haikuwebkit/Source/WebCore/Headers.cmake

1793 lines
60 KiB
CMake
Raw Permalink Normal View History

[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
set(WebCore_PRIVATE_FRAMEWORK_HEADERS
Remove code behind ENABLE(MEDIA_SESSION), no ports enable it https://bugs.webkit.org/show_bug.cgi?id=216831 Reviewed by Alex Christensen. .: * Source/cmake/OptionsFTW.cmake: * Source/cmake/WebKitFeatures.cmake: Remove option to build with MEDIA_SESSION, no one was doing it. Source/WebCore: * CMakeLists.txt: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Remove media session related files. * Modules/airplay/PlaybackTargetClientContextIdentifier.h: Added. * Modules/airplay/WebMediaSessionManager.cpp: Added. * Modules/airplay/WebMediaSessionManager.h: Added. * Modules/airplay/WebMediaSessionManagerClient.h: Added. * Modules/mediasession: Removed. * platform/mediasession: Removed. Delete Modules/mediasession and platform/mediasession. Move files that were actually used for the WIRELESS_PLAYBACK_TARGET feature to Modules/airplay where other parts of that feature are implemented. * dom/Document.cpp: * dom/Document.h: * dom/EventTargetFactory.in: * html/HTMLMediaElement.cpp: * html/HTMLMediaElement.h: * page/ChromeClient.h: * page/Page.cpp: * page/Page.h: * testing/Internals.cpp: * testing/Internals.h: * testing/Internals.idl: Remove all code inside ENABLE(MEDIA_SESSION). Source/WebKit: Removes all code in ENABLE(MEDIA_SESSION) and all media session related SPI. It was never enabled and nothing ever adopted it. * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: Remove media session related files. * Shared/API/APIObject.h: * Shared/API/c/WKBase.h: * Shared/WebCoreArgumentCoders.cpp: * Shared/WebCoreArgumentCoders.h: * Shared/WebMediaSessionMetadata.cpp: Removed. * Shared/WebMediaSessionMetadata.h: Removed. * UIProcess/API/APIUIClient.h: * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKContext.cpp: * UIProcess/API/C/WKContext.h: * UIProcess/API/C/WKMediaSessionFocusManager.cpp: Removed. * UIProcess/API/C/WKMediaSessionFocusManager.h: Removed. * UIProcess/API/C/WKMediaSessionMetadata.cpp: Removed. * UIProcess/API/C/WKMediaSessionMetadata.h: Removed. * UIProcess/API/C/WKPage.cpp: * UIProcess/API/C/WKPagePrivate.h: * UIProcess/API/C/WKPageUIClient.h: * UIProcess/WebMediaSessionFocusManager.cpp: Removed. * UIProcess/WebMediaSessionFocusManager.h: Removed. * UIProcess/WebMediaSessionFocusManagerClient.cpp: Removed. * UIProcess/WebMediaSessionFocusManagerClient.h: Removed. * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessPool.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Remove all code in ENABLE(MEDIA_SESSION). Tools: * Scripts/webkitperl/FeatureList.pm: Remove support for building with MEDIA_SESSION enabled. * WebKitTestRunner/TestController.cpp: (WTR::TestController::createOtherPage): (WTR::TestController::createWebViewWithOptions): Update names to new 'unused' naming. LayoutTests: Remove always skipped Media Session tests. * TestExpectations: * gpu-process/TestExpectations: * media/session: Removed. Canonical link: https://commits.webkit.org/230003@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-02 16:39:47 +00:00
Modules/airplay/PlaybackTargetClientContextIdentifier.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/applepay/ApplePaySessionPaymentRequest.h
Modules/applepay/Payment.h
Modules/applepay/PaymentAuthorizationStatus.h
Modules/applepay/PaymentContact.h
Modules/applepay/PaymentCoordinator.h
Modules/applepay/PaymentCoordinatorClient.h
Modules/applepay/PaymentHeaders.h
Modules/applepay/PaymentMerchantSession.h
Modules/applepay/PaymentMethod.h
Modules/applicationmanifest/ApplicationManifest.h
Modules/applicationmanifest/ApplicationManifestParser.h
Modules/cache/CacheQueryOptions.h
Modules/cache/CacheStorageConnection.h
Modules/cache/DOMCacheEngine.h
Filter DOMCache records in network process to reduce the number of records being sent to WebProcess https://bugs.webkit.org/show_bug.cgi?id=209469 <rdar://problem/55207565> Reviewed by Alex Christensen. Source/WebCore: Instead of retrieving all records and filtering them in WebProcess, WebProcess is now sending filtering options to NetworkProcess. In case of keys, ask network process to not send back any response. Covered by existing tests. * Headers.cmake: * Modules/cache/CacheStorageConnection.h: * Modules/cache/DOMCache.cpp: (WebCore::DOMCache::doMatch): (WebCore::DOMCache::matchAll): (WebCore::DOMCache::keys): (WebCore::DOMCache::queryCache): (WebCore::DOMCache::retrieveRecords): Deleted. (WebCore::DOMCache::queryCacheWithTargetStorage): Deleted. * Modules/cache/DOMCache.h: * Modules/cache/WorkerCacheStorageConnection.cpp: (WebCore::WorkerCacheStorageConnection::retrieveRecords): * Modules/cache/WorkerCacheStorageConnection.h: * WebCore.xcodeproj/project.pbxproj: * page/CacheStorageProvider.h: Source/WebKit: Receive new retrieve record options and make use of them to filter the records sent back to the WebProcess. This includes filtering the records for a given requests. This includes removing responses in case the request is made to gather all requests for Cache.keys(). * NetworkProcess/cache/CacheStorageEngine.cpp: (WebKit::CacheStorage::Engine::retrieveRecords): * NetworkProcess/cache/CacheStorageEngine.h: * NetworkProcess/cache/CacheStorageEngineCache.cpp: (WebKit::CacheStorage::Cache::retrieveRecords): * NetworkProcess/cache/CacheStorageEngineCache.h: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: (WebKit::CacheStorageEngineConnection::retrieveRecords): * NetworkProcess/cache/CacheStorageEngineConnection.h: * NetworkProcess/cache/CacheStorageEngineConnection.messages.in: * WebProcess/Cache/WebCacheStorageConnection.cpp: (WebKit::WebCacheStorageConnection::retrieveRecords): * WebProcess/Cache/WebCacheStorageConnection.h: Canonical link: https://commits.webkit.org/222586@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-27 16:11:20 +00:00
Modules/cache/RetrieveRecordsOptions.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
[Contact Picker API] Add skeleton implementation of ContactsManager.select() https://bugs.webkit.org/show_bug.cgi?id=218050 <rdar://problem/69862186> Reviewed by Devin Rousso. Source/WebCore: ContactsManager.select() is the interface that allows clients to present a contact picker. The method should immediately reject when called from a subframe, when called outside user-interaction and when called while a contact picker is already being displayed. Furthermore, the promise is rejected when the supplied properties are empty or invalid. After the conditions necessary for the UI to be presented are verified, ContactsManager.select() calls into the page's Chrome to display the picker. The UI implementation on macOS and iOS will be done in forthcoming patches. See https://wicg.github.io/contact-api/spec/#contacts-manager-select for more information. Tests: contact-picker/contacts-select-invalid-properties-and-options.html contact-picker/contacts-select-requires-user-gesture.html contact-picker/contacts-select-subframe.html * Headers.cmake: * Modules/contact-picker/ContactInfo.h: Added encoder and decoder for IPC. (WebCore::ContactInfo::encode const): (WebCore::ContactInfo::decode): * Modules/contact-picker/ContactInfo.idl: * Modules/contact-picker/ContactProperty.h: * Modules/contact-picker/ContactsManager.cpp: (WebCore::ContactsManager::frame const): (WebCore::ContactsManager::select): * Modules/contact-picker/ContactsManager.h: * Modules/contact-picker/ContactsRequestData.h: Added. ContactsRequestData encapsulates the information required to display a picker UI. This includes the requested properties, the URL of the presenting site, and whether multiple contact selection should be allowed. (WebCore::ContactsRequestData::encode const): (WebCore::ContactsRequestData::decode): * WebCore.xcodeproj/project.pbxproj: * page/Chrome.cpp: (WebCore::Chrome::showContactPicker): * page/Chrome.h: * page/ChromeClient.h: (WebCore::ChromeClient::showContactPicker): Source/WebKit: Added the necessary plumbing in order for the UIProcess to display a contact picker after a call to ContactsManager.select() is made. * UIProcess/PageClient.h: (WebKit::PageClient::showContactPicker): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::showContactPicker): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::showContactPicker): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::showContactPicker): * WebProcess/WebPage/WebPage.h: LayoutTests: Added tests for failure cases of the API. Note that success cases are untested since no platforms currently display a picker UI, and the specification states that the promise should fail in this case. The success test cases will be added once the UI is implemented for iOS. * contact-picker/contacts-select-invalid-properties-and-options-expected.txt: Added. * contact-picker/contacts-select-invalid-properties-and-options.html: Added. * contact-picker/contacts-select-requires-user-gesture-expected.txt: Added. * contact-picker/contacts-select-requires-user-gesture.html: Added. * contact-picker/contacts-select-subframe-expected.txt: Added. * contact-picker/contacts-select-subframe.html: Added. Canonical link: https://commits.webkit.org/230819@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-23 01:32:09 +00:00
Modules/contact-picker/ContactInfo.h
Modules/contact-picker/ContactProperty.h
Modules/contact-picker/ContactsRequestData.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/encryptedmedia/CDMClient.h
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
Modules/encryptedmedia/MediaKeySystemClient.h
Modules/encryptedmedia/MediaKeySystemController.h
Modules/encryptedmedia/MediaKeySystemRequest.h
Use MediaKeySystemRequestIdentifier, rather than mysterious uint64_t values, in WebKit https://bugs.webkit.org/show_bug.cgi?id=229310 Reviewed by Youenn Fablet. WebCore already had an ObjectIdentifer<> type for media system key requests, MediaKeySystemRequestIdentifier. Use it in the WebKit layer. * Scripts/webkit/messages.py: (types_that_cannot_be_forward_declared): (headers_for_type): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp: (WebKit::MediaKeySystemPermissionRequestManagerProxy::denyRequest): (WebKit::MediaKeySystemPermissionRequestManagerProxy::grantRequest): (WebKit::MediaKeySystemPermissionRequestManagerProxy::createRequestForFrame): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.h: * UIProcess/MediaKeySystemPermissionRequestProxy.cpp: (WebKit::MediaKeySystemPermissionRequestProxy::MediaKeySystemPermissionRequestProxy): * UIProcess/MediaKeySystemPermissionRequestProxy.h: (WebKit::MediaKeySystemPermissionRequestProxy::create): (WebKit::MediaKeySystemPermissionRequestProxy::mediaKeySystemID const): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestMediaKeySystemPermissionForFrame): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.cpp: (WebKit::MediaKeySystemPermissionRequestManager::sendMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::mediaKeySystemWasGranted): (WebKit::MediaKeySystemPermissionRequestManager::mediaKeySystemWasDenied): * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mediaKeySystemWasGranted): (WebKit::WebPage::mediaKeySystemWasDenied): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Canonical link: https://commits.webkit.org/240791@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-21 18:15:15 +00:00
Modules/encryptedmedia/MediaKeySystemRequestIdentifier.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/fetch/FetchBodyConsumer.h
Modules/fetch/FetchBodySource.h
JS Modules in Workers https://bugs.webkit.org/show_bug.cgi?id=164860 Reviewed by Saam Barati. LayoutTests/imported/w3c: Some of worklet failures in WPT is because, 1. Previously, worklet does not support module. These tests are passing incorrectly when modules are not supported. Now, modules are supported, and some edge features are missing, so start failing 2. WPT is using www1.localhost in some tests (CSP tests), and this is not supported in WebKit's WPT testing. So failing incorrectly. * web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.any.worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-workerglobalscope-onerror-module-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker-importScripts-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker.sub-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-nothrow-worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-2-import-worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-3-dynamic-worker-expected.txt: * web-platform-tests/service-workers/service-worker/import-module-scripts.https-expected.txt: * web-platform-tests/workers/baseurl/alpha/import-in-moduleworker-expected.txt: * web-platform-tests/workers/baseurl/alpha/importScripts-in-worker-expected.txt: * web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker-expected.txt: * web-platform-tests/workers/baseurl/alpha/xhr-in-worker-expected.txt: * web-platform-tests/workers/constructors/Worker/same-origin-expected.txt: * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-expected.txt: * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-module-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-csp-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-failure-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-meta-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-meta.html: * web-platform-tests/workers/modules/dedicated-worker-import-referrer-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import.any-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-options-type-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-parse-error-failure-expected.txt: * web-platform-tests/workers/name-property-expected.txt: * web-platform-tests/worklets/audio-worklet-credentials.https-expected.txt: * web-platform-tests/worklets/audio-worklet-csp.https-expected.txt: * web-platform-tests/worklets/audio-worklet-import.https-expected.txt: * web-platform-tests/worklets/audio-worklet-referrer.https-expected.txt: * web-platform-tests/xhr/open-url-redirected-worker-origin-expected.txt: Source/JavaScriptCore: Add error information to extract this in WebCore's module loader. Currently, we are using Promise pipeline, and this makes it a bit difficult to extract error information. This error information attached in this patch allows us to extract SyntaxError in WebCore, and throwing JS SyntaxError instead of AbortError. We are planning to update our module pipieline not using Promises in the future. The current design derived from the original module loader pipeline where using Promises is critical. But now, that proposal was abandoned, so we can just simplify the module loader. * runtime/AggregateError.cpp: (JSC::AggregateError::AggregateError): * runtime/Error.cpp: (JSC::createError): (JSC::createEvalError): (JSC::createRangeError): (JSC::createReferenceError): (JSC::createSyntaxError): (JSC::createTypeError): (JSC::createURIError): (JSC::createGetterTypeError): (JSC::throwSyntaxError): * runtime/Error.h: * runtime/ErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * runtime/ErrorInstance.cpp: (JSC::ErrorInstance::ErrorInstance): (JSC::ErrorInstance::create): (JSC::ErrorInstance::sanitizedMessageString): (JSC::ErrorInstance::sanitizedNameString): (JSC::ErrorInstance::sanitizedToString): * runtime/ErrorInstance.h: (JSC::ErrorInstance::create): (JSC::ErrorInstance::errorType const): * runtime/JSGlobalObjectFunctions.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * runtime/NativeErrorConstructor.cpp: (JSC::NativeErrorConstructor<errorType>::constructImpl): (JSC::NativeErrorConstructor<errorType>::callImpl): * runtime/NullSetterFunction.cpp: (JSC::NullSetterFunctionInternal::JSC_DEFINE_HOST_FUNCTION): * wasm/js/JSWebAssemblyCompileError.cpp: (JSC::JSWebAssemblyCompileError::JSWebAssemblyCompileError): * wasm/js/JSWebAssemblyLinkError.cpp: (JSC::JSWebAssemblyLinkError::JSWebAssemblyLinkError): * wasm/js/JSWebAssemblyRuntimeError.cpp: (JSC::JSWebAssemblyRuntimeError::JSWebAssemblyRuntimeError): * wasm/js/WebAssemblyCompileErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * wasm/js/WebAssemblyLinkErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * wasm/js/WebAssemblyRuntimeErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): Source/WebCore: This patch implements JS modules in Workers and Worklets. We are not supporting modules in ServiceWorkers' initialization yet. But service-worker can import modules via JS `import()`. The worker can be executed as a module if we pass, `type: "module"` to worker options. Worklet is executed as modules by default. 1. In Worker, we first fetch the initial code. And then, analyze the dependencies and load subsequent modules. We iterate run-loop to load all the dependent modules in the module loader. At that time, we annotate run-loop tasks with special taskMode to iterate tasks with this taskMode. This prevents us from discarding different tasks in this run-loop driving phase. (e.g. postMessage can be called from the main thread while loading module graph, in that case, we should not discard this task.) 2. In Worklet, we just request module loading to ScriptModuleLoader, and run it after loading module graph. This is OK since worklet thread is already running. So we can just request modules and worklet thread automatically drives module loading via run-loop. * Headers.cmake: * Modules/webaudio/AudioWorkletGlobalScope.h: (WebCore::AudioWorkletGlobalScope::currentFrame const): Deleted. (WebCore::AudioWorkletGlobalScope::sampleRate const): Deleted. (WebCore::AudioWorkletGlobalScope::currentTime const): Deleted. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/CachedModuleScriptLoader.cpp: (WebCore::CachedModuleScriptLoader::create): (WebCore::CachedModuleScriptLoader::CachedModuleScriptLoader): (WebCore::CachedModuleScriptLoader::load): (WebCore::CachedModuleScriptLoader::notifyFinished): * bindings/js/CachedModuleScriptLoader.h: * bindings/js/CachedScriptFetcher.cpp: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::retrieveErrorMessageWithoutName): (WebCore::createDOMException): * bindings/js/JSDOMExceptionHandling.h: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::scriptModuleLoader): (WebCore::JSDOMGlobalObject::moduleLoaderResolve): (WebCore::JSDOMGlobalObject::moduleLoaderFetch): (WebCore::JSDOMGlobalObject::moduleLoaderEvaluate): (WebCore::JSDOMGlobalObject::moduleLoaderImportModule): (WebCore::JSDOMGlobalObject::moduleLoaderCreateImportMetaProperties): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::moduleLoaderResolve): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderFetch): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderEvaluate): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderImportModule): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderCreateImportMetaProperties): Deleted. * bindings/js/JSDOMWindowBase.h: * bindings/js/JSWorkerGlobalScopeBase.cpp: * bindings/js/JSWorkletGlobalScopeBase.cpp: * bindings/js/ModuleScriptLoader.h: Copied from Source/WebCore/dom/ModuleFetchParameters.h. (WebCore::ModuleScriptLoader::clearClient): (WebCore::ModuleScriptLoader::scriptFetcher): (WebCore::ModuleScriptLoader::parameters): (WebCore::ModuleScriptLoader::ModuleScriptLoader): * bindings/js/ModuleScriptLoaderClient.h: Renamed from Source/WebCore/bindings/js/CachedModuleScriptLoaderClient.h. * bindings/js/ScriptModuleLoader.cpp: (WebCore::ScriptModuleLoader::ScriptModuleLoader): (WebCore::resolveModuleSpecifier): (WebCore::ScriptModuleLoader::resolve): (WebCore::ScriptModuleLoader::fetch): (WebCore::ScriptModuleLoader::moduleURL): (WebCore::ScriptModuleLoader::responseURLFromRequestURL): (WebCore::ScriptModuleLoader::evaluate): (WebCore::ScriptModuleLoader::importModule): (WebCore::ScriptModuleLoader::notifyFinished): * bindings/js/ScriptModuleLoader.h: * bindings/js/ScriptSourceCode.h: (WebCore::ScriptSourceCode::ScriptSourceCode): * bindings/js/WorkerModuleScriptLoader.cpp: Added. (WebCore::WorkerModuleScriptLoader::create): (WebCore::WorkerModuleScriptLoader::WorkerModuleScriptLoader): (WebCore::WorkerModuleScriptLoader::~WorkerModuleScriptLoader): (WebCore::WorkerModuleScriptLoader::load): (WebCore::WorkerModuleScriptLoader::referrerPolicy): (WebCore::WorkerModuleScriptLoader::notifyFinished): (WebCore::WorkerModuleScriptLoader::taskMode): * bindings/js/WorkerModuleScriptLoader.h: Copied from Source/WebCore/dom/ModuleFetchParameters.h. * bindings/js/WorkerScriptFetcher.h: Added. * dom/Document.cpp: * dom/ExceptionCode.h: * dom/LoadableModuleScript.cpp: (WebCore::LoadableModuleScript::LoadableModuleScript): (WebCore::LoadableModuleScript::load): Deleted. * dom/LoadableModuleScript.h: * dom/ModuleFetchParameters.h: (WebCore::ModuleFetchParameters::create): (WebCore::ModuleFetchParameters::isTopLevelModule const): (WebCore::ModuleFetchParameters::ModuleFetchParameters): * dom/ScriptElement.cpp: (WebCore::ScriptElement::requestModuleScript): * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoader::create): * loader/ThreadableLoader.h: (WebCore::ThreadableLoader::create): * workers/DedicatedWorkerGlobalScope.h: * workers/Worker.cpp: (WebCore::Worker::Worker): (WebCore::Worker::create): (WebCore::Worker::notifyFinished): * workers/Worker.h: * workers/Worker.idl: * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): (WebCore::WorkerGlobalScope::importScripts): * workers/WorkerGlobalScope.h: (WebCore::WorkerGlobalScope::credentials const): * workers/WorkerGlobalScopeProxy.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerGlobalScope): * workers/WorkerMessagingProxy.h: * workers/WorkerOrWorkletGlobalScope.cpp: (WebCore::WorkerOrWorkletGlobalScope::WorkerOrWorkletGlobalScope): * workers/WorkerOrWorkletGlobalScope.h: (WebCore::WorkerOrWorkletGlobalScope::moduleLoader): * workers/WorkerOrWorkletScriptController.cpp: (WebCore::jsValueToModuleKey): (WebCore::WorkerOrWorkletScriptController::evaluateModule): (WebCore::WorkerOrWorkletScriptController::loadModuleSynchronously): (WebCore::WorkerOrWorkletScriptController::linkAndEvaluateModule): (WebCore::WorkerOrWorkletScriptController::loadAndEvaluateModule): * workers/WorkerOrWorkletScriptController.h: * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::loadAsynchronously): (WebCore::WorkerScriptLoader::didReceiveResponse): * workers/WorkerScriptLoader.h: (WebCore::WorkerScriptLoader::responseSource const): (WebCore::WorkerScriptLoader::isRedirected const): * workers/WorkerThread.cpp: (WebCore::WorkerParameters::isolatedCopy const): (WebCore::WorkerThread::evaluateScriptIfNecessary): * workers/WorkerThread.h: * workers/WorkerType.h: * workers/service/ServiceWorkerContainer.h: * workers/service/ServiceWorkerGlobalScope.h: * workers/service/ServiceWorkerJob.cpp: (WebCore::ServiceWorkerJob::fetchScriptWithContext): * workers/service/ServiceWorkerRegistrationOptions.h: * workers/service/context/ServiceWorkerThread.cpp: (WebCore::ServiceWorkerThread::ServiceWorkerThread): * workers/service/server/SWServerWorker.h: * worklets/PaintWorkletGlobalScope.h: (WebCore::PaintWorkletGlobalScope::paintDefinitionMap): Deleted. (WebCore::PaintWorkletGlobalScope::paintDefinitionLock): Deleted. (WebCore::PaintWorkletGlobalScope::~PaintWorkletGlobalScope): Deleted. * worklets/WorkletGlobalScope.cpp: (WebCore::WorkletGlobalScope::fetchAndInvokeScript): (WebCore::WorkletGlobalScope::processNextScriptFetchJobIfNeeded): Deleted. (WebCore::WorkletGlobalScope::didReceiveResponse): Deleted. (WebCore::WorkletGlobalScope::notifyFinished): Deleted. (WebCore::WorkletGlobalScope::didCompleteScriptFetchJob): Deleted. * worklets/WorkletGlobalScope.h: LayoutTests: * TestExpectations: * http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt: * http/tests/subresource-integrity/sri-module-expected.txt: * webaudio/audioworklet-addModule-failure-expected.txt: * webaudio/worklet-crash-expected.txt: Canonical link: https://commits.webkit.org/234389@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-20 20:28:27 +00:00
Modules/fetch/FetchRequestCredentials.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/fetch/FetchHeaders.h
Modules/fetch/FetchIdentifier.h
Modules/fetch/FetchLoader.h
Modules/fetch/FetchLoaderClient.h
Modules/geolocation/Geolocation.h
Modules/geolocation/GeolocationClient.h
Modules/geolocation/GeolocationController.h
[geolocation] Rename interfaces and remove [NoInterfaceObject] https://bugs.webkit.org/show_bug.cgi?id=200885 Reviewed by Alex Christensen. Source/WebCore: Rename Geolocation interfaces and expose them on the global Window object to match the latest specification: - https://w3c.github.io/geolocation-api/#api_description Test: fast/dom/Geolocation/exposed-geolocation-interfaces.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Modules/geolocation/GeoNotifier.cpp: (WebCore::GeoNotifier::setFatalError): (WebCore::GeoNotifier::runSuccessCallback): (WebCore::GeoNotifier::runErrorCallback): (WebCore::GeoNotifier::timerFired): * Modules/geolocation/GeoNotifier.h: * Modules/geolocation/Geolocation.cpp: (WebCore::createGeolocationPosition): (WebCore::createGeolocationPositionError): (WebCore::Geolocation::lastPosition): (WebCore::Geolocation::startRequest): (WebCore::Geolocation::requestUsesCachedPosition): (WebCore::Geolocation::makeCachedPositionCallbacks): (WebCore::Geolocation::haveSuitableCachedPosition): (WebCore::Geolocation::setIsAllowed): (WebCore::Geolocation::sendError): (WebCore::Geolocation::sendPosition): (WebCore::Geolocation::cancelRequests): (WebCore::Geolocation::handleError): (WebCore::Geolocation::makeSuccessCallbacks): (WebCore::Geolocation::positionChanged): (WebCore::Geolocation::setError): (WebCore::Geolocation::handlePendingPermissionNotifiers): * Modules/geolocation/Geolocation.h: * Modules/geolocation/Geolocation.idl: * Modules/geolocation/GeolocationClient.h: * Modules/geolocation/GeolocationController.cpp: (WebCore::GeolocationController::positionChanged): (WebCore::GeolocationController::lastPosition): * Modules/geolocation/GeolocationController.h: * Modules/geolocation/GeolocationCoordinates.cpp: Renamed from Source/WebCore/Modules/geolocation/Coordinates.cpp. (WebCore::GeolocationCoordinates::GeolocationCoordinates): * Modules/geolocation/GeolocationCoordinates.h: Renamed from Source/WebCore/Modules/geolocation/Coordinates.h. (WebCore::GeolocationCoordinates::create): (WebCore::GeolocationCoordinates::isolatedCopy const): * Modules/geolocation/GeolocationCoordinates.idl: Renamed from Source/WebCore/Modules/geolocation/Coordinates.idl. * Modules/geolocation/GeolocationPosition.h: (WebCore::GeolocationPosition::create): (WebCore::GeolocationPosition::isolatedCopy const): (WebCore::GeolocationPosition::timestamp const): (WebCore::GeolocationPosition::coords const): (WebCore::GeolocationPosition::GeolocationPosition): * Modules/geolocation/GeolocationPosition.idl: Renamed from Source/WebCore/Modules/geolocation/Geoposition.idl. * Modules/geolocation/GeolocationPositionData.h: Copied from Source/WebCore/Modules/geolocation/GeolocationPosition.h. (WebCore::GeolocationPositionData::GeolocationPositionData): (WebCore::GeolocationPositionData::encode const): (WebCore::GeolocationPositionData::decode): (WebCore::GeolocationPositionData::isValid const): * Modules/geolocation/GeolocationPositionError.h: Renamed from Source/WebCore/Modules/geolocation/PositionError.h. (WebCore::GeolocationPositionError::create): (WebCore::GeolocationPositionError::GeolocationPositionError): * Modules/geolocation/GeolocationPositionError.idl: Renamed from Source/WebCore/Modules/geolocation/PositionError.idl. * Modules/geolocation/Geoposition.h: Removed. * Modules/geolocation/PositionCallback.h: * Modules/geolocation/PositionCallback.idl: * Modules/geolocation/PositionErrorCallback.h: * Modules/geolocation/PositionErrorCallback.idl: * Modules/geolocation/ios/GeolocationPositionDataIOS.mm: Renamed from Source/WebCore/Modules/geolocation/ios/GeolocationPositionIOS.mm. (WebCore::GeolocationPositionData::GeolocationPositionData): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/mock/GeolocationClientMock.cpp: (WebCore::GeolocationClientMock::setPosition): (WebCore::GeolocationClientMock::lastPosition): * platform/mock/GeolocationClientMock.h: Source/WebKit: * Shared/WebGeolocationPosition.cpp: (WebKit::WebGeolocationPosition::create): * Shared/WebGeolocationPosition.h: (WebKit::WebGeolocationPosition::corePosition const): (WebKit::WebGeolocationPosition::WebGeolocationPosition): * UIProcess/API/C/WKGeolocationPosition.cpp: (WKGeolocationPositionCreate_c): * UIProcess/WebGeolocationManagerProxy.h: (WebKit::WebGeolocationManagerProxy::lastPosition const): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKLegacyCoreLocationProvider positionChanged:]): * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::didChangePosition): * WebProcess/Geolocation/WebGeolocationManager.h: * WebProcess/Geolocation/WebGeolocationManager.messages.in: * WebProcess/WebCoreSupport/WebGeolocationClient.cpp: (WebKit::WebGeolocationClient::lastPosition): * WebProcess/WebCoreSupport/WebGeolocationClient.h: Source/WebKitLegacy/ios: * Misc/WebGeolocationCoreLocationProvider.h: * Misc/WebGeolocationCoreLocationProvider.mm: (-[WebGeolocationCoreLocationProvider sendLocation:]): * Misc/WebGeolocationProviderIOS.mm: (-[_WebCoreLocationUpdateThreadingProxy positionChanged:]): Source/WebKitLegacy/mac: * WebCoreSupport/WebGeolocationClient.h: * WebCoreSupport/WebGeolocationClient.mm: (WebGeolocationClient::lastPosition): * WebView/WebGeolocationPosition.mm: (-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]): (core): (-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]): (-[WebGeolocationPosition initWithGeolocationPosition:]): * WebView/WebGeolocationPositionInternal.h: Tools: * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setMockGeolocationPosition): LayoutTests: Add layout test coverage. * fast/dom/Geolocation/exposed-geolocation-interfaces-expected.txt: Added. * fast/dom/Geolocation/exposed-geolocation-interfaces.html: Added. * fast/dom/Geolocation/position-string-expected.txt: * fast/dom/Geolocation/position-string.html: Canonical link: https://commits.webkit.org/214790@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-23 20:58:49 +00:00
Modules/geolocation/GeolocationCoordinates.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/geolocation/GeolocationError.h
Modules/geolocation/GeolocationPosition.h
[geolocation] Rename interfaces and remove [NoInterfaceObject] https://bugs.webkit.org/show_bug.cgi?id=200885 Reviewed by Alex Christensen. Source/WebCore: Rename Geolocation interfaces and expose them on the global Window object to match the latest specification: - https://w3c.github.io/geolocation-api/#api_description Test: fast/dom/Geolocation/exposed-geolocation-interfaces.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Modules/geolocation/GeoNotifier.cpp: (WebCore::GeoNotifier::setFatalError): (WebCore::GeoNotifier::runSuccessCallback): (WebCore::GeoNotifier::runErrorCallback): (WebCore::GeoNotifier::timerFired): * Modules/geolocation/GeoNotifier.h: * Modules/geolocation/Geolocation.cpp: (WebCore::createGeolocationPosition): (WebCore::createGeolocationPositionError): (WebCore::Geolocation::lastPosition): (WebCore::Geolocation::startRequest): (WebCore::Geolocation::requestUsesCachedPosition): (WebCore::Geolocation::makeCachedPositionCallbacks): (WebCore::Geolocation::haveSuitableCachedPosition): (WebCore::Geolocation::setIsAllowed): (WebCore::Geolocation::sendError): (WebCore::Geolocation::sendPosition): (WebCore::Geolocation::cancelRequests): (WebCore::Geolocation::handleError): (WebCore::Geolocation::makeSuccessCallbacks): (WebCore::Geolocation::positionChanged): (WebCore::Geolocation::setError): (WebCore::Geolocation::handlePendingPermissionNotifiers): * Modules/geolocation/Geolocation.h: * Modules/geolocation/Geolocation.idl: * Modules/geolocation/GeolocationClient.h: * Modules/geolocation/GeolocationController.cpp: (WebCore::GeolocationController::positionChanged): (WebCore::GeolocationController::lastPosition): * Modules/geolocation/GeolocationController.h: * Modules/geolocation/GeolocationCoordinates.cpp: Renamed from Source/WebCore/Modules/geolocation/Coordinates.cpp. (WebCore::GeolocationCoordinates::GeolocationCoordinates): * Modules/geolocation/GeolocationCoordinates.h: Renamed from Source/WebCore/Modules/geolocation/Coordinates.h. (WebCore::GeolocationCoordinates::create): (WebCore::GeolocationCoordinates::isolatedCopy const): * Modules/geolocation/GeolocationCoordinates.idl: Renamed from Source/WebCore/Modules/geolocation/Coordinates.idl. * Modules/geolocation/GeolocationPosition.h: (WebCore::GeolocationPosition::create): (WebCore::GeolocationPosition::isolatedCopy const): (WebCore::GeolocationPosition::timestamp const): (WebCore::GeolocationPosition::coords const): (WebCore::GeolocationPosition::GeolocationPosition): * Modules/geolocation/GeolocationPosition.idl: Renamed from Source/WebCore/Modules/geolocation/Geoposition.idl. * Modules/geolocation/GeolocationPositionData.h: Copied from Source/WebCore/Modules/geolocation/GeolocationPosition.h. (WebCore::GeolocationPositionData::GeolocationPositionData): (WebCore::GeolocationPositionData::encode const): (WebCore::GeolocationPositionData::decode): (WebCore::GeolocationPositionData::isValid const): * Modules/geolocation/GeolocationPositionError.h: Renamed from Source/WebCore/Modules/geolocation/PositionError.h. (WebCore::GeolocationPositionError::create): (WebCore::GeolocationPositionError::GeolocationPositionError): * Modules/geolocation/GeolocationPositionError.idl: Renamed from Source/WebCore/Modules/geolocation/PositionError.idl. * Modules/geolocation/Geoposition.h: Removed. * Modules/geolocation/PositionCallback.h: * Modules/geolocation/PositionCallback.idl: * Modules/geolocation/PositionErrorCallback.h: * Modules/geolocation/PositionErrorCallback.idl: * Modules/geolocation/ios/GeolocationPositionDataIOS.mm: Renamed from Source/WebCore/Modules/geolocation/ios/GeolocationPositionIOS.mm. (WebCore::GeolocationPositionData::GeolocationPositionData): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/mock/GeolocationClientMock.cpp: (WebCore::GeolocationClientMock::setPosition): (WebCore::GeolocationClientMock::lastPosition): * platform/mock/GeolocationClientMock.h: Source/WebKit: * Shared/WebGeolocationPosition.cpp: (WebKit::WebGeolocationPosition::create): * Shared/WebGeolocationPosition.h: (WebKit::WebGeolocationPosition::corePosition const): (WebKit::WebGeolocationPosition::WebGeolocationPosition): * UIProcess/API/C/WKGeolocationPosition.cpp: (WKGeolocationPositionCreate_c): * UIProcess/WebGeolocationManagerProxy.h: (WebKit::WebGeolocationManagerProxy::lastPosition const): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKLegacyCoreLocationProvider positionChanged:]): * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::didChangePosition): * WebProcess/Geolocation/WebGeolocationManager.h: * WebProcess/Geolocation/WebGeolocationManager.messages.in: * WebProcess/WebCoreSupport/WebGeolocationClient.cpp: (WebKit::WebGeolocationClient::lastPosition): * WebProcess/WebCoreSupport/WebGeolocationClient.h: Source/WebKitLegacy/ios: * Misc/WebGeolocationCoreLocationProvider.h: * Misc/WebGeolocationCoreLocationProvider.mm: (-[WebGeolocationCoreLocationProvider sendLocation:]): * Misc/WebGeolocationProviderIOS.mm: (-[_WebCoreLocationUpdateThreadingProxy positionChanged:]): Source/WebKitLegacy/mac: * WebCoreSupport/WebGeolocationClient.h: * WebCoreSupport/WebGeolocationClient.mm: (WebGeolocationClient::lastPosition): * WebView/WebGeolocationPosition.mm: (-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]): (core): (-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]): (-[WebGeolocationPosition initWithGeolocationPosition:]): * WebView/WebGeolocationPositionInternal.h: Tools: * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setMockGeolocationPosition): LayoutTests: Add layout test coverage. * fast/dom/Geolocation/exposed-geolocation-interfaces-expected.txt: Added. * fast/dom/Geolocation/exposed-geolocation-interfaces.html: Added. * fast/dom/Geolocation/position-string-expected.txt: * fast/dom/Geolocation/position-string.html: Canonical link: https://commits.webkit.org/214790@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-23 20:58:49 +00:00
Modules/geolocation/GeolocationPositionData.h
Modules/geolocation/GeolocationPositionError.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/geolocation/PositionCallback.h
Modules/geolocation/PositionErrorCallback.h
Modules/geolocation/PositionOptions.h
Change App Highlights API to operate in terms of a single serialized highlight at a time https://bugs.webkit.org/show_bug.cgi?id=221802 Reviewed by Tim Horton. Source/WebCore: Pipe through additional data needed for display, and update to allow for more information to be added more easily. * Modules/highlight/AppHighlightListData.cpp: Removed. * Modules/highlight/AppHighlightRangeData.h: Renamed from Source/WebCore/Modules/highlight/AppHighlightListData.h. * Modules/highlight/AppHighlightStorage.cpp: (WebCore::createAppHighlightRangeData): (WebCore::AppHighlightStorage::storeAppHighlight): (WebCore::AppHighlightStorage::restoreAppHighlight): (WebCore::AppHighlightStorage::updateAppHighlightsStorage): Deleted. (WebCore::AppHighlightStorage::restoreAppHighlights): Deleted. * Modules/highlight/AppHighlightStorage.h: * Modules/highlight/HighlightRegister.cpp: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * loader/EmptyClients.cpp: (WebCore::EmptyChromeClient::storeAppHighlight const): (WebCore::EmptyChromeClient::updateAppHighlightsStorage const): Deleted. * loader/EmptyClients.h: * page/Chrome.cpp: (WebCore::Chrome::storeAppHighlight const): (WebCore::Chrome::updateAppHighlightsStorage const): Deleted. * page/Chrome.h: * page/ChromeClient.h: Source/WebKit: Pipe through additional data needed for display, and update to allow for more information to be added more easily. * Shared/CreateNewGroupForHighlight.h: Removed. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _storeAppHighlight:]): (-[WKWebView _restoreAppHighlights:]): (-[WKWebView _updateAppHighlightsStorage:]): Deleted. * UIProcess/API/Cocoa/WKWebViewInternal.h: * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/Cocoa/PageClientImplCocoa.h: * UIProcess/Cocoa/PageClientImplCocoa.mm: (WebKit::PageClientImplCocoa::storeAppHighlight): (WebKit::PageClientImplCocoa::updateAppHighlightsStorage): Deleted. * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::createAppHighlightInSelectedRange): (WebKit::WebPageProxy::restoreAppHighlights): * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected): (WebKit::WebPageProxy::storeAppHighlight): (WebKit::WebPageProxy::updateAppHighlightsStorage): Deleted. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView createHighlightInCurrentGroupWithRange:]): (-[WKContentView createHighlightInNewGroupWithRange:]): * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::storeAppHighlight const): (WebKit::WebChromeClient::updateAppHighlightsStorage const): Deleted. * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createAppHighlightInSelectedRange): (WebKit::WebPage::restoreAppHighlights): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Source/WebKitLegacy/mac: * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::storeAppHighlight const): (WebChromeClient::updateAppHighlightsStorage const): Deleted. Canonical link: https://commits.webkit.org/234158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-16 21:44:30 +00:00
Modules/highlight/AppHighlight.h
Create and draw app highlights https://bugs.webkit.org/show_bug.cgi?id=219365 Reviewed by Wenson Hsieh. Source/WebCore: Create a separate highlight register for app highlights so that there is a clear separation with no risk of web content accessing the wrong highlights. Extend rendering to include the app highlights with the current default settings. * Modules/highlight/Highlight.h: * Modules/highlight/HighlightRegister.cpp: (WebCore::HighlightRegister::appHighlightKey): (WebCore::HighlightRegister::addAppHighlight): * Modules/highlight/HighlightRegister.h: * WebCore.xcodeproj/project.pbxproj: * css/CSSValueKeywords.in: * dom/Document.cpp: (WebCore::Document::appHighlightRegister): (WebCore::Document::collectRageDataFromRegister): (WebCore::Document::updateHighlightPositions): * dom/Document.h: * dom/StaticRange.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): * rendering/HighlightData.cpp: (WebCore::rendererAfterOffset): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::resolveStyleForMarkedText): (WebCore::InlineTextBox::collectMarkedTextsForHighlights const): * rendering/MarkedText.h: * rendering/RenderTheme.cpp: (WebCore::RenderTheme::platformAppHighlightColor const): * rendering/RenderTheme.h: * rendering/RenderThemeIOS.mm: (WebCore::cssValueIDSelectorList): * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::platformAppHighlightColor const): (WebCore::RenderThemeMac::systemColor const): Source/WebKit: Handle the creation of App Highlights from selections when the context menu item is selected. This patch will add the highlights to the Document's app Highlight register, and handle drawing them in InlineTextBox. Later patches will handle the persistent storage and repopulation of app highlights on launch or reload of a page. * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::createAppHighlightInSelectedRange): * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected): * UIProcess/WebPageProxy.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView createHighlightInCurrentGroupWithRange:]): (-[WKContentView createHighlightInNewGroupWithRange:]): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createAppHighlightInSelectedRange): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Tools: * TestWebKitAPI/Tests/WebCore/MarkedText.cpp: (WebCore::operator<<): Canonical link: https://commits.webkit.org/232051@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-02 20:09:26 +00:00
Modules/highlight/Highlight.h
Modules/highlight/HighlightRegister.h
Modules/highlight/HighlightVisibility.h
Create and draw app highlights https://bugs.webkit.org/show_bug.cgi?id=219365 Reviewed by Wenson Hsieh. Source/WebCore: Create a separate highlight register for app highlights so that there is a clear separation with no risk of web content accessing the wrong highlights. Extend rendering to include the app highlights with the current default settings. * Modules/highlight/Highlight.h: * Modules/highlight/HighlightRegister.cpp: (WebCore::HighlightRegister::appHighlightKey): (WebCore::HighlightRegister::addAppHighlight): * Modules/highlight/HighlightRegister.h: * WebCore.xcodeproj/project.pbxproj: * css/CSSValueKeywords.in: * dom/Document.cpp: (WebCore::Document::appHighlightRegister): (WebCore::Document::collectRageDataFromRegister): (WebCore::Document::updateHighlightPositions): * dom/Document.h: * dom/StaticRange.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): * rendering/HighlightData.cpp: (WebCore::rendererAfterOffset): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::resolveStyleForMarkedText): (WebCore::InlineTextBox::collectMarkedTextsForHighlights const): * rendering/MarkedText.h: * rendering/RenderTheme.cpp: (WebCore::RenderTheme::platformAppHighlightColor const): * rendering/RenderTheme.h: * rendering/RenderThemeIOS.mm: (WebCore::cssValueIDSelectorList): * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::platformAppHighlightColor const): (WebCore::RenderThemeMac::systemColor const): Source/WebKit: Handle the creation of App Highlights from selections when the context menu item is selected. This patch will add the highlights to the Document's app Highlight register, and handle drawing them in InlineTextBox. Later patches will handle the persistent storage and repopulation of app highlights on launch or reload of a page. * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::createAppHighlightInSelectedRange): * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected): * UIProcess/WebPageProxy.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView createHighlightInCurrentGroupWithRange:]): (-[WKContentView createHighlightInNewGroupWithRange:]): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createAppHighlightInSelectedRange): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Tools: * TestWebKitAPI/Tests/WebCore/MarkedText.cpp: (WebCore::operator<<): Canonical link: https://commits.webkit.org/232051@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-02 20:09:26 +00:00
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/indexeddb/IDBActiveDOMObject.h
Modules/indexeddb/IDBDatabaseIdentifier.h
IndexedDB: Support IDBFactory databases method https://bugs.webkit.org/show_bug.cgi?id=211043 Patch by Darryl Pogue <darryl@dpogue.ca> on 2020-06-17 Reviewed by Youenn Fablet. LayoutTests/imported/w3c: Adjust test expectations for `IDBFactory.prototype.databases()`. * web-platform-tests/IndexedDB/get-databases.any-expected.txt: * web-platform-tests/IndexedDB/get-databases.any.worker-expected.txt: * web-platform-tests/IndexedDB/idbfactory-databases-opaque-origin-expected.txt: * web-platform-tests/IndexedDB/idbfactory-origin-isolation-expected.txt: * web-platform-tests/IndexedDB/idlharness.any-expected.txt: * web-platform-tests/IndexedDB/idlharness.any.worker-expected.txt: Source/WebCore: Add support for fetching the list of IDB database names and versions from the IDBServer, and expose the functionality as `IDBFactory.prototype.databases()`. Spec: https://w3c.github.io/IndexedDB/#dom-idbfactory-databases * Headers.cmake: * Modules/indexeddb/IDBActiveDOMObject.h: (WebCore::IDBActiveDOMObject::performCallbackOnOriginThread): * Modules/indexeddb/IDBDatabaseNameAndVersionRequest.cpp: Added. (WebCore::IDBDatabaseNameAndVersionRequest::create): (WebCore::IDBDatabaseNameAndVersionRequest::IDBDatabaseNameAndVersionRequest): (WebCore::IDBDatabaseNameAndVersionRequest::~IDBDatabaseNameAndVersionRequest): (WebCore::IDBDatabaseNameAndVersionRequest::complete): (WebCore::IDBDatabaseNameAndVersionRequest::activeDOMObjectName const): (WebCore::IDBDatabaseNameAndVersionRequest::virtualHasPendingActivity const): (WebCore::IDBDatabaseNameAndVersionRequest::stop): * Modules/indexeddb/IDBDatabaseNameAndVersionRequest.h: Added. * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::databases): (WebCore::IDBFactory::getAllDatabaseNames): * Modules/indexeddb/IDBFactory.h: * Modules/indexeddb/IDBFactory.idl: * Modules/indexeddb/client/IDBConnectionProxy.cpp: (WebCore::IDBClient::IDBConnectionProxy::connectionToServerLost): (WebCore::IDBClient::IDBConnectionProxy::getAllDatabaseNamesAndVersions): (WebCore::IDBClient::IDBConnectionProxy::didGetAllDatabaseNamesAndVersions): (WebCore::IDBClient::IDBConnectionProxy::forgetActivityForCurrentThread): (WebCore::IDBClient::IDBConnectionProxy::getAllDatabaseNames): Deleted. * Modules/indexeddb/client/IDBConnectionProxy.h: * Modules/indexeddb/client/IDBConnectionToServer.cpp: (WebCore::IDBClient::IDBConnectionToServer::getAllDatabaseNamesAndVersions): (WebCore::IDBClient::IDBConnectionToServer::didGetAllDatabaseNamesAndVersions): (WebCore::IDBClient::IDBConnectionToServer::getAllDatabaseNames): Deleted. (WebCore::IDBClient::IDBConnectionToServer::didGetAllDatabaseNames): Deleted. * Modules/indexeddb/client/IDBConnectionToServer.h: * Modules/indexeddb/client/IDBConnectionToServerDelegate.h: * Modules/indexeddb/server/IDBConnectionToClient.cpp: (WebCore::IDBServer::IDBConnectionToClient::didGetAllDatabaseNamesAndVersions): (WebCore::IDBServer::IDBConnectionToClient::didGetAllDatabaseNames): Deleted. * Modules/indexeddb/server/IDBConnectionToClient.h: * Modules/indexeddb/server/IDBConnectionToClientDelegate.h: * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions): (WebCore::IDBServer::IDBServer::getAllDatabaseNames): Deleted. * Modules/indexeddb/server/IDBServer.h: * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameAndVersionFromFile): (WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameFromFile): Deleted. * Modules/indexeddb/server/SQLiteIDBBackingStore.h: * Modules/indexeddb/shared/IDBDatabaseNameAndVersion.h: Added. (WebCore::IDBDatabaseNameAndVersion::encode const): (WebCore::IDBDatabaseNameAndVersion::decode): (WebCore::IDBDatabaseNameAndVersion::isolatedCopy const): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * inspector/agents/InspectorIndexedDBAgent.cpp: (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): * loader/EmptyClients.cpp: Source/WebKit: Plumbing for returning a list of IDB databases and versions. * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNamesAndVersions): (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames): Deleted. * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: * NetworkProcess/IndexedDB/WebIDBServer.cpp: (WebKit::WebIDBServer::getAllDatabaseNamesAndVersions): (WebKit::WebIDBServer::getAllDatabaseNames): Deleted. * NetworkProcess/IndexedDB/WebIDBServer.h: * NetworkProcess/IndexedDB/WebIDBServer.messages.in: * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: (WebKit::WebIDBConnectionToServer::getAllDatabaseNamesAndVersions): (WebKit::WebIDBConnectionToServer::didGetAllDatabaseNamesAndVersions): (WebKit::WebIDBConnectionToServer::getAllDatabaseNames): Deleted. (WebKit::WebIDBConnectionToServer::didGetAllDatabaseNames): Deleted. * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h: * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in: Source/WebKitLegacy: Plumbing for returning a list of IDB databases and versions. * Storage/InProcessIDBServer.cpp: (InProcessIDBServer::getAllDatabaseNamesAndVersions): (InProcessIDBServer::didGetAllDatabaseNamesAndVersions): (InProcessIDBServer::getAllDatabaseNames): Deleted. (InProcessIDBServer::didGetAllDatabaseNames): Deleted. * Storage/InProcessIDBServer.h: Canonical link: https://commits.webkit.org/226088@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-17 16:51:42 +00:00
Modules/indexeddb/IDBDatabaseNameAndVersionRequest.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/indexeddb/IDBGetAllResult.h
Modules/indexeddb/IDBGetResult.h
Modules/indexeddb/IDBKey.h
Modules/indexeddb/IDBKeyData.h
Modules/indexeddb/IDBKeyPath.h
Modules/indexeddb/IDBKeyRange.h
Modules/indexeddb/IDBKeyRangeData.h
Modules/indexeddb/IDBOpenDBRequest.h
Modules/indexeddb/IDBRequest.h
Modules/indexeddb/IDBTransaction.h
Implement IDBTransaction.durability https://bugs.webkit.org/show_bug.cgi?id=228289 Reviewed by Darin Adler. LayoutTests/imported/w3c: * web-platform-tests/IndexedDB/idlharness.any-expected.txt: * web-platform-tests/IndexedDB/idlharness.any.worker-expected.txt: * web-platform-tests/IndexedDB/transaction-relaxed-durability.tentative.any-expected.txt: * web-platform-tests/IndexedDB/transaction-relaxed-durability.tentative.any.worker-expected.txt: Source/WebCore: Spec: https://www.w3.org/TR/IndexedDB/#dom-idbtransaction-durability https://www.w3.org/TR/IndexedDB/#dictdef-idbtransactionoptions IDBTransaction.durability gives a hint about durability of a transaction. If it's strict, backend would try syncing data to database file after transaction commit, which enforces durability. If it's relaxed, it means data may stay in the OS buffer some time after transaction commit, which gives better performance. Firefox and Chrome already implemented durability. They have different ways of setting durability, and we choose to use TransactionOptions as spec. Rebaselined existing tests. New tests: storage/indexeddb/idbtransaction-durability-private.html storage/indexeddb/idbtransaction-durability.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::transaction): * Modules/indexeddb/IDBDatabase.h: * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBTransaction.h: * Modules/indexeddb/IDBTransaction.idl: * Modules/indexeddb/IDBTransactionDurability.h: Added. * Modules/indexeddb/IDBTransactionDurability.idl: Added. * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction): * Modules/indexeddb/server/SQLiteIDBTransaction.h: (WebCore::IDBServer::SQLiteIDBTransaction::durability const): * Modules/indexeddb/shared/IDBTransactionInfo.cpp: (WebCore::IDBTransactionInfo::clientTransaction): (WebCore::IDBTransactionInfo::IDBTransactionInfo): (WebCore::IDBTransactionInfo::isolatedCopy): * Modules/indexeddb/shared/IDBTransactionInfo.h: (WebCore::IDBTransactionInfo::durability const): (WebCore::IDBTransactionInfo::encode const): (WebCore::IDBTransactionInfo::decode): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/sql/SQLiteDatabase.cpp: (WebCore::checkpointModeValue): (WebCore::SQLiteDatabase::checkpoint): (WebCore::SQLiteDatabase::useWALJournalMode): * platform/sql/SQLiteDatabase.h: LayoutTests: * storage/indexeddb/idbtransaction-durability-expected.txt: Added. * storage/indexeddb/idbtransaction-durability-private-expected.txt: Added. * storage/indexeddb/idbtransaction-durability-private.html: Added. * storage/indexeddb/idbtransaction-durability.html: Added. * storage/indexeddb/resources/idbtransaction-durability.js: Added. (onOpenUpgradeNeeded): (onOpenSuccess): (onTransactionComplete): Canonical link: https://commits.webkit.org/240055@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280415 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-29 04:04:18 +00:00
Modules/indexeddb/IDBTransactionDurability.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/indexeddb/IDBTransactionMode.h
Modules/indexeddb/IDBValue.h
Modules/indexeddb/IndexedDB.h
Modules/indexeddb/client/IDBConnectionProxy.h
Modules/indexeddb/client/IDBConnectionToServer.h
Modules/indexeddb/client/IDBConnectionToServerDelegate.h
Modules/indexeddb/client/TransactionOperation.h
Modules/indexeddb/server/IDBBackingStore.h
Modules/indexeddb/server/IDBConnectionToClient.h
Modules/indexeddb/server/IDBConnectionToClientDelegate.h
Modules/indexeddb/server/IDBServer.h
Modules/indexeddb/server/ServerOpenDBRequest.h
Modules/indexeddb/server/UniqueIDBDatabase.h
Modules/indexeddb/server/UniqueIDBDatabaseConnection.h
Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h
Improve accuracy of IndexedDB estimated write size computation https://bugs.webkit.org/show_bug.cgi?id=211360 Reviewed by Brady Eidson. Source/WebCore: We currently estimate the size of a put in IndexedDB for quota check purposes with something like: estimatedWriteSize = (1 + numIndices) * (keySize + valueSize) However, this can lead to large overestimates of write sizes. This is because secondary indices only store a mapping of secondary index key => primary key; they do not store the entire value. In the example site attached to 202137 (another DB quota-related bug), the the heuristic estimates that one of the put operations would use more than 800 MB when it actually uses 220 MB. This inaccuracy leads to spurious disk quota permission modals being presented in Safari. This patch improves the write size computation by generating the secondary index keys before estimating the write size. The performance should be about the same since we save the generated index keys for later usage when we actually add the record to the DB. * Headers.cmake: * Modules/indexeddb/server/IDBBackingStore.h: * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: (WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore): (WebCore::IDBServer::MemoryIDBBackingStore::addRecord): (WebCore::IDBServer::MemoryIDBBackingStore::serializationContext): * Modules/indexeddb/server/MemoryIDBBackingStore.h: * Modules/indexeddb/server/MemoryObjectStore.cpp: (WebCore::IDBServer::MemoryObjectStore::addRecord): (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord): * Modules/indexeddb/server/MemoryObjectStore.h: * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::serializationContext): * Modules/indexeddb/server/SQLiteIDBBackingStore.h: * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::estimateSize): (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd): * Modules/indexeddb/shared/IndexKey.h: * WebCore.xcodeproj/project.pbxproj: * bindings/js/IDBBindingUtilities.cpp: (WebCore::generateIndexKeyMapForValue): * bindings/js/IDBBindingUtilities.h: LayoutTests: Added a layout test to check that the size estimate associated with adding an object to a store with many indices is reasonable. * platform/mac-wk1/TestExpectations: Skip test on Mac WK1 since it doesn't implement quota checks. * platform/win/TestExpectations: Skip test on Windows since it doesn't implement quota checks. * storage/indexeddb/resources/storage-limit-with-indices.js: Added. * storage/indexeddb/storage-limit-with-indices-expected.txt: Added. * storage/indexeddb/storage-limit-with-indices.html: Added. Canonical link: https://commits.webkit.org/224651@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-12 00:38:17 +00:00
Modules/indexeddb/shared/IndexKey.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/indexeddb/shared/IDBCursorInfo.h
IndexedDB: prefetch cursor records on client side https://bugs.webkit.org/show_bug.cgi?id=207602 <rdar://problem/58483927> Reviewed by Brady Eidson. Cache cursor records on client side and use those records for iterate operations. This makes cursor continue/advance tests in PerformanceTests/IndexedDB/basics ~3x faster. * Headers.cmake: * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::setGetResult): Record the ID of TransactionOperation that updates cached record. (WebCore::IDBCursor::iterateWithPrefetchedRecords): IDBCursor uses cached records for iterate opertaions if there is no write operation between last cached records update and current iteration operation. (WebCore::IDBCursor::clearPrefetchedRecords): * Modules/indexeddb/IDBCursor.h: * Modules/indexeddb/IDBGetResult.cpp: (WebCore::IDBGetResult::isolatedCopy): * Modules/indexeddb/IDBGetResult.h: (WebCore::IDBGetResult::IDBGetResult): (WebCore::IDBGetResult::prefetchedRecords const): (WebCore::IDBGetResult::encode const): (WebCore::IDBGetResult::decode): * Modules/indexeddb/IDBRequest.cpp: Record corresponding TransactionOperation ID in request. (WebCore::IDBRequest::didOpenOrIterateCursor): * Modules/indexeddb/IDBRequest.h: (WebCore::IDBRequest::pendingCursor const): (WebCore::IDBRequest::setTransactionOperationID): * Modules/indexeddb/IDBTransaction.cpp: If a cursor iterate request can be handled with cached records, IDBClient does not need to send request to IDBServer and wait for response. But requests before that iterate request may need to wait server to answer, and spec requires to handle requests in order. Therefore, we now keep all the results in m_transactionOperationResultMap and handle them according to the ordering in m_transactionOperationsInProgressQueue. (WebCore::IDBTransaction::abortInProgressOperations): (WebCore::IDBTransaction::removeRequest): Because result of a cursor request can be answered sooner, it is possible that in finishedDispatchEventForRequest, m_currentlyCompletingRequest (which is a cursor request) is set to nullptr, and then it is set back to the same cursor request in handleOperationsCompletedOnServer right after. This happens in dispatchEvent of the cursor request, where request would remove itself from request list of transaction at the end. In this case, when request list becomes empty, transaction may commit automatically. But transaction should not because that request is still valid as m_currentlyCompletingRequest and should not be removed from list. (WebCore::IDBTransaction::scheduleOperation): (WebCore::IDBTransaction::operationCompletedOnServer): (WebCore::IDBTransaction::handleOperationsCompletedOnServer): All requests were sent to IDBServer and the response/result ordering would naturally be the same as request order. Now that results can be created in both IDBClient and IDBServer, we no longer handle requests using m_completedOnServerQueue. (WebCore::IDBTransaction::createObjectStore): Mark as write operation to track last write operation. (WebCore::IDBTransaction::renameObjectStore): Ditto. (WebCore::IDBTransaction::createIndex): Ditto. (WebCore::IDBTransaction::renameIndex): Ditto. (WebCore::IDBTransaction::requestDeleteRecord): Ditto. (WebCore::IDBTransaction::requestClearObjectStore): Ditto. (WebCore::IDBTransaction::requestPutOrAdd): Ditto. (WebCore::IDBTransaction::deleteObjectStore): Ditto. (WebCore::IDBTransaction::deleteIndex): Ditto. (WebCore::IDBTransaction::iterateCursorOnServer): Only use cached records if the request does not specify target key. If cursor is iterated successfully with cache, send a message to IDBServer to notify about the progress. Otherwise, fall back to depend on IDBServer to answer the request. (WebCore::IDBTransaction::generateOperationID): TransactionOperation ID is unique in a transaction. * Modules/indexeddb/IDBTransaction.h: * Modules/indexeddb/IndexedDB.h: * Modules/indexeddb/client/IDBConnectionProxy.cpp: (WebCore::IDBClient::IDBConnectionProxy::iterateCursor): Don't track result of TransactionOperation in IDBConnectionProxy if TransactionOperation does not need a reply from IDBServer. * Modules/indexeddb/client/TransactionOperation.cpp: (WebCore::IDBClient::TransactionOperation::TransactionOperation): * Modules/indexeddb/client/TransactionOperation.h: Add ID to TransactionOperation. (WebCore::IDBClient::TransactionOperation::operationID const): (WebCore::IDBClient::TransactionOperation::TransactionOperation): * Modules/indexeddb/server/IDBBackingStore.h: remove prefetchCursor as it is not used now. * Modules/indexeddb/server/MemoryIDBBackingStore.h: Ditto. Also this patch only deals with prefetching in persistent store. * Modules/indexeddb/server/MemoryIDBBackingStore.h: * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords): (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor): Only prefetch at when request needs to be answered. (WebCore::IDBServer::SQLiteIDBBackingStore::prefetchCursor): Deleted. * Modules/indexeddb/server/SQLiteIDBBackingStore.h: * Modules/indexeddb/server/SQLiteIDBCursor.cpp: (WebCore::IDBServer::SQLiteIDBCursor::currentData): Provide an option to include prefetched records in result. (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged): Reset count to prefetch when there is a change. This is used with increaseCountToPrefetch to make prefetch adaptive. (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged): (WebCore::IDBServer::SQLiteIDBCursor::prefetchOneRecord): (WebCore::IDBServer::SQLiteIDBCursor::increaseCountToPrefetch): (WebCore::IDBServer::SQLiteIDBCursor::prefetch): Count to prefetch is decided by SQLiteCursor now. (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord): (WebCore::IDBServer::SQLiteIDBCursor::currentValue const): * Modules/indexeddb/server/SQLiteIDBCursor.h: * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor): Move call to prefetch cursor to SQLiteIDBBackingStore. (WebCore::IDBServer::UniqueIDBDatabase::prefetchCursor): Deleted. * Modules/indexeddb/server/UniqueIDBDatabase.h: * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp: (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor): * Modules/indexeddb/shared/IDBCursorRecord.h: Stop using pointer for IDBValue for easier encoding and decoding. (WebCore::IDBCursorRecord::size const): (WebCore::IDBCursorRecord::isolatedCopy const): * Modules/indexeddb/shared/IDBIterateCursorData.cpp: (WebCore::IDBIterateCursorData::isolatedCopy const): * Modules/indexeddb/shared/IDBIterateCursorData.h: Add an option to let IDBServer know whether it should answer the cursor request. (WebCore::IDBIterateCursorData::encode const): (WebCore::IDBIterateCursorData::decode): * WebCore.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/220726@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-14 18:08:03 +00:00
Modules/indexeddb/shared/IDBCursorRecord.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/indexeddb/shared/IDBDatabaseInfo.h
IndexedDB: Support IDBFactory databases method https://bugs.webkit.org/show_bug.cgi?id=211043 Patch by Darryl Pogue <darryl@dpogue.ca> on 2020-06-17 Reviewed by Youenn Fablet. LayoutTests/imported/w3c: Adjust test expectations for `IDBFactory.prototype.databases()`. * web-platform-tests/IndexedDB/get-databases.any-expected.txt: * web-platform-tests/IndexedDB/get-databases.any.worker-expected.txt: * web-platform-tests/IndexedDB/idbfactory-databases-opaque-origin-expected.txt: * web-platform-tests/IndexedDB/idbfactory-origin-isolation-expected.txt: * web-platform-tests/IndexedDB/idlharness.any-expected.txt: * web-platform-tests/IndexedDB/idlharness.any.worker-expected.txt: Source/WebCore: Add support for fetching the list of IDB database names and versions from the IDBServer, and expose the functionality as `IDBFactory.prototype.databases()`. Spec: https://w3c.github.io/IndexedDB/#dom-idbfactory-databases * Headers.cmake: * Modules/indexeddb/IDBActiveDOMObject.h: (WebCore::IDBActiveDOMObject::performCallbackOnOriginThread): * Modules/indexeddb/IDBDatabaseNameAndVersionRequest.cpp: Added. (WebCore::IDBDatabaseNameAndVersionRequest::create): (WebCore::IDBDatabaseNameAndVersionRequest::IDBDatabaseNameAndVersionRequest): (WebCore::IDBDatabaseNameAndVersionRequest::~IDBDatabaseNameAndVersionRequest): (WebCore::IDBDatabaseNameAndVersionRequest::complete): (WebCore::IDBDatabaseNameAndVersionRequest::activeDOMObjectName const): (WebCore::IDBDatabaseNameAndVersionRequest::virtualHasPendingActivity const): (WebCore::IDBDatabaseNameAndVersionRequest::stop): * Modules/indexeddb/IDBDatabaseNameAndVersionRequest.h: Added. * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::databases): (WebCore::IDBFactory::getAllDatabaseNames): * Modules/indexeddb/IDBFactory.h: * Modules/indexeddb/IDBFactory.idl: * Modules/indexeddb/client/IDBConnectionProxy.cpp: (WebCore::IDBClient::IDBConnectionProxy::connectionToServerLost): (WebCore::IDBClient::IDBConnectionProxy::getAllDatabaseNamesAndVersions): (WebCore::IDBClient::IDBConnectionProxy::didGetAllDatabaseNamesAndVersions): (WebCore::IDBClient::IDBConnectionProxy::forgetActivityForCurrentThread): (WebCore::IDBClient::IDBConnectionProxy::getAllDatabaseNames): Deleted. * Modules/indexeddb/client/IDBConnectionProxy.h: * Modules/indexeddb/client/IDBConnectionToServer.cpp: (WebCore::IDBClient::IDBConnectionToServer::getAllDatabaseNamesAndVersions): (WebCore::IDBClient::IDBConnectionToServer::didGetAllDatabaseNamesAndVersions): (WebCore::IDBClient::IDBConnectionToServer::getAllDatabaseNames): Deleted. (WebCore::IDBClient::IDBConnectionToServer::didGetAllDatabaseNames): Deleted. * Modules/indexeddb/client/IDBConnectionToServer.h: * Modules/indexeddb/client/IDBConnectionToServerDelegate.h: * Modules/indexeddb/server/IDBConnectionToClient.cpp: (WebCore::IDBServer::IDBConnectionToClient::didGetAllDatabaseNamesAndVersions): (WebCore::IDBServer::IDBConnectionToClient::didGetAllDatabaseNames): Deleted. * Modules/indexeddb/server/IDBConnectionToClient.h: * Modules/indexeddb/server/IDBConnectionToClientDelegate.h: * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions): (WebCore::IDBServer::IDBServer::getAllDatabaseNames): Deleted. * Modules/indexeddb/server/IDBServer.h: * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameAndVersionFromFile): (WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameFromFile): Deleted. * Modules/indexeddb/server/SQLiteIDBBackingStore.h: * Modules/indexeddb/shared/IDBDatabaseNameAndVersion.h: Added. (WebCore::IDBDatabaseNameAndVersion::encode const): (WebCore::IDBDatabaseNameAndVersion::decode): (WebCore::IDBDatabaseNameAndVersion::isolatedCopy const): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * inspector/agents/InspectorIndexedDBAgent.cpp: (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): * loader/EmptyClients.cpp: Source/WebKit: Plumbing for returning a list of IDB databases and versions. * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNamesAndVersions): (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames): Deleted. * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: * NetworkProcess/IndexedDB/WebIDBServer.cpp: (WebKit::WebIDBServer::getAllDatabaseNamesAndVersions): (WebKit::WebIDBServer::getAllDatabaseNames): Deleted. * NetworkProcess/IndexedDB/WebIDBServer.h: * NetworkProcess/IndexedDB/WebIDBServer.messages.in: * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: (WebKit::WebIDBConnectionToServer::getAllDatabaseNamesAndVersions): (WebKit::WebIDBConnectionToServer::didGetAllDatabaseNamesAndVersions): (WebKit::WebIDBConnectionToServer::getAllDatabaseNames): Deleted. (WebKit::WebIDBConnectionToServer::didGetAllDatabaseNames): Deleted. * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h: * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in: Source/WebKitLegacy: Plumbing for returning a list of IDB databases and versions. * Storage/InProcessIDBServer.cpp: (InProcessIDBServer::getAllDatabaseNamesAndVersions): (InProcessIDBServer::didGetAllDatabaseNamesAndVersions): (InProcessIDBServer::getAllDatabaseNames): Deleted. (InProcessIDBServer::didGetAllDatabaseNames): Deleted. * Storage/InProcessIDBServer.h: Canonical link: https://commits.webkit.org/226088@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-17 16:51:42 +00:00
Modules/indexeddb/shared/IDBDatabaseNameAndVersion.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/indexeddb/shared/IDBError.h
Modules/indexeddb/shared/IDBGetAllRecordsData.h
Modules/indexeddb/shared/IDBGetRecordData.h
Modules/indexeddb/shared/IDBIndexInfo.h
Modules/indexeddb/shared/IDBIterateCursorData.h
Modules/indexeddb/shared/IDBObjectStoreInfo.h
Modules/indexeddb/shared/IDBRequestData.h
Modules/indexeddb/shared/IDBResourceIdentifier.h
Modules/indexeddb/shared/IDBResultData.h
Modules/indexeddb/shared/IDBTransactionInfo.h
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
Modules/mediarecorder/MediaRecorderProvider.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/mediasource/SampleMap.h
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
Modules/mediastream/DetachedRTCDataChannel.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/mediastream/DoubleRange.h
Modules/mediastream/LongRange.h
Modules/mediastream/MediaStreamTrack.h
Modules/mediastream/MediaTrackConstraints.h
Modules/mediastream/RTCController.h
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
Modules/mediastream/RTCDataChannel.h
Modules/mediastream/RTCDataChannelRemoteHandler.h
Modules/mediastream/RTCDataChannelRemoteSource.h
Modules/mediastream/STUNMessageParsing.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/mediastream/UserMediaClient.h
Modules/mediastream/UserMediaController.h
Modules/mediastream/UserMediaRequest.h
Modules/model-element/HTMLModelElement.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/notifications/Notification.h
Modules/notifications/NotificationClient.h
Modules/notifications/NotificationController.h
Modules/notifications/NotificationDirection.h
Modules/notifications/NotificationPermission.h
Modules/notifications/NotificationPermissionCallback.h
Modules/plugins/PluginReplacement.h
Modules/plugins/YouTubePluginReplacement.h
Implement audio capture for SpeechRecognition on macOS https://bugs.webkit.org/show_bug.cgi?id=218855 <rdar://problem/71331001> Reviewed by Youenn Fablet. Source/WebCore: Introduce SpeechRecognizer, which performs audio capture and speech recogntion operations. On start, SpeechRecognizer creates a SpeechRecognitionCaptureSource and starts audio capturing. On stop, SpeechRecognizer clears the source and stops recognizing. SpeechRecognizer can only handle one request at a time, so calling start on already started SpeechRecognizer would cause ongoing request to be aborted. Tests: fast/speechrecognition/start-recognition-then-stop.html fast/speechrecognition/start-second-recognition.html * Headers.cmake: * Modules/speech/SpeechRecognitionCaptureSource.cpp: Added. (WebCore::SpeechRecognitionCaptureSource::SpeechRecognitionCaptureSource): * Modules/speech/SpeechRecognitionCaptureSource.h: Added. * Modules/speech/SpeechRecognitionCaptureSourceImpl.cpp: Added. SpeechRecognitionCaptureSourceImpl provides implementation of SpeechRecognitionCaptureSource on when ENABLE(MEDIA_STREAM) is true. (WebCore::nextLogIdentifier): (WebCore::nullLogger): (WebCore::SpeechRecognitionCaptureSourceImpl::SpeechRecognitionCaptureSourceImpl): (WebCore::SpeechRecognitionCaptureSourceImpl::~SpeechRecognitionCaptureSourceImpl): (WebCore::SpeechRecognitionCaptureSourceImpl::audioSamplesAvailable): Push data to buffer, signal main thread to pull from buffer and invoke data callback. (WebCore::SpeechRecognitionCaptureSourceImpl::sourceStarted): (WebCore::SpeechRecognitionCaptureSourceImpl::sourceStopped): (WebCore::SpeechRecognitionCaptureSourceImpl::sourceMutedChanged): * Modules/speech/SpeechRecognitionCaptureSourceImpl.h: Added. * Modules/speech/SpeechRecognizer.cpp: Added. (WebCore::SpeechRecognizer::SpeechRecognizer): (WebCore::SpeechRecognizer::reset): (WebCore::SpeechRecognizer::start): (WebCore::SpeechRecognizer::startInternal): (WebCore::SpeechRecognizer::stop): (WebCore::SpeechRecognizer::stopInternal): * Modules/speech/SpeechRecognizer.h: Added. (WebCore::SpeechRecognizer::currentClientIdentifier const): * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * platform/cocoa/MediaUtilities.cpp: Added. (WebCore::createAudioFormatDescription): (WebCore::createAudioSampleBuffer): * platform/cocoa/MediaUtilities.h: Added. * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: Move code for creating CMSampleBufferRef to MediaUtilities.h/cpp so it can shared between SpeechRecognition and UserMedia, as Speech recognition backend will take CMSampleBufferRef as input. (WebCore::createAudioFormatDescription): Deleted. (WebCore::createAudioSampleBuffer): Deleted. Source/WebKit: * UIProcess/SpeechRecognitionPermissionManager.cpp: (WebKit::SpeechRecognitionPermissionManager::startProcessingRequest): Check and enable mock devices based on preference as SpeechRecognition needs it for testing. * UIProcess/SpeechRecognitionServer.cpp: (WebKit::SpeechRecognitionServer::start): (WebKit::SpeechRecognitionServer::requestPermissionForRequest): (WebKit::SpeechRecognitionServer::handleRequest): (WebKit::SpeechRecognitionServer::stop): (WebKit::SpeechRecognitionServer::abort): (WebKit::SpeechRecognitionServer::invalidate): (WebKit::SpeechRecognitionServer::sendUpdate): (WebKit::SpeechRecognitionServer::stopRequest): Deleted. (WebKit::SpeechRecognitionServer::abortRequest): Deleted. * UIProcess/SpeechRecognitionServer.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::syncIfMockDevicesEnabledChanged): * UIProcess/WebPageProxy.h: LayoutTests: * TestExpectations: * fast/speechrecognition/start-recognition-in-removed-iframe.html: mark test as async to avoid flakiness. * fast/speechrecognition/start-recognition-then-stop-expected.txt: Added. * fast/speechrecognition/start-recognition-then-stop.html: Added. * fast/speechrecognition/start-second-recognition-expected.txt: Added. * fast/speechrecognition/start-second-recognition.html: Added. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/231867@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-22 05:51:10 +00:00
Modules/speech/SpeechRecognitionCaptureSource.h
Modules/speech/SpeechRecognitionCaptureSourceImpl.h
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
Modules/speech/SpeechRecognitionConnection.h
Modules/speech/SpeechRecognitionConnectionClient.h
Modules/speech/SpeechRecognitionConnectionClientIdentifier.h
Modules/speech/SpeechRecognitionError.h
Modules/speech/SpeechRecognitionRequest.h
Modules/speech/SpeechRecognitionRequestInfo.h
Modules/speech/SpeechRecognitionResultData.h
Modules/speech/SpeechRecognitionUpdate.h
Implement audio capture for SpeechRecognition on macOS https://bugs.webkit.org/show_bug.cgi?id=218855 <rdar://problem/71331001> Reviewed by Youenn Fablet. Source/WebCore: Introduce SpeechRecognizer, which performs audio capture and speech recogntion operations. On start, SpeechRecognizer creates a SpeechRecognitionCaptureSource and starts audio capturing. On stop, SpeechRecognizer clears the source and stops recognizing. SpeechRecognizer can only handle one request at a time, so calling start on already started SpeechRecognizer would cause ongoing request to be aborted. Tests: fast/speechrecognition/start-recognition-then-stop.html fast/speechrecognition/start-second-recognition.html * Headers.cmake: * Modules/speech/SpeechRecognitionCaptureSource.cpp: Added. (WebCore::SpeechRecognitionCaptureSource::SpeechRecognitionCaptureSource): * Modules/speech/SpeechRecognitionCaptureSource.h: Added. * Modules/speech/SpeechRecognitionCaptureSourceImpl.cpp: Added. SpeechRecognitionCaptureSourceImpl provides implementation of SpeechRecognitionCaptureSource on when ENABLE(MEDIA_STREAM) is true. (WebCore::nextLogIdentifier): (WebCore::nullLogger): (WebCore::SpeechRecognitionCaptureSourceImpl::SpeechRecognitionCaptureSourceImpl): (WebCore::SpeechRecognitionCaptureSourceImpl::~SpeechRecognitionCaptureSourceImpl): (WebCore::SpeechRecognitionCaptureSourceImpl::audioSamplesAvailable): Push data to buffer, signal main thread to pull from buffer and invoke data callback. (WebCore::SpeechRecognitionCaptureSourceImpl::sourceStarted): (WebCore::SpeechRecognitionCaptureSourceImpl::sourceStopped): (WebCore::SpeechRecognitionCaptureSourceImpl::sourceMutedChanged): * Modules/speech/SpeechRecognitionCaptureSourceImpl.h: Added. * Modules/speech/SpeechRecognizer.cpp: Added. (WebCore::SpeechRecognizer::SpeechRecognizer): (WebCore::SpeechRecognizer::reset): (WebCore::SpeechRecognizer::start): (WebCore::SpeechRecognizer::startInternal): (WebCore::SpeechRecognizer::stop): (WebCore::SpeechRecognizer::stopInternal): * Modules/speech/SpeechRecognizer.h: Added. (WebCore::SpeechRecognizer::currentClientIdentifier const): * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * platform/cocoa/MediaUtilities.cpp: Added. (WebCore::createAudioFormatDescription): (WebCore::createAudioSampleBuffer): * platform/cocoa/MediaUtilities.h: Added. * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: Move code for creating CMSampleBufferRef to MediaUtilities.h/cpp so it can shared between SpeechRecognition and UserMedia, as Speech recognition backend will take CMSampleBufferRef as input. (WebCore::createAudioFormatDescription): Deleted. (WebCore::createAudioSampleBuffer): Deleted. Source/WebKit: * UIProcess/SpeechRecognitionPermissionManager.cpp: (WebKit::SpeechRecognitionPermissionManager::startProcessingRequest): Check and enable mock devices based on preference as SpeechRecognition needs it for testing. * UIProcess/SpeechRecognitionServer.cpp: (WebKit::SpeechRecognitionServer::start): (WebKit::SpeechRecognitionServer::requestPermissionForRequest): (WebKit::SpeechRecognitionServer::handleRequest): (WebKit::SpeechRecognitionServer::stop): (WebKit::SpeechRecognitionServer::abort): (WebKit::SpeechRecognitionServer::invalidate): (WebKit::SpeechRecognitionServer::sendUpdate): (WebKit::SpeechRecognitionServer::stopRequest): Deleted. (WebKit::SpeechRecognitionServer::abortRequest): Deleted. * UIProcess/SpeechRecognitionServer.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::syncIfMockDevicesEnabledChanged): * UIProcess/WebPageProxy.h: LayoutTests: * TestExpectations: * fast/speechrecognition/start-recognition-in-removed-iframe.html: mark test as async to avoid flakiness. * fast/speechrecognition/start-recognition-then-stop-expected.txt: Added. * fast/speechrecognition/start-recognition-then-stop.html: Added. * fast/speechrecognition/start-second-recognition-expected.txt: Added. * fast/speechrecognition/start-second-recognition.html: Added. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/231867@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-22 05:51:10 +00:00
Modules/speech/SpeechRecognizer.h
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
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/streams/ReadableStreamSink.h
Modules/streams/ReadableStreamSource.h
[WebAuthN] Support Attestation Conveyance Preference https://bugs.webkit.org/show_bug.cgi?id=192722 <rdar://problem/49939647> Reviewed by Brent Fulgham. Source/WebCore: This patch implements https://www.w3.org/TR/webauthn/#enumdef-attestationconveyancepreference, together with Step 20 with regard to AttestationConveyancePreference of https://www.w3.org/TR/webauthn/#createCredential. Few notes with regard to Step 20: 1) We treat indirect attestation as direct attestation as we don't MITM the attestation process; 2) We won't distinguish self attestation and return it to keep consistency between the response and the request. If callers want none attestation, they will very likely ignore fmt and attStmt of the attestation object, and therefore it is meaningless to return self attestation. Covered by new tests within existing files. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Modules/webauthn/AttestationConveyancePreference.h: Copied from Source/WebCore/Modules/webauthn/WebAuthenticationUtils.h. * Modules/webauthn/AttestationConveyancePreference.idl: Copied from Source/WebCore/Modules/webauthn/WebAuthenticationUtils.h. * Modules/webauthn/PublicKeyCredentialCreationOptions.h: (WebCore::PublicKeyCredentialCreationOptions::encode const): (WebCore::PublicKeyCredentialCreationOptions::decode): * Modules/webauthn/PublicKeyCredentialCreationOptions.idl: * Modules/webauthn/WebAuthenticationConstants.h: * Modules/webauthn/WebAuthenticationUtils.cpp: (WebCore::buildAttestationObject): * Modules/webauthn/WebAuthenticationUtils.h: * Modules/webauthn/fido/DeviceResponseConverter.cpp: (fido::readCTAPMakeCredentialResponse): * Modules/webauthn/fido/DeviceResponseConverter.h: * Modules/webauthn/fido/FidoConstants.h: noneAttestationValue is moved to WebAuthenticationConstants.h. * Modules/webauthn/fido/U2fResponseConverter.cpp: (fido::readU2fRegisterResponse): * Modules/webauthn/fido/U2fResponseConverter.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Source/WebKit: * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested): * UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp: (WebKit::CtapHidAuthenticator::continueMakeCredentialAfterResponseReceived const): * UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp: (WebKit::U2fHidAuthenticator::continueRegisterCommandAfterResponseReceived): Tools: * TestWebKitAPI/Tests/WebCore/CtapRequestTest.cpp: (TestWebKitAPI::TEST): Updates the test with AttestationConveyancePreference. LayoutTests: * http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt: * http/wpt/webauthn/public-key-credential-create-success-hid.https.html: * http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt: * http/wpt/webauthn/public-key-credential-create-success-local.https.html: * http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt: * http/wpt/webauthn/public-key-credential-create-success-u2f.https.html: Canonical link: https://commits.webkit.org/212199@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-22 19:27:49 +00:00
Modules/webauthn/AttestationConveyancePreference.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/webauthn/AuthenticationExtensionsClientInputs.h
[WebAuthn] Combine AuthenticatorResponse and PublicKeyCredentialData https://bugs.webkit.org/show_bug.cgi?id=190783 <rdar://problem/57781183> Reviewed by Brent Fulgham. Source/WebCore: This patch combines AuthenticatorResponse and PublicKeyCredentialData, and therefore renames PublicKeyCredentialData to AuthenticatorResponseData as well. The complexity of WebKit's CTAP implementation has reached the point that PublicKeyCredentialData is not appropriate to represent all the different type of responses from authenticators anymore. For example, authenticatorGetNextAssertion depends on the numberOfCredentials member from authenticatorGetAssertion response to function, but numberOfCredentials is not used anywhere else. Therefore, a polymorphic type is needed to represent different responses from authenticators instead of an uniform one, i.e., PublicKeyCredentialData. AuthenticatorResponse seems to be the best fit. However, there are some limitations: 1) it is a WebIDL interface, and therefore is RefCounted. RefCounted objects cannot be serialized through IPC. To solve this, AuthenticatorResponseData (PublicKeyCredentialData) is kept as an intermediate type that is only used during IPC. 2) it doesn't contain all the information from an actual authenticator response. To solve this, it has been enlarged to include all members from PublicKeyCredential. After this patch, PublicKeyCredential will be a thin wrapper on top of AuthenticatorResponse. Covered by existing tests. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Modules/webauthn/AuthenticationExtensionsClientOutputs.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl. * Modules/webauthn/AuthenticationExtensionsClientOutputs.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl. This is separated from PublicKeyCredential such that AuthenticatorResponse can include it. * Modules/webauthn/AuthenticatorAssertionResponse.cpp: Added. (WebCore::AuthenticatorAssertionResponse::create): (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse): (WebCore::AuthenticatorAssertionResponse::data const): * Modules/webauthn/AuthenticatorAssertionResponse.h: (WebCore::AuthenticatorAssertionResponse::create): Deleted. (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse): Deleted. * Modules/webauthn/AuthenticatorAttestationResponse.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.h. (WebCore::AuthenticatorAttestationResponse::create): (WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse): (WebCore::AuthenticatorAttestationResponse::data const): * Modules/webauthn/AuthenticatorAttestationResponse.h: (WebCore::AuthenticatorAttestationResponse::create): Deleted. (WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse): Deleted. * Modules/webauthn/AuthenticatorCoordinator.cpp: (WebCore::AuthenticatorCoordinator::create const): (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const): * Modules/webauthn/AuthenticatorCoordinatorClient.h: * Modules/webauthn/AuthenticatorResponse.cpp: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp. (WebCore::AuthenticatorResponse::tryCreate): (WebCore::AuthenticatorResponse::data const): (WebCore::AuthenticatorResponse::extensions const): (WebCore::AuthenticatorResponse::setClientDataJSON): (WebCore::AuthenticatorResponse::clientDataJSON const): (WebCore::AuthenticatorResponse::AuthenticatorResponse): * Modules/webauthn/AuthenticatorResponse.h: (WebCore::AuthenticatorResponse::rawId const): (WebCore::AuthenticatorResponse::setExtensions): (WebCore::AuthenticatorResponse::AuthenticatorResponse): Deleted. (WebCore::AuthenticatorResponse::clientDataJSON const): Deleted. * Modules/webauthn/AuthenticatorResponseData.h: Renamed from Source/WebCore/Modules/webauthn/PublicKeyCredentialData.h. (WebCore::AuthenticatorResponseData::encode const): (WebCore::AuthenticatorResponseData::decode): * Modules/webauthn/PublicKeyCredential.cpp: (WebCore::PublicKeyCredential::create): (WebCore::PublicKeyCredential::rawId const): (WebCore::PublicKeyCredential::getClientExtensionResults const): (WebCore::PublicKeyCredential::PublicKeyCredential): (WebCore::PublicKeyCredential::tryCreate): Deleted. * Modules/webauthn/PublicKeyCredential.h: * Modules/webauthn/PublicKeyCredential.idl: * Modules/webauthn/fido/DeviceResponseConverter.cpp: (fido::readCTAPMakeCredentialResponse): (fido::readCTAPGetAssertionResponse): * Modules/webauthn/fido/DeviceResponseConverter.h: A more appropriate derived type of AuthenticatorResponse is used to replace PublicKeyCredentialData. * Modules/webauthn/fido/U2fResponseConverter.cpp: (fido::readU2fRegisterResponse): (fido::readU2fSignResponse): * Modules/webauthn/fido/U2fResponseConverter.h: A more appropriate derived type of AuthenticatorResponse is used to replace PublicKeyCredentialData. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Source/WebKit: Code in WebKit are changed to use AuthenticatorResponse and its subtypes. * UIProcess/WebAuthentication/Authenticator.h: * UIProcess/WebAuthentication/AuthenticatorManager.cpp: (WebKit::AuthenticatorManager::respondReceived): (WebKit::AuthenticatorManager::invokePendingCompletionHandler): * UIProcess/WebAuthentication/AuthenticatorManager.h: * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested): (WebKit::LocalAuthenticator::continueGetAssertionAfterUserConsented): * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp: (WebKit::WebAuthenticatorCoordinatorProxy::handleRequest): * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h: * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in: * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: (WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived const): (WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived): * UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: (WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived): (WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived): * WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp: Tools: * TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp: (TestWebKitAPI::TEST): Updates tests accordingly. Canonical link: https://commits.webkit.org/218334@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-11 23:19:08 +00:00
Modules/webauthn/AuthenticationExtensionsClientOutputs.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/webauthn/AuthenticatorCoordinator.h
Modules/webauthn/AuthenticatorCoordinatorClient.h
[WebAuthn] Combine AuthenticatorResponse and PublicKeyCredentialData https://bugs.webkit.org/show_bug.cgi?id=190783 <rdar://problem/57781183> Reviewed by Brent Fulgham. Source/WebCore: This patch combines AuthenticatorResponse and PublicKeyCredentialData, and therefore renames PublicKeyCredentialData to AuthenticatorResponseData as well. The complexity of WebKit's CTAP implementation has reached the point that PublicKeyCredentialData is not appropriate to represent all the different type of responses from authenticators anymore. For example, authenticatorGetNextAssertion depends on the numberOfCredentials member from authenticatorGetAssertion response to function, but numberOfCredentials is not used anywhere else. Therefore, a polymorphic type is needed to represent different responses from authenticators instead of an uniform one, i.e., PublicKeyCredentialData. AuthenticatorResponse seems to be the best fit. However, there are some limitations: 1) it is a WebIDL interface, and therefore is RefCounted. RefCounted objects cannot be serialized through IPC. To solve this, AuthenticatorResponseData (PublicKeyCredentialData) is kept as an intermediate type that is only used during IPC. 2) it doesn't contain all the information from an actual authenticator response. To solve this, it has been enlarged to include all members from PublicKeyCredential. After this patch, PublicKeyCredential will be a thin wrapper on top of AuthenticatorResponse. Covered by existing tests. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Modules/webauthn/AuthenticationExtensionsClientOutputs.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl. * Modules/webauthn/AuthenticationExtensionsClientOutputs.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl. This is separated from PublicKeyCredential such that AuthenticatorResponse can include it. * Modules/webauthn/AuthenticatorAssertionResponse.cpp: Added. (WebCore::AuthenticatorAssertionResponse::create): (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse): (WebCore::AuthenticatorAssertionResponse::data const): * Modules/webauthn/AuthenticatorAssertionResponse.h: (WebCore::AuthenticatorAssertionResponse::create): Deleted. (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse): Deleted. * Modules/webauthn/AuthenticatorAttestationResponse.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.h. (WebCore::AuthenticatorAttestationResponse::create): (WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse): (WebCore::AuthenticatorAttestationResponse::data const): * Modules/webauthn/AuthenticatorAttestationResponse.h: (WebCore::AuthenticatorAttestationResponse::create): Deleted. (WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse): Deleted. * Modules/webauthn/AuthenticatorCoordinator.cpp: (WebCore::AuthenticatorCoordinator::create const): (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const): * Modules/webauthn/AuthenticatorCoordinatorClient.h: * Modules/webauthn/AuthenticatorResponse.cpp: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp. (WebCore::AuthenticatorResponse::tryCreate): (WebCore::AuthenticatorResponse::data const): (WebCore::AuthenticatorResponse::extensions const): (WebCore::AuthenticatorResponse::setClientDataJSON): (WebCore::AuthenticatorResponse::clientDataJSON const): (WebCore::AuthenticatorResponse::AuthenticatorResponse): * Modules/webauthn/AuthenticatorResponse.h: (WebCore::AuthenticatorResponse::rawId const): (WebCore::AuthenticatorResponse::setExtensions): (WebCore::AuthenticatorResponse::AuthenticatorResponse): Deleted. (WebCore::AuthenticatorResponse::clientDataJSON const): Deleted. * Modules/webauthn/AuthenticatorResponseData.h: Renamed from Source/WebCore/Modules/webauthn/PublicKeyCredentialData.h. (WebCore::AuthenticatorResponseData::encode const): (WebCore::AuthenticatorResponseData::decode): * Modules/webauthn/PublicKeyCredential.cpp: (WebCore::PublicKeyCredential::create): (WebCore::PublicKeyCredential::rawId const): (WebCore::PublicKeyCredential::getClientExtensionResults const): (WebCore::PublicKeyCredential::PublicKeyCredential): (WebCore::PublicKeyCredential::tryCreate): Deleted. * Modules/webauthn/PublicKeyCredential.h: * Modules/webauthn/PublicKeyCredential.idl: * Modules/webauthn/fido/DeviceResponseConverter.cpp: (fido::readCTAPMakeCredentialResponse): (fido::readCTAPGetAssertionResponse): * Modules/webauthn/fido/DeviceResponseConverter.h: A more appropriate derived type of AuthenticatorResponse is used to replace PublicKeyCredentialData. * Modules/webauthn/fido/U2fResponseConverter.cpp: (fido::readU2fRegisterResponse): (fido::readU2fSignResponse): * Modules/webauthn/fido/U2fResponseConverter.h: A more appropriate derived type of AuthenticatorResponse is used to replace PublicKeyCredentialData. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Source/WebKit: Code in WebKit are changed to use AuthenticatorResponse and its subtypes. * UIProcess/WebAuthentication/Authenticator.h: * UIProcess/WebAuthentication/AuthenticatorManager.cpp: (WebKit::AuthenticatorManager::respondReceived): (WebKit::AuthenticatorManager::invokePendingCompletionHandler): * UIProcess/WebAuthentication/AuthenticatorManager.h: * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested): (WebKit::LocalAuthenticator::continueGetAssertionAfterUserConsented): * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp: (WebKit::WebAuthenticatorCoordinatorProxy::handleRequest): * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h: * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in: * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: (WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived const): (WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived): * UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: (WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived): (WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived): * WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp: Tools: * TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp: (TestWebKitAPI::TEST): Updates tests accordingly. Canonical link: https://commits.webkit.org/218334@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-11 23:19:08 +00:00
Modules/webauthn/AuthenticatorResponseData.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Modules/webauthn/AuthenticatorTransport.h
Modules/webauthn/PublicKeyCredentialCreationOptions.h
Modules/webauthn/PublicKeyCredentialDescriptor.h
Modules/webauthn/PublicKeyCredentialRequestOptions.h
Modules/webauthn/PublicKeyCredentialType.h
Modules/webauthn/UserVerificationRequirement.h
Modules/webauthn/WebAuthenticationConstants.h
Modules/webauthn/WebAuthenticationUtils.h
Modules/webauthn/apdu/ApduCommand.h
Modules/webauthn/apdu/ApduResponse.h
Modules/webauthn/cbor/CBORReader.h
Modules/webauthn/cbor/CBORValue.h
Modules/webauthn/cbor/CBORWriter.h
Modules/webauthn/fido/AuthenticatorGetInfoResponse.h
Modules/webauthn/fido/AuthenticatorSupportedOptions.h
Modules/webauthn/fido/DeviceRequestConverter.h
Modules/webauthn/fido/DeviceResponseConverter.h
Modules/webauthn/fido/FidoConstants.h
Modules/webauthn/fido/FidoHidMessage.h
Modules/webauthn/fido/FidoHidPacket.h
Modules/webauthn/fido/U2fCommandConstructor.h
Modules/webauthn/fido/U2fResponseConverter.h
Modules/webdatabase/DatabaseDetails.h
Modules/webdatabase/DatabaseManager.h
Modules/webdatabase/DatabaseManagerClient.h
Modules/webdatabase/DatabaseTracker.h
Modules/webdatabase/OriginLock.h
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
Modules/websockets/ThreadableWebSocketChannel.h
Modules/websockets/WebSocketChannel.h
Modules/websockets/WebSocketChannelClient.h
Add WebInspector support to WebKit::WebSocketChannel https://bugs.webkit.org/show_bug.cgi?id=207794 Reviewed by Darin Adler. Source/WebCore: Add a wrapper around Inspector for using it in WebInspector. This allows getting preliminary support of WebInspector for the new WebSocket path. * Modules/websockets/WebSocketChannelInspector.cpp: Added. (WebCore::WebSocketChannelInspector::WebSocketChannelInspector): (WebCore::WebSocketChannelInspector::didCreateWebSocket): (WebCore::WebSocketChannelInspector::willSendWebSocketHandshakeRequest): (WebCore::WebSocketChannelInspector::didReceiveWebSocketHandshakeResponse): (WebCore::WebSocketChannelInspector::didCloseWebSocket): (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrame): (WebCore::WebSocketChannelInspector::didSendWebSocketFrame): (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrameError): * Modules/websockets/WebSocketChannelInspector.h: Added. * Modules/websockets/WebSocketFrame.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Source/WebKit: Call WebInspector hooks wherever needed. We do not have access to frames so we make as if a message is part of one frame. We do not have yet a response so provide an empty one as well. * WebProcess/Network/WebSocketChannel.cpp: (WebKit::WebSocketChannel::notifySendFrame): (WebKit::WebSocketChannel::createMessageQueue): (WebKit::WebSocketChannel::WebSocketChannel): (WebKit::WebSocketChannel::connect): (WebKit::WebSocketChannel::sendMessage): (WebKit::WebSocketChannel::disconnect): (WebKit::WebSocketChannel::didConnect): (WebKit::createWebSocketFrameForWebInspector): (WebKit::WebSocketChannel::didReceiveText): (WebKit::WebSocketChannel::didReceiveBinaryData): (WebKit::WebSocketChannel::didClose): (WebKit::WebSocketChannel::didReceiveMessageError): * WebProcess/Network/WebSocketChannel.h: Canonical link: https://commits.webkit.org/220821@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-17 20:46:43 +00:00
Modules/websockets/WebSocketChannelInspector.h
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
Modules/websockets/WebSocketDeflateFramer.h
Modules/websockets/WebSocketDeflater.h
Modules/websockets/WebSocketExtensionDispatcher.h
Modules/websockets/WebSocketExtensionProcessor.h
Modules/websockets/WebSocketFrame.h
Introduce a ThreadableWebSocketChannel identifier https://bugs.webkit.org/show_bug.cgi?id=216034 Reviewed by Alex Christensen. Source/WebCore: Clean-up code to have a single identifier for all WebSockets. We use a WebSocketIdentifier that is now moved from WebKit to WebCore. Introduce CookieGetter name following comments from https://bugs.webkit.org/show_bug.cgi?id=215928 review. No change of behavior. * Headers.cmake: * Modules/websockets/ThreadableWebSocketChannel.cpp: (WebCore::ThreadableWebSocketChannel::ThreadableWebSocketChannel): * Modules/websockets/ThreadableWebSocketChannel.h: (WebCore::ThreadableWebSocketChannel::ref): (WebCore::ThreadableWebSocketChannel::deref): (WebCore::ThreadableWebSocketChannel::identifier const): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::connect): (WebCore::WebSocketChannel::clientHandshakeRequest const): * Modules/websockets/WebSocketChannel.h: * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::clientHandshakeRequest const): * Modules/websockets/WebSocketHandshake.h: * Modules/websockets/WebSocketIdentifier.h: Added. * Modules/websockets/WorkerThreadableWebSocketChannel.h: * WebCore.xcodeproj/project.pbxproj: * inspector/agents/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::enable): (WebCore::InspectorNetworkAgent::webSocketForRequestId): * page/SocketProvider.cpp: (WebCore::SocketProvider::createSocketStreamHandle): * page/SocketProvider.h: Source/WebKit: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkSocketChannel.h: * NetworkProcess/NetworkSocketStream.h: * Scripts/webkit/messages.py: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/WebSocketChannel.cpp: (WebKit::WebSocketChannel::WebSocketChannel): * WebProcess/Network/WebSocketChannel.h: (WebKit::WebSocketChannel::identifier const): Deleted. * WebProcess/Network/WebSocketChannelManager.h: * WebProcess/Network/WebSocketIdentifier.h: Removed. * WebProcess/Network/WebSocketProvider.cpp: (WebKit::WebSocketProvider::createSocketStreamHandle): * WebProcess/Network/WebSocketProvider.h: * WebProcess/Network/WebSocketStream.cpp: (WebKit::WebSocketStream::create): (WebKit::WebSocketStream::WebSocketStream): * WebProcess/Network/WebSocketStream.h: Canonical link: https://commits.webkit.org/228872@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-02 16:10:19 +00:00
Modules/websockets/WebSocketIdentifier.h
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
Modules/websockets/WebSocketHandshake.h
Add logging to core accessibility. https://bugs.webkit.org/show_bug.cgi?id=210564 Reviewed by Chris Fleizach. Added AXLogger class and AXTRACE macro. Used them in AXIsolatedTree. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * accessibility/AXLogger.cpp: Added. (WebCore::AXLogger::AXLogger): (WebCore::AXLogger::~AXLogger): * accessibility/AXLogger.h: Added. * accessibility/isolatedtree/AXIsolatedTree.cpp: (WebCore::AXIsolatedTree::AXIsolatedTree): (WebCore::AXIsolatedTree::~AXIsolatedTree): (WebCore::AXIsolatedTree::create): (WebCore::AXIsolatedTree::nodeInTreeForID): (WebCore::AXIsolatedTree::treeForID): (WebCore::AXIsolatedTree::createTreeForPageID): (WebCore::AXIsolatedTree::removeTreeForPageID): (WebCore::AXIsolatedTree::treeForPageID): (WebCore::AXIsolatedTree::nodeForID const): (WebCore::AXIsolatedTree::objectsForIDs const): (WebCore::AXIsolatedTree::generateSubtree): (WebCore::AXIsolatedTree::createSubtree): (WebCore::AXIsolatedTree::updateNode): (WebCore::AXIsolatedTree::updateSubtree): (WebCore::AXIsolatedTree::updateChildren): (WebCore::AXIsolatedTree::focusedUIElement): (WebCore::AXIsolatedTree::rootNode): (WebCore::AXIsolatedTree::setRootNode): (WebCore::AXIsolatedTree::setFocusedNode): (WebCore::AXIsolatedTree::setFocusedNodeID): (WebCore::AXIsolatedTree::removeNode): (WebCore::AXIsolatedTree::removeSubtree): (WebCore::AXIsolatedTree::appendNodeChanges): (WebCore::AXIsolatedTree::applyPendingChanges): * platform/Logging.h: Canonical link: https://commits.webkit.org/223454@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-16 02:19:13 +00:00
accessibility/AXLogger.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
accessibility/AXObjectCache.h
accessibility/AXTextStateChangeIntent.h
accessibility/AccessibilityListBox.h
accessibility/AccessibilityMenuListPopup.h
accessibility/AccessibilityMockObject.h
accessibility/AccessibilityNodeObject.h
accessibility/AccessibilityObject.h
accessibility/AccessibilityObjectInterface.h
accessibility/AccessibilityRenderObject.h
accessibility/AccessibilityScrollView.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
accessibility/ForcedAccessibilityValue.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
accessibility/isolatedtree/AXIsolatedObject.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
accessibility/isolatedtree/AXIsolatedTree.h
animation/CSSPropertyBlendingClient.h
animation/CompositeOperation.h
[Web Animations] Add a supporting object for Document to manage timelines https://bugs.webkit.org/show_bug.cgi?id=210817 Reviewed by Dean Jackson. Add a new DocumentTimelinesController object owned by Document to manage DocumentTimelines created for it. This simple piece of refactoring is the first step towards a coordinated "update animations and send events" procedure where all timelines are updated at once with a single microtask checkpoint instead of each timeline running one. No change in behavior, so no new tests. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * animation/DocumentTimeline.cpp: (WebCore::DocumentTimeline::DocumentTimeline): (WebCore::DocumentTimeline::~DocumentTimeline): (WebCore::DocumentTimeline::controller const): (WebCore::DocumentTimeline::detachFromDocument): * animation/DocumentTimeline.h: * animation/DocumentTimelinesController.cpp: Added. (WebCore::DocumentTimelinesController::DocumentTimelinesController): (WebCore::DocumentTimelinesController::~DocumentTimelinesController): (WebCore::DocumentTimelinesController::addTimeline): (WebCore::DocumentTimelinesController::removeTimeline): (WebCore::DocumentTimelinesController::detachFromDocument): (WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents): * animation/DocumentTimelinesController.h: Added. * dom/Document.cpp: (WebCore::Document::commonTeardown): (WebCore::Document::ensureTimelinesController): (WebCore::Document::updateAnimationsAndSendEvents): Deleted. (WebCore::Document::addTimeline): Deleted. (WebCore::Document::removeTimeline): Deleted. * dom/Document.h: (WebCore::Document::timelinesController const): * page/Page.cpp: (WebCore::Page::updateRendering): Canonical link: https://commits.webkit.org/223739@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-22 07:16:51 +00:00
animation/DocumentTimelinesController.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
animation/EffectTiming.h
animation/FillMode.h
animation/GetAnimationsOptions.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
animation/IterationCompositeOperation.h
animation/KeyframeAnimationOptions.h
animation/KeyframeEffectOptions.h
animation/PlaybackDirection.h
AnimationTimeline should not have multiple HashMaps with raw Element* keys https://bugs.webkit.org/show_bug.cgi?id=208079 <rdar://problem/59687906> Reviewed by Ryosuke Niwa. We introduce a new ElementAnimationRareData class that holds the KeyframeEffectStack previously owned by ElementRareData as well as a few maps and lists owned by AnimationTimeline which would use raw Element pointers as keys. Specifically, this is what changed: - AnimationTimeline::m_elementToRunningCSSTransitionByCSSPropertyID → ElementAnimationRareData::runningTransitionByProperty() - AnimationTimeline::m_elementToCompletedCSSTransitionByCSSPropertyID → ElementAnimationRareData::completedTransitionByProperty() - AnimationTimeline::m_elementToCSSAnimationsCreatedByMarkupMap → ElementAnimationRareData::animationsCreatedByMarkup() - AnimationTimeline::m_elementToCSSTransitionsMap → ElementAnimationRareData::transitions() - AnimationTimeline::m_elementToCSSAnimationsMap → ElementAnimationRareData::cssAnimations() - AnimationTimeline::m_elementToAnimationsMap → ElementAnimationRareData::webAnimations() For convenience, these new members are exposed via Element directly. No change in behavior, so no new tests. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * animation/AnimationPlaybackEventInit.h: * animation/AnimationTimeline.cpp: (WebCore::AnimationTimeline::animationWasAddedToElement): (WebCore::removeCSSTransitionFromMap): (WebCore::AnimationTimeline::animationWasRemovedFromElement): (WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement): (WebCore::AnimationTimeline::animationsForElement const): (WebCore::AnimationTimeline::removeCSSAnimationCreatedByMarkup): (WebCore::AnimationTimeline::willDestroyRendererForElement): (WebCore::AnimationTimeline::elementWasRemoved): (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement): (WebCore::AnimationTimeline::updateCSSAnimationsForElement): (WebCore::propertyInStyleMatchesValueForTransitionInMap): (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty): (WebCore::AnimationTimeline::updateCSSTransitionsForElement): (WebCore::removeAnimationFromMapForElement): Deleted. (WebCore::AnimationTimeline::ensureRunningTransitionsByProperty): Deleted. * animation/AnimationTimeline.h: * animation/ComputedEffectTiming.h: * animation/DocumentTimeline.cpp: (WebCore::DocumentTimeline::transitionDidComplete): * animation/ElementAnimationRareData.cpp: Copied from Source/WebCore/animation/ComputedEffectTiming.h. (WebCore::ElementAnimationRareData::ElementAnimationRareData): (WebCore::ElementAnimationRareData::~ElementAnimationRareData): (WebCore::ElementAnimationRareData::ensureKeyframeEffectStack): * animation/ElementAnimationRareData.h: Added. (WebCore::ElementAnimationRareData::keyframeEffectStack): (WebCore::ElementAnimationRareData::webAnimations): (WebCore::ElementAnimationRareData::cssAnimations): (WebCore::ElementAnimationRareData::transitions): (WebCore::ElementAnimationRareData::animationsCreatedByMarkup): (WebCore::ElementAnimationRareData::setAnimationsCreatedByMarkup): (WebCore::ElementAnimationRareData::completedTransitionByProperty): (WebCore::ElementAnimationRareData::runningTransitionsByProperty): * animation/KeyframeEffect.h: * animation/OptionalEffectTiming.h: * animation/WebAnimation.h: * animation/WebAnimationTypes.h: Copied from Source/WebCore/animation/WebAnimationUtilities.h. (WebCore::WebAnimationsMarkableDoubleTraits::isEmptyValue): (WebCore::WebAnimationsMarkableDoubleTraits::emptyValue): * animation/WebAnimationUtilities.h: (WebCore::WebAnimationsMarkableDoubleTraits::isEmptyValue): Deleted. (WebCore::WebAnimationsMarkableDoubleTraits::emptyValue): Deleted. * dom/Element.cpp: (WebCore::Element::animationRareData const): (WebCore::Element::ensureAnimationRareData): (WebCore::Element::keyframeEffectStack const): (WebCore::Element::ensureKeyframeEffectStack): (WebCore::Element::hasKeyframeEffects const): (WebCore::Element::webAnimations): (WebCore::Element::cssAnimations): (WebCore::Element::transitions): (WebCore::Element::animationsCreatedByMarkup): (WebCore::Element::setAnimationsCreatedByMarkup): (WebCore::Element::completedTransitionByProperty): (WebCore::Element::runningTransitionsByProperty): * dom/Element.h: * dom/ElementRareData.h: (WebCore::ElementRareData::elementAnimationRareData): (WebCore::ElementRareData::useTypes const): (WebCore::ElementRareData::ensureAnimationRareData): (WebCore::ElementRareData::keyframeEffectStack): Deleted. (WebCore::ElementRareData::setKeyframeEffectStack): Deleted. * dom/Node.cpp: (WebCore::stringForRareDataUseType): * dom/NodeRareData.h: Canonical link: https://commits.webkit.org/221886@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-12 07:48:06 +00:00
animation/WebAnimationTypes.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
bindings/IDLTypes.h
bindings/js/BufferSource.h
bindings/js/CachedScriptFetcher.h
bindings/js/CommonVM.h
bindings/js/DOMWrapperWorld.h
Make it possible to not include IPC Messages headers in other headers https://bugs.webkit.org/show_bug.cgi?id=203074 Reviewed by Geoffrey Garen. Source/WebCore: * WebCore.xcodeproj/project.pbxproj: * bindings/js/ExceptionDetails.h: Added. * bindings/js/JSDOMExceptionHandling.h: Split the ExceptionDetails struct out into its own file. Source/WebKit: Make the Messages generator generate a new -MessagesReplies.h file, which only includes headers for and definitions of DelayedReply/AsyncReply types, which need to be mentioned as arguments to message hander methods, and thus must be available in various headers throughout the project. In order to do this, we have to de-nest them from the primary message class, but we then 'using' them back into place inside the message class so that most of the code doesn't need to change. This helps to wildly decrease the header load of WebPage.h and WebPageProxy.h, especially, because the number of headers needed for types in their replies is much smaller than the number needed for all message receivers. Also, only invoke the Messages generator once per source file, and only parse the source file once, generating all three output files in one invocation. And then clean up all the missing indirect includes that we lost by doing this. All-in-all this is worth roughly 8% on the WebKit2 Build Time Benchmark. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources.make: * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkResourceLoader.h: * PluginProcess/PluginControllerProxy.cpp: * PluginProcess/PluginControllerProxy.h: * PluginProcess/WebProcessConnection.h: * Scripts/Makefile: * Scripts/generate-message-receiver.py: (main): * Scripts/generate-messages-header.py: Removed. * Scripts/webkit/LegacyMessageReceiver-expected.cpp: * Scripts/webkit/LegacyMessages-expected.h: * Scripts/webkit/LegacyMessagesReplies-expected.h: Added. * Scripts/webkit/MessageReceiver-expected.cpp: * Scripts/webkit/MessageReceiverSuperclass-expected.cpp: * Scripts/webkit/Messages-expected.h: * Scripts/webkit/MessagesReplies-expected.h: Added. * Scripts/webkit/MessagesRepliesSuperclassReplies-expected.h: Added. * Scripts/webkit/MessagesSuperclass-expected.h: * Scripts/webkit/messages.py: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h: * UIProcess/Downloads/DownloadProxy.h: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Plugins/PluginProcessManager.cpp: * UIProcess/Plugins/PluginProcessManager.h: * UIProcess/Plugins/PluginProcessProxy.h: * UIProcess/ProvisionalPageProxy.h: * UIProcess/SuspendedPageProxy.h: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.h: * UIProcess/ios/WKContentView.mm: * UIProcess/ios/WKContentViewInteraction.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Storage/WebSWContextManagerConnection.cpp: * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/ios/WebPageIOS.mm: * WebProcess/cocoa/VideoFullscreenManager.h: * WebProcess/cocoa/VideoFullscreenManager.mm: Canonical link: https://commits.webkit.org/216682@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-22 20:02:17 +00:00
bindings/js/ExceptionDetails.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
bindings/js/GCController.h
bindings/js/IDBBindingUtilities.h
bindings/js/JSCSSRuleCustom.h
bindings/js/JSCSSStyleDeclarationCustom.h
bindings/js/JSDOMBinding.h
bindings/js/JSDOMBindingSecurity.h
[WebIDL] Remove [ImplicitThis] and [CustomProxyToJSObject] extended attributes https://bugs.webkit.org/show_bug.cgi?id=223758 Reviewed by Sam Weinig. LayoutTests/imported/w3c: * web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any-expected.txt: Added. * web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any.html: Added. * web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any.js: Added. * web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any.worker-expected.txt: Added. * web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any.worker.html: Added. * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https-expected.txt: Added. * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https.html: Added. * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/dummy-processor-globalthis.js: Added. Source/WebCore: This change introduces castThisValue<JSClass>, taking a step towards unification of |this| value casting between IDLAttribute and IDLOperation. The helper uses compile-time inheritance check to provide implicit |this| value for DOM global objects [1], replacing [ImplicitThis] extended attribute, which was removed from the spec [2] a while ago. IDLAttribute can't perform toThis() with ECMAMode::strict(), like IDLOperation now does, because CustomValue getters are called with |this| value of JSGlobalObject type, which gets tainted by JSScope::toThis(). #225397 will remove the need for toThis(), finally making |this| value casting consistent between attributes and operations. Also, this patch fixes `Object.create(window).location` to throw as per spec [1] by removing prototype chain traversal from toJSDOMWindow(), which aligns WebKit with Blink and Gecko. As DOM global objects are wrapped in proxies and require special casting, toJSDOMWindow() and friends are merged into toJSDOMGlobalObject<JSClass>, which is aware of inheritance / JSProxy. It replaces [CustomProxyToJSObject] extended attribute, which could be missed when adding new DOM global objects, fixing worklets' global functions not to throw when called on `globalThis`. This change reduces WebCore --release binary size by 0.2% (147 KB). [1] https://heycam.github.io/webidl/#dfn-attribute-getter (step 1.1.2.3) [2] https://github.com/heycam/webidl/pull/155 Tests: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any.js imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https.html fast/css-custom-paint/registerPaintBindings.html http/tests/security/listener/*.html * Headers.cmake: * Modules/webaudio/AudioWorkletGlobalScope.idl: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMAttribute.h: (WebCore::IDLAttribute::set): (WebCore::IDLAttribute::setPassingPropertyName): (WebCore::IDLAttribute::get): (WebCore::IDLAttribute::getPassingPropertyName): * bindings/js/JSDOMCastThisValue.h: Added. (WebCore::castThisValue): * bindings/js/JSDOMCastedThisErrorBehavior.h: Removed. * bindings/js/JSDOMGlobalObject.h: (WebCore::toJSDOMGlobalObject): * bindings/js/JSDOMOperation.h: (WebCore::IDLOperation::cast): * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSDOMWindowBase.h: (WebCore::toJSDOMWindow): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSC_DEFINE_CUSTOM_GETTER): (WebCore::IDLOperation<JSDOMWindow>::cast): Deleted. * bindings/js/JSDocumentCustom.cpp: (WebCore::cachedDocumentWrapper): * bindings/js/JSEventTargetCustom.cpp: (WebCore::jsEventTargetCast): * bindings/js/JSEventTargetCustom.h: (WebCore::IDLOperation<JSEventTarget>::call): * bindings/js/JSRemoteDOMWindowBase.cpp: (WebCore::toJSRemoteDOMWindow): Deleted. * bindings/js/JSRemoteDOMWindowBase.h: * bindings/js/JSWorkerGlobalScopeBase.cpp: (WebCore::toJSDedicatedWorkerGlobalScope): Deleted. (WebCore::toJSWorkerGlobalScope): Deleted. (WebCore::toJSServiceWorkerGlobalScope): Deleted. * bindings/js/JSWorkerGlobalScopeBase.h: * bindings/js/JSWorkletGlobalScopeBase.cpp: (WebCore::toJSWorkletGlobalScope): Deleted. * bindings/js/JSWorkletGlobalScopeBase.h: * bindings/scripts/CodeGeneratorJS.pm: (ShouldGenerateToJSDeclaration): (IsAcceleratedDOMAttribute): (GenerateImplementation): * bindings/scripts/IDLAttributes.json: * bindings/scripts/test/JS/*: Updated. * inspector/InspectorController.cpp: (WebCore::InspectorController::canAccessInspectedScriptState const): * page/DOMWindow.idl: * page/RemoteDOMWindow.idl: * workers/DedicatedWorkerGlobalScope.idl: * workers/WorkerGlobalScope.idl: * workers/service/ServiceWorkerGlobalScope.idl: * worklets/PaintWorkletGlobalScope.idl: * worklets/WorkletGlobalScope.idl: Source/WebKit: Use inherits<T> instead of toJSDOMWindow() if the value is never a JSProxy. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::reportException): Source/WebKitLegacy/mac: Use inherits<T> instead of toJSDOMWindow() if the value is never a JSProxy. * WebView/WebView.mm: (+[WebView _reportException:inContext:]): Source/WebKitLegacy/win: Use inherits<T> instead of toJSDOMWindow() if the value is never a JSProxy. * WebView.cpp: (WebView::reportException): LayoutTests: * fast/css-custom-paint/registerPaintBindings.html: * http/tests/security/listener/*: This is a progression: Blink and Gecko don't call event listeners belonging to destroyed frames. * js/property-of-window-as-prototype-expected.txt: Removed. * js/property-of-window-as-prototype.html: Removed. Canonical link: https://commits.webkit.org/237976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-20 22:25:01 +00:00
bindings/js/JSDOMCastThisValue.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
bindings/js/JSDOMConvert.h
bindings/js/JSDOMConvertAny.h
bindings/js/JSDOMConvertBase.h
bindings/js/JSDOMConvertBoolean.h
bindings/js/JSDOMConvertBufferSource.h
bindings/js/JSDOMConvertCallbacks.h
bindings/js/JSDOMConvertDate.h
bindings/js/JSDOMConvertDictionary.h
bindings/js/JSDOMConvertEnumeration.h
bindings/js/JSDOMConvertEventListener.h
bindings/js/JSDOMConvertIndexedDB.h
bindings/js/JSDOMConvertInterface.h
bindings/js/JSDOMConvertJSON.h
bindings/js/JSDOMConvertNull.h
bindings/js/JSDOMConvertNullable.h
bindings/js/JSDOMConvertNumbers.h
bindings/js/JSDOMConvertObject.h
bindings/js/JSDOMConvertRecord.h
bindings/js/JSDOMConvertSequences.h
bindings/js/JSDOMConvertSerializedScriptValue.h
bindings/js/JSDOMConvertStrings.h
bindings/js/JSDOMConvertUnion.h
bindings/js/JSDOMConvertWebGL.h
bindings/js/JSDOMConvertXPathNSResolver.h
bindings/js/JSDOMExceptionHandling.h
bindings/js/JSDOMGlobalObject.h
bindings/js/JSDOMGuardedObject.h
bindings/js/JSDOMOperation.h
bindings/js/JSDOMPromiseDeferred.h
bindings/js/JSDOMWindowBase.h
bindings/js/JSDOMWrapper.h
bindings/js/JSDOMWrapperCache.h
bindings/js/JSDocumentCustom.h
bindings/js/JSElementCustom.h
bindings/js/JSEventCustom.h
bindings/js/JSEventTargetCustom.h
bindings/js/JSExecState.h
bindings/js/JSMediaListCustom.h
bindings/js/JSNodeCustom.h
bindings/js/JSNodeListCustom.h
bindings/js/JSPluginElementFunctions.h
bindings/js/JSStyleSheetCustom.h
bindings/js/JSValueInWrappedObject.h
bindings/js/JSWindowProxy.h
bindings/js/ReadableStreamDefaultController.h
Add WKWebView SPI to evaluate a function with arguments https://bugs.webkit.org/show_bug.cgi?id=205239 Reviewed by Alex Christensen. Source/WebCore: Covered by new API tests. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * bindings/js/ExceptionDetails.h: * bindings/js/RunJavaScriptParameters.h: Added. (WebCore::RunJavaScriptParameters::RunJavaScriptParameters): (WebCore::RunJavaScriptParameters::encode const): (WebCore::RunJavaScriptParameters::decode): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::executeScriptInWorldIgnoringException): (WebCore::ScriptController::executeScriptInWorld): (WebCore::ScriptController::callInWorld): (WebCore::ScriptController::executeUserAgentScriptInWorld): (WebCore::ScriptController::executeUserAgentScriptInWorldInternal): (WebCore::ScriptController::executeAsynchronousUserAgentScriptInWorld): * bindings/js/ScriptController.h: XPathGrammar changes completely unrelated to the functionality of this patch, but because of our poor #include hygiene these were necessary to keep linuxes building. * xml/XPathGrammar.cpp: * xml/XPathGrammar.y: Source/WebKit: * Shared/API/APISerializedScriptValue.h: * UIProcess/API/C/WKPage.cpp: (WKPageRunJavaScriptInMainFrame): * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: (API::sharedContext): (API::SerializedScriptValue::deserialize): (API::SerializedScriptValue::wireBytesFromNSObject): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView evaluateJavaScript:completionHandler:]): (validateArgument): (-[WKWebView _evaluateJavaScript:asAsyncFunction:withArguments:forceUserGesture:completionHandler:]): (-[WKWebView _callAsyncFunction:withArguments:completionHandler:]): (-[WKWebView _evaluateJavaScriptWithoutUserGesture:completionHandler:]): (-[WKWebView _evaluateJavaScript:forceUserGesture:completionHandler:]): Deleted. * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/API/glib/WebKitWebView.cpp: (webkit_web_view_run_javascript): (webkit_web_view_run_javascript_in_world): (resourcesStreamReadCallback): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::runJavaScriptInMainFrame): (WebKit::WebPageProxy::runJavaScriptInMainFrameScriptWorld): * UIProcess/WebPageProxy.h: * UIProcess/socket/RemoteInspectorProtocolHandler.cpp: (WebKit::RemoteInspectorProtocolHandler::runScript): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::runJavaScript): (WebKit::WebPage::runJavaScriptInMainFrameScriptWorld): (WebKit::WebPage::runJavaScriptInFrame): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/AsyncFunction.mm: Added. (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[WKWebView objectByCallingAsyncFunction:withArguments:error:]): Canonical link: https://commits.webkit.org/218826@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-30 20:23:20 +00:00
bindings/js/RunJavaScriptParameters.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
bindings/js/ScriptCachedFrameData.h
bindings/js/ScriptController.h
bindings/js/ScriptState.h
bindings/js/ScriptWrappable.h
bindings/js/ScriptWrappableInlines.h
bindings/js/SerializedScriptValue.h
bindings/js/StringAdaptors.h
[JSC] Introduce JITOperationList to validate JIT-caged pointers https://bugs.webkit.org/show_bug.cgi?id=217261 Reviewed by Saam Barati. Source/JavaScriptCore: This patch adds JITOperationList, which manages all the host-function & jit-operation pointers. And we can now query whether the given pointer is registered in this table. Currently, as a test, we are verifying that host-function is registered in this table when creating NativeExecutable in debug build. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * assembler/JITOperationList.cpp: Added. (JSC::JITOperationList::initialize): (JSC::addPointers): (JSC::JITOperationList::populatePointersInJavaScriptCore): (JSC::JITOperationList::populatePointersInEmbedder): * assembler/JITOperationList.h: Added. (JSC::JITOperationList::contains const): (JSC::JITOperationList::assertIsHostFunction): (JSC::JITOperationList::assertIsJITOperation): (JSC::JITOperationList::instance): * assembler/MacroAssemblerARM64.cpp: * assembler/MacroAssemblerARMv7.cpp: * assembler/MacroAssemblerMIPS.cpp: * assembler/MacroAssemblerX86Common.cpp: * jsc.cpp: (jscmain): * runtime/InitializeThreading.cpp: (JSC::initialize): * runtime/JSGenericTypedArrayViewPrototypeFunctions.h: (JSC::genericTypedArrayViewProtoFuncSet): (JSC::genericTypedArrayViewProtoFuncCopyWithin): (JSC::genericTypedArrayViewProtoFuncIncludes): (JSC::genericTypedArrayViewProtoFuncIndexOf): (JSC::genericTypedArrayViewProtoFuncJoin): (JSC::genericTypedArrayViewProtoFuncLastIndexOf): (JSC::genericTypedArrayViewProtoGetterFuncBuffer): (JSC::genericTypedArrayViewProtoGetterFuncLength): (JSC::genericTypedArrayViewProtoGetterFuncByteLength): (JSC::genericTypedArrayViewProtoGetterFuncByteOffset): (JSC::genericTypedArrayViewProtoFuncReverse): (JSC::genericTypedArrayViewPrivateFuncSort): (JSC::genericTypedArrayViewProtoFuncSlice): (JSC::genericTypedArrayViewPrivateFuncSubarrayCreate): (JSC::JSC_DEFINE_HOST_FUNCTION): Deleted. * runtime/VM.cpp: (JSC::VM::getHostFunction): Source/WebCore: We should have WebCore::initialize(). It is filed in https://bugs.webkit.org/show_bug.cgi?id=217270. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMBuiltinConstructor.h: * bindings/js/JSDOMConstructor.h: * bindings/js/JSDOMLegacyFactoryFunction.h: * bindings/js/ScriptController.cpp: (WebCore::ScriptController::initializeMainThread): * bindings/js/WebCoreJITOperations.cpp: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp. (WebCore::populateJITOperations): * bindings/js/WebCoreJITOperations.h: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp. * bindings/scripts/CodeGeneratorJS.pm: (GenerateConstructorDefinitions): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: * bridge/objc/WebScriptObject.mm: (+[WebScriptObject initialize]): * domjit/JSDocumentDOMJIT.cpp: * platform/cocoa/SharedBufferCocoa.mm: (+[WebCoreSharedBufferData initialize]): * platform/ios/wak/WebCoreThread.mm: (RunWebThread): Source/WebKit: * Shared/API/c/WKString.cpp: (WKStringCopyJSString): * Shared/Cocoa/WebKit2InitializeCocoa.mm: (WebKit::runInitializationCode): * Shared/WebKit2Initialize.cpp: (WebKit::InitializeWebKit2): * Shared/WebKitJITOperations.cpp: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp. (WebKit::populateJITOperations): * Shared/WebKitJITOperations.h: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: Source/WebKitLegacy/mac: * History/WebBackForwardList.mm: (+[WebBackForwardList initialize]): * History/WebHistoryItem.mm: (+[WebHistoryItem initialize]): * Misc/WebCache.mm: (+[WebCache initialize]): * Misc/WebElementDictionary.mm: (+[WebElementDictionary initialize]): * Misc/WebIconDatabase.mm: * Misc/WebStringTruncator.mm: (+[WebStringTruncator initialize]): * Plugins/Hosted/WebHostedNetscapePluginView.mm: (+[WebHostedNetscapePluginView initialize]): * Plugins/WebBaseNetscapePluginView.mm: * Plugins/WebBasePluginPackage.mm: (+[WebBasePluginPackage initialize]): * Plugins/WebNetscapePluginView.mm: (+[WebNetscapePluginView initialize]): * WebCoreSupport/WebEditorClient.mm: (+[WebUndoStep initialize]): * WebCoreSupport/WebFrameLoaderClient.mm: (+[WebFramePolicyListener initialize]): * WebView/WebArchive.mm: (+[WebArchivePrivate initialize]): * WebView/WebDataSource.mm: (+[WebDataSource initialize]): * WebView/WebHTMLView.mm: (+[WebHTMLViewPrivate initialize]): (+[WebHTMLView initialize]): * WebView/WebPreferences.mm: (+[WebPreferences initialize]): * WebView/WebResource.mm: (+[WebResourcePrivate initialize]): * WebView/WebTextIterator.mm: (+[WebTextIteratorPrivate initialize]): * WebView/WebView.mm: (+[WebView initialize]): * WebView/WebViewData.mm: (+[WebViewPrivate initialize]): Source/WebKitLegacy/win: * WebKitClassFactory.cpp: (WebKitClassFactory::WebKitClassFactory): * WebView.cpp: (WebView::WebView): Source/WTF: * wtf/PlatformCallingConventions.h: * wtf/PlatformEnable.h: Canonical link: https://commits.webkit.org/230049@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-03 23:51:12 +00:00
bindings/js/WebCoreJITOperations.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
bindings/js/WebCoreTypedArrayController.h
bindings/js/WindowProxy.h
JS Modules in Workers https://bugs.webkit.org/show_bug.cgi?id=164860 Reviewed by Saam Barati. LayoutTests/imported/w3c: Some of worklet failures in WPT is because, 1. Previously, worklet does not support module. These tests are passing incorrectly when modules are not supported. Now, modules are supported, and some edge features are missing, so start failing 2. WPT is using www1.localhost in some tests (CSP tests), and this is not supported in WebKit's WPT testing. So failing incorrectly. * web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.any.worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-workerglobalscope-onerror-module-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker-importScripts-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker.sub-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-nothrow-worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-2-import-worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-3-dynamic-worker-expected.txt: * web-platform-tests/service-workers/service-worker/import-module-scripts.https-expected.txt: * web-platform-tests/workers/baseurl/alpha/import-in-moduleworker-expected.txt: * web-platform-tests/workers/baseurl/alpha/importScripts-in-worker-expected.txt: * web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker-expected.txt: * web-platform-tests/workers/baseurl/alpha/xhr-in-worker-expected.txt: * web-platform-tests/workers/constructors/Worker/same-origin-expected.txt: * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-expected.txt: * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-module-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-csp-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-failure-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-meta-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-meta.html: * web-platform-tests/workers/modules/dedicated-worker-import-referrer-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import.any-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-options-type-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-parse-error-failure-expected.txt: * web-platform-tests/workers/name-property-expected.txt: * web-platform-tests/worklets/audio-worklet-credentials.https-expected.txt: * web-platform-tests/worklets/audio-worklet-csp.https-expected.txt: * web-platform-tests/worklets/audio-worklet-import.https-expected.txt: * web-platform-tests/worklets/audio-worklet-referrer.https-expected.txt: * web-platform-tests/xhr/open-url-redirected-worker-origin-expected.txt: Source/JavaScriptCore: Add error information to extract this in WebCore's module loader. Currently, we are using Promise pipeline, and this makes it a bit difficult to extract error information. This error information attached in this patch allows us to extract SyntaxError in WebCore, and throwing JS SyntaxError instead of AbortError. We are planning to update our module pipieline not using Promises in the future. The current design derived from the original module loader pipeline where using Promises is critical. But now, that proposal was abandoned, so we can just simplify the module loader. * runtime/AggregateError.cpp: (JSC::AggregateError::AggregateError): * runtime/Error.cpp: (JSC::createError): (JSC::createEvalError): (JSC::createRangeError): (JSC::createReferenceError): (JSC::createSyntaxError): (JSC::createTypeError): (JSC::createURIError): (JSC::createGetterTypeError): (JSC::throwSyntaxError): * runtime/Error.h: * runtime/ErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * runtime/ErrorInstance.cpp: (JSC::ErrorInstance::ErrorInstance): (JSC::ErrorInstance::create): (JSC::ErrorInstance::sanitizedMessageString): (JSC::ErrorInstance::sanitizedNameString): (JSC::ErrorInstance::sanitizedToString): * runtime/ErrorInstance.h: (JSC::ErrorInstance::create): (JSC::ErrorInstance::errorType const): * runtime/JSGlobalObjectFunctions.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * runtime/NativeErrorConstructor.cpp: (JSC::NativeErrorConstructor<errorType>::constructImpl): (JSC::NativeErrorConstructor<errorType>::callImpl): * runtime/NullSetterFunction.cpp: (JSC::NullSetterFunctionInternal::JSC_DEFINE_HOST_FUNCTION): * wasm/js/JSWebAssemblyCompileError.cpp: (JSC::JSWebAssemblyCompileError::JSWebAssemblyCompileError): * wasm/js/JSWebAssemblyLinkError.cpp: (JSC::JSWebAssemblyLinkError::JSWebAssemblyLinkError): * wasm/js/JSWebAssemblyRuntimeError.cpp: (JSC::JSWebAssemblyRuntimeError::JSWebAssemblyRuntimeError): * wasm/js/WebAssemblyCompileErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * wasm/js/WebAssemblyLinkErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * wasm/js/WebAssemblyRuntimeErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): Source/WebCore: This patch implements JS modules in Workers and Worklets. We are not supporting modules in ServiceWorkers' initialization yet. But service-worker can import modules via JS `import()`. The worker can be executed as a module if we pass, `type: "module"` to worker options. Worklet is executed as modules by default. 1. In Worker, we first fetch the initial code. And then, analyze the dependencies and load subsequent modules. We iterate run-loop to load all the dependent modules in the module loader. At that time, we annotate run-loop tasks with special taskMode to iterate tasks with this taskMode. This prevents us from discarding different tasks in this run-loop driving phase. (e.g. postMessage can be called from the main thread while loading module graph, in that case, we should not discard this task.) 2. In Worklet, we just request module loading to ScriptModuleLoader, and run it after loading module graph. This is OK since worklet thread is already running. So we can just request modules and worklet thread automatically drives module loading via run-loop. * Headers.cmake: * Modules/webaudio/AudioWorkletGlobalScope.h: (WebCore::AudioWorkletGlobalScope::currentFrame const): Deleted. (WebCore::AudioWorkletGlobalScope::sampleRate const): Deleted. (WebCore::AudioWorkletGlobalScope::currentTime const): Deleted. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/CachedModuleScriptLoader.cpp: (WebCore::CachedModuleScriptLoader::create): (WebCore::CachedModuleScriptLoader::CachedModuleScriptLoader): (WebCore::CachedModuleScriptLoader::load): (WebCore::CachedModuleScriptLoader::notifyFinished): * bindings/js/CachedModuleScriptLoader.h: * bindings/js/CachedScriptFetcher.cpp: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::retrieveErrorMessageWithoutName): (WebCore::createDOMException): * bindings/js/JSDOMExceptionHandling.h: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::scriptModuleLoader): (WebCore::JSDOMGlobalObject::moduleLoaderResolve): (WebCore::JSDOMGlobalObject::moduleLoaderFetch): (WebCore::JSDOMGlobalObject::moduleLoaderEvaluate): (WebCore::JSDOMGlobalObject::moduleLoaderImportModule): (WebCore::JSDOMGlobalObject::moduleLoaderCreateImportMetaProperties): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::moduleLoaderResolve): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderFetch): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderEvaluate): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderImportModule): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderCreateImportMetaProperties): Deleted. * bindings/js/JSDOMWindowBase.h: * bindings/js/JSWorkerGlobalScopeBase.cpp: * bindings/js/JSWorkletGlobalScopeBase.cpp: * bindings/js/ModuleScriptLoader.h: Copied from Source/WebCore/dom/ModuleFetchParameters.h. (WebCore::ModuleScriptLoader::clearClient): (WebCore::ModuleScriptLoader::scriptFetcher): (WebCore::ModuleScriptLoader::parameters): (WebCore::ModuleScriptLoader::ModuleScriptLoader): * bindings/js/ModuleScriptLoaderClient.h: Renamed from Source/WebCore/bindings/js/CachedModuleScriptLoaderClient.h. * bindings/js/ScriptModuleLoader.cpp: (WebCore::ScriptModuleLoader::ScriptModuleLoader): (WebCore::resolveModuleSpecifier): (WebCore::ScriptModuleLoader::resolve): (WebCore::ScriptModuleLoader::fetch): (WebCore::ScriptModuleLoader::moduleURL): (WebCore::ScriptModuleLoader::responseURLFromRequestURL): (WebCore::ScriptModuleLoader::evaluate): (WebCore::ScriptModuleLoader::importModule): (WebCore::ScriptModuleLoader::notifyFinished): * bindings/js/ScriptModuleLoader.h: * bindings/js/ScriptSourceCode.h: (WebCore::ScriptSourceCode::ScriptSourceCode): * bindings/js/WorkerModuleScriptLoader.cpp: Added. (WebCore::WorkerModuleScriptLoader::create): (WebCore::WorkerModuleScriptLoader::WorkerModuleScriptLoader): (WebCore::WorkerModuleScriptLoader::~WorkerModuleScriptLoader): (WebCore::WorkerModuleScriptLoader::load): (WebCore::WorkerModuleScriptLoader::referrerPolicy): (WebCore::WorkerModuleScriptLoader::notifyFinished): (WebCore::WorkerModuleScriptLoader::taskMode): * bindings/js/WorkerModuleScriptLoader.h: Copied from Source/WebCore/dom/ModuleFetchParameters.h. * bindings/js/WorkerScriptFetcher.h: Added. * dom/Document.cpp: * dom/ExceptionCode.h: * dom/LoadableModuleScript.cpp: (WebCore::LoadableModuleScript::LoadableModuleScript): (WebCore::LoadableModuleScript::load): Deleted. * dom/LoadableModuleScript.h: * dom/ModuleFetchParameters.h: (WebCore::ModuleFetchParameters::create): (WebCore::ModuleFetchParameters::isTopLevelModule const): (WebCore::ModuleFetchParameters::ModuleFetchParameters): * dom/ScriptElement.cpp: (WebCore::ScriptElement::requestModuleScript): * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoader::create): * loader/ThreadableLoader.h: (WebCore::ThreadableLoader::create): * workers/DedicatedWorkerGlobalScope.h: * workers/Worker.cpp: (WebCore::Worker::Worker): (WebCore::Worker::create): (WebCore::Worker::notifyFinished): * workers/Worker.h: * workers/Worker.idl: * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): (WebCore::WorkerGlobalScope::importScripts): * workers/WorkerGlobalScope.h: (WebCore::WorkerGlobalScope::credentials const): * workers/WorkerGlobalScopeProxy.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerGlobalScope): * workers/WorkerMessagingProxy.h: * workers/WorkerOrWorkletGlobalScope.cpp: (WebCore::WorkerOrWorkletGlobalScope::WorkerOrWorkletGlobalScope): * workers/WorkerOrWorkletGlobalScope.h: (WebCore::WorkerOrWorkletGlobalScope::moduleLoader): * workers/WorkerOrWorkletScriptController.cpp: (WebCore::jsValueToModuleKey): (WebCore::WorkerOrWorkletScriptController::evaluateModule): (WebCore::WorkerOrWorkletScriptController::loadModuleSynchronously): (WebCore::WorkerOrWorkletScriptController::linkAndEvaluateModule): (WebCore::WorkerOrWorkletScriptController::loadAndEvaluateModule): * workers/WorkerOrWorkletScriptController.h: * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::loadAsynchronously): (WebCore::WorkerScriptLoader::didReceiveResponse): * workers/WorkerScriptLoader.h: (WebCore::WorkerScriptLoader::responseSource const): (WebCore::WorkerScriptLoader::isRedirected const): * workers/WorkerThread.cpp: (WebCore::WorkerParameters::isolatedCopy const): (WebCore::WorkerThread::evaluateScriptIfNecessary): * workers/WorkerThread.h: * workers/WorkerType.h: * workers/service/ServiceWorkerContainer.h: * workers/service/ServiceWorkerGlobalScope.h: * workers/service/ServiceWorkerJob.cpp: (WebCore::ServiceWorkerJob::fetchScriptWithContext): * workers/service/ServiceWorkerRegistrationOptions.h: * workers/service/context/ServiceWorkerThread.cpp: (WebCore::ServiceWorkerThread::ServiceWorkerThread): * workers/service/server/SWServerWorker.h: * worklets/PaintWorkletGlobalScope.h: (WebCore::PaintWorkletGlobalScope::paintDefinitionMap): Deleted. (WebCore::PaintWorkletGlobalScope::paintDefinitionLock): Deleted. (WebCore::PaintWorkletGlobalScope::~PaintWorkletGlobalScope): Deleted. * worklets/WorkletGlobalScope.cpp: (WebCore::WorkletGlobalScope::fetchAndInvokeScript): (WebCore::WorkletGlobalScope::processNextScriptFetchJobIfNeeded): Deleted. (WebCore::WorkletGlobalScope::didReceiveResponse): Deleted. (WebCore::WorkletGlobalScope::notifyFinished): Deleted. (WebCore::WorkletGlobalScope::didCompleteScriptFetchJob): Deleted. * worklets/WorkletGlobalScope.h: LayoutTests: * TestExpectations: * http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt: * http/tests/subresource-integrity/sri-module-expected.txt: * webaudio/audioworklet-addModule-failure-expected.txt: * webaudio/worklet-crash-expected.txt: Canonical link: https://commits.webkit.org/234389@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-20 20:28:27 +00:00
bindings/js/WorkerScriptFetcher.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
bridge/Bridge.h
bridge/IdentifierRep.h
bridge/NP_jsobject.h
bridge/npruntime_impl.h
bridge/npruntime_internal.h
bridge/runtime_method.h
bridge/runtime_object.h
bridge/runtime_root.h
bridge/c/c_instance.h
bridge/c/c_utility.h
bridge/jsc/BridgeJSC.h
contentextensions/CombinedFiltersAlphabet.h
contentextensions/CombinedURLFilters.h
contentextensions/CompiledContentExtension.h
contentextensions/ContentExtension.h
contentextensions/ContentExtensionActions.h
contentextensions/ContentExtensionCompiler.h
contentextensions/ContentExtensionError.h
contentextensions/ContentExtensionParser.h
contentextensions/ContentExtensionRule.h
contentextensions/ContentExtensionsBackend.h
contentextensions/ContentExtensionsDebugging.h
contentextensions/ContentRuleListResults.h
contentextensions/DFA.h
contentextensions/DFABytecode.h
contentextensions/DFABytecodeCompiler.h
contentextensions/DFABytecodeInterpreter.h
contentextensions/DFACombiner.h
contentextensions/DFANode.h
contentextensions/ImmutableNFA.h
contentextensions/ImmutableNFANodeBuilder.h
contentextensions/MutableRange.h
contentextensions/MutableRangeList.h
contentextensions/NFA.h
contentextensions/NFANode.h
contentextensions/NFAToDFA.h
Serialize NFA to disk before converting it to a DFA when compiling a WKContentRuleList https://bugs.webkit.org/show_bug.cgi?id=219452 Patch by Alex Christensen <achristensen@webkit.org> on 2020-12-03 Reviewed by Geoffrey Garen. Source/WebCore: This decreases maximum memory use by about 50% because the NFA and DFA never need to be in memory at the same time. I'll have to do some tuning and on-device measurement, but this may allow us to increase maxRuleCount. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * contentextensions/CombinedURLFilters.cpp: (WebCore::ContentExtensions::CombinedURLFilters::processNFAs): * contentextensions/CombinedURLFilters.h: * contentextensions/ContentExtensionCompiler.cpp: (WebCore::ContentExtensions::compileToBytecode): (WebCore::ContentExtensions::compileRuleList): * contentextensions/ContentExtensionError.cpp: (WebCore::ContentExtensions::contentExtensionErrorCategory): * contentextensions/ContentExtensionError.h: * contentextensions/ContentExtensionsDebugging.h: * contentextensions/DFA.cpp: (WebCore::ContentExtensions::DFA::shrinkToFit): Deleted. * contentextensions/DFA.h: * contentextensions/ImmutableNFA.h: (WebCore::ContentExtensions::ImmutableNFA::clear): (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator* const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator-> const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator== const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator!= const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator++): Deleted. (WebCore::ContentExtensions::ImmutableNFA::IterableConstTargets::begin const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::IterableConstTargets::end const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator== const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator!= const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator++): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::first const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::last const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::range const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::begin const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::end const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::debugPrint const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::transitionsForNode const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::root const): Deleted. (WebCore::ContentExtensions::ImmutableNFA::finalize): Deleted. * contentextensions/ImmutableNFANodeBuilder.h: * contentextensions/NFAToDFA.cpp: (WebCore::ContentExtensions::epsilonClosureExcludingSelf): (WebCore::ContentExtensions::resolveEpsilonClosures): (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource): (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate): (WebCore::ContentExtensions::createCombinedTransition): (WebCore::ContentExtensions::getOrCreateDFANode): (WebCore::ContentExtensions::NFAToDFA::convert): * contentextensions/NFAToDFA.h: * contentextensions/SerializedNFA.cpp: Added. (WebCore::ContentExtensions::writeAllToFile): (WebCore::ContentExtensions::SerializedNFA::serialize): (WebCore::ContentExtensions::SerializedNFA::SerializedNFA): (WebCore::ContentExtensions::SerializedNFA::pointerAtOffsetInFile const): (WebCore::ContentExtensions::SerializedNFA::nodes const const): (WebCore::ContentExtensions::SerializedNFA::transitions const const): (WebCore::ContentExtensions::SerializedNFA::targets const const): (WebCore::ContentExtensions::SerializedNFA::epsilonTransitionsTargets const const): (WebCore::ContentExtensions::SerializedNFA::actions const const): * contentextensions/SerializedNFA.h: Copied from Source/WebCore/contentextensions/ImmutableNFA.h. (WebCore::ContentExtensions::SerializedNFA::Range::Range): (WebCore::ContentExtensions::SerializedNFA::Range::begin const): (WebCore::ContentExtensions::SerializedNFA::Range::end const): (WebCore::ContentExtensions::SerializedNFA::Range::size const): (WebCore::ContentExtensions::SerializedNFA::Range::operator[] const): (WebCore::ContentExtensions::SerializedNFA::root const): (WebCore::ContentExtensions::SerializedNFA::ConstTargetIterator::operator* const): (WebCore::ContentExtensions::SerializedNFA::ConstTargetIterator::operator-> const): (WebCore::ContentExtensions::SerializedNFA::ConstTargetIterator::operator== const): (WebCore::ContentExtensions::SerializedNFA::ConstTargetIterator::operator!= const): (WebCore::ContentExtensions::SerializedNFA::ConstTargetIterator::operator++): (WebCore::ContentExtensions::SerializedNFA::IterableConstTargets::begin const): (WebCore::ContentExtensions::SerializedNFA::IterableConstTargets::end const): (WebCore::ContentExtensions::SerializedNFA::ConstRangeIterator::operator== const): (WebCore::ContentExtensions::SerializedNFA::ConstRangeIterator::operator!= const): (WebCore::ContentExtensions::SerializedNFA::ConstRangeIterator::operator++): (WebCore::ContentExtensions::SerializedNFA::ConstRangeIterator::first const): (WebCore::ContentExtensions::SerializedNFA::ConstRangeIterator::last const): (WebCore::ContentExtensions::SerializedNFA::ConstRangeIterator::data const): (WebCore::ContentExtensions::SerializedNFA::ConstRangeIterator::range const): (WebCore::ContentExtensions::SerializedNFA::IterableConstRange::begin const): (WebCore::ContentExtensions::SerializedNFA::IterableConstRange::end const): (WebCore::ContentExtensions::SerializedNFA::IterableConstRange::debugPrint const): (WebCore::ContentExtensions::SerializedNFA::transitionsForNode const): Source/WebKit: * UIProcess/API/Cocoa/WKContentRuleListStore.mm: (-[WKContentRuleListStore _compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:]): * UIProcess/API/Cocoa/WKContentRuleListStorePrivate.h: Remove NS_RELEASES_ARGUMENT because it was incorrect and unnecessary because the WTF::String is copied to a background thread. Tools: Update syntax of existing tests, which cover behavior quite well. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::createNFAs): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/DFAHelpers.h: (TestWebKitAPI::createNFAs): (TestWebKitAPI::buildDFAFromPatterns): Canonical link: https://commits.webkit.org/232097@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-04 00:01:23 +00:00
contentextensions/SerializedNFA.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
contentextensions/Term.h
contentextensions/URLFilterParser.h
crypto/SerializedCryptoKeyWrap.h
Add CSSConditionRule and CSSGroupingRule https://bugs.webkit.org/show_bug.cgi?id=216855 Reviewed by Sam Weinig. LayoutTests/imported/w3c: * web-platform-tests/css/conditional/idlharness-expected.txt: * web-platform-tests/css/cssom/MediaList-expected.txt: * web-platform-tests/css/cssom/cssimportrule-expected.txt: * web-platform-tests/css/cssom/idlharness-expected.txt: Updated expectations to expect more tests to pass. Source/WebCore: * CMakeLists.txt: Added CSSConditionRule.idl and CSSGroupingRule.idl. * DerivedSources-input.xcfilelist: Updated. * DerivedSources-output.xcfilelist: Updated. * DerivedSources.make: Added CSSConditionRule.idl and CSSGroupingRule.idl. * Headers.cmake: Added CSSConditionRule.h. * Sources.txt: Add CSSConditionRule.cpp, JSCSSConditioRule.cpp, and JSCSSGroupingRule.cpp. * WebCore.xcodeproj/project.pbxproj: Added all the files. * css/CSSConditionRule.cpp: Added. * css/CSSConditionRule.h: Added. * css/CSSConditionRule.idl: Added. * css/CSSGroupingRule.cpp: (WebCore::CSSGroupingRule::~CSSGroupingRule): Use a range-based for loop and nullptr. (WebCore::CSSGroupingRule::appendCSSTextForItems const): Use variadic append to clean this up a bit. (WebCore::CSSGroupingRule::item const): Use auto. * css/CSSGroupingRule.h: Made m_groupRule private instead of protected. Did some other tweaks. * css/CSSGroupingRule.idl: Added. * css/CSSImportRule.idl: Added [Exposed=Window], changed href to be a USVString, added [SameObject, PutForwards=mediaText] to media and [SameObject] to styleSheet. * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::CSSMediaRule): Derive from CSSConditionRule. (WebCore::CSSMediaRule::mediaQueries const): Return a reference. (WebCore::CSSMediaRule::cssText const): Streamline since we don't need a null check. (WebCore::CSSMediaRule::conditionText const): Added. (WebCore::CSSMediaRule::setConditionText): Added. (WebCore::CSSMediaRule::media const): Streamline since we don't need a null check. (WebCore::CSSMediaRule::reattach): Ditto. * css/CSSMediaRule.h: Derive from CSSConditionRule. * css/CSSMediaRule.idl: Derive from CSSConditionRule. Added [Exposed=Window]. Added [SameObject, PutForwards=mediaText] to media. Removed insertRule and deleteRule since they are now inherited from CSSGroupingRule. * css/CSSRule.h: Added MARGIN_RULE constant even though we don't have that rule type. Moved inline functions out of the class body to help clarity a bit. * css/CSSRule.idl: Added [Exposed=Window], changed a few things to match the specification. * css/CSSStyleRule.idl: Added [Exposed=Window]. Added [SameObject] to style. * css/CSSStyleSheet.idl: Added [Exposed=Window]. * css/CSSSupportsRule.cpp: (WebCore::CSSSupportsRule::CSSSupportsRule): Derive from CSSConditionRule. (WebCore::CSSSupportsRule::create): Added. (WebCore::CSSSupportsRule::cssText const): Use variadic append. (WebCore::CSSSupportsRule::conditionText const): Updated to use groupRule. (WebCore::CSSSupportsRule::setConditionText): Added. Not implemented yet. * css/CSSSupportsRule.h: Derive from CSSConditionRule. * css/CSSSupportsRule.idl: Derive from CSSConditionRule. Added [Exposed=Window]. * css/MediaList.cpp: (WebCore::MediaQuerySet::set): Use move instead of swap. * css/MediaList.idl: Added [Exposed=Window] and marked mediaText as the stringifier. * css/StyleRule.cpp: (WebCore::StyleRule::create): Moved here from the header. (WebCore::StyleRule::copy const): Ditto. (WebCore::StyleRulePage::create): Ditto. (WebCore::StyleRuleGroup::StyleRuleGroup): Use move instead of swap. (WebCore::StyleRuleMedia::create): Use move instead of swap. (WebCore::StyleRuleMedia::copy const): Moved out of the header. (WebCore::StyleRuleSupports::StyleRuleSupports): Ditto. (WebCore::StyleRuleSupports::create): Ditto. (WebCore::StyleRuleNamespace::StyleRuleNamespace): Ditto. (WebCore::StyleRuleNamespace::create): Ditto. * css/StyleRule.h: Moved function bodies out of the class defintiion for clarity. * css/StyleSheet.idl: Added [Exposed=Window] and [SameObject, PutForwards=mediaText] for media. * css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::parserAppendRule): Updated since mediaQueries returns a reference. * css/StyleSheetList.idl: Added [Exposed=Window]. * css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::consumeMediaRule): Use WTFMove since the create function now takes an rvalue reference. (WebCore::CSSParserImpl::consumeSupportsRule): Ditto. * style/RuleSet.cpp: (WebCore::Style::RuleSet::addChildRules): Updated since mediaQueries returns a reference. * style/UserAgentStyle.cpp: (WebCore::Style::UserAgentStyle::addToDefaultStyle): Ditto. Source/WebKitLegacy/mac: * DOM/DOMCSS.mm: (kitClass): Added a default case since we don't intend to list every single rule type here. LayoutTests: * fast/dom/domListEnumeration-expected.txt: * fast/dom/domListEnumeration.html: Updated since toString is now implemented and enumerable. * fast/dom/non-numeric-values-numeric-parameters-expected.txt: * fast/dom/non-numeric-values-numeric-parameters.html: Updated test and expectations since CSSMediaRule's deleteRule no longer allows omitting the index to delete rule 0 (both non-standard and inconsistent with CSSStyleSheet). Canonical link: https://commits.webkit.org/229755@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-25 17:19:48 +00:00
css/CSSConditionRule.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
css/CSSCustomPropertyValue.h
css/CSSFontFaceRule.h
css/CSSFontFamily.h
[css-grid] Preserve repeat() notation when serializing declared values https://bugs.webkit.org/show_bug.cgi?id=197840 Reviewed by Manuel Rego Casasnovas. LayoutTests/imported/w3c: Import WPT test. * web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002-expected.txt: Added. * web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html: Added. * web-platform-tests/css/css-grid/grid-definition/w3c-import.log: Source/WebCore: Tests: fast/css-grid-layout/grid-element-auto-repeat-get-set.html fast/css-grid-layout/grid-repeat-calc.html fast/css-grid-layout/named-grid-line-get-set.html imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html Before this change, a repeat() notation with an integral number of repetitions was expanded at parse time. This was observable when reading declared values using JS APIs. This patch makes the parser preserve that notation, like it was already happening when the number of repetitions was automatic and not integral. The resolved value in getComputedStyle() will still be expanded, though, as required by the spec. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * css/CSSGridIntegerRepeatValue.cpp: Added. (WebCore::CSSGridIntegerRepeatValue::customCSSText const): (WebCore::CSSGridIntegerRepeatValue::equals const): * css/CSSGridIntegerRepeatValue.h: Added. * css/CSSValue.cpp: (WebCore::CSSValue::equals const): (WebCore::CSSValue::cssText const): (WebCore::CSSValue::destroy): * css/CSSValue.h: (WebCore::CSSValue::isGridIntegerRepeatValue const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::createGridTrackList): (WebCore::StyleBuilderConverter::convertGridTrackSizeList): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeGridTrackRepeatFunction): Tools: Adapt CSSPropertyParserTest to CSSGridIntegerRepeatValue. * TestWebKitAPI/Tests/WebCore/CSSParser.cpp: (TestWebKitAPI::computeNumberOfTracks): LayoutTests: Update test expectations. * fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt: * fast/css-grid-layout/grid-element-auto-repeat-get-set.html: * fast/css-grid-layout/grid-repeat-calc-expected.txt: * fast/css-grid-layout/grid-repeat-calc.html: * fast/css-grid-layout/named-grid-line-get-set-expected.txt: * fast/css-grid-layout/named-grid-line-get-set.html: Canonical link: https://commits.webkit.org/212315@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-27 21:27:15 +00:00
css/CSSGridIntegerRepeatValue.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
css/CSSGroupingRule.h
css/CSSImportRule.h
css/CSSLineBoxContainValue.h
css/CSSMediaRule.h
css/CSSPageRule.h
css/CSSPrimitiveValue.h
css/CSSPrimitiveValueMappings.h
css/CSSProperty.h
css/CSSRegisteredCustomProperty.h
css/CSSRule.h
css/CSSRuleList.h
css/CSSStyleDeclaration.h
css/CSSStyleRule.h
css/CSSStyleSheet.h
css/CSSToLengthConversionData.h
css/CSSUnits.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
css/CSSUnknownRule.h
css/CSSValue.h
css/CSSValueList.h
css/CSSVariableData.h
css/CSSVariableReferenceValue.h
css/Counter.h
css/DeprecatedCSSOMCounter.h
css/DeprecatedCSSOMPrimitiveValue.h
css/DeprecatedCSSOMRGBColor.h
css/DeprecatedCSSOMRect.h
css/DeprecatedCSSOMValue.h
css/DeprecatedCSSOMValueList.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
css/FontLoadTimingOverride.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
css/LengthFunctions.h
css/MediaList.h
css/MediaQueryEvaluator.h
css/MediaQueryExpression.h
css/MediaQueryParserContext.h
css/Rect.h
css/StyleColor.h
css/StyleProperties.h
Can't change @font-face descriptors from fontFaceRule.style.setProperty() https://bugs.webkit.org/show_bug.cgi?id=177975 <rdar://problem/56648761> Reviewed by Antti Koivisto. LayoutTests/imported/w3c: More passing subtests. * web-platform-tests/css/css-syntax/urange-parsing-expected.txt: Source/WebCore: When parsing properties via PropertySetCSSStyleDeclaration::setProperty() (called from script as rule.style.setProperty()), CSSPropertyParser::parseValue() needs to know if we're parsing properties in a @font-face or @viewport rule, since some properties are only allowed in these contexts. Achieve this by adding to CSSParserContext an Optional<enclosingRuleType>, which gets set for font-face and viewport rules. This gets set by StyleRuleCSSStyleDeclaration::cssParserContext() based on the type of the parent rule. Moved StyleRule::Type to its own header so CSSParserContext can use it. Added compile-time asserts that the values match CSSRule::Type (fixing one of them). Also fix <urange> serialization when start and end values are the same. Test: web-platform-tests/css/css-syntax/urange-parsing.html * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * css/CSSKeyframeRule.cpp: (WebCore::StyleRuleKeyframe::StyleRuleKeyframe): * css/CSSKeyframesRule.cpp: (WebCore::StyleRuleKeyframes::StyleRuleKeyframes): * css/CSSPropertySourceData.h: (WebCore::CSSRuleSourceData::create): (WebCore::CSSRuleSourceData::createUnknown): (WebCore::CSSRuleSourceData::CSSRuleSourceData): * css/CSSRule.cpp: * css/CSSUnicodeRangeValue.cpp: (WebCore::CSSUnicodeRangeValue::customCSSText const): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::StyleRuleCSSStyleDeclaration::cssParserContext const): * css/StyleRule.cpp: (WebCore::StyleRuleBase::destroy): (WebCore::StyleRuleBase::copy const): (WebCore::StyleRuleBase::createCSSOMWrapper const): (WebCore::StyleRule::StyleRule): (WebCore::StyleRulePage::StyleRulePage): (WebCore::StyleRuleFontFace::StyleRuleFontFace): (WebCore::StyleRuleGroup::StyleRuleGroup): (WebCore::StyleRuleMedia::StyleRuleMedia): (WebCore::StyleRuleSupports::StyleRuleSupports): (WebCore::StyleRuleViewport::StyleRuleViewport): (WebCore::StyleRuleCharset::StyleRuleCharset): (WebCore::StyleRuleNamespace::StyleRuleNamespace): * css/StyleRule.h: (WebCore::StyleRuleBase::type const): (WebCore::StyleRuleBase::isCharsetRule const): (WebCore::StyleRuleBase::isFontFaceRule const): (WebCore::StyleRuleBase::isKeyframesRule const): (WebCore::StyleRuleBase::isKeyframeRule const): (WebCore::StyleRuleBase::isNamespaceRule const): (WebCore::StyleRuleBase::isMediaRule const): (WebCore::StyleRuleBase::isPageRule const): (WebCore::StyleRuleBase::isStyleRule const): (WebCore::StyleRuleBase::isSupportsRule const): (WebCore::StyleRuleBase::isViewportRule const): (WebCore::StyleRuleBase::isImportRule const): (WebCore::StyleRuleBase::StyleRuleBase): * css/StyleRuleImport.cpp: (WebCore::StyleRuleImport::StyleRuleImport): * css/StyleRuleImport.h: * css/StyleRuleType.h: Copied from Source/WebCore/css/CSSUnicodeRangeValue.cpp. * css/StyleSheetContents.cpp: (WebCore::traverseRulesInVector): (WebCore::StyleSheetContents::traverseSubresources const): * css/parser/CSSParser.cpp: (WebCore::CSSParser::parseValueWithVariableReferences): * css/parser/CSSParserContext.h: * css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::parseValue): (WebCore::CSSParserImpl::parseInlineStyleDeclaration): (WebCore::CSSParserImpl::parseDeferredDeclaration): (WebCore::CSSParserImpl::parseDeclarationList): (WebCore::CSSParserImpl::supportsDeclaration): (WebCore::CSSParserImpl::parseDeclarationListForInspector): (WebCore::CSSParserImpl::consumeImportRule): (WebCore::CSSParserImpl::consumeMediaRule): (WebCore::CSSParserImpl::consumeSupportsRule): (WebCore::CSSParserImpl::consumeViewportRule): (WebCore::CSSParserImpl::consumeFontFaceRule): (WebCore::CSSParserImpl::consumeKeyframesRule): (WebCore::CSSParserImpl::consumePageRule): (WebCore::CSSParserImpl::consumeKeyframeStyleRule): (WebCore::observeSelectors): (WebCore::CSSParserImpl::consumeStyleRule): (WebCore::CSSParserImpl::consumeDeclarationList): (WebCore::CSSParserImpl::consumeDeclaration): (WebCore::CSSParserImpl::consumeDeclarationValue): * css/parser/CSSParserImpl.h: * css/parser/CSSParserObserver.h: * css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::parseValue): * css/parser/CSSPropertyParser.h: * css/parser/CSSTokenizer.cpp: (WebCore::CSSTokenizer::letterU): * inspector/InspectorStyleSheet.cpp: (flattenSourceData): (WebCore::StyleSheetHandler::startRuleHeader): (WebCore::InspectorStyleSheetForInlineStyle::ruleSourceData const): LayoutTests: Fix tests for the urange serialization fix. * fast/text/font-face-javascript-expected.txt: * fast/text/font-face-javascript.html: * fast/text/unicode-range-javascript-expected.txt: * fast/text/unicode-range-javascript.html: Canonical link: https://commits.webkit.org/216882@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-28 16:02:53 +00:00
css/StyleRuleType.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
css/StyleSheet.h
css/StyleSheetContents.h
css/StyleSheetList.h
Split calc() related files into 1-class per file structure https://bugs.webkit.org/show_bug.cgi?id=226421 Reviewed by Chris Dumez. Source/WebCore: It's bothered me for a while that the calc related classes (both in css/ and in platform/) were bundled all in two big files. This change splits them all out into their own header and implementation files that match their name, and puts them in new calc/ subdirectories (css/calc/... and platform/calc/...). This should hopefully make the modifications I need to make to calc() to support relative color syntax a little easier. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * css/CSSCalculationValue.cpp: Removed. * css/CSSCalculationValue.h: Removed. * css/CSSGradientValue.cpp: * css/CSSPrimitiveValue.cpp: * css/CSSPrimitiveValueMappings.h: * css/CSSValue.cpp: * css/calc: Added. * css/calc/CSSCalcCategoryMapping.cpp: Added. (WebCore::calcUnitCategory): (WebCore::calculationCategoryForCombination): (WebCore::canonicalUnitTypeForCalculationCategory): (WebCore::hasDoubleValue): * css/calc/CSSCalcCategoryMapping.h: Added. * css/calc/CSSCalcExpressionNode.cpp: Added. (WebCore::operator<<): (WebCore::prettyPrintNode): (WebCore::prettyPrintNodes): * css/calc/CSSCalcExpressionNode.h: Added. (WebCore::CSSCalcExpressionNode::equals const): (WebCore::CSSCalcExpressionNode::category const): (WebCore::CSSCalcExpressionNode::CSSCalcExpressionNode): * css/calc/CSSCalcExpressionNodeParser.cpp: Added. (WebCore::CSSCalcExpressionNodeParser::parseCalc): (WebCore::CSSCalcExpressionNodeParser::operatorValue): (WebCore::checkDepthAndIndex): (WebCore::CSSCalcExpressionNodeParser::parseCalcFunction): (WebCore::CSSCalcExpressionNodeParser::parseValue): (WebCore::CSSCalcExpressionNodeParser::parseCalcValue): (WebCore::CSSCalcExpressionNodeParser::parseCalcProduct): (WebCore::CSSCalcExpressionNodeParser::parseCalcSum): * css/calc/CSSCalcExpressionNodeParser.h: Added. (WebCore::CSSCalcExpressionNodeParser::CSSCalcExpressionNodeParser): * css/calc/CSSCalcInvertNode.cpp: Added. (WebCore::CSSCalcInvertNode::createCalcExpression const): (WebCore::CSSCalcInvertNode::doubleValue const): (WebCore::CSSCalcInvertNode::computeLengthPx const): (WebCore::CSSCalcInvertNode::dump const): * css/calc/CSSCalcInvertNode.h: Added. * css/calc/CSSCalcNegateNode.cpp: Added. (WebCore::CSSCalcNegateNode::createCalcExpression const): (WebCore::CSSCalcNegateNode::dump const): * css/calc/CSSCalcNegateNode.h: Added. * css/calc/CSSCalcOperationNode.cpp: Added. (WebCore::determineCategory): (WebCore::categoryForInvert): (WebCore::resolvedTypeForMinOrMaxOrClamp): (WebCore::isSamePair): (WebCore::sortingCategoryForType): (WebCore::sortingCategory): (WebCore::primitiveTypeForCombination): (WebCore::conversionToAddValuesWithTypes): (WebCore::functionFromOperator): (WebCore::CSSCalcOperationNode::create): (WebCore::CSSCalcOperationNode::createSum): (WebCore::CSSCalcOperationNode::createProduct): (WebCore::CSSCalcOperationNode::createMinOrMaxOrClamp): (WebCore::CSSCalcOperationNode::hoistChildrenWithOperator): (WebCore::CSSCalcOperationNode::canCombineAllChildren const): (WebCore::CSSCalcOperationNode::combineChildren): (WebCore::CSSCalcOperationNode::simplify): (WebCore::CSSCalcOperationNode::simplifyRecursive): (WebCore::CSSCalcOperationNode::simplifyNode): (WebCore::CSSCalcOperationNode::primitiveType const): (WebCore::CSSCalcOperationNode::createCalcExpression const): (WebCore::CSSCalcOperationNode::doubleValue const): (WebCore::CSSCalcOperationNode::computeLengthPx const): (WebCore::CSSCalcOperationNode::collectDirectComputationalDependencies const): (WebCore::CSSCalcOperationNode::collectDirectRootComputationalDependencies const): (WebCore::CSSCalcOperationNode::buildCSSText): (WebCore::functionPrefixForOperator): (WebCore::CSSCalcOperationNode::buildCSSTextRecursive): (WebCore::CSSCalcOperationNode::dump const): (WebCore::CSSCalcOperationNode::equals const): (WebCore::CSSCalcOperationNode::evaluateOperator): * css/calc/CSSCalcOperationNode.h: Added. * css/calc/CSSCalcPrimitiveValueNode.cpp: Added. (WebCore::CSSCalcPrimitiveValueNode::create): (WebCore::CSSCalcPrimitiveValueNode::customCSSText const): (WebCore::CSSCalcPrimitiveValueNode::primitiveType const): (WebCore::CSSCalcPrimitiveValueNode::CSSCalcPrimitiveValueNode): (WebCore::CSSCalcPrimitiveValueNode::isNumericValue const): (WebCore::CSSCalcPrimitiveValueNode::isNegative const): (WebCore::CSSCalcPrimitiveValueNode::negate): (WebCore::CSSCalcPrimitiveValueNode::invert): (WebCore::CSSCalcPrimitiveValueNode::add): (WebCore::CSSCalcPrimitiveValueNode::multiply): (WebCore::CSSCalcPrimitiveValueNode::convertToUnitType): (WebCore::CSSCalcPrimitiveValueNode::canonicalizeUnit): (WebCore::CSSCalcPrimitiveValueNode::createCalcExpression const): (WebCore::CSSCalcPrimitiveValueNode::doubleValue const): (WebCore::CSSCalcPrimitiveValueNode::computeLengthPx const): (WebCore::CSSCalcPrimitiveValueNode::collectDirectComputationalDependencies const): (WebCore::CSSCalcPrimitiveValueNode::collectDirectRootComputationalDependencies const): (WebCore::CSSCalcPrimitiveValueNode::isZero const): (WebCore::CSSCalcPrimitiveValueNode::equals const): (WebCore::CSSCalcPrimitiveValueNode::dump const): * css/calc/CSSCalcPrimitiveValueNode.h: Added. * css/calc/CSSCalcValue.cpp: Added. (WebCore::createBlendHalf): (WebCore::createCSS): (WebCore::CSSCalcValue::CSSCalcValue): (WebCore::CSSCalcValue::category const): (WebCore::CSSCalcValue::primitiveType const): (WebCore::CSSCalcValue::createCalculationValue const): (WebCore::CSSCalcValue::setPermittedValueRange): (WebCore::CSSCalcValue::collectDirectComputationalDependencies const): (WebCore::CSSCalcValue::collectDirectRootComputationalDependencies const): (WebCore::CSSCalcValue::customCSSText const): (WebCore::CSSCalcValue::equals const): (WebCore::CSSCalcValue::clampToPermittedRange const): (WebCore::CSSCalcValue::doubleValue const): (WebCore::CSSCalcValue::computeLengthPx const): (WebCore::CSSCalcValue::isCalcFunction): (WebCore::CSSCalcValue::dump const): (WebCore::CSSCalcValue::create): (WebCore::operator<<): * css/calc/CSSCalcValue.h: Added. * css/parser/CSSPropertyParserHelpers.cpp: * platform/CalculationValue.cpp: Removed. * platform/CalculationValue.h: Removed. * platform/Length.cpp: * platform/calc: Added. * platform/calc/CalcExpressionBlendLength.cpp: Added. (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength): (WebCore::CalcExpressionBlendLength::evaluate const): (WebCore::CalcExpressionBlendLength::operator== const): (WebCore::CalcExpressionBlendLength::dump const): * platform/calc/CalcExpressionBlendLength.h: Added. (WebCore::operator==): * platform/calc/CalcExpressionInversion.cpp: Added. (WebCore::CalcExpressionInversion::evaluate const): (WebCore::CalcExpressionInversion::dump const): (WebCore::CalcExpressionInversion::operator== const): (WebCore::operator==): * platform/calc/CalcExpressionInversion.h: Added. * platform/calc/CalcExpressionLength.cpp: Added. (WebCore::CalcExpressionLength::evaluate const): (WebCore::CalcExpressionLength::operator== const): (WebCore::CalcExpressionLength::dump const): * platform/calc/CalcExpressionLength.h: Added. (WebCore::CalcExpressionLength::CalcExpressionLength): (WebCore::operator==): * platform/calc/CalcExpressionNegation.cpp: Added. (WebCore::CalcExpressionNegation::evaluate const): (WebCore::CalcExpressionNegation::operator== const): (WebCore::CalcExpressionNegation::dump const): (WebCore::operator==): * platform/calc/CalcExpressionNegation.h: Added. * platform/calc/CalcExpressionNode.cpp: Added. (WebCore::operator<<): * platform/calc/CalcExpressionNode.h: Added. (WebCore::CalcExpressionNode::type const): (WebCore::CalcExpressionNode::CalcExpressionNode): * platform/calc/CalcExpressionNumber.cpp: Added. (WebCore::CalcExpressionNumber::evaluate const): (WebCore::CalcExpressionNumber::dump const): (WebCore::CalcExpressionNumber::operator== const): * platform/calc/CalcExpressionNumber.h: Added. (WebCore::CalcExpressionNumber::CalcExpressionNumber): (WebCore::operator==): * platform/calc/CalcExpressionOperation.cpp: Added. (WebCore::CalcExpressionOperation::evaluate const): (WebCore::CalcExpressionOperation::operator== const): (WebCore::operator==): (WebCore::CalcExpressionOperation::dump const): * platform/calc/CalcExpressionOperation.h: Added. (WebCore::CalcExpressionOperation::CalcExpressionOperation): * platform/calc/CalcOperator.cpp: Added. (WebCore::operator<<): * platform/calc/CalcOperator.h: Added. * platform/calc/CalculationCategory.cpp: Added. (WebCore::operator<<): * platform/calc/CalculationCategory.h: Added. * platform/calc/CalculationValue.cpp: Added. (WebCore::CalculationValue::create): (WebCore::CalculationValue::CalculationValue): (WebCore::CalculationValue::evaluate const): (WebCore::operator==): (WebCore::operator<<): * platform/calc/CalculationValue.h: Added. (WebCore::CalculationValue::shouldClampToNonNegative const): (WebCore::CalculationValue::expression const): * style/StyleBuilderConverter.h: Tools: * TestWebKitAPI/Tests/WebCore/CalculationValue.cpp: Update test to include additonal header now needed. Canonical link: https://commits.webkit.org/238283@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-30 00:51:26 +00:00
css/calc/CSSCalcValue.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
css/parser/CSSParser.h
css/parser/CSSParserContext.h
css/parser/CSSParserMode.h
css/parser/CSSParserToken.h
css/parser/CSSParserTokenRange.h
[LFC Display] Add the beginnings of a CSS display box hierarchy and CSS painter https://bugs.webkit.org/show_bug.cgi?id=216752 Reviewed by Zalan Bujtas. Add some Display::Box subclasses to display/css, a Display::Tree class to own the display tree, and a DisplayTreeBuilder. Also add css/DisplayCSSPainter which is the beginnings of a class that knows how to paint a CSS stacking context. This code other than DisplayCSSPainter is deliberately vague about how much is CSS specific. It's likely that some box classes will be shared with SVG painting. * CMakeLists.txt: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * display/DisplayLayerController.cpp: (WebCore::Display::LayerController::RootLayerClient::paintContents): (WebCore::Display::LayerController::RootLayerClient::deviceScaleFactor const): (WebCore::Display::LayerController::prepareForDisplay): (WebCore::Display::LayerController::ensureRootLayer): (WebCore::Display::LayerController::updateRootLayerGeometry): * display/DisplayLayerController.h: * display/DisplayTree.cpp: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::Tree::Tree): * display/DisplayTree.h: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::Tree::rootBox const): * display/DisplayTreeBuilder.cpp: Added. (WebCore::Display::TreeBuilder::TreeBuilder): (WebCore::Display::TreeBuilder::build const): (WebCore::Display::TreeBuilder::recursiveBuildDisplayTree const): (WebCore::Display::TreeBuilder::displayBoxForRootBox const): (WebCore::Display::TreeBuilder::displayBoxForLayoutBox const): (WebCore::Display::outputDisplayBox): (WebCore::Display::outputDisplayTree): (WebCore::Display::showDisplayTree): * display/DisplayTreeBuilder.h: Copied from Source/WebCore/display/DisplayView.h. * display/DisplayView.cpp: (WebCore::Display::View::prepareForDisplay): (WebCore::Display::View::deviceScaleFactor const): * display/DisplayView.h: * display/css/DisplayBox.cpp: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::Box::Box): (WebCore::Display::Box::setNextSibling): (WebCore::Display::Box::debugDescription const): * display/css/DisplayBox.h: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::Box::Box): (WebCore::Display::Box::style const): (WebCore::Display::Box::borderBoxFrame const): (WebCore::Display::Box::isContainerBox const): (WebCore::Display::Box::isImageBox const): (WebCore::Display::Box::isReplacedBox const): (WebCore::Display::Box::nextSibling const): * display/css/DisplayCSSPainter.cpp: Added. (WebCore::Display::CSSPainter::paintBoxDecorations): (WebCore::Display::CSSPainter::paintBoxContent): (WebCore::Display::CSSPainter::paintBox): (WebCore::Display::CSSPainter::recursivePaintDescendants): (WebCore::Display::CSSPainter::paintStackingContext): (WebCore::Display::CSSPainter::isStackingContextPaintingBoundary): (WebCore::Display::CSSPainter::recursiveCollectLayers): (WebCore::Display::CSSPainter::paintTree): * display/css/DisplayCSSPainter.h: Copied from Source/WebCore/display/DisplayView.h. * display/css/DisplayContainerBox.cpp: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ContainerBox::ContainerBox): (WebCore::Display::ContainerBox::setFirstChild): (WebCore::Display::ContainerBox::debugDescription const): * display/css/DisplayContainerBox.h: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ContainerBox::firstChild const): * display/css/DisplayImageBox.cpp: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ImageBox::ImageBox): (WebCore::Display::ImageBox::setImage): (WebCore::Display::ImageBox::debugDescription const): * display/css/DisplayImageBox.h: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ImageBox::image const): * display/css/DisplayReplacedBox.cpp: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ReplacedBox::ReplacedBox): * display/css/DisplayReplacedBox.h: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ReplacedBox::replacedContentRect const): * display/css/DisplayStyle.cpp: Copied from Source/WebCore/display/DisplayView.cpp. (WebCore::Display::Style::Style): (WebCore::Display::Style::hasBackground const): (WebCore::Display::Style::hasVisibleBorder const): * display/css/DisplayStyle.h: Added. (WebCore::Display::Style::backgroundColor const): (WebCore::Display::Style::hasBackgroundImage const): (WebCore::Display::Style::borderLeft const): (WebCore::Display::Style::borderRight const): (WebCore::Display::Style::borderTop const): (WebCore::Display::Style::borderBottom const): (WebCore::Display::Style::zIndex const): (WebCore::Display::Style::isStackingContext const): (WebCore::Display::Style::isPositioned const): (WebCore::Display::Style::isFloating const): (WebCore::Display::Style::participatesInZOrderSorting const): (WebCore::Display::Style::setIsPositioned): (WebCore::Display::Style::setIsFloating): * layout/displaytree/DisplayBox.cpp: Removed. * layout/displaytree/DisplayBox.h: Removed. * layout/layouttree/LayoutIterator.h: Unified sources build fix. Canonical link: https://commits.webkit.org/229692@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-23 23:39:29 +00:00
display/DisplayTree.h
display/DisplayTreeBuilder.h
display/DisplayView.h
display/compositing/DisplayLayerController.h
[LFC Display] Add the beginnings of a CSS display box hierarchy and CSS painter https://bugs.webkit.org/show_bug.cgi?id=216752 Reviewed by Zalan Bujtas. Add some Display::Box subclasses to display/css, a Display::Tree class to own the display tree, and a DisplayTreeBuilder. Also add css/DisplayCSSPainter which is the beginnings of a class that knows how to paint a CSS stacking context. This code other than DisplayCSSPainter is deliberately vague about how much is CSS specific. It's likely that some box classes will be shared with SVG painting. * CMakeLists.txt: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * display/DisplayLayerController.cpp: (WebCore::Display::LayerController::RootLayerClient::paintContents): (WebCore::Display::LayerController::RootLayerClient::deviceScaleFactor const): (WebCore::Display::LayerController::prepareForDisplay): (WebCore::Display::LayerController::ensureRootLayer): (WebCore::Display::LayerController::updateRootLayerGeometry): * display/DisplayLayerController.h: * display/DisplayTree.cpp: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::Tree::Tree): * display/DisplayTree.h: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::Tree::rootBox const): * display/DisplayTreeBuilder.cpp: Added. (WebCore::Display::TreeBuilder::TreeBuilder): (WebCore::Display::TreeBuilder::build const): (WebCore::Display::TreeBuilder::recursiveBuildDisplayTree const): (WebCore::Display::TreeBuilder::displayBoxForRootBox const): (WebCore::Display::TreeBuilder::displayBoxForLayoutBox const): (WebCore::Display::outputDisplayBox): (WebCore::Display::outputDisplayTree): (WebCore::Display::showDisplayTree): * display/DisplayTreeBuilder.h: Copied from Source/WebCore/display/DisplayView.h. * display/DisplayView.cpp: (WebCore::Display::View::prepareForDisplay): (WebCore::Display::View::deviceScaleFactor const): * display/DisplayView.h: * display/css/DisplayBox.cpp: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::Box::Box): (WebCore::Display::Box::setNextSibling): (WebCore::Display::Box::debugDescription const): * display/css/DisplayBox.h: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::Box::Box): (WebCore::Display::Box::style const): (WebCore::Display::Box::borderBoxFrame const): (WebCore::Display::Box::isContainerBox const): (WebCore::Display::Box::isImageBox const): (WebCore::Display::Box::isReplacedBox const): (WebCore::Display::Box::nextSibling const): * display/css/DisplayCSSPainter.cpp: Added. (WebCore::Display::CSSPainter::paintBoxDecorations): (WebCore::Display::CSSPainter::paintBoxContent): (WebCore::Display::CSSPainter::paintBox): (WebCore::Display::CSSPainter::recursivePaintDescendants): (WebCore::Display::CSSPainter::paintStackingContext): (WebCore::Display::CSSPainter::isStackingContextPaintingBoundary): (WebCore::Display::CSSPainter::recursiveCollectLayers): (WebCore::Display::CSSPainter::paintTree): * display/css/DisplayCSSPainter.h: Copied from Source/WebCore/display/DisplayView.h. * display/css/DisplayContainerBox.cpp: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ContainerBox::ContainerBox): (WebCore::Display::ContainerBox::setFirstChild): (WebCore::Display::ContainerBox::debugDescription const): * display/css/DisplayContainerBox.h: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ContainerBox::firstChild const): * display/css/DisplayImageBox.cpp: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ImageBox::ImageBox): (WebCore::Display::ImageBox::setImage): (WebCore::Display::ImageBox::debugDescription const): * display/css/DisplayImageBox.h: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ImageBox::image const): * display/css/DisplayReplacedBox.cpp: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ReplacedBox::ReplacedBox): * display/css/DisplayReplacedBox.h: Copied from Source/WebCore/display/DisplayView.h. (WebCore::Display::ReplacedBox::replacedContentRect const): * display/css/DisplayStyle.cpp: Copied from Source/WebCore/display/DisplayView.cpp. (WebCore::Display::Style::Style): (WebCore::Display::Style::hasBackground const): (WebCore::Display::Style::hasVisibleBorder const): * display/css/DisplayStyle.h: Added. (WebCore::Display::Style::backgroundColor const): (WebCore::Display::Style::hasBackgroundImage const): (WebCore::Display::Style::borderLeft const): (WebCore::Display::Style::borderRight const): (WebCore::Display::Style::borderTop const): (WebCore::Display::Style::borderBottom const): (WebCore::Display::Style::zIndex const): (WebCore::Display::Style::isStackingContext const): (WebCore::Display::Style::isPositioned const): (WebCore::Display::Style::isFloating const): (WebCore::Display::Style::participatesInZOrderSorting const): (WebCore::Display::Style::setIsPositioned): (WebCore::Display::Style::setIsFloating): * layout/displaytree/DisplayBox.cpp: Removed. * layout/displaytree/DisplayBox.h: Removed. * layout/layouttree/LayoutIterator.h: Unified sources build fix. Canonical link: https://commits.webkit.org/229692@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-23 23:39:29 +00:00
display/css/DisplayBox.h
display/css/DisplayCSSPainter.h
display/css/DisplayContainerBox.h
display/css/DisplayImageBox.h
display/css/DisplayReplacedBox.h
display/css/DisplayStyle.h
Support AbortSignal in addEventListenerOptions to unsubscribe from events https://bugs.webkit.org/show_bug.cgi?id=218753 <rdar://problem/71258012> Reviewed by Darin Adler. LayoutTests/imported/w3c: Import test coverage from WPT. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any-expected.txt: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.js: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker-expected.txt: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html: Added. * web-platform-tests/dom/events/w3c-import.log: Source/WebCore: Support AbortSignal in addEventListenerOptions to unsubscribe from events: - https://github.com/whatwg/dom/issues/911 - https://github.com/whatwg/dom/pull/919 Blink already added support for this. Tests: imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Modules/async-clipboard/Clipboard.h: * Modules/encryptedmedia/MediaKeySession.h: * Modules/indexeddb/IDBRequest.h: * Modules/mediastream/MediaDevices.h: * Modules/mediastream/RTCPeerConnection.h: * Modules/paymentrequest/PaymentRequest.h: * Modules/speech/SpeechRecognition.h: * Modules/webaudio/BaseAudioContext.h: * Modules/webgpu/WebGPUDevice.h: * Modules/webxr/WebXRSystem.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * animation/WebAnimation.h: * css/MediaQueryList.cpp: (WebCore::MediaQueryList::addListener): (WebCore::MediaQueryList::removeListener): * css/MediaQueryList.h: * dom/AbortSignal.h: * dom/AddEventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. (WebCore::AddEventListenerOptions::AddEventListenerOptions): * dom/AddEventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. * dom/EventListener.h: * dom/EventListenerMap.cpp: * dom/EventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. (WebCore::EventListenerOptions::EventListenerOptions): * dom/EventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. * dom/EventTarget.cpp: (WebCore::EventTarget::addEventListener): (WebCore::EventTarget::removeEventListenerForBindings): (WebCore::EventTarget::removeEventListener): (WebCore::EventTarget::setAttributeEventListener): (WebCore::EventTarget::innerInvokeEventListeners): * dom/EventTarget.h: (WebCore::EventTarget::removeEventListener): * dom/EventTarget.idl: * dom/MessagePort.cpp: (WebCore::MessagePort::MessagePort): (WebCore::MessagePort::removeEventListener): * dom/MessagePort.h: * dom/Node.cpp: (WebCore::tryAddEventListener): (WebCore::tryRemoveEventListener): (WebCore::Node::removeEventListener): * dom/Node.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::removeEventListener): * html/HTMLMediaElement.h: * html/ImageDocument.cpp: * html/track/TextTrackCue.h: * inspector/agents/InspectorDOMAgent.cpp: * loader/appcache/DOMApplicationCache.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::removeEventListener): * page/DOMWindow.h: * platform/cocoa/PlaybackSessionModelMediaElement.mm: * platform/cocoa/VideoFullscreenModelVideoElement.mm: * svg/SVGElement.cpp: (WebCore::SVGElement::removeEventListener): * svg/SVGElement.h: * svg/SVGTRefElement.cpp: * svg/animation/SVGSMILElement.cpp: * testing/Internals.cpp: * workers/service/ServiceWorkerContainer.h: Source/WebKit: Minor build fixes. * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: Source/WebKitLegacy/mac: Minor build fixes. * DOM/DOMNode.mm: Source/WTF: Add initializeWeakPtrFactory() protection function to CanMakeWeakPtr so that a subclass can eagerly initialize the WeakPtrFactory even if it does not subclass WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager>. MessagePort used to subclass WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager> for thread-safety reason but it now subclasses WeakPtrFactory<T, WeakPtrFactoryInitialization::Lazy> via EventTarget. * wtf/WeakPtr.h: (WTF::CanMakeWeakPtr::initializeWeakPtrFactory): Canonical link: https://commits.webkit.org/233312@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-25 20:06:25 +00:00
dom/AbortSignal.h
Add AbstractRange https://bugs.webkit.org/show_bug.cgi?id=217846 Reviewed by Ryosuke Niwa. LayoutTests/imported/w3c: * web-platform-tests/dom/idlharness.window-expected.txt: Updated test result for progression. Source/WebCore: This makes us more accurately match the DOM specification, makes Range and StaticRange objects slightly bigger since they now have a virtual table pointer, and makes the AbstractRange methods a bit slower to call from JavaScript since they are backed by C++ virtual functions. * CMakeLists.txt: Added AbstractRange files. * DerivedSources-input.xcfilelist: Ditto. * DerivedSources-output.xcfilelist: Ditto. * DerivedSources.make: Ditto. * Headers.cmake: Ditto. * Sources.txt: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. Also removed reference to non-existent JSAudioNodeCustom.cpp and moved JSStaticRange file from the Events group into the Ranges group. * bindings/js/JSAbstractRangeCustom.cpp: Added. (WebCore::toJS): Added. Just the default implementation. Would be nice if we did not have to write this. (WebCore::toJSNewlyCreated): Make either a StaticRange or Range wrapper depending on whether this is a live range or not. * bindings/js/JSEventCustom.cpp: Removed lots of unneeded includes. (WebCore::toJS): Stopped using "using namespace JSC". * bindings/js/WebCoreBuiltinNames.h: Added AbstractRange. * dom/AbstractRange.cpp: Added. (WebCore::makeSimpleRange): Added. * dom/AbstractRange.h: Added. * dom/AbstractRange.idl: Added. * dom/Range.h: Changed to derive from AbstractRange instead of from RefCounted. Also marked this final since it's now polymorphic. Marked all the functions that override final as well, to check that they correctly override the virtual functions in the base class. Added private isLiveRange function override that returns true. Added SPECIALIZE_TYPE_TRAITS_BEGIN/END so we can do is<Range>. * dom/Range.idl: Removed ImplementationLacksVTable. Added JSGenerateToNativeObject. Inherit from AbstractRange. Removed the 5 attribute getters that are now inherited from AbstractRange. * dom/StaticRange.h: Changed to derive from AbstractRange instead of from RefCounted. Also marked this final since it's now polymorphic. Added functions to override the ones from StaticRange, calling through to the ones from SimpleRange (I thought there was a way to do this with using, but I couldn't figure that out). Added private isLiveRange function override that returns false. Added SPECIALIZE_TYPE_TRAITS_BEGIN/END so we can do is<StaticRange>. * dom/StaticRange.idl: Removed EnabledBySetting=InputEvents since this should now always be included. I think we should probably remove the InputEvents setting now entirely. Removed ImplementationLacksVTable. Added JSGenerateToNativeObject. Inherit from AbstractRange. Removed all 5 attribute getters, which are now inherited from AbstractRange. Canonical link: https://commits.webkit.org/230606@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-17 20:33:53 +00:00
dom/AbstractRange.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/ActiveDOMCallback.h
dom/ActiveDOMObject.h
Support AbortSignal in addEventListenerOptions to unsubscribe from events https://bugs.webkit.org/show_bug.cgi?id=218753 <rdar://problem/71258012> Reviewed by Darin Adler. LayoutTests/imported/w3c: Import test coverage from WPT. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any-expected.txt: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.js: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker-expected.txt: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html: Added. * web-platform-tests/dom/events/w3c-import.log: Source/WebCore: Support AbortSignal in addEventListenerOptions to unsubscribe from events: - https://github.com/whatwg/dom/issues/911 - https://github.com/whatwg/dom/pull/919 Blink already added support for this. Tests: imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Modules/async-clipboard/Clipboard.h: * Modules/encryptedmedia/MediaKeySession.h: * Modules/indexeddb/IDBRequest.h: * Modules/mediastream/MediaDevices.h: * Modules/mediastream/RTCPeerConnection.h: * Modules/paymentrequest/PaymentRequest.h: * Modules/speech/SpeechRecognition.h: * Modules/webaudio/BaseAudioContext.h: * Modules/webgpu/WebGPUDevice.h: * Modules/webxr/WebXRSystem.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * animation/WebAnimation.h: * css/MediaQueryList.cpp: (WebCore::MediaQueryList::addListener): (WebCore::MediaQueryList::removeListener): * css/MediaQueryList.h: * dom/AbortSignal.h: * dom/AddEventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. (WebCore::AddEventListenerOptions::AddEventListenerOptions): * dom/AddEventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. * dom/EventListener.h: * dom/EventListenerMap.cpp: * dom/EventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. (WebCore::EventListenerOptions::EventListenerOptions): * dom/EventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. * dom/EventTarget.cpp: (WebCore::EventTarget::addEventListener): (WebCore::EventTarget::removeEventListenerForBindings): (WebCore::EventTarget::removeEventListener): (WebCore::EventTarget::setAttributeEventListener): (WebCore::EventTarget::innerInvokeEventListeners): * dom/EventTarget.h: (WebCore::EventTarget::removeEventListener): * dom/EventTarget.idl: * dom/MessagePort.cpp: (WebCore::MessagePort::MessagePort): (WebCore::MessagePort::removeEventListener): * dom/MessagePort.h: * dom/Node.cpp: (WebCore::tryAddEventListener): (WebCore::tryRemoveEventListener): (WebCore::Node::removeEventListener): * dom/Node.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::removeEventListener): * html/HTMLMediaElement.h: * html/ImageDocument.cpp: * html/track/TextTrackCue.h: * inspector/agents/InspectorDOMAgent.cpp: * loader/appcache/DOMApplicationCache.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::removeEventListener): * page/DOMWindow.h: * platform/cocoa/PlaybackSessionModelMediaElement.mm: * platform/cocoa/VideoFullscreenModelVideoElement.mm: * svg/SVGElement.cpp: (WebCore::SVGElement::removeEventListener): * svg/SVGElement.h: * svg/SVGTRefElement.cpp: * svg/animation/SVGSMILElement.cpp: * testing/Internals.cpp: * workers/service/ServiceWorkerContainer.h: Source/WebKit: Minor build fixes. * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: Source/WebKitLegacy/mac: Minor build fixes. * DOM/DOMNode.mm: Source/WTF: Add initializeWeakPtrFactory() protection function to CanMakeWeakPtr so that a subclass can eagerly initialize the WeakPtrFactory even if it does not subclass WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager>. MessagePort used to subclass WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager> for thread-safety reason but it now subclasses WeakPtrFactory<T, WeakPtrFactoryInitialization::Lazy> via EventTarget. * wtf/WeakPtr.h: (WTF::CanMakeWeakPtr::initializeWeakPtrFactory): Canonical link: https://commits.webkit.org/233312@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-25 20:06:25 +00:00
dom/AddEventListenerOptions.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/Attr.h
dom/Attribute.h
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
dom/BroadcastChannel.h
dom/BroadcastChannelIdentifier.h
dom/BroadcastChannelRegistry.h
Begin moving off of live ranges for WebKit internals https://bugs.webkit.org/show_bug.cgi?id=208432 Reviewed by Daniel Bates. Source/WebCore: The DOM Range class is a live range. The live updating feature of these ranges mean they are expensive to create and destroy and also make all DOM mutation more expensive while they are alive. We will be able to speed up, likely measurable on Speedometer, if we can cut down uses of live ranges. - Refactored the StaticRange class to create two new structs. - The BoundaryPoint struct implements what the DOM standard calls a boundary point: a node and offset. Similar to the RangeBoundaryPoint class, which supports being the boundary point of a live range, but simpler and not live. - The SimpleRange struct implements what the DOM standard calls a range (not a live range). Like StaticRange but without reference counting and DOM binding. - Since StaticRange is derived publicly from SimpleRange you can pass either to any function that takes a SimpleRange. And since there is a constructor to create a SimpleRange from a Range you can pass a Range to those functions too. - Renamed StaticRange::createFromRange to StaticRange::create. * Headers.cmake: Added BoundaryPoint.h, SimpleRange.h, and StaticRange.h. * Sources.txt: Added BoundaryPoint.cpp and SimpleRange.cpp. * WebCore.xcodeproj/project.pbxproj: Added BoundaryPoint.cpp/h and SimpleRange.cpp/h. * dom/BoundaryPoint.cpp: Added. * dom/BoundaryPoint.h: Added. * dom/SimpleRange.cpp: Added. * dom/SimpleRange.h: Added. * dom/StaticRange.cpp: (WebCore::StaticRange::StaticRange): Take an rvalue reference to a SimpleRange. (WebCore::StaticRange::create): Ditto. Changed the other overloads to create a SimpleRange first then call through to the main one. (WebCore::isDocumentTypeOrAttr): Wrote a much more efficient version of this. The old version called the virtual function nodeType twice. This calls it at most once, and mostly doesn't call it at all. * dom/StaticRange.h: Simplified this class, putting most of the actual range logic into the base class. Note that this change eliminated the peculiar code that in the == operator that compared nodes using isEqualNode instead of using node identity. There was no one who needed that other behavior. Also fixed mistaken use of unsigned long in StaticRange::Init. It's unsigned long in the IDL file, but confusingly that's just unsigned in .cpp files. * dom/StaticRange.idl: Tweaked formatting. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::targetRanges const): Updated for rename of StaticRange::create. * editing/ReplaceRangeWithTextCommand.cpp: (WebCore::ReplaceRangeWithTextCommand::doApply): Updated since VisibleSelection takes SimpleRange now. (WebCore::ReplaceRangeWithTextCommand::targetRanges const): Updated for rename of StaticRange::create. * editing/SpellingCorrectionCommand.cpp: (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand): Updated since a selection now takes a SimpleRange&, not a StaticRange. (WebCore::SpellingCorrectionCommand::targetRanges const): Updated for rename of StaticRange::create. * editing/TypingCommand.cpp: (WebCore::TypingCommand::willAddTypingToOpenCommand): Ditto. * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::VisibleSelection): Use SimpleRange instead of StaticRange and Range. * editing/VisibleSelection.h: Updated for the above. * editing/mac/EditorMac.mm: Added include. * page/DragController.cpp: Ditto. * page/TextIndicator.cpp: Ditto. (WebCore::TextIndicator::createWithRange): Updated since VisibleSelection takes SimpleRange now. * page/mac/EventHandlerMac.mm: (WebCore::InlineTextBox::collectMarkedTextsForHighlights): Tweaked coding style a bit. Source/WebKit: * Shared/EditingRange.cpp: (WebKit::EditingRange::fromRange): Initialize out arguments. * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: Added include. * WebProcess/WebPage/FindController.cpp: Ditto. * WebProcess/WebPage/WebPage.cpp: Ditto. * WebProcess/WebPage/mac/WebPageMac.mm: Ditto. Source/WebKitLegacy/ios: * WebCoreSupport/WebFrameIOS.mm: Added include. Source/WebKitLegacy/mac: * WebCoreSupport/WebContextMenuClient.mm: Added include. * WebView/WebFrame.mm: Ditto. (-[WebFrame _convertToNSRange:]): Initialized out arguments. Canonical link: https://commits.webkit.org/221736@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-09 04:00:31 +00:00
dom/BoundaryPoint.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/CDATASection.h
dom/CallbackResult.h
dom/CharacterData.h
dom/CollectionIndexCache.h
dom/Comment.h
dom/ContainerNode.h
dom/ContextDestructionObserver.h
dom/CustomElementReactionQueue.h
dom/DOMException.h
dom/DOMHighResTimeStamp.h
dom/DOMImplementation.h
dom/DOMPasteAccess.h
dom/DOMRect.h
dom/DOMRectInit.h
dom/DOMRectList.h
dom/DOMRectReadOnly.h
dom/DOMTimeStamp.h
dom/DataTransfer.h
dom/DeviceOrientationClient.h
dom/DeviceOrientationData.h
dom/DeviceOrientationOrMotionPermissionState.h
dom/Document.h
Fix WPT test resource-timing/cross-origin-redirects.html https://bugs.webkit.org/show_bug.cgi?id=190523 <rdar://45227788> Reviewed by Brady Eidson. LayoutTests/imported/w3c: * web-platform-tests/navigation-timing/nav2_test_redirect_server-expected.txt: * web-platform-tests/navigation-timing/nav2_test_redirect_server.html: Sometimes, with our use of Performance::reduceTimeResolution, the event times are equal to each other. Allow this. * web-platform-tests/resource-timing/cross-origin-redirects-expected.txt: Added. * web-platform-tests/resource-timing/cross-origin-redirects.html: Added. * web-platform-tests/resource-timing/resources/entry-invariants.js: Added. (const.assert_all_equal_): (const.assert_ordered_): (const.assert_zeroed_): (const.assert_not_negative_): (const.assert_positive_): (const.attribute_test_internal): (async const): (const.attribute_test_with_validator): * web-platform-tests/resource-timing/resources/resource-loaders.js: Added. (const.load.font.path.return.document.fonts.ready.then): (const.load.stylesheet.async path): (const.load.iframe.async path): (const.load.script.async path): (const.load.xhr_sync.async path): Source/WebCore: Test: imported/w3c/web-platform-tests/resource-timing/cross-origin-redirects.html This test took more to fix than I thought it would. We used to collect our timing data from various sources into various structures, mostly based on Google's work from 2010 with a few things tacked on to it. The timing specifications have changed considerably in the last 11 years, and so should the shape of the structures we put the data into. We used to have a LoadTiming structure in various places that claimed to contain the redirect times, but markRedirectStart and markRedirectEnd were never called. Instead we tried to collect this data from the SubResourceLoader and DocumentLoader reporting redirects in the web process. This wasn't great. Redirect timing is best collected in the network process by the framework doing the redirecting, and now we have the NSURLSessionTaskMetrics API to get the data we need. I've made NetworkLoadMetrics the structure that contains all the network load metrics from the network process. DocumentEventTiming is owned in the web process by the Document, and it contains the load event timing data. ResourceLoadTiming is owned by the ResourceLoader, and it contains the fetch start and end times including the parts of the fetch algorithm that happen in the web process. DocumentLoadTiming inherits from it and is owned by the DocumentLoader, which reflects the fact that PerformanceNavigationTiming inherits from PerformanceResourceTiming in the specs. With these structures in place, we now have the infrastructure to collect timing data and expose it correctly. Another thing that has changed is that these structures consistently store the timing data in the MonotonicTime type, which is the number of seconds since the machine restarted. NetworkLoadMetrics used to confusingly store fetch start time and then other network times as deltas from it, and we would pretend that fetch start time was the same as the fetch start time in the web process and calculate everything from the deltas. This is an unfortunate consequence of my younger self not realizing that the double values from NSURLConnection._timingData are values to be put into [NSDate initWithTimeIntervalSinceReferenceDate] then pulled out with timeIntervalSince1970 to get WallTime. I was confused because they weren't WallTime or MonotonicTime, so I only dealt with them as deltas from each other. Consistently using MonotonicTime makes all this code much more straightforward. I also use std::numeric_limits<uint64_t>::max() instead of std::numeric_limits<uint32_t>::max() as a sentinel value for requestHeaderBytesSent and responseHeaderBytesReceived to make everything more sane. I'm not too worried about the metrics of downloads of exactly 4GB, but they should also be fixed. A consequence of collecting the redirect times in the network process is that we have to move the SecurityOrigin::canRequest checks to see if the redirects are same-origin to ResourceHandle and NetworkDataTask. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::setReadyState): (WebCore::Document::finishedParsing): (WebCore::Document::monotonicTimestamp const): * dom/Document.h: (WebCore::Document::eventTiming const): (WebCore::Document::timing const): Deleted. * dom/DocumentEventTiming.h: Copied from Source/WebCore/dom/DocumentTiming.h. * inspector/agents/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::buildObjectForTiming): (WebCore::InspectorNetworkAgent::buildObjectForMetrics): (WebCore::InspectorNetworkAgent::buildObjectForResourceResponse): (WebCore::InspectorNetworkAgent::didFinishLoading): * inspector/agents/InspectorNetworkAgent.h: * loader/DocumentLoadTiming.h: Renamed from Source/WebCore/loader/LoadTiming.h. (WebCore::DocumentLoadTiming::timeOrigin const): (WebCore::DocumentLoadTiming::markUnloadEventStart): (WebCore::DocumentLoadTiming::markUnloadEventEnd): (WebCore::DocumentLoadTiming::markLoadEventStart): (WebCore::DocumentLoadTiming::markLoadEventEnd): (WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument): (WebCore::DocumentLoadTiming::unloadEventStart const): (WebCore::DocumentLoadTiming::unloadEventEnd const): (WebCore::DocumentLoadTiming::loadEventStart const): (WebCore::DocumentLoadTiming::loadEventEnd const): (WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument const): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::willSendRequest): (WebCore::DocumentLoader::dataReceived): (WebCore::DocumentLoader::startLoadingMainResource): * loader/DocumentLoader.h: (WebCore::DocumentLoader::timing const): (WebCore::DocumentLoader::timing): (WebCore::DocumentLoader::resetTiming): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::loadRequest): * loader/FrameLoader.cpp: (WebCore::FrameLoader::dispatchUnloadEvents): * loader/LoadTiming.cpp: Removed. * loader/ResourceLoadTiming.h: Renamed from Source/WebCore/dom/DocumentTiming.h. (WebCore::ResourceLoadTiming::markStartTime): (WebCore::ResourceLoadTiming::markEndTime): (WebCore::ResourceLoadTiming::startTime const): (WebCore::ResourceLoadTiming::endTime const): (WebCore::ResourceLoadTiming::isolatedCopy const): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::init): * loader/ResourceLoader.h: (WebCore::ResourceLoader::loadTiming): * loader/ResourceTiming.cpp: (WebCore::ResourceTiming::fromMemoryCache): (WebCore::ResourceTiming::fromLoad): (WebCore::ResourceTiming::fromSynchronousLoad): (WebCore::ResourceTiming::ResourceTiming): (WebCore::ResourceTiming::isolatedCopy const): (WebCore::ResourceTiming::fromCache): Deleted. * loader/ResourceTiming.h: (WebCore::ResourceTiming::resourceLoadTiming const): (WebCore::ResourceTiming::ResourceTiming): (WebCore::ResourceTiming::loadTiming const): Deleted. * loader/ResourceTimingInformation.cpp: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequestInternal): (WebCore::SubresourceLoader::didFinishLoading): * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource): * page/DOMWindow.cpp: (WebCore::DOMWindow::performance const): * page/Performance.cpp: (WebCore::Performance::addNavigationTiming): * page/Performance.h: * page/PerformanceNavigation.cpp: (WebCore::PerformanceNavigation::redirectCount const): * page/PerformanceNavigationTiming.cpp: (WebCore::PerformanceNavigationTiming::PerformanceNavigationTiming): (WebCore::PerformanceNavigationTiming::millisecondsSinceOrigin const): (WebCore::PerformanceNavigationTiming::sameOriginCheckFails const): (WebCore::PerformanceNavigationTiming::unloadEventStart const): (WebCore::PerformanceNavigationTiming::unloadEventEnd const): (WebCore::PerformanceNavigationTiming::domInteractive const): (WebCore::PerformanceNavigationTiming::domContentLoadedEventStart const): (WebCore::PerformanceNavigationTiming::domContentLoadedEventEnd const): (WebCore::PerformanceNavigationTiming::domComplete const): (WebCore::PerformanceNavigationTiming::loadEventStart const): (WebCore::PerformanceNavigationTiming::loadEventEnd const): (WebCore::PerformanceNavigationTiming::redirectCount const): * page/PerformanceNavigationTiming.h: * page/PerformanceResourceTiming.cpp: (WebCore::networkLoadTimeToDOMHighResTimeStamp): (WebCore::fetchStart): (WebCore::entryStartTime): (WebCore::entryEndTime): (WebCore::PerformanceResourceTiming::redirectStart const): (WebCore::PerformanceResourceTiming::redirectEnd const): (WebCore::PerformanceResourceTiming::fetchStart const): (WebCore::PerformanceResourceTiming::domainLookupStart const): (WebCore::PerformanceResourceTiming::domainLookupEnd const): (WebCore::PerformanceResourceTiming::connectStart const): (WebCore::PerformanceResourceTiming::connectEnd const): (WebCore::PerformanceResourceTiming::secureConnectionStart const): (WebCore::PerformanceResourceTiming::requestStart const): (WebCore::PerformanceResourceTiming::responseStart const): (WebCore::PerformanceResourceTiming::responseEnd const): (WebCore::monotonicTimeToDOMHighResTimeStamp): Deleted. (WebCore::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp const): Deleted. * page/PerformanceResourceTiming.h: * page/PerformanceTiming.cpp: (WebCore::PerformanceTiming::navigationStart const): (WebCore::PerformanceTiming::unloadEventStart const): (WebCore::PerformanceTiming::unloadEventEnd const): (WebCore::PerformanceTiming::redirectStart const): (WebCore::PerformanceTiming::redirectEnd const): (WebCore::PerformanceTiming::fetchStart const): (WebCore::PerformanceTiming::domainLookupStart const): (WebCore::PerformanceTiming::domainLookupEnd const): (WebCore::PerformanceTiming::connectStart const): (WebCore::PerformanceTiming::connectEnd const): (WebCore::PerformanceTiming::secureConnectionStart const): (WebCore::PerformanceTiming::requestStart const): (WebCore::PerformanceTiming::responseStart const): (WebCore::PerformanceTiming::responseEnd const): (WebCore::PerformanceTiming::domLoading const): (WebCore::PerformanceTiming::domInteractive const): (WebCore::PerformanceTiming::domContentLoadedEventStart const): (WebCore::PerformanceTiming::domContentLoadedEventEnd const): (WebCore::PerformanceTiming::domComplete const): (WebCore::PerformanceTiming::loadEventStart const): (WebCore::PerformanceTiming::loadEventEnd const): (WebCore::PerformanceTiming::documentLoader const): (WebCore::PerformanceTiming::documentEventTiming const): (WebCore::PerformanceTiming::documentLoadTiming const): (WebCore::PerformanceTiming::networkLoadMetrics const): (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds const): (WebCore::PerformanceTiming::documentTiming const): Deleted. (WebCore::PerformanceTiming::loadTiming const): Deleted. (WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart const): Deleted. * page/PerformanceTiming.h: * platform/network/NetworkLoadMetrics.h: (WebCore::NetworkLoadMetrics::isolatedCopy const): (WebCore::NetworkLoadMetrics::operator== const): (WebCore::NetworkLoadMetrics::encode const): (WebCore::NetworkLoadMetrics::decode): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::hasCrossOriginRedirect const): (WebCore::ResourceHandle::setHasCrossOriginRedirect): (WebCore::ResourceHandle::incrementRedirectCount): (WebCore::ResourceHandle::redirectCount const): (WebCore::ResourceHandle::startTimeBeforeRedirects const): (WebCore::ResourceHandle::networkLoadMetrics): (WebCore::ResourceHandle::setNetworkLoadMetrics): * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: * platform/network/cocoa/NetworkLoadMetrics.mm: (WebCore::dateToMonotonicTime): (WebCore::packageTimingData): (WebCore::copyTimingData): * platform/network/cocoa/WebCoreNSURLSession.mm: (networkLoadMetricsDate): (-[WebCoreNSURLSessionTaskTransactionMetrics fetchStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupEndDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics connectStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics secureConnectionStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics connectEndDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics requestStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics responseStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics responseEndDate]): * platform/network/curl/CurlContext.cpp: (WebCore::CurlHandle::getNetworkLoadMetrics): * platform/network/curl/CurlContext.h: * platform/network/curl/CurlRequest.cpp: (WebCore::CurlRequest::didCompleteTransfer): (WebCore::CurlRequest::networkLoadMetrics): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]): Source/WebKit: * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]): (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): * NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup): (WebKit::NetworkDataTaskSoup::clearRequest): (WebKit::NetworkDataTaskSoup::resume): (WebKit::NetworkDataTaskSoup::didSendRequest): (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError): (WebKit::NetworkDataTaskSoup::continueHTTPRedirection): (WebKit::NetworkDataTaskSoup::networkEvent): (WebKit::NetworkDataTaskSoup::didStartRequest): (WebKit::NetworkDataTaskSoup::didRestart): LayoutTests: * http/tests/misc/webtiming-slow-load-expected.txt: * http/tests/misc/webtiming-slow-load.py: Our new metrics gathering now matches Firefox instead of Chrome in PerformanceResourceTiming::responseEnd in this edge case of a deprecated API. Update expectations accordingly. * platform/mac-wk1/TestExpectations: Bringing this test to passing in WK2 makes it flaky in WK1 because we don't get good redirect timing data from CFNetwork through NSURLConnection. * platform/win/http/tests/misc/webtiming-one-redirect-expected.txt: Added. * platform/win/http/tests/misc/webtiming-slow-load-expected.txt: Copied from LayoutTests/http/tests/misc/webtiming-slow-load-expected.txt. * platform/win/http/tests/misc/webtiming-two-redirects-expected.txt: Added. The network layer is now responsible for counting redirects and providing redirect timings. Our friend CFURLConnection doesn't have that ability, so it doesn't pass these tests any more. It never supported any timing APIs and other tests are skipped. Canonical link: https://commits.webkit.org/238416@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-03 01:25:53 +00:00
dom/DocumentEventTiming.h
Refactor font loading to make it possible for Worker to implement it https://bugs.webkit.org/show_bug.cgi?id=224277 Reviewed by Darin Adler. Introduce FontLoadRequest and FontLoadRequestClient as an abstraction separate from CachedFont and CachedFontClient to allow for separate implementations. Also move Document-specific font-loading behaviour from CSSFontSelector into Document and add non-Document specific accessors to ScriptExecutionContext. These changes should allow for custom font loading to be implementable on a Worker, which will be necessary for FontFace support in OffscreenCanvas. No new tests, no change in behavior. * Headers.cmake: Added FontLoadRequest.h, CachedFontLoadRequest.h and DocumentFontLoader.h. * Sources.txt: Added DocumentFontLoader.cpp. * WebCore.xcodeproj/project.pbxproj: Added files listed above. * css/CSSFontFace.cpp: Update to not require Document for custom font loading. (WebCore::CSSFontFace::appendSources): * css/CSSFontFaceSource.cpp: Update to use FontLoadRequest instead of CachedFont. (WebCore::CSSFontFaceSource::CSSFontFaceSource): (WebCore::CSSFontFaceSource::~CSSFontFaceSource): (WebCore::CSSFontFaceSource::opportunisticallyStartFontDataURLLoading): (WebCore::CSSFontFaceSource::fontLoaded): (WebCore::CSSFontFaceSource::load): (WebCore::CSSFontFaceSource::font): (WebCore::CSSFontFaceSource::isSVGFontFaceSource const): * css/CSSFontFaceSource.h: * css/CSSFontFaceSrcValue.cpp: Update to use FontLoadRequest and ScriptExecutionContext instead of CachedResourceLoader. (WebCore::CSSFontFaceSrcValue::fontLoadRequest): * css/CSSFontFaceSrcValue.h: * css/CSSFontSelector.cpp: Remove Document-specific code. (WebCore::CSSFontSelector::CSSFontSelector): (WebCore::CSSFontSelector::~CSSFontSelector): (WebCore::CSSFontSelector::clearFonts): * css/CSSFontSelector.h: * dom/Document.cpp: Implement ScriptExecutionContext::fontLoadRequest and ::beginLoadingFontSoon. (WebCore::Document::~Document): (WebCore::Document::removedLastRef): (WebCore::Document::resolveStyle): (WebCore::Document::suspendFontLoading): (WebCore::Document::fontLoadRequest): (WebCore::Document::beginLoadingFontSoon): (WebCore::Document::suspend): (WebCore::Document::resume): * dom/Document.h: * dom/DocumentFontLoader.cpp: Added. New class to handle Document-specific font-loading code that was previously in CSSFontSelector and CSSFontFaceSrcValue. (WebCore::DocumentFontLoader::DocumentFontLoader): (WebCore::DocumentFontLoader::~DocumentFontLoader): (WebCore::DocumentFontLoader::cachedFont): (WebCore::DocumentFontLoader::beginLoadingFontSoon): (WebCore::DocumentFontLoader::loadPendingFonts): (WebCore::DocumentFontLoader::fontLoadingTimerFired): (WebCore::DocumentFontLoader::stopLoadingAndClearFonts): (WebCore::DocumentFontLoader::suspendFontLoading): (WebCore::DocumentFontLoader::resumeFontLoading): * dom/DocumentFontLoader.h: * dom/ScriptExecutionContext.cpp: Add functions to initiate font load requests. (WebCore::ScriptExecutionContext::fontLoadRequest): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::beginLoadingFontSoon): * loader/DocumentLoader.cpp: CSSFontSelector::suspendFontLoadingTimer is now Document::suspendFontLoading. (WebCore::DocumentLoader::stopLoading): * loader/FontLoadRequest.h: Added. An interface to manage font loading that abstracts some of the behaviour of CachedResource, CachedFont and CachedFontClient. (WebCore::FontLoadRequestClient::fontLoaded): (WebCore::FontLoadRequestClient::isCachedFontLoadRequest const): * loader/cache/CachedFontLoadRequest.h: Added. An implementation of FontLoadRequest for CachedFont. * workers/WorkerGlobalScope.cpp: Remove now-redundant CSSFontSelector call. (WebCore::WorkerGlobalScope::~WorkerGlobalScope): Canonical link: https://commits.webkit.org/236387@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-12 09:26:42 +00:00
dom/DocumentFontLoader.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/DocumentFragment.h
dom/DocumentFullscreen.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/DocumentMarker.h
dom/DocumentMarkerController.h
Storage Access API: Make two changes requested by developers and complete refactoring and cleanup https://bugs.webkit.org/show_bug.cgi?id=197648 <rdar://problem/50527493> Reviewed by Chris Dumez. Source/WebCore: Developers have requested two minor changes to the Storage Access API: - Only consume the user gesture when the user explicitly denies access. - Make document.hasStorageAccess() return true instead of false when the feature is off. In addition to this, we have refactoring and cleanup to do. Namely: - Make use of WebCore::RegistrableDomain all the way. - Remove dead code in WebKit::NetworkProcess since the calls now go through NetworkConnectionToWebProcess. - Introduce boolean enums for state handling. - Break out the Storage Access API functionality into a supplement of WebCore::Document. Reviewed by Chris Dumez. Tests: http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture.html http/tests/storageAccess/deny-without-prompt-preserves-gesture.html http/tests/storageAccess/grant-with-prompt-preserves-gesture.html http/tests/storageAccess/has-storage-access-true-if-feature-off.html * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::hasStorageAccess): Deleted. (WebCore::Document::requestStorageAccess): Deleted. (WebCore::Document::enableTemporaryTimeUserGesture): Deleted. (WebCore::Document::consumeTemporaryTimeUserGesture): Deleted. (WebCore::Document::hasFrameSpecificStorageAccess const): Deleted. (WebCore::Document::setHasFrameSpecificStorageAccess): Deleted. * dom/Document.h: (WebCore::Document::setUserGrantsStorageAccessOverride): Deleted. All of this has been moved to the supplement WebCore::DocumentStorageAccess. * dom/Document.idl: The Storage Access API has been moved to DocumentStorageAccess.idl. * dom/DocumentStorageAccess.cpp: Added. (WebCore::DocumentStorageAccess::from): (WebCore::DocumentStorageAccess::supplementName): (WebCore::DocumentStorageAccess::hasStorageAccess): (WebCore::DocumentStorageAccess::requestStorageAccess): (WebCore::DocumentStorageAccess::enableTemporaryTimeUserGesture): (WebCore::DocumentStorageAccess::consumeTemporaryTimeUserGesture): (WebCore::DocumentStorageAccess::hasFrameSpecificStorageAccess const): (WebCore::DocumentStorageAccess::setHasFrameSpecificStorageAccess): * dom/DocumentStorageAccess.h: Added. * dom/DocumentStorageAccess.idl: Added. * page/ChromeClient.h: * testing/Internals.cpp: (WebCore::Internals::setUserGrantsStorageAccess): Deleted. This was dead code. * testing/Internals.h: * testing/Internals.idl: Source/WebKit: Developers have requested two minor changes to the Storage Access API: - Only consume the user gesture when the user explicitly denies access. - Make document.hasStorageAccess() return true instead of false when the feature is off. In addition to this, we have refactoring and cleanup to do. Namely: - Make use of WebCore::RegistrableDomain all the way. - Remove dead code in WebKit::NetworkProcess since the calls now go through NetworkConnectionToWebProcess. - Introduce boolean enums for state handling. - Break out the Storage Access API functionality into a supplement of WebCore::Document. * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: (WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationships): (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess): (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener): (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess): (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal): (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const): These changes are due to the new enums WebCore::StorageAccessWasGranted and WebCore::StorageAccessPromptWasShown. * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess): (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener): (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccess): (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal): (WebKit::ResourceLoadStatisticsMemoryStore::hasUserGrantedStorageAccessThroughPrompt): These changes are due to the new enums WebCore::StorageAccessWasGranted and WebCore::StorageAccessPromptWasShown. * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: These changes are due to the new enums WebCore::StorageAccessWasGranted and WebCore::StorageAccessPromptWasShown. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess): (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): (WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler): These changes are due to the new enums WebCore::StorageAccessWasGranted and WebCore::StorageAccessPromptWasShown. (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessGranted): Deleted. This function is now no longer exposed and its functionality could be folded into the existing WebResourceLoadStatisticsStore::requestStorageAccess() which is more clearly named. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::hasStorageAccess): (WebKit::NetworkConnectionToWebProcess::requestStorageAccess): These changes are due to the new enums WebCore::StorageAccessWasGranted and WebCore::StorageAccessPromptWasShown. * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::hasStorageAccessForFrame): Deleted. (WebKit::NetworkProcess::hasStorageAccess): Deleted. (WebKit::NetworkProcess::requestStorageAccess): Deleted. (WebKit::NetworkProcess::requestStorageAccessGranted): Deleted. (WebKit::NetworkProcess::grantStorageAccess): Deleted. (WebKit::NetworkProcess::removeAllStorageAccess): Deleted. These functions were left behind in the move of ITP to the network process. This communication goes through WebKit::NetworkConnectionToWebProcess since a while back. * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * Scripts/webkit/messages.py: Instructions for derived IPC code on how to include the new enums WebCore::StorageAccessWasGranted and WebCore::StorageAccessPromptWasShown. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::hasStorageAccessForFrame): Deleted. (WebKit::NetworkProcessProxy::hasStorageAccess): Deleted. (WebKit::NetworkProcessProxy::requestStorageAccess): Deleted. (WebKit::NetworkProcessProxy::grantStorageAccess): Deleted. (WebKit::NetworkProcessProxy::removeAllStorageAccess): Deleted. These functions were left behind in the move of ITP to the network process. This communication goes through WebKit::NetworkConnectionToWebProcess since a while back. * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::hasStorageAccess): Deleted. (WebKit::WebsiteDataStore::requestStorageAccess): Deleted. (WebKit::WebsiteDataStore::grantStorageAccess): Deleted. These functions were left behind in the move of ITP to the network process. This communication goes through WebKit::NetworkConnectionToWebProcess since a while back. * UIProcess/WebsiteData/WebsiteDataStore.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::hasStorageAccess): (WebKit::WebChromeClient::requestStorageAccess): These changes are due to the new enums WebCore::StorageAccessWasGranted and WebCore::StorageAccessPromptWasShown. They also receive WebCore::RegistrableDomain objects instead of Strings now. * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::hasStorageAccess): (WebKit::WebPage::requestStorageAccess): These changes are due to the new enums WebCore::StorageAccessWasGranted and WebCore::StorageAccessPromptWasShown. They also receive WebCore::RegistrableDomain objects instead of Strings now. * WebProcess/WebPage/WebPage.h: LayoutTests: The changed test cases have had calls to WebCore::Internals::setUserGrantsStorageAccess() removed since it was dead code. One of the new tests, deny-with-prompt-does-not-preserve-gesture.html, is marked [ Skip ] for now since we lack the ability to click "Don't allow" in the prompt. I wanted to include the test anyway so that we have it. I have done a manual test to make sure the code does the right thing for this case. * http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture-expected.txt: Added. * http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture.html: Copied from LayoutTests/http/tests/storageAccess/request-and-grant-access-cross-origin-non-sandboxed-iframe-pop-window.html. * http/tests/storageAccess/deny-without-prompt-preserves-gesture-expected.txt: Added. * http/tests/storageAccess/deny-without-prompt-preserves-gesture.html: Copied from LayoutTests/http/tests/storageAccess/request-and-grant-access-cross-origin-non-sandboxed-iframe-pop-window.html. * http/tests/storageAccess/grant-with-prompt-preserves-gesture-expected.txt: Renamed from LayoutTests/http/tests/storageAccess/request-and-grant-access-cross-origin-non-sandboxed-iframe-pop-window-expected.txt. * http/tests/storageAccess/grant-with-prompt-preserves-gesture.html: Renamed from LayoutTests/http/tests/storageAccess/request-and-grant-access-cross-origin-non-sandboxed-iframe-pop-window.html. * http/tests/storageAccess/has-storage-access-true-if-feature-off-expected.txt: Added. * http/tests/storageAccess/has-storage-access-true-if-feature-off.html: Added. * http/tests/storageAccess/resources/request-storage-access-and-immediately-postmessage-iframe.html: * http/tests/storageAccess/resources/request-storage-access-iframe-and-pop-window.html: * http/tests/storageAccess/resources/request-storage-access-iframe.html: * http/tests/storageAccess/resources/request-storage-access-without-user-gesture-iframe.html: * http/tests/storageAccess/resources/self-navigating-frame-after-granted-access.html: * platform/mac-wk2/TestExpectations: Added expectations for the new tests. Canonical link: https://commits.webkit.org/211805@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-07 19:55:29 +00:00
dom/DocumentStorageAccess.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/DocumentType.h
dom/Element.h
dom/ElementAncestorIterator.h
dom/ElementChildIterator.h
Move ElementContext from WebKit to WebCore https://bugs.webkit.org/show_bug.cgi?id=203210 <rdar://problem/56475682> Reviewed by Simon Fraser. Source/WebCore: * WebCore.xcodeproj/project.pbxproj: * dom/RadioButtonGroups.h: Source/WebKit: * Scripts/webkit/messages.py: * Shared/DocumentEditingContext.h: * Shared/DocumentEditingContext.mm: (IPC::ArgumentCoder<WebKit::DocumentEditingContextRequest>::decode): * Shared/ElementContext.cpp: Removed. * Shared/ElementContext.h: Removed. * Shared/WebPreferencesDefaultValues.cpp: (WebKit::defaultCSSOMViewScrollingAPIEnabled): * Shared/WebsitePoliciesData.cpp: (WebKit::WebsitePoliciesData::decode): * Shared/ios/InteractionInformationAtPosition.h: * Sources.txt: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _requestTextInputContextsInRect:completionHandler:]): * UIProcess/API/Cocoa/_WKTextInputContext.mm: (-[_WKTextInputContext _initWithTextInputContext:]): (-[_WKTextInputContext _textInputContext]): * UIProcess/API/Cocoa/_WKTextInputContextInternal.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::textInputContextsInRect): (WebKit::WebPageProxy::focusTextInputContext): * UIProcess/WebPageProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::textInputContextsInRect): (WebKit::WebPage::focusTextInputContext): (WebKit::WebPage::elementForContext const): (WebKit::WebPage::contextForElement const): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::startInteractionWithElementContextOrPosition): Canonical link: https://commits.webkit.org/216626@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-21 22:12:01 +00:00
dom/ElementContext.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/ElementData.h
dom/ElementIdentifier.h
dom/ElementIterator.h
dom/ElementIteratorAssertions.h
dom/ElementTraversal.h
dom/Event.h
dom/EventInit.h
dom/EventListener.h
dom/EventListenerMap.h
Support AbortSignal in addEventListenerOptions to unsubscribe from events https://bugs.webkit.org/show_bug.cgi?id=218753 <rdar://problem/71258012> Reviewed by Darin Adler. LayoutTests/imported/w3c: Import test coverage from WPT. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any-expected.txt: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.js: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker-expected.txt: Added. * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html: Added. * web-platform-tests/dom/events/w3c-import.log: Source/WebCore: Support AbortSignal in addEventListenerOptions to unsubscribe from events: - https://github.com/whatwg/dom/issues/911 - https://github.com/whatwg/dom/pull/919 Blink already added support for this. Tests: imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Modules/async-clipboard/Clipboard.h: * Modules/encryptedmedia/MediaKeySession.h: * Modules/indexeddb/IDBRequest.h: * Modules/mediastream/MediaDevices.h: * Modules/mediastream/RTCPeerConnection.h: * Modules/paymentrequest/PaymentRequest.h: * Modules/speech/SpeechRecognition.h: * Modules/webaudio/BaseAudioContext.h: * Modules/webgpu/WebGPUDevice.h: * Modules/webxr/WebXRSystem.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * animation/WebAnimation.h: * css/MediaQueryList.cpp: (WebCore::MediaQueryList::addListener): (WebCore::MediaQueryList::removeListener): * css/MediaQueryList.h: * dom/AbortSignal.h: * dom/AddEventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. (WebCore::AddEventListenerOptions::AddEventListenerOptions): * dom/AddEventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. * dom/EventListener.h: * dom/EventListenerMap.cpp: * dom/EventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. (WebCore::EventListenerOptions::EventListenerOptions): * dom/EventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h. * dom/EventTarget.cpp: (WebCore::EventTarget::addEventListener): (WebCore::EventTarget::removeEventListenerForBindings): (WebCore::EventTarget::removeEventListener): (WebCore::EventTarget::setAttributeEventListener): (WebCore::EventTarget::innerInvokeEventListeners): * dom/EventTarget.h: (WebCore::EventTarget::removeEventListener): * dom/EventTarget.idl: * dom/MessagePort.cpp: (WebCore::MessagePort::MessagePort): (WebCore::MessagePort::removeEventListener): * dom/MessagePort.h: * dom/Node.cpp: (WebCore::tryAddEventListener): (WebCore::tryRemoveEventListener): (WebCore::Node::removeEventListener): * dom/Node.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::removeEventListener): * html/HTMLMediaElement.h: * html/ImageDocument.cpp: * html/track/TextTrackCue.h: * inspector/agents/InspectorDOMAgent.cpp: * loader/appcache/DOMApplicationCache.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::removeEventListener): * page/DOMWindow.h: * platform/cocoa/PlaybackSessionModelMediaElement.mm: * platform/cocoa/VideoFullscreenModelVideoElement.mm: * svg/SVGElement.cpp: (WebCore::SVGElement::removeEventListener): * svg/SVGElement.h: * svg/SVGTRefElement.cpp: * svg/animation/SVGSMILElement.cpp: * testing/Internals.cpp: * workers/service/ServiceWorkerContainer.h: Source/WebKit: Minor build fixes. * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: Source/WebKitLegacy/mac: Minor build fixes. * DOM/DOMNode.mm: Source/WTF: Add initializeWeakPtrFactory() protection function to CanMakeWeakPtr so that a subclass can eagerly initialize the WeakPtrFactory even if it does not subclass WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager>. MessagePort used to subclass WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager> for thread-safety reason but it now subclasses WeakPtrFactory<T, WeakPtrFactoryInitialization::Lazy> via EventTarget. * wtf/WeakPtr.h: (WTF::CanMakeWeakPtr::initializeWeakPtrFactory): Canonical link: https://commits.webkit.org/233312@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-25 20:06:25 +00:00
dom/EventListenerOptions.h
Port media code to the HTML event loop https://bugs.webkit.org/show_bug.cgi?id=226543 Reviewed by Ryosuke Niwa. Port media code to the HTML event loop so that event processing order is consistent with non-media related events. To avoid having a very large patch, I made the following changes: - Update MainThreadGenericEventQueue to be based on the HTML event loop instead of a global Timer. - Introduce a EventLoopDeferrableTask which has the same API as DeferrableTask<Timer> but uses the HTML event loop instead of a global Timer. Port media code to use EventLoopDeferrableTask instead of DeferrableTask. - Introduce an EventLoopTaskQueue which has the same API as GenericTaskQueue<Timer> but uses the HTML event loop instead of a global Timer. Port media code to use EventLoopTaskQueue instead of GenericTaskQueue<Timer>. This effectively ports our entire media code to the HTML event loop. It allows new media code to use the HTML event loop *directly* without fear of ordering issues. It also allows us to refactor existing media code to use the HTML event loop *directly* when possible, in an incremental fashion, without causing ordering issues. * Headers.cmake: * Modules/remoteplayback/RemotePlayback.cpp: (WebCore::RemotePlayback::RemotePlayback): * Modules/remoteplayback/RemotePlayback.h: * animation/DocumentTimelinesController.cpp: (WebCore::DocumentTimelinesController::DocumentTimelinesController): * animation/DocumentTimelinesController.h: * dom/FullscreenManager.cpp: * dom/FullscreenManager.h: * dom/GenericEventQueue.cpp: (WebCore::MainThreadGenericEventQueue::MainThreadGenericEventQueue): (WebCore::MainThreadGenericEventQueue::enqueueEvent): (WebCore::MainThreadGenericEventQueue::close): (WebCore::MainThreadGenericEventQueue::cancelAllEvents): (WebCore::MainThreadGenericEventQueue::hasPendingEventsOfType const): * dom/GenericEventQueue.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): * html/HTMLMediaElement.h: * html/shadow/MediaControlTextTrackContainerElement.cpp: (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): * html/shadow/MediaControlTextTrackContainerElement.h: * platform/DeferrableTask.h: (WebCore::DeferrableTaskBase::close): (WebCore::DeferrableTaskBase::cancelTask): (WebCore::DeferrableTaskBase::hasPendingTask const): (WebCore::DeferrableTaskBase::isClosed const): (WebCore::DeferrableTaskBase::setHasPendingTask): * platform/GenericTaskQueue.h: (WebCore::GenericTaskQueueBase::hasPendingTasks const): (WebCore::GenericTaskQueueBase::isClosed const): (WebCore::GenericTaskQueueBase::close): (WebCore::GenericTaskQueueBase::cancelAllTasks): (WebCore::GenericTaskQueueBase::incrementPendingTasks): (WebCore::GenericTaskQueueBase::decremementPendingTasks): Canonical link: https://commits.webkit.org/238417@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-03 01:54:35 +00:00
dom/EventLoop.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/EventModifierInit.h
dom/EventNames.h
dom/EventQueue.h
dom/EventTarget.h
Implement EventTarget constructor https://bugs.webkit.org/show_bug.cgi?id=174313 Reviewed by Darin Adler. LayoutTests/imported/w3c: * web-platform-tests/WebIDL/ecmascript-binding/constructors-expected.txt: * web-platform-tests/dom/events/Event-subclasses-constructors-expected.txt: * web-platform-tests/dom/events/EventTarget-constructible.any-expected.txt: * web-platform-tests/dom/events/EventTarget-constructible.any.worker-expected.txt: * web-platform-tests/dom/events/event-global-extra.window-expected.txt: * web-platform-tests/dom/idlharness.any.worker-expected.txt: * web-platform-tests/dom/idlharness.window-expected.txt: Source/WebCore: Currently, EventTarget can't be directly constructed or be subclassed in JavaScript. The spec for EventTarget was updated (https://github.com/whatwg/dom/pull/467) to allow constructing and subclassing EventTarget. This feature was shipped in Chrome 64 and Firefox 59. This patch introduces EventTargetConcrete class, a user-constructable version of EventTarget, exposed as "EventTarget" to JavaScript. We don't use EventTarget directly because it is an abstract class and making it non-abstract is unfavorable due to size increase of EventTarget and all of its subclasses with code that is mostly unnecessary for them, resulting in a performance decrease. To prevent definition of specific to EventTargetConcrete `toJS` and `toJSNewlyCreated` functions, we don't define EventTargetConcrete interface type, but rather tweak make_event_factory.pl to default to base interface (like it does for Event). To allow subclassing of all DOM constructors, non-custom ones replace structures of newly created wrapper objects with ones returned by InternalFunction::createSubclassStructure. Per WebIDL spec [1], `setSubclassStructureIfNeeded` helper uses realm of `newTarget` for default prototypes. This approach was chosen because a) detecting [[Construct]] with callFrame->newTarget() is unreliable outside constructor, and b) passing `newTarget` down to `createWrapper` via `toJSNewlyCreated` is quite awkward and would result in massive code change. [1] https://heycam.github.io/webidl/#internally-create-a-new-object-implementing-the-interface (step 3.3.2) Tests: fast/dom/dom-constructors.html imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/constructors.html imported/w3c/web-platform-tests/dom/events/Event-subclasses-constructors.html imported/w3c/web-platform-tests/dom/events/EventTarget-constructible.any.html imported/w3c/web-platform-tests/dom/idlharness.window.html * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWrapperCache.h: (WebCore::setSubclassStructureIfNeeded): * bindings/js/JSEventTargetCustom.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/CodeGeneratorJS.pm: (GenerateConstructorDefinition): * bindings/scripts/InFilesCompiler.pm: (generateInterfacesHeader): * bindings/scripts/test/JS/*: Adjust bindings expectations. * dom/EventTarget.cpp: (WebCore::EventTarget::create): * dom/EventTarget.h: * dom/EventTarget.idl: * dom/EventTargetConcrete.cpp: Added. * dom/EventTargetConcrete.h: Added. * dom/make_event_factory.pl: (generateImplementation): LayoutTests: * fast/dom/dom-constructors-expected.txt: * fast/dom/dom-constructors.html: * platform/ios/imported/w3c/web-platform-tests/dom/events/Event-subclasses-constructors-expected.txt: Removed. Canonical link: https://commits.webkit.org/220784@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-17 01:41:27 +00:00
dom/EventTargetConcrete.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/Exception.h
dom/ExceptionCode.h
dom/ExceptionData.h
dom/ExceptionOr.h
Enable ability to prevent scrolling in Element.focus() https://bugs.webkit.org/show_bug.cgi?id=178583 Patch by Rob Buis <rbuis@igalia.com> on 2021-03-22 Reviewed by Simon Fraser. LayoutTests/imported/w3c: Update improved test result. * web-platform-tests/html/interaction/focus/processing-model/preventScroll-nested-scroll-elements-expected.txt: Added. * web-platform-tests/html/interaction/focus/processing-model/preventScroll-nested-scroll-elements.html: Added. * web-platform-tests/html/interaction/focus/processing-model/preventScroll-textarea-expected.txt: Source/WebCore: Add FocusOptions parameter to the focus method [1] both to the IDL as the C++ side. Change Element.focus to not scroll if FocusOptions.preventScroll is true. Behavior matches Chrome and Firefox. Tests: imported/w3c/web-platform-tests/html/interaction/focus/processing-model/preventScroll-textarea.html imported/w3c/web-platform-tests/html/interaction/focus/processing-model/preventScroll-nested-scroll-elements.html Test: imported/w3c/web-platform-tests/html/interaction/focus/processing-model/preventScroll-nested-scroll-elements.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Element.cpp: (WebCore::Element::focus): * dom/Element.h: (WebCore::Element::focus): * dom/FocusOptions.h: Copied from Source/WebCore/html/HTMLOrForeignElement.idl. * dom/FocusOptions.idl: Copied from Source/WebCore/html/HTMLOrForeignElement.idl. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::didAttachRenderers): * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::focus): * html/HTMLLabelElement.h: * html/HTMLLegendElement.cpp: (WebCore::HTMLLegendElement::focus): * html/HTMLLegendElement.h: * html/HTMLOrForeignElement.idl: * html/InputType.cpp: (WebCore::InputType::accessKeyAction): * page/FocusController.cpp: (WebCore::FocusController::advanceFocusInDocumentOrder): (WebCore::FocusController::advanceFocusDirectionallyInContainer): LayoutTests: The test preventScroll-textarea.html now passes on all platforms. * platform/ios-wk2/imported/w3c/web-platform-tests/html/interaction/focus/processing-model/preventScroll-textarea-expected.txt: Removed. * platform/mac-wk1/imported/w3c/web-platform-tests/html/interaction/focus/processing-model/preventScroll-textarea-expected.txt: Removed. Canonical link: https://commits.webkit.org/235610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 22:29:52 +00:00
dom/FocusOptions.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/FragmentScriptingPermission.h
dom/FullscreenManager.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/GCReachableRef.h
dom/InlineStyleSheetOwner.h
dom/KeyboardEvent.h
dom/LiveNodeList.h
dom/LoadableScript.h
dom/MessagePort.h
dom/MessagePortIdentifier.h
dom/MouseEvent.h
dom/MouseEventInit.h
dom/MouseRelatedEvent.h
dom/MutationEvent.h
dom/MutationObserver.h
dom/NameNodeList.h
dom/NamedNodeMap.h
dom/NativeNodeFilter.h
dom/Node.h
dom/NodeConstants.h
dom/NodeFilter.h
dom/NodeFilterCondition.h
dom/NodeIterator.h
dom/NodeList.h
dom/NodeRenderStyle.h
dom/NodeTraversal.h
dom/OverflowEvent.h
WebDriver: add support for pen pointer events https://bugs.webkit.org/show_bug.cgi?id=219024 Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2020-12-09 Reviewed by Brian Burg. LayoutTests/imported/w3c: Handle pen pointer events in testdriver. * web-platform-tests/resources/testdriver-vendor.js: (window.test_driver_internal.action_sequence): Source/WebCore: * Headers.cmake: * dom/Element.cpp: (WebCore::dispatchPointerEventIfNeeded): Pass pointer ID and pointer type to pointerEventForMouseEvent(). * dom/PointerEvent.cpp: (WebCore::PointerEvent::create): Add pointer ID and pointer type parameters. (WebCore::PointerEvent::PointerEvent): Ditto. * dom/PointerEvent.h: * page/PointerCaptureController.cpp: (WebCore::PointerCaptureController::pointerEventForMouseEvent): Do not assume the pointer type is always mouse. We might not have a capturing data yet for other pointer types. (WebCore::PointerCaptureController::pointerEventWillBeDispatched): Explicilty check it's not touch pointer event. * page/PointerCaptureController.h: * platform/PlatformMouseEvent.h: (WebCore::PlatformMouseEvent::pointerType const): Source/WebDriver: Pass the actual pointer type to the automation as a different input source. * Session.cpp: (WebDriver::automationSourceType): (WebDriver::Session::performActions): Source/WebKit: Make it possible to synthesize pointer events for any pointer type. Add pen input source to automation and handle it when dispatching actions. * Shared/NativeWebMouseEvent.h: * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): * Shared/WebMouseEvent.cpp: (WebKit::WebMouseEvent::WebMouseEvent): (WebKit::WebMouseEvent::encode const): (WebKit::WebMouseEvent::decode): * Shared/WebMouseEvent.h: (WebKit::WebMouseEvent::pointerId const): (WebKit::WebMouseEvent::pointerType const): * Shared/gtk/NativeWebMouseEventGtk.cpp: (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * UIProcess/API/gtk/WebKitWebViewBase.cpp: (primaryPointerForType): (webkitWebViewBaseSynthesizeMouseEvent): * UIProcess/API/gtk/WebKitWebViewBaseInternal.h: * UIProcess/Automation/Automation.json: * UIProcess/Automation/SimulatedInputDispatcher.cpp: (WebKit::SimulatedInputSourceState::emptyStateForSourceType): (WebKit::SimulatedInputDispatcher::transitionInputSourceToState): * UIProcess/Automation/SimulatedInputDispatcher.h: * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::simulateMouseInteraction): (WebKit::WebAutomationSession::performMouseInteraction): (WebKit::simulatedInputSourceTypeFromProtocolSourceType): (WebKit::WebAutomationSession::performInteractionSequence): * UIProcess/Automation/WebAutomationSession.h: * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp: (WebKit::WebAutomationSession::platformSimulateMouseInteraction): * UIProcess/Automation/mac/WebAutomationSessionMac.mm: (WebKit::WebAutomationSession::platformSimulateMouseInteraction): * UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp: (WebKit::WebAutomationSession::platformSimulateMouseInteraction): * UIProcess/gtk/PointerLockManager.cpp: (WebKit::PointerLockManager::handleMotion): Tools: Add optional pointerType parameter to EventSenderProxy mouseDown(), mouseUp() and mouseMoveTo() methods. * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::createMouseMessageBody): (WTR::EventSendingController::mouseDown): (WTR::EventSendingController::mouseUp): (WTR::EventSendingController::mouseMoveTo): (WTR::EventSendingController::scheduleAsynchronousClick): * WebKitTestRunner/InjectedBundle/EventSendingController.h: * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): * WebKitTestRunner/TestController.cpp: (WTR::TestController::didReceiveMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): * WebKitTestRunner/win/EventSenderProxyWin.cpp: (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): LayoutTests: Update expectations of imported/w3c/web-platform-tests/pointerevents/pointerevent_attributes_hoverable_pointers.html. The test is now timing out, but because tesdriver doesn't correctly handle the iframe element. * platform/gtk/imported/w3c/web-platform-tests/pointerevents/pointerevent_attributes_hoverable_pointers-expected.txt: Added. * platform/mac-wk2/imported/w3c/web-platform-tests/pointerevents/pointerevent_attributes_hoverable_pointers-expected.txt: Added. Canonical link: https://commits.webkit.org/232253@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-09 17:03:08 +00:00
dom/PointerEvent.h
WebMouseEvent.h should avoid pulling in WebCore headers that know about DOM nodes https://bugs.webkit.org/show_bug.cgi?id=222291 Reviewed by Darin Adler. Source/WebCore: Refactor `PointerEvent.h` so that the static class helper methods for getting the names of mouse, pen and touch pointer event types are instead separate functions in `PointerEventTypeNames.h`. This allows us to just import `PointerEventTypeNames.h` instead of `PointerEvent.h` in WebKit -- and, in particular, within WebKit headers that are exclusive to the UI process. No change in behavior. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/PointerEvent.cpp: (WebCore::PointerEvent::mousePointerType): Deleted. (WebCore::PointerEvent::penPointerType): Deleted. (WebCore::PointerEvent::touchPointerType): Deleted. * dom/PointerEvent.h: Drive-by fix: also forward declare `Node` instead of including `Node.h`; `WebCore::Node` is only used in this header in the context of `RefPtr<Node>`, so the forward declaration is sufficient. * dom/PointerEventTypeNames.cpp: Added. (WebCore::mousePointerEventType): (WebCore::penPointerEventType): (WebCore::touchPointerEventType): * dom/PointerEventTypeNames.h: Added. * dom/ios/PointerEventIOS.cpp: * page/PointerCaptureController.cpp: (WebCore::PointerCaptureController::reset): (WebCore::PointerCaptureController::pointerEventForMouseEvent): (WebCore::PointerCaptureController::dispatchEvent): (WebCore::PointerCaptureController::pointerEventWillBeDispatched): (WebCore::PointerCaptureController::pointerEventWasDispatched): (WebCore::PointerCaptureController::processPendingPointerCapture): Source/WebKit: Import `PointerEventTypeNames.h` instead of `PointerEvent.h` in several UI process and shared headers. * Shared/WebMouseEvent.h: * UIProcess/API/gtk/WebKitWebViewBase.cpp: (primaryPointerForType): (webkitWebViewBaseSynthesizeMouseEvent): * UIProcess/Automation/SimulatedInputDispatcher.cpp: (WebKit::SimulatedInputDispatcher::transitionInputSourceToState): * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::performMouseInteraction): * UIProcess/gtk/PointerLockManager.cpp: (WebKit::PointerLockManager::handleMotion): Canonical link: https://commits.webkit.org/234456@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-23 03:16:32 +00:00
dom/PointerEventTypeNames.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/Position.h
dom/ProcessingInstruction.h
dom/ProgressEvent.h
dom/QualifiedName.h
dom/RadioButtonGroups.h
dom/Range.h
dom/RangeBoundaryPoint.h
dom/RegisteredEventListener.h
dom/RenderedDocumentMarker.h
dom/ScriptDisallowedScope.h
dom/ScriptElement.h
dom/ScriptElementCachedScriptFetcher.h
dom/ScriptExecutionContext.h
dom/SecurityContext.h
dom/SecurityPolicyViolationEvent.h
Non-unified build fixes, early April 2021 https://bugs.webkit.org/show_bug.cgi?id=224091 Patch by Tyler Wilcock <twilco.o@protonmail.com> on 2021-04-06 Reviewed by Simon Fraser. Source/WebCore: The SelectionRestorationMode enum has been moved out of Document.h so the entirety of Document.h doesn't need to be included just for that enum. * Headers.cmake: Add SelectionRestorationMode.h. * WebCore.xcodeproj/project.pbxproj: Add SelectionRestorationMode.h. * dom/Document.h: Move SelectionRestorationMode enum to its own file. * dom/Element.h: Add forward declaration for enum class SelectionRestorationMode. Rearrange existing enum class forward declarations alphabetically. * dom/SelectionRestorationMode.h: Added. * dom/FocusOptions.h: * history/CachedPage.cpp: * html/HTMLFormControlElement.cpp: * html/HTMLInputElement.h: * html/HTMLLabelElement.cpp: * html/HTMLLegendElement.cpp: * html/HTMLTextAreaElement.h: * html/InputType.cpp: * page/EventHandler.cpp: * page/FocusController.cpp: Add #include "SelectionRestorationMode.h". * workers/service/context/ServiceWorkerThreadProxy.cpp: Add #include "ServiceWorkerGlobalScope.h" to fix: ServiceWorkerThreadProxy.cpp:287:53: error: invalid use of incomplete type 'WTF::match_constness_t<WebCore::ScriptExecutionContext, WebCore::ServiceWorkerGlobalScope>' {aka 'class WebCore::ServiceWorkerGlobalScope'} Source/WebKit: The SelectionRestorationMode enum has been moved out of Document.h so the entirety of Document.h doesn't need to be included just for that enum. * WebProcess/WebPage/WebPage.cpp: Add #include "SelectionRestorationMode.h". Canonical link: https://commits.webkit.org/236183@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-06 16:51:57 +00:00
dom/SelectionRestorationMode.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/ShadowRoot.h
dom/ShadowRootInit.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/ShadowRootMode.h
Begin moving off of live ranges for WebKit internals https://bugs.webkit.org/show_bug.cgi?id=208432 Reviewed by Daniel Bates. Source/WebCore: The DOM Range class is a live range. The live updating feature of these ranges mean they are expensive to create and destroy and also make all DOM mutation more expensive while they are alive. We will be able to speed up, likely measurable on Speedometer, if we can cut down uses of live ranges. - Refactored the StaticRange class to create two new structs. - The BoundaryPoint struct implements what the DOM standard calls a boundary point: a node and offset. Similar to the RangeBoundaryPoint class, which supports being the boundary point of a live range, but simpler and not live. - The SimpleRange struct implements what the DOM standard calls a range (not a live range). Like StaticRange but without reference counting and DOM binding. - Since StaticRange is derived publicly from SimpleRange you can pass either to any function that takes a SimpleRange. And since there is a constructor to create a SimpleRange from a Range you can pass a Range to those functions too. - Renamed StaticRange::createFromRange to StaticRange::create. * Headers.cmake: Added BoundaryPoint.h, SimpleRange.h, and StaticRange.h. * Sources.txt: Added BoundaryPoint.cpp and SimpleRange.cpp. * WebCore.xcodeproj/project.pbxproj: Added BoundaryPoint.cpp/h and SimpleRange.cpp/h. * dom/BoundaryPoint.cpp: Added. * dom/BoundaryPoint.h: Added. * dom/SimpleRange.cpp: Added. * dom/SimpleRange.h: Added. * dom/StaticRange.cpp: (WebCore::StaticRange::StaticRange): Take an rvalue reference to a SimpleRange. (WebCore::StaticRange::create): Ditto. Changed the other overloads to create a SimpleRange first then call through to the main one. (WebCore::isDocumentTypeOrAttr): Wrote a much more efficient version of this. The old version called the virtual function nodeType twice. This calls it at most once, and mostly doesn't call it at all. * dom/StaticRange.h: Simplified this class, putting most of the actual range logic into the base class. Note that this change eliminated the peculiar code that in the == operator that compared nodes using isEqualNode instead of using node identity. There was no one who needed that other behavior. Also fixed mistaken use of unsigned long in StaticRange::Init. It's unsigned long in the IDL file, but confusingly that's just unsigned in .cpp files. * dom/StaticRange.idl: Tweaked formatting. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::targetRanges const): Updated for rename of StaticRange::create. * editing/ReplaceRangeWithTextCommand.cpp: (WebCore::ReplaceRangeWithTextCommand::doApply): Updated since VisibleSelection takes SimpleRange now. (WebCore::ReplaceRangeWithTextCommand::targetRanges const): Updated for rename of StaticRange::create. * editing/SpellingCorrectionCommand.cpp: (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand): Updated since a selection now takes a SimpleRange&, not a StaticRange. (WebCore::SpellingCorrectionCommand::targetRanges const): Updated for rename of StaticRange::create. * editing/TypingCommand.cpp: (WebCore::TypingCommand::willAddTypingToOpenCommand): Ditto. * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::VisibleSelection): Use SimpleRange instead of StaticRange and Range. * editing/VisibleSelection.h: Updated for the above. * editing/mac/EditorMac.mm: Added include. * page/DragController.cpp: Ditto. * page/TextIndicator.cpp: Ditto. (WebCore::TextIndicator::createWithRange): Updated since VisibleSelection takes SimpleRange now. * page/mac/EventHandlerMac.mm: (WebCore::InlineTextBox::collectMarkedTextsForHighlights): Tweaked coding style a bit. Source/WebKit: * Shared/EditingRange.cpp: (WebKit::EditingRange::fromRange): Initialize out arguments. * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: Added include. * WebProcess/WebPage/FindController.cpp: Ditto. * WebProcess/WebPage/WebPage.cpp: Ditto. * WebProcess/WebPage/mac/WebPageMac.mm: Ditto. Source/WebKitLegacy/ios: * WebCoreSupport/WebFrameIOS.mm: Added include. Source/WebKitLegacy/mac: * WebCoreSupport/WebContextMenuClient.mm: Added include. * WebView/WebFrame.mm: Ditto. (-[WebFrame _convertToNSRange:]): Initialized out arguments. Canonical link: https://commits.webkit.org/221736@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-09 04:00:31 +00:00
dom/SimpleRange.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/SimulatedClickOptions.h
dom/SpaceSplitString.h
Begin moving off of live ranges for WebKit internals https://bugs.webkit.org/show_bug.cgi?id=208432 Reviewed by Daniel Bates. Source/WebCore: The DOM Range class is a live range. The live updating feature of these ranges mean they are expensive to create and destroy and also make all DOM mutation more expensive while they are alive. We will be able to speed up, likely measurable on Speedometer, if we can cut down uses of live ranges. - Refactored the StaticRange class to create two new structs. - The BoundaryPoint struct implements what the DOM standard calls a boundary point: a node and offset. Similar to the RangeBoundaryPoint class, which supports being the boundary point of a live range, but simpler and not live. - The SimpleRange struct implements what the DOM standard calls a range (not a live range). Like StaticRange but without reference counting and DOM binding. - Since StaticRange is derived publicly from SimpleRange you can pass either to any function that takes a SimpleRange. And since there is a constructor to create a SimpleRange from a Range you can pass a Range to those functions too. - Renamed StaticRange::createFromRange to StaticRange::create. * Headers.cmake: Added BoundaryPoint.h, SimpleRange.h, and StaticRange.h. * Sources.txt: Added BoundaryPoint.cpp and SimpleRange.cpp. * WebCore.xcodeproj/project.pbxproj: Added BoundaryPoint.cpp/h and SimpleRange.cpp/h. * dom/BoundaryPoint.cpp: Added. * dom/BoundaryPoint.h: Added. * dom/SimpleRange.cpp: Added. * dom/SimpleRange.h: Added. * dom/StaticRange.cpp: (WebCore::StaticRange::StaticRange): Take an rvalue reference to a SimpleRange. (WebCore::StaticRange::create): Ditto. Changed the other overloads to create a SimpleRange first then call through to the main one. (WebCore::isDocumentTypeOrAttr): Wrote a much more efficient version of this. The old version called the virtual function nodeType twice. This calls it at most once, and mostly doesn't call it at all. * dom/StaticRange.h: Simplified this class, putting most of the actual range logic into the base class. Note that this change eliminated the peculiar code that in the == operator that compared nodes using isEqualNode instead of using node identity. There was no one who needed that other behavior. Also fixed mistaken use of unsigned long in StaticRange::Init. It's unsigned long in the IDL file, but confusingly that's just unsigned in .cpp files. * dom/StaticRange.idl: Tweaked formatting. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::targetRanges const): Updated for rename of StaticRange::create. * editing/ReplaceRangeWithTextCommand.cpp: (WebCore::ReplaceRangeWithTextCommand::doApply): Updated since VisibleSelection takes SimpleRange now. (WebCore::ReplaceRangeWithTextCommand::targetRanges const): Updated for rename of StaticRange::create. * editing/SpellingCorrectionCommand.cpp: (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand): Updated since a selection now takes a SimpleRange&, not a StaticRange. (WebCore::SpellingCorrectionCommand::targetRanges const): Updated for rename of StaticRange::create. * editing/TypingCommand.cpp: (WebCore::TypingCommand::willAddTypingToOpenCommand): Ditto. * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::VisibleSelection): Use SimpleRange instead of StaticRange and Range. * editing/VisibleSelection.h: Updated for the above. * editing/mac/EditorMac.mm: Added include. * page/DragController.cpp: Ditto. * page/TextIndicator.cpp: Ditto. (WebCore::TextIndicator::createWithRange): Updated since VisibleSelection takes SimpleRange now. * page/mac/EventHandlerMac.mm: (WebCore::InlineTextBox::collectMarkedTextsForHighlights): Tweaked coding style a bit. Source/WebKit: * Shared/EditingRange.cpp: (WebKit::EditingRange::fromRange): Initialize out arguments. * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: Added include. * WebProcess/WebPage/FindController.cpp: Ditto. * WebProcess/WebPage/WebPage.cpp: Ditto. * WebProcess/WebPage/mac/WebPageMac.mm: Ditto. Source/WebKitLegacy/ios: * WebCoreSupport/WebFrameIOS.mm: Added include. Source/WebKitLegacy/mac: * WebCoreSupport/WebContextMenuClient.mm: Added include. * WebView/WebFrame.mm: Ditto. (-[WebFrame _convertToNSRange:]): Initialized out arguments. Canonical link: https://commits.webkit.org/221736@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-09 04:00:31 +00:00
dom/StaticRange.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/StyledElement.h
2019-11-03 20:01:55 +00:00
dom/TaskSource.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
dom/Text.h
dom/TextEvent.h
dom/TextEventInputType.h
dom/Touch.h
dom/Traversal.h
dom/TreeScope.h
dom/TreeScopeOrderedMap.h
dom/TreeWalker.h
dom/TypedElementDescendantIterator.h
dom/UIEvent.h
dom/UIEventInit.h
dom/UIEventWithKeyState.h
dom/UserActionElementSet.h
dom/UserGestureIndicator.h
dom/UserTypingGestureIndicator.h
dom/ViewportArguments.h
dom/VisibilityChangeClient.h
dom/VisibilityState.h
dom/WheelEvent.h
dom/XMLDocument.h
dom/messageports/MessagePortChannel.h
dom/messageports/MessagePortChannelProvider.h
dom/messageports/MessagePortChannelRegistry.h
dom/messageports/MessageWithMessagePorts.h
Move TextIterator::rangeFromLocationAndLength off of live ranges https://bugs.webkit.org/show_bug.cgi?id=209408 Source/WebCore: Reviewed by Antti Koivisto. - Put CharacterRange into a header, CharacterRange.h. - Replaced CharacterOffset with direct uses of uint64_t. Because this can be a single offset into an entire document, use a 64-bit integer so we don't limit an entire document to 2^32 characters; in theory this makes it so we can support a document with tons of text nodes that add up to more than 2^32. - Because CharacterRange uses 64-bit integers we can now convert more easily to and from NSRange and CFRange on Cocoa platforms. * Headers.cmake: Added CharacterRange.h. * WebCore.xcodeproj/project.pbxproj: Ditto. * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper _convertToDOMRange:]): Use CharacterRange, resolveCharacterLocation/Range. * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (AXAttributeStringSetSpelling): Ditto. (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]): Ditto. * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::collectTextRanges): Take SimpleRange. (WebCore::DocumentMarkerController::addMarker): Ditto. (WebCore::DocumentMarkerController::addDictationResultMarker): Ditto. (WebCore::DocumentMarkerController::addPlatformTextCheckingMarker): Ditto. * dom/DocumentMarkerController.h: Updated for above changes. * dom/Position.h: Export createLegacyEditingPosition so it can be used outside of WebCore. * dom/SimpleRange.cpp: (WebCore::fastIsCharacterData): Added. Could be moved to the Node class. (WebCore::length): Added. Could be moved to the Node class. (WebCore::makeRangeSelectingNodeContents): Added. Analogous to the Range::selectNodeContents function. * dom/SimpleRange.h: Updated for the above. * editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::applyAlternativeTextToRange): Use CharacterRange, resolveCharacterLocation/Range. * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyBlockStyle): Ditto. * editing/CharacterRange.h: Added. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::moveParagraphs): Use CharacterRange, resolveCharacterLocation/Range. * editing/Editing.cpp: (WebCore::visiblePositionForIndex): Ditto. * editing/Editor.cpp: (WebCore::Editor::advanceToNextMisspelling): Ditto. (WebCore::correctSpellcheckingPreservingTextCheckingParagraph): Ditto. (WebCore::Editor::markAndReplaceFor): Ditto. (WebCore::Editor::changeBackToReplacedString): Ditto. (WebCore::Editor::scanRangeForTelephoneNumbers): Ditto. (WebCore::Editor::rangeForTextCheckingResult const): Ditto. * editing/TextCheckingHelper.cpp: (WebCore::findGrammaticalErrors): Ditto. (WebCore::findMisspellings): Ditto. (WebCore::TextCheckingParagraph::invalidateParagraphRangeValues): Ditto. (WebCore::TextCheckingParagraph::rangeLength const): Ditto. (WebCore::TextCheckingParagraph::subrange const): Ditto. (WebCore::TextCheckingParagraph::offsetTo const): Ditto. (WebCore::TextCheckingParagraph::text const): Ditto. Also use StringView. (WebCore::TextCheckingParagraph::checkingStart const): Ditto. (WebCore::TextCheckingParagraph::checkingEnd const): Ditto. Also compute this by adding start and length, and don't cache it. (WebCore::TextCheckingParagraph::checkingLength const): Ditto. (WebCore::TextCheckingParagraph::automaticReplacementStart const): Ditto. (WebCore::TextCheckingParagraph::automaticReplacementLength const): Ditto. (WebCore::TextCheckingHelper::findFirstMisspelling): Ditto. (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): Ditto. (WebCore::TextCheckingHelper::findFirstGrammarDetail const): Ditto. (WebCore::TextCheckingHelper::findFirstBadGrammar const): Ditto. (WebCore::TextCheckingHelper::isUngrammatical const): Ditto. (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange const): Ditto. (WebCore::TextCheckingHelper::markAllMisspellings): Ditto. (WebCore::TextCheckingHelper::markAllBadGrammar): Ditto. (WebCore::checkTextOfParagraph): Ditto. * editing/TextCheckingHelper.h: Updated for the above. Also got rid of m_checkingEnd since it's sufficient to cache the start and the length. Should come back later and use CharacterRange instead of 2x CharacterCount. * editing/TextIterator.cpp: (WebCore::characterCount): Use uint64_t. (WebCore::TextIterator::subrange): Deleted. (WebCore::TextIterator::rangeFromLocationAndLength): Deleted. (WebCore::clampedAdd): Added. Helps implement resolveCharacterRange in a way that can work with any character count without concern about overflow. (WebCore::resolveCharacterRange): Added. Replaces both subrange and rangeFromLocationAndLength, using an algorithm close to the one from the latter function, including workarounds it had. Replaced the boolean "forSelectionPreservation" with the TextIteratorBehavior options, which seems to make good sense at all the call sites. (WebCore::resolveCharacterLocation): Added. Like resolveCharacterRange, but instead of resolving CharacterRange to SimpleRange, resolves a character location to a BoundaryPoint. Made a separate function for this in case we later refactor for efficiency, but for now this simply calls resolveCharacterRange with a zero length range. * editing/TextIterator.h: Moved CharacterCount and CharagerRange into a separate header. Replaced TextIterator::rangeFromLocationAndLength and TextIterator::subrange with resolveCharacterLocation and resolveCharacterRange. * editing/cocoa/DataDetection.mm: (WebCore::detectItemAtPositionWithRange): Use CharacterRange, resolveCharacterLocation/Range. (WebCore::DataDetection::detectContentInRange): Ditto. * editing/cocoa/DictionaryLookup.mm: (WebCore::DictionaryLookup::rangeForSelection): Ditto. (WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto. * editing/ios/DictationCommandIOS.cpp: (WebCore::DictationCommandIOS::doApply): Ditto. * editing/mac/DictionaryLookupLegacy.mm: (WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto. * page/EventHandler.cpp: (WebCore::textDistance): Ditto. * page/Page.cpp: (WebCore::replaceRanges): Ditto. (WebCore::Page::replaceRangesWithText): Ditto. * platform/text/TextChecking.h: Ditto. * testing/Internals.cpp: (WebCore::Internals::rangeFromLocationAndLength): Ditto. (WebCore::Internals::subrange): Ditto. (WebCore::Internals::handleAcceptedCandidate): Ditto. * testing/Internals.h: Made location and length unsigned rather than signed. * testing/Internals.idl: Ditto. Source/WebKit: Reviewed by Antti Koivisto. * Shared/EditingRange.cpp: (WebKit::EditingRange::toRange): Use CharacterRange, resolveCharacterLocation/Range. * Shared/EditingRange.h: Added a FIXME about replacing with CharacterRange. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<CharacterRange>::encode): Added. (IPC::ArgumentCoder<CharacterRange>::decode): Added. (IPC::ArgumentCoder<GrammarDetail>::encode): Updated to use CharacterRange. (IPC::ArgumentCoder<GrammarDetail>::decode): Ditto. (IPC::ArgumentCoder<TextCheckingResult>::encode): Ditto. (IPC::ArgumentCoder<TextCheckingResult>::decode): Ditto. * Shared/WebCoreArgumentCoders.h: Added CharacterRange. * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::textCheckingResultFromNSTextCheckingResult): Use CharacterRange, resolveCharacterLocation/Range. * UIProcess/WebGrammarDetail.cpp: (WebKit::WebGrammarDetail::WebGrammarDetail): Ditto. * UIProcess/WebGrammarDetail.h: (WebKit::WebGrammarDetail::location const): Ditto. (WebKit::WebGrammarDetail::length const): Ditto. * UIProcess/gtk/TextCheckerGtk.cpp: (WebKit::TextChecker::checkTextOfParagraph): Ditto. * UIProcess/ios/TextCheckerIOS.mm: (WebKit::TextChecker::checkTextOfParagraph): Ditto. * UIProcess/mac/TextCheckerMac.mm: (WebKit::TextChecker::checkTextOfParagraph): Ditto. (WebKit::TextChecker::updateSpellingUIWithGrammarString): Ditto. * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm: (WebKit::TextCheckingControllerProxy::rangeAndOffsetRelativeToSelection): Ditto. (WebKit::TextCheckingControllerProxy::replaceRelativeToSelection): Ditto. (WebKit::TextCheckingControllerProxy::annotatedSubstringBetweenPositions): Ditto. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::deleteSurrounding): Ditto. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getPlatformEditorState const): Small tweak. (WebKit::WebPage::updateSelectionWithDelta): Ditto. (WebKit::WebPage::requestDocumentEditingContext): Ditto. Source/WebKitLegacy/mac: Reviewed by Antti Koivisto. * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::checkTextOfParagraph): Use CharacterRange, resolveCharacterLocation/Range. (WebEditorClient::checkGrammarOfString): Ditto. (core): Ditto. (WebEditorClient::updateSpellingUIWithGrammarString): Ditto. (WebEditorClient::handleAcceptedCandidateWithSoftSpaces): Ditto. * WebView/WebFrame.mm: (-[WebFrame _convertToDOMRange:rangeIsRelativeTo:]): Ditto. * WebView/WebView.mm: (textCheckingResultFromNSTextCheckingResult): Ditto. Source/WebKitLegacy/win: Reviewed by Antti Koivisto. * WebCoreSupport/WebEditorClient.cpp: (WebEditorClient::checkGrammarOfString): Use CharacterRange, resolveCharacterLocation/Range. (WebEditorClient::updateSpellingUIWithGrammarString): Ditto. * WebView.cpp: (WebView::firstRectForCharacterRangeForTesting): Ditto. LayoutTests: Fix Mac-specific firstrectforcharacterrange-styled.html test https://bugs.webkit.org/show_bug.cgi?id=205314 <rdar://problem/57990717> Reviewed by Antti Koivisto. * accessibility/mac/textmarker-for-index-out-of-bounds-crash-expected.txt: * accessibility/mac/textmarker-for-index-out-of-bounds-crash.html: Updated to expect textMarkerForIndex to clamp rather than returning something invalid. * editing/mac/input/firstrectforcharacterrange-plain-expected.txt: * editing/mac/input/firstrectforcharacterrange-plain.html: Updated test output to include what is being tested, not just the test result. Updated test results to expect clamping rather than an empty rectangle, for values that are out of bounds. Also got rid of dumping of eidting callbacks since there is no reason to include them in this test. * editing/mac/input/firstrectforcharacterrange-styled-expected.txt: * editing/mac/input/firstrectforcharacterrange-styled.html: Ditto. * platform/mac-wk1/TestExpectations: Since our oldest supported release is Mojave, deleted all rules with Sierra or HighSierra conditionals since those conditions are always false, and removed any conditionals that said Sierra+, HighSierra+, or Mojave+ because those conditions are always true. One test, firstrectforcharacterrange-styled.html, had results checked in that were correct for Mojave but incorrect for Catalina. For that test, the results are now correct for Catalina, so updated expectations for that. * platform/mac-wk2/TestExpectations: Ditto. Also some tests that claimed ImageOnlyFailure are flaky and sometimes passing, so marked them for either Pass or ImageOnlyFailure. * platform/mac/TestExpectations: Ditto. Also some tests marked Failure were flaky and sometimes passing, so marked them for either Pass or Failure. * platform/mac/editing/mac/input/firstrectforcharacterrange-styled-expected.txt: Removed. This is already a Mac-specific test; it doesn't make sense to have an additional Mac-specific overridden result since the base result is already Mac-specific. * platform/mac/fast/text/attributed-substring-from-range-001-expected.txt: * platform/mac/fast/text/attributed-substring-from-range-001.html: Updated this test to expect the empty string, not "undefined" for an out of range, since we now clamp instead of failing in such cases. * platform/mac/fast/text/attributed-substring-from-range-expected.txt: * platform/mac/fast/text/attributed-substring-from-range.html: Ditto. Canonical link: https://commits.webkit.org/222649@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-30 01:06:28 +00:00
editing/CharacterRange.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
editing/ClipboardAccessPolicy.h
Add support for specifying background colors when setting marked text https://bugs.webkit.org/show_bug.cgi?id=207065 <rdar://problem/57876140> Reviewed by Tim Horton. Source/WebCore: Add support for rendering custom highlights (background colors) behind marked text in WebCore. To do this, we plumb a Vector of CompositionHighlights alongside the Vector of CompositionUnderlines to Editor. At paint time, we then consult this highlight data to determine which ranges of text in the composition should paint using custom background colors. Note that in the future, we should consider refactoring both composition underlines and highlights to use the MarkedText mechanism for decorating ranges of text instead. Test: editing/input/composition-highlights.html * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * editing/CompositionHighlight.h: Added. (WebCore::CompositionHighlight::CompositionHighlight): (WebCore::CompositionHighlight::encode const): (WebCore::CompositionHighlight::decode): Add CompositionHighlight, which represents a range in the composition that should be highlighted with a given background color. * editing/Editor.cpp: (WebCore::Editor::clear): (WebCore::Editor::setComposition): Add logic for clearing and updating m_customCompositionHighlights. * editing/Editor.h: (WebCore::Editor::compositionUsesCustomHighlights const): (WebCore::Editor::customCompositionHighlights const): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintCompositionBackground): If custom composition highlights are given, use those when painting the composition background; otherwise, default to painting the entire composition range using `Color::compositionFill`. Source/WebCore/PAL: Add an SPI soft-linking declaration for NSMarkedClauseSegmentAttributeName. * pal/spi/cocoa/NSAttributedStringSPI.h: Source/WebKit: Implement -setAttributedMarkedText:selectedRange: on WKContentView, and have it extract highlight color information from the given attributed string. Plumb this through to the web process by serializing and deserializing `WebCore::CompositionHighlight`s. * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::setMarkedText): * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/ios/WKContentViewInteraction.mm: (compositionHighlights): For each marked text clause, grab the specified background color (defaulting to Color::compositionFill) and use it to create a list of CompositionHighlights. (-[WKContentView setAttributedMarkedText:selectedRange:]): (-[WKContentView setMarkedText:selectedRange:]): (-[WKContentView _setMarkedText:highlights:selectedRange:]): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetComposition): Add testing support for specifying highlight ranges when setting marked text. * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: * WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp: (WebKit::WebEditorClient::didDispatchInputMethodKeydown): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setCompositionForTesting): (WebKit::WebPage::setCompositionAsync): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Source/WebKitLegacy/mac: Adjust some call sites of Editor::setComposition(). * WebView/WebFrame.mm: (-[WebFrame setMarkedText:selectedRange:]): (-[WebFrame setMarkedText:forCandidates:]): * WebView/WebHTMLView.mm: (-[WebHTMLView setMarkedText:selectedRange:]): Source/WebKitLegacy/win: Adjust some call sites of Editor::setComposition(). * WebView.cpp: (WebView::onIMEComposition): (WebView::setCompositionForTesting): Tools: Add support in WebKitTestRunner for specifying a list of highlight ranges when setting marked text. This comes in the form of an additional argument to TextInputController::setMarkedText, which contains an array of objects, each describing one range (in the composition) to highlight. * DumpRenderTree/ios/TextInputControllerIOS.m: (+[TextInputController isSelectorExcludedFromWebScript:]): (+[TextInputController webScriptNameForSelector:]): (-[TextInputController setMarkedText:selectedFrom:length:suppressUnderline:highlights:]): (-[TextInputController setMarkedText:selectedFrom:length:suppressUnderline:]): Deleted. * DumpRenderTree/mac/TextInputControllerMac.m: (+[TextInputController isSelectorExcludedFromWebScript:]): (+[TextInputController webScriptNameForSelector:]): (-[TextInputController setMarkedText:selectedFrom:length:suppressUnderline:highlights:]): (-[TextInputController setMarkedText:selectedFrom:length:suppressUnderline:]): Deleted. * WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl: * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::arrayLength): (WTR::createCompositionHighlightData): Add logic to convert a given JSObject containing the composition highlight information into a WKArrayRef, which is then passed into WebKit via WKBundlePageSetComposition. (WTR::TextInputController::setMarkedText): * WebKitTestRunner/InjectedBundle/TextInputController.h: LayoutTests: Add a test to check that highlighting different parts of a composition range results in the same behavior as applying background colors using CSS. This test is currently only supported in WebKit2. * TestExpectations: * editing/input/composition-highlights-expected.html: Added. * editing/input/composition-highlights.html: Added. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/220091@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-01 00:44:07 +00:00
editing/CompositionHighlight.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
editing/CompositionUnderline.h
editing/DictationAlternative.h
Dictation context should be an object identifier, not a type-punned pointer https://bugs.webkit.org/show_bug.cgi?id=212174 Reviewed by Anders Carlsson. Source/WebCore: * Headers.cmake: Added DictationContext.h. * Sources.txt: Removed DictationAlternative.cpp. * WebCore.xcodeproj/project.pbxproj: Added DictationContext.h, removed DictationAlternative.cpp. * dom/DocumentMarker.h: Use DictationContext instead of uint64_t. * editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::timerFired): Ditto. * editing/AlternativeTextController.h: Ditto. * editing/DictationAlternative.h: Use DictationContext instead of uint64_t, but also use CharacterRange rather than two "unsigned" values. Also convert into a simple struct without constructors; don't really need those. * editing/DictationAlternative.cpp: Removed. * editing/DictationCommand.cpp: (WebCore::DictationCommand::collectDictationAlternativesInRange): Updated for changes to DictationAlternative. * editing/DictationContext.h: Added. * editing/Editor.h: Forward declare DictationAlternative rather than including its header. * editing/cocoa/AlternativeTextContextController.h: Use a pair of maps to bind NSTextAlternatives objects to object identifiers. Remove unnecessary explicit constructor and destructor. Also removed unnecessary use of WTF_MAKE_FAST_ALLOCATED, since this is only used as a data member of another class. Removed unused invalidContext constant. * editing/cocoa/AlternativeTextContextController.mm: Removed the unneeded includes. This file treats NSTextAlternatives as an opaque Objective-C type and so doesn't need any details of that class. (WebCore::AlternativeTextContextController::addAlternatives): Changed to return a DictationContext and use two maps, using HashMap::ensure to avoid double hashing. (WebCore::AlternativeTextContextController::alternativesForContext): Added a null check. (WebCore::AlternativeTextContextController::removeAlternativesForContext): Ditto. Also updated to remove from both maps. (WebCore::AlternativeTextContextController::clear): Clear both maps. * editing/cocoa/AlternativeTextUIController.h: Since this header is used only from Objective-C, removed use of OBJC_CLASS. Put showAlternatives inside a macOS-specific block. Use DictationContext instead of uint64_t. * editing/cocoa/AlternativeTextUIController.mm: (WebCore::AlternativeTextUIController::addAlternatives): Use DictationContext instead of uint64_t. (WebCore::AlternativeTextUIController::alternativesForContext): Ditto. (WebCore::AlternativeTextUIController::showAlternatives): Ditto. (WebCore::AlternativeTextUIController::handleAcceptedAlternative): Ditto. (WebCore::AlternativeTextUIController::removeAlternatives): Ditto. * page/AlternativeTextClient.h: Use DictationContext instead of uint64_t. Source/WebKit: * Scripts/webkit/messages.py: Added DictationContext to the list of types that are not C++ classes. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<DictationAlternative>::encode): Updated for change to DictationAlternative structure. (IPC::ArgumentCoder<DictationAlternative>::decode): Ditto. * UIProcess/Cocoa/PageClientImplCocoa.h: Use DictationContext instead of uint64_t. * UIProcess/Cocoa/PageClientImplCocoa.mm: (WebKit::PageClientImplCocoa::addDictationAlternatives): Ditto. (WebKit::PageClientImplCocoa::removeDictationAlternatives): Ditto. (WebKit::PageClientImplCocoa::dictationAlternatives): Ditto. * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::insertDictatedTextAsync): Ditto. * UIProcess/PageClient.h: Ditto. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::showDictationAlternativeUI): Ditto. (WebKit::WebPageProxy::removeDictationAlternatives): Ditto. (WebKit::WebPageProxy::dictationAlternatives): Ditto. * UIProcess/WebPageProxy.h: Ditto. * UIProcess/WebPageProxy.messages.in: Ditto. * UIProcess/ios/PageClientImplIOS.h: Ditto. * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::showDictationAlternativeUI): Ditto. * UIProcess/mac/PageClientImplMac.h: Ditto. * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::showDictationAlternativeUI): Ditto. * UIProcess/mac/WebPageProxyMac.mm: Removed unneeded include of DictationAlternative.h. * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Use DictationContext instead of uint64_t. Also marked class final and made everything private. * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp: (WebKit::WebAlternativeTextClient::removeDictationAlternatives): Ditto. (WebKit::WebAlternativeTextClient::showDictationAlternativeUI): Ditto. (WebKit::WebAlternativeTextClient::dictationAlternatives): Ditto. Source/WebKitLegacy/mac: * WebCoreSupport/WebAlternativeTextClient.h: Use DictationContext instead of uint64_t. * WebCoreSupport/WebAlternativeTextClient.mm: (WebAlternativeTextClient::removeDictationAlternatives): Ditto. (WebAlternativeTextClient::showDictationAlternativeUI): Ditto. (WebAlternativeTextClient::dictationAlternatives): Ditto. * WebView/WebHTMLView.mm: Added include of DictationAlternative.h, now needed because it's forward declared in Editor.h. * WebView/WebView.mm: Ditto. (-[WebView _getWebCoreDictationAlternatives:fromTextAlternatives:]): Updated for change to DictationAlternative. (-[WebView _showDictationAlternativeUI:forDictationContext:]): Use DictationContext instead of uint64_t. (-[WebView _removeDictationAlternatives:]): Ditto. (-[WebView _dictationAlternatives:]): Ditto. * WebView/WebViewInternal.h: Updated for the above. Canonical link: https://commits.webkit.org/225053@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-21 01:59:23 +00:00
editing/DictationContext.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
editing/DictionaryPopupInfo.h
editing/EditAction.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
editing/EditableLinkBehavior.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
editing/Editing.h
editing/EditingBehavior.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
editing/EditingBehaviorType.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
editing/EditingBoundary.h
editing/EditingStyle.h
editing/Editor.h
editing/EditorDeleteAction.h
editing/EditorInsertAction.h
editing/FindOptions.h
editing/FontAttributeChanges.h
editing/FontAttributes.h
editing/FontShadow.h
editing/FrameSelection.h
editing/HTMLInterchange.h
[LFC][Integration] Avoid ensureLineBoxes for some call sites of inlineBoxAndOffset https://bugs.webkit.org/show_bug.cgi?id=217225 Reviewed by Zalan Bujtas. Separate inlineRunAndOffset from inlineBoxAndOffset. The formet returns iterator while the later forces the legacy path. Use inlineRunAndOffset in a few places. * dom/Position.cpp: (WebCore::Position::rendersInDifferentPosition const): (WebCore::Position::inlineRunAndOffset const): (WebCore::Position::inlineBoxAndOffset const): (WebCore::Position::ensureLineBoxes const): (WebCore::InlineBoxAndOffset::InlineBoxAndOffset): Deleted. * dom/Position.h: (WebCore::InlineBoxAndOffset::InlineBoxAndOffset): * editing/FrameSelection.cpp: (WebCore::FrameSelection::directionOfSelection): * editing/VisiblePosition.h: (WebCore::VisiblePosition::inlineRunAndOffset const): * layout/integration/LayoutIntegrationCoverage.cpp: (WebCore::LayoutIntegration::canUseForFontAndText): * layout/integration/LayoutIntegrationRunIterator.h: (WebCore::LayoutIntegration::Run::onSameLine const): * layout/integration/LayoutIntegrationRunIteratorLegacyPath.h: (WebCore::LayoutIntegration::LegacyPath::onSameLine const): (WebCore::LayoutIntegration::LegacyPath::atEnd const): * layout/integration/LayoutIntegrationRunIteratorModernPath.h: (WebCore::LayoutIntegration::ModernPath::onSameLine const): (WebCore::LayoutIntegration::ModernPath::atEnd const): * platform/DragImage.cpp: * rendering/RenderTextLineBoxes.h: Canonical link: https://commits.webkit.org/230071@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-05 14:39:03 +00:00
editing/InlineRunAndOffset.h
[macOS] ImageOverlayController should paint selection quads instead of bounding rects https://bugs.webkit.org/show_bug.cgi?id=225585 <rdar://problem/77725745> Reviewed by Tim Horton. Source/WebCore: Teach `SelectionRectGatherer` (now renamed to `SelectionGeometryGatherer`) to emit quads, rather than bounding rects around each quad. We use these quads in `ImageOverlayController` to render selection quads via page overlay (i.e., in the case where the image containing the overlay is transparent). Test: fast/images/image-extraction/mac/select-rotated-transparent-image-overlay.html * Headers.cmake: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * editing/SelectionGeometryGatherer.cpp: Renamed from Source/WebCore/editing/SelectionRectGatherer.cpp. Rename `SelectionRectGatherer` to `SelectionGeometryGatherer`, to reflect the fact that this helper class now aggregates both selection quads and gap rects. (WebCore::SelectionGeometryGatherer::SelectionGeometryGatherer): (WebCore::SelectionGeometryGatherer::addQuad): Rename `addRect` to `addQuad`, and make it take a `FloatQuad` instead. (WebCore::SelectionGeometryGatherer::addGapRects): (WebCore::SelectionGeometryGatherer::Notifier::Notifier): (WebCore::SelectionGeometryGatherer::Notifier::~Notifier): (WebCore::SelectionGeometryGatherer::boundingRects const): (WebCore::SelectionGeometryGatherer::clearAndCreateNotifier): * editing/SelectionGeometryGatherer.h: Renamed from Source/WebCore/editing/SelectionRectGatherer.h. (WebCore::SelectionGeometryGatherer::setTextOnly): (WebCore::SelectionGeometryGatherer::isTextOnly const): * html/HTMLElement.cpp: (WebCore::HTMLElement::updateWithImageExtractionResult): Minor tweak - don't add any margin around the word when the line only contains a single word. * page/ImageOverlayController.cpp: (WebCore::ImageOverlayController::selectionQuadsDidChange): Rename `selectionRectsDidChange` to `selectionQuadsDidChange`, and take a `FloatQuad` in absolute coordinates instead of a `LayoutRect`. Store these quads in `m_overlaySelectionQuads` (also renamed from `m_overlaySelectionRects`). (WebCore::ImageOverlayController::uninstallPageOverlayIfNeeded): (WebCore::ImageOverlayController::drawRect): Make a few changes when painting selections using the `ImageOverlayController`: 1. Instead of painting with `fillRect()`, coalesce all of the collected selection quads into a single `Path` object, and pass that `Path` into `fillPath()`. This allows us to render each piece of selected content as a quad instead of a bounding rect, and additionally prevents us from rendering overlapping selections when using `ImageOverlayController`. 2. Clip selections to the absolute bounds of the image overlay host element's renderer, which prevents the new selection quads from spilling out of the host element. (WebCore::ImageOverlayController::selectionRectsDidChange): Deleted. * page/ImageOverlayController.h: * rendering/RenderSelectionInfo.cpp: (WebCore::RenderSelectionInfo::RenderSelectionInfo): * rendering/RenderSelectionInfo.h: (WebCore::RenderSelectionInfo::collectedSelectionQuads const): (WebCore::RenderSelectionInfo::collectedSelectionRects const): Deleted. More minor refactoring: rename `collectedSelectionRects` to `collectedSelectionQuads`, and make it take the original `FloatQuad` instead of the quad's bounding box. * rendering/RenderText.cpp: (WebCore::RenderText::collectSelectionGeometriesForLineBoxes): * rendering/RenderText.h: * rendering/SelectionRangeData.cpp: (WebCore::SelectionRangeData::SelectionRangeData): (WebCore::SelectionRangeData::set): (WebCore::SelectionRangeData::apply): * rendering/SelectionRangeData.h: LayoutTests: Add a new layout test to cover the change. Currently, the below test case renders a visible selection rect in the image overlay since we render the bounding rect of the overlay text quad, which intersects with the image overlay's bounds. However, the text quad is positioned outside of the image overlay, so there shouldn't be any visible selection rect. As such, this test is expected to render the same content as a plain image (even without an image overlay). Unfortunately, I couldn't write a matching ref-test for the case where the selection rect is inside the bounds of the image overlay, since doing so led to tiny subpixel differences between the transparent image case (using `ImageOverlayController`) and the regular image overlay selection case. * fast/images/image-extraction/mac/select-rotated-transparent-image-overlay-expected.html: Added. * fast/images/image-extraction/mac/select-rotated-transparent-image-overlay.html: Added. Canonical link: https://commits.webkit.org/237541@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-10 18:10:03 +00:00
editing/SelectionGeometryGatherer.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
editing/SerializedAttachmentData.h
editing/SmartReplace.h
editing/SpellChecker.h
editing/TextAffinity.h
editing/TextGranularity.h
editing/TextIterator.h
editing/TextIteratorBehavior.h
Add a mechanism to find and manipulate text by paragraphs https://bugs.webkit.org/show_bug.cgi?id=203286 Reviewed by Wenson Hsieh. Source/WebCore: This patch introduces TextManipulationController which allows WebKit clients to find and replace text content in a given document by paragraph boundary. For now, TextManipulationController finds all paragraphs in the document and invokes the callback for each paragraph. In the future, this controller will support detecting removal and insertion of new content to the document. Tests: TextManipulation.StartTextManipulationFindSimpleParagraphs TextManipulation.StartTextManipulationFindParagraphsWithMultileTokens TextManipulation.CompleteTextManipulationShouldReplaceSimpleParagraphContent TextManipulation.CompleteTextManipulationShouldFailWhenContentIsChanged TextManipulation.CompleteTextManipulationShouldFailWhenDocumentHasBeenNavigatedAway * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::prepareForDestruction): Clear TextManipulationController. Otherwise m_items in TextManipulationController may keep a bunch of nodes alive and not let this document destructed. (WebCore::Document::textManipulationController): Added. * dom/Document.h: (WebCore::Document::textManipulationControllerIfExists): Added. * editing/TextManipulationController.cpp: Added. (WebCore::TextManipulationController::TextManipulationController): Added. (WebCore::TextManipulationController::startObservingParagraphs): Finds all pargraphs and invoke the callback. (WebCore::TextManipulationController::addItem): Added. A helper for startObservingParagraphs. (WebCore::TextManipulationController::completeManipulation): Added. (WebCore::TextManipulationController::replace): Added. A helper for completeManipulation. * editing/TextManipulationController.h: Added. (WebCore::TextManipulationController::ManipulationToken::encode const): Added. (WebCore::TextManipulationController::ManipulationToken::decode): Added. Source/WebKit: This patch introduces a new SPI to find paragraphs of text and let client replace the content of each paragraph. For now, this SPI is limited to find & replace contents of main frame's document. WKWebView's _startTextManipulationsWithCompletionHandler sends StartTextManipulations message to WebContent process to find all paragraphs in the main frame. WebContent process will send back DidFindTextManipulationItem message for each paragraph, which in turn calls back _WKTextManipulationDelegate's _webView: didFindTextManipulationItem:. Upon receiving this delegate callback, the client can invoke WKWebView's _completeTextManipulation to replace the content. It will send CompleteTextManipulation to WebContent process, which will invoke completeManipulation on main frame's document's TextManipulationController. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _textManipulationDelegate]): Aded. (-[WKWebView _setTextManipulationDelegate:]): Aded. (-[WKWebView _startTextManipulationsWithCompletionHandler:]): (-[WKWebView _completeTextManipulation:completion:]): * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/API/Cocoa/_WKTextManipulationDelegate.h: Added. * UIProcess/API/Cocoa/_WKTextManipulationItem.h: Added. * UIProcess/API/Cocoa/_WKTextManipulationItem.mm: Added. (-[_WKTextManipulationItem initWithIdentifier:tokens:]): (-[_WKTextManipulationItem identifier]): (-[_WKTextManipulationItem tokens]): * UIProcess/API/Cocoa/_WKTextManipulationToken.h: Added. * UIProcess/API/Cocoa/_WKTextManipulationToken.mm: Added. (-[_WKTextManipulationToken init]): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::startTextManipulations): (WebKit::WebPageProxy::didFindTextManipulationItem): (WebKit::WebPageProxy::completeTextManipulation): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::startTextManipulations): (WebKit::WebPage::completeTextManipulation): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Tools: Added basic API tests for the new SPI. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: Added. (-[TextManipulationDelegate init]): (-[TextManipulationDelegate _webView:didFindItem:forFrame:]): (-[TextManipulationDelegate items]): (TestWebKitAPI::createItem): Canonical link: https://commits.webkit.org/216803@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-25 00:08:13 +00:00
editing/TextManipulationController.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
editing/UndoStep.h
editing/VisiblePosition.h
editing/VisibleSelection.h
editing/VisibleUnits.h
editing/WebContentReader.h
editing/WritingDirection.h
editing/markup.h
fileapi/AsyncFileStream.h
fileapi/Blob.h
fileapi/BlobPropertyBag.h
Blob URL changes after loading it https://bugs.webkit.org/show_bug.cgi?id=228923 Reviewed by Geoff Garen. Source/WebCore: Blob URL changes after loading it. This is because we use URLWithBlobURLLifetimeExtension to extend the lifetime of the Blob URL during the load and URLWithBlobURLLifetimeExtension ends up creating a new public Blob URL. This is Web-observable so we need a way to extend the lifetime of a Blob URL without actually generating a new Blob URL. This patch replaces URLWithBlobURLLifetimeExtension with a new BlobURLHandle class which extends the lifetime of a Blob URL as long as there are BlobURLHandle objects referring to it. BlobURLHandle works with both private and public Blob URLs so it replaces Blob::Handle as well (which I recently introduced via r280547). The Blob URL no longer changes when we extend its lifetime. Instead, the Blob registry now keeps track of references to a given Blob and only removes a Blob URL once there are no longer any references to it. Test: fast/files/blob-as-frame-url.html * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::serialize): (WebCore::CloneSerializer::CloneSerializer): (WebCore::CloneSerializer::dumpIfTerminal): (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::create): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::blobHandles const): (WebCore::SerializedScriptValue::SerializedScriptValue): * fileapi/Blob.cpp: (WebCore::Blob::Blob): (WebCore::Blob::slice const): (WebCore::Blob::size const): (WebCore::Blob::handle const): * fileapi/Blob.h: (WebCore::Blob::url const): * fileapi/BlobURL.cpp: (WebCore::BlobURLHandle::BlobURLHandle): (WebCore::BlobURLHandle::~BlobURLHandle): (WebCore::BlobURLHandle::registerBlobURLHandleIfNecessary): (WebCore::BlobURLHandle::unregisterBlobURLHandleIfNecessary): (WebCore::BlobURLHandle::operator=): (WebCore::BlobURLHandle::clear): * fileapi/BlobURL.h: (WebCore::BlobURLHandle::BlobURLHandle): (WebCore::BlobURLHandle::url const): * fileapi/ThreadableBlobRegistry.cpp: (WebCore::ThreadableBlobRegistry::registerBlobURLHandle): (WebCore::ThreadableBlobRegistry::unregisterBlobURLHandle): * fileapi/ThreadableBlobRegistry.h: * loader/PolicyChecker.cpp: (WebCore::FrameLoader::PolicyChecker::extendBlobURLLifetimeIfNecessary const): (WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy): (WebCore::FrameLoader::PolicyChecker::checkNewWindowPolicy): * loader/PolicyChecker.h: * platform/network/BlobRegistry.h: * platform/network/BlobRegistryImpl.cpp: (WebCore::BlobRegistryImpl::registerFileBlobURL): (WebCore::BlobRegistryImpl::registerBlobURL): (WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked): (WebCore::BlobRegistryImpl::registerBlobURLForSlice): (WebCore::BlobRegistryImpl::unregisterBlobURL): (WebCore::BlobRegistryImpl::addBlobData): (WebCore::BlobRegistryImpl::registerBlobURLHandle): (WebCore::BlobRegistryImpl::unregisterBlobURLHandle): * platform/network/BlobRegistryImpl.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setResponseType): (WebCore::XMLHttpRequest::open): (WebCore::XMLHttpRequest::prepareToSend): (WebCore::XMLHttpRequest::send): (WebCore::XMLHttpRequest::createRequest): (WebCore::XMLHttpRequest::clearRequest): (WebCore::XMLHttpRequest::didFinishLoading): * xml/XMLHttpRequest.h: Source/WebKit: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::registerBlobURLHandle): (WebKit::NetworkConnectionToWebProcess::unregisterBlobURLHandle): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry): * WebProcess/FileAPI/BlobRegistryProxy.cpp: (WebKit::BlobRegistryProxy::registerBlobURLHandle): (WebKit::BlobRegistryProxy::unregisterBlobURLHandle): * WebProcess/FileAPI/BlobRegistryProxy.h: Source/WebKitLegacy/mac: * WebCoreSupport/WebPlatformStrategies.mm: Source/WebKitLegacy/win: * WebCoreSupport/WebPlatformStrategies.cpp: LayoutTests: Add layout test coverage. * fast/files/blob-as-frame-url-expected.txt: Added. * fast/files/blob-as-frame-url.html: Added. Canonical link: https://commits.webkit.org/240387@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 03:33:03 +00:00
fileapi/BlobURL.h
fileapi/EndingType.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
fileapi/File.h
fileapi/FileList.h
WebSockets: add support for sending blob messages when using web sockets platform APIs https://bugs.webkit.org/show_bug.cgi?id=199189 Reviewed by Youenn Fablet. Source/WebCore: * Headers.cmake: Add missing headers. Source/WebKit: Add helper private class BlobLoader that uses FileReaderLoader to load the blobs. Since blob loads are asynchronous, the messages are queued using another helper internal class PendingMessage. * WebProcess/Network/WebSocketChannel.cpp: (WebKit::WebSocketChannel::increaseBufferedAmount): Increase the buffered amount checking we don't overlofw. (WebKit::WebSocketChannel::decreaseBufferedAmount): Decrease the buffered amount. (WebKit::WebSocketChannel::sendMessage): Helper class to send message to the network process and decrease the buffered amount when done. (WebKit::WebSocketChannel::send): Queue the message in pending queue if there are pending messages in the queue for text and binary messages. For blobs, always queue the message unless it's an empty blob that we can handle as empty binary data directly. (WebKit::PendingMessage::PendingMessage): Helper class to queue message requests. (WebKit::PendingMessage::type const): Type of message: Text, Binary, Blob. (WebKit::PendingMessage::textMessage const): The text message. (WebKit::PendingMessage::binaryData const): The binary data. (WebKit::PendingMessage::blobLoader const): The blob loader. (WebKit::WebSocketChannel::fail): Notify the client about the error to ensure onclose is emitted. (WebKit::WebSocketChannel::disconnect): Clear the pending messages queue. * WebProcess/Network/WebSocketChannel.h: Canonical link: https://commits.webkit.org/213290@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-01 08:09:46 +00:00
fileapi/FileReaderLoader.h
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
fileapi/FileReaderLoaderClient.h
fileapi/NetworkSendQueue.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Rename PageCache to BackForwardCache https://bugs.webkit.org/show_bug.cgi?id=203048 Reviewed by Alex Christensen. Rename PageCache to BackForwardCache for clarity and consistency with the UIProcess's WebBackForwardCache. Source/WebCore: * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::suspend): * Modules/mediarecorder/MediaRecorder.cpp: (WebCore::MediaRecorder::canSuspendForDocumentSuspension const): * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::suspend): * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::suspend): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * animation/WebAnimation.cpp: (WebCore::WebAnimation::canSuspendForDocumentSuspension const): * bindings/js/WindowProxy.cpp: (WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow): * bindings/js/WindowProxy.h: * dom/ActiveDOMObject.h: * dom/Document.cpp: (WebCore::Document::~Document): (WebCore::Document::scheduleStyleRecalc): (WebCore::Document::needsStyleRecalc const): (WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc): (WebCore::Document::createRenderTree): (WebCore::Document::didBecomeCurrentDocumentInFrame): (WebCore::Document::attachToCachedFrame): (WebCore::Document::detachFromCachedFrame): (WebCore::Document::prepareForDestruction): (WebCore::Document::adjustFocusedNodeOnNodeRemoval): (WebCore::Document::setFocusedElement): (WebCore::Document::takeDOMWindowFrom): (WebCore::Document::setBackForwardCacheState): (WebCore::Document::suspend): (WebCore::Document::resume): (WebCore::Document::topDocument const): * dom/Document.h: (WebCore::Document::backForwardCacheState const): * dom/FullscreenManager.cpp: (WebCore::FullscreenManager::willEnterFullscreen): (WebCore::FullscreenManager::didEnterFullscreen): (WebCore::FullscreenManager::willExitFullscreen): (WebCore::FullscreenManager::didExitFullscreen): * dom/FullscreenManager.h: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): * history/BackForwardCache.cpp: Renamed from Source/WebCore/history/PageCache.cpp. (WebCore::logBackForwardCacheFailureDiagnosticMessage): (WebCore::canCacheFrame): (WebCore::canCachePage): (WebCore::BackForwardCache::singleton): (WebCore::BackForwardCache::BackForwardCache): (WebCore::BackForwardCache::dump const): (WebCore::BackForwardCache::canCache const): (WebCore::BackForwardCache::pruneToSizeNow): (WebCore::BackForwardCache::setMaxSize): (WebCore::BackForwardCache::frameCount const): (WebCore::BackForwardCache::markPagesForDeviceOrPageScaleChanged): (WebCore::BackForwardCache::markPagesForContentsSizeChanged): (WebCore::BackForwardCache::markPagesForCaptionPreferencesChanged): (WebCore::setBackForwardCacheState): (WebCore::BackForwardCache::addIfCacheable): (WebCore::BackForwardCache::take): (WebCore::BackForwardCache::removeAllItemsForPage): (WebCore::BackForwardCache::get): (WebCore::BackForwardCache::remove): (WebCore::BackForwardCache::prune): * history/BackForwardCache.h: Renamed from Source/WebCore/history/PageCache.h. * history/CachedFrame.cpp: (WebCore::CachedFrameBase::restore): (WebCore::CachedFrame::CachedFrame): (WebCore::CachedFrame::clear): (WebCore::CachedFrame::destroy): * history/CachedFramePlatformData.h: * history/HistoryItem.cpp: (WebCore::HistoryItem::setCachedPage): (WebCore::HistoryItem::setURL): * history/HistoryItem.h: (WebCore::HistoryItem::isInBackForwardCache const): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::suspend): (WebCore::HTMLMediaElement::resume): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::createElementRenderer): * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::suspend): * html/MediaElementSession.cpp: (WebCore::MediaElementSession::autoplayPermitted const): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::addSubresourceLoader): * loader/DocumentLoader.h: * loader/EmptyFrameLoaderClient.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::closeURL): (WebCore::FrameLoader::clear): (WebCore::FrameLoader::stopAllLoaders): (WebCore::FrameLoader::stopForBackForwardCache): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::open): (WebCore::FrameLoader::frameDetached): (WebCore::FrameLoader::detachFromParent): (WebCore::FrameLoader::receivedMainResourceError): (WebCore::FrameLoader::shouldPerformFragmentNavigation): (WebCore::FrameLoader::dispatchUnloadEvents): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): (WebCore::FrameLoader::loadDifferentDocumentItem): * loader/FrameLoader.h: * loader/FrameLoaderClient.h: * loader/HistoryController.cpp: (WebCore::HistoryController::saveScrollPositionAndViewStateToItem): (WebCore::HistoryController::restoreScrollPositionAndViewState): (WebCore::HistoryController::invalidateCurrentItemCachedPage): (WebCore::HistoryController::updateForReload): * loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::canCacheInBackForwardCache): * loader/appcache/ApplicationCacheHost.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::load): * page/DOMWindow.cpp: (WebCore::DOMWindow::suspendForBackForwardCache): (WebCore::DOMWindow::resumeFromBackForwardCache): (WebCore::DOMWindow::decrementScrollEventListenersCount): * page/DOMWindow.h: * page/DOMWindowExtension.cpp: (WebCore::DOMWindowExtension::suspendForBackForwardCache): (WebCore::DOMWindowExtension::resumeFromBackForwardCache): * page/DOMWindowExtension.h: * page/DiagnosticLoggingKeys.cpp: (WebCore::DiagnosticLoggingKeys::backForwardCacheKey): (WebCore::DiagnosticLoggingKeys::backForwardCacheFailureKey): * page/DiagnosticLoggingKeys.h: * page/EventSource.cpp: (WebCore::EventSource::scheduleReconnect): (WebCore::EventSource::didReceiveResponse): (WebCore::EventSource::didReceiveData): (WebCore::EventSource::didFinishLoading): (WebCore::EventSource::didFail): (WebCore::EventSource::abortConnectionAttempt): (WebCore::EventSource::suspend): (WebCore::EventSource::resume): (WebCore::EventSource::dispatchMessageEvent): * page/EventSource.h: * page/Frame.cpp: (WebCore::Frame::setView): (WebCore::Frame::setDocument): (WebCore::Frame::willDetachPage): * page/FrameView.cpp: (WebCore::FrameView::didRestoreFromBackForwardCache): (WebCore::FrameView::setContentsSize): * page/FrameView.h: * page/FrameViewLayoutContext.cpp: (WebCore::FrameViewLayoutContext::layout): (WebCore::FrameViewLayoutContext::scheduleLayout): * page/MemoryRelease.cpp: (WebCore::releaseCriticalMemory): (WebCore::releaseMemory): * page/MemoryRelease.h: * page/Page.cpp: (WebCore::Page::~Page): (WebCore::Page::setViewScaleFactor): (WebCore::Page::setDeviceScaleFactor): * page/Page.h: * page/PageGroup.cpp: (WebCore::PageGroup::captionPreferencesChanged): * page/PerformanceLogging.cpp: (WebCore::PerformanceLogging::memoryUsageStatistics): * page/Settings.yaml: * page/SettingsBase.cpp: (WebCore::SettingsBase::usesBackForwardCacheChanged): * page/SettingsBase.h: * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::setNeedsStyleRecalc): * page/animation/CSSAnimationController.cpp: (WebCore::CSSAnimationControllerPrivate::updateAnimations): (WebCore::CSSAnimationControllerPrivate::addElementChangeToDispatch): (WebCore::CSSAnimationController::cancelAnimations): (WebCore::CSSAnimationController::updateAnimations): * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::sendTransitionEvent): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::sendAnimationEvent): * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled): (WebCore::ScrollAnimatorMac::updateScrollerStyle): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintIntoLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking): (WebCore::RenderLayerCompositor::didAddScrollingLayer): * rendering/RenderLayerCompositor.h: * rendering/RenderObject.h: * rendering/SimpleLineLayoutCoverage.cpp: (WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage): * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::createAnimatedElementUpdate): * testing/Internals.cpp: (WebCore::Internals::clearBackForwardCache): (WebCore::Internals::backForwardCacheSize const): (WebCore::Internals::preventDocumentForEnteringBackForwardCache): * testing/Internals.h: * testing/Internals.idl: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::suspend): Source/WebKit: * Shared/CacheModel.cpp: (WebKit::calculateMemoryCacheSizes): * Shared/CacheModel.h: * Shared/WebPreferences.yaml: * UIProcess/API/APINavigationClient.h: (API::NavigationClient::willGoToBackForwardListItem): * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPageCacheEnabled): (WKPreferencesGetPageCacheEnabled): (WKPreferencesSetPageCacheSupportsPlugins): (WKPreferencesGetPageCacheSupportsPlugins): * UIProcess/API/Cocoa/WKPreferences.mm: (-[WKPreferences _setUsesPageCache:]): (-[WKPreferences _usesPageCache]): (-[WKPreferences _setPageCacheSupportsPlugins:]): (-[WKPreferences _pageCacheSupportsPlugins]): * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: (-[_WKProcessPoolConfiguration pageCacheEnabled]): (-[_WKProcessPoolConfiguration setPageCacheEnabled:]): * UIProcess/API/glib/WebKitSettings.cpp: (webkit_settings_get_enable_page_cache): (webkit_settings_set_enable_page_cache): * UIProcess/Cocoa/NavigationState.h: * UIProcess/Cocoa/NavigationState.mm: (WebKit::NavigationState::setNavigationDelegate): (WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem): (WebKit::NavigationState::NavigationClient::didStartProvisionalNavigation): (WebKit::NavigationState::NavigationClient::didReceiveServerRedirectForProvisionalNavigation): (WebKit::NavigationState::NavigationClient::didFailProvisionalNavigationWithError): (WebKit::NavigationState::NavigationClient::didCommitNavigation): (WebKit::NavigationState::NavigationClient::didFinishDocumentLoad): (WebKit::NavigationState::NavigationClient::didFinishNavigation): (WebKit::NavigationState::NavigationClient::didFailNavigationWithError): (WebKit::NavigationState::NavigationClient::didSameDocumentNavigation): * UIProcess/ViewGestureController.cpp: (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::shouldUseBackForwardCache const): (WebKit::WebPageProxy::willGoToBackForwardListItem): (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): (WebKit::WebPageProxy::didFinishLoadForFrame): (WebKit::WebPageProxy::didFailLoadForFrame): (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::updateBackForwardCacheCapacity): * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp: (WKBundleBackForwardListItemIsInBackForwardCache): * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h: * WebProcess/WebCoreSupport/SessionStateConversion.cpp: (WebKit::toBackForwardListItemState): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::WebFrameLoaderClient): (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem const): (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): (WebKit::WebFrameLoaderClient::didRestoreFromBackForwardCache): (WebKit::WebFrameLoaderClient::createPlugin): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm: (WebKit::WebFrameLoaderClient::forceLayoutOnRestoreFromBackForwardCache): * WebProcess/WebPage/VisitedLinkTableController.cpp: * WebProcess/WebPage/WebBackForwardListProxy.cpp: (WebKit::WebBackForwardListProxy::removeItem): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::suspendForProcessSwap): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::setCacheModel): (WebKit::WebProcess::deleteWebsiteData): (WebKit::WebProcess::setBackForwardCacheCapacity): (WebKit::WebProcess::clearCachedPage): * WebProcess/WebProcess.h: Source/WebKitLegacy/ios: * WebView/WebUIKitDelegate.h: Source/WebKitLegacy/mac: * History/BackForwardList.mm: (BackForwardList::addItem): (BackForwardList::setCapacity): * History/WebBackForwardList.mm: (-[WebBackForwardList pageCacheSize]): * History/WebHistoryItem.mm: * History/WebHistoryItemPrivate.h: * Misc/WebCache.mm: * Misc/WebCoreStatistics.mm: (+[WebCoreStatistics cachedPageCount]): (+[WebCoreStatistics cachedFrameCount]): * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::forceLayoutOnRestoreFromBackForwardCache): (WebFrameLoaderClient::didRestoreFromBackForwardCache): * WebCoreSupport/WebVisitedLinkStore.mm: * WebView/WebHTMLView.mm: (-[WebHTMLView layoutToMinimumPageWidth:height:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustingViewSize:]): (-[WebHTMLView setNeedsLayout:]): (-[WebHTMLView setNeedsToApplyStyles:]): * WebView/WebView.mm: (-[WebView _close]): (-[WebView _preferencesChanged:]): (+[WebView _setCacheModel:]): Source/WebKitLegacy/win: * BackForwardList.cpp: (BackForwardList::addItem): (BackForwardList::setCapacity): * WebCoreStatistics.cpp: (WebCoreStatistics::cachedPageCount): (WebCoreStatistics::cachedFrameCount): * WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::didRestoreFromBackForwardCache): * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebVisitedLinkStore.cpp: * WebFrame.cpp: (WebFrame::accessible const): * WebView.cpp: (WebView::setCacheModel): (WebView::notifyPreferencesChanged): Tools: * DumpRenderTree/TestOptions.cpp: (TestOptions::TestOptions): * DumpRenderTree/TestOptions.h: * DumpRenderTree/TestRunner.cpp: (overridePreferenceCallback): * DumpRenderTree/mac/DumpRenderTree.mm: (setWebPreferencesForTestOptions): * DumpRenderTree/win/DumpRenderTree.cpp: (resetWebPreferencesToConsistentValues): (setWebPreferencesForTestOptions): * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp: (TestWebKitAPI::DOMWindowExtensionNoCache::willDisconnectDOMWindowExtensionFromGlobalObject): (TestWebKitAPI::DOMWindowExtensionNoCache::didReconnectDOMWindowExtensionToGlobalObject): * TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp: (TestWebKitAPI::DidRemoveFrameFromHiearchyInBackForwardCacheTest::DidRemoveFrameFromHiearchyInBackForwardCacheTest): (TestWebKitAPI::DidRemoveFrameFromHiearchyInBackForwardCacheTest::didCreatePage): * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp: (testWebKitSettings): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::overridePreference): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): * lldb/lldb_webkit.py: (WebCoreFrame_SummaryProvider): (WebCoreDocument_SummaryProvider): (WebCoreDocumentProvider.page_cache_state): LayoutTests: * animations/resume-after-page-cache.html: * compositing/accelerated-layers-after-back.html: * compositing/iframes/page-cache-layer-tree.html: * compositing/page-cache-back-crash.html: * compositing/show-composited-iframe-on-back-button.html: * editing/mac/input/unconfirmed-text-navigation-with-page-cache.html: * fast/canvas/webgl/canvas-webgl-page-cache.html: * fast/css/fontloader-page-cache.html: * fast/dom/DeviceMotion/no-page-cache.html: * fast/dom/DeviceOrientation/event-after-navigation.html: * fast/dom/DeviceOrientation/no-page-cache.html: * fast/dom/Window/timer-resume-on-navigation-back.html: * fast/events/onunload-back-to-page-cache.html: * fast/events/pagehide-timeout.html: * fast/events/pagehide-xhr-open.html: * fast/events/pageshow-pagehide-on-back-cached-with-frames.html: * fast/events/pageshow-pagehide-on-back-cached.html: * fast/events/suspend-timers.html: * fast/forms/autocomplete-off-with-default-value-does-not-clear.html: * fast/frames/frame-crash-with-page-cache.html: * fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html: * fast/frames/page-hide-document-open.html: * fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html: * fast/frames/restoring-page-cache-should-not-run-scripts.html: * fast/harness/page-cache-crash-on-data-urls.html: * fast/harness/use-page-cache.html: * fast/history/back-from-page-with-focused-iframe.html: * fast/history/go-back-to-iframe-with-plugin.html: * fast/history/go-back-to-object-subframe.html: * fast/history/history-back-while-pdf-in-pagecache.html: * fast/history/page-cache-MessagePort-pending-message.html: * fast/history/page-cache-after-window-open.html: * fast/history/page-cache-back-navigation-crash.html: * fast/history/page-cache-clearing-expected.txt: * fast/history/page-cache-clearing.html: * fast/history/page-cache-closed-audiocontext.html: * fast/history/page-cache-createImageBitmap.html: * fast/history/page-cache-createObjectURL-using-open-panel.html: * fast/history/page-cache-createObjectURL.html: * fast/history/page-cache-destroy-document.html: * fast/history/page-cache-element-state-focused.html: * fast/history/page-cache-execute-script-during-restore.html: * fast/history/page-cache-geolocation-active-oneshot.html: * fast/history/page-cache-geolocation-active-watcher.html: * fast/history/page-cache-geolocation.html: * fast/history/page-cache-iframe-js-url.html: * fast/history/page-cache-indexed-closed-db.html: * fast/history/page-cache-indexed-opened-db.html: * fast/history/page-cache-media-source-closed-2.html: * fast/history/page-cache-media-source-closed.html: * fast/history/page-cache-media-source-opened.html: * fast/history/page-cache-navigate-during-restore.html: * fast/history/page-cache-notification-non-suspendable.html: * fast/history/page-cache-notification-suspendable.html: * fast/history/page-cache-removed-source-buffer.html: * fast/history/page-cache-running-audiocontext.html: * fast/history/page-cache-subframes-with-provisional-load.html: * fast/history/page-cache-suspended-audiocontext.html: * fast/history/page-cache-webdatabase-no-transaction-db.html: * fast/history/page-cache-webdatabase-pending-transaction.html: * fast/history/page-cache-with-opener.html: * fast/history/pagehide-remove-iframe-crash.html: * fast/history/resources/page-cache-window-with-iframe.html: * fast/history/resources/page-cache-window-with-opener.html: * fast/history/timed-refresh-in-cached-frame.html: * fast/images/animated-gif-restored-from-bfcache.html: * fast/loader/frames-with-unload-handlers-in-page-cache.html: * fast/loader/image-in-page-cache.html: * fast/loader/input-element-page-cache-crash.html: * fast/loader/navigate-with-new-target-after-back-forward-navigation.html: * fast/loader/navigate-with-post-to-new-target-after-back-forward-navigation.html: * fast/loader/scroll-position-restored-on-back.html: * fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html: * fast/loader/stateobjects/popstate-fires-with-page-cache.html: * fast/loader/unschedule-relayout-after-unload.html: * fast/loader/window-properties-restored-from-page-cache.html: * fast/mediastream/RTCPeerConnection-page-cache.html: * fast/overflow/horizontal-scroll-after-back.html: * fast/scrolling/iframe-scrollable-after-back.html: * fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html: * fast/scrolling/ios/scroll-events-back-forward.html: * fast/scrolling/ios/touch-scroll-back-forward.html: * fast/scrolling/overflow-scrollable-after-back.html: * fast/scrolling/page-cache-back-overflow-scroll-restore.html: * fast/text-autosizing/ios/text-autosizing-after-back.html: * fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html: * fast/viewport/viewport-128.html: * fast/workers/worker-page-cache.html: * http/tests/cache/display-image-unset-allows-cached-image-load.html: * http/tests/eventsource/eventsource-page-cache-connected.html: * http/tests/eventsource/eventsource-page-cache-connecting.html: * http/tests/loading/main-resource-delegates-on-back-navigation.html: * http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html: * http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html: * http/tests/media/reload-after-dialog.html: * http/tests/navigation/go-back-to-error-page.html: * http/tests/navigation/https-in-page-cache.html: * http/tests/navigation/https-no-store-subframe-in-page-cache.html: * http/tests/navigation/image-load-in-pagehide-handler.html: * http/tests/navigation/page-cache-domcache-pending-promise.html: * http/tests/navigation/page-cache-domcachestorage-pending-promise.html: * http/tests/navigation/page-cache-failed-xhr.html: * http/tests/navigation/page-cache-fontfaceset.html: * http/tests/navigation/page-cache-fragment-referrer.html: * http/tests/navigation/page-cache-iframe-no-current-historyItem.html: * http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html: * http/tests/navigation/page-cache-iframe-provisional-load.html: * http/tests/navigation/page-cache-pending-image-load-cache-partition.html: * http/tests/navigation/page-cache-pending-image-load.html: * http/tests/navigation/page-cache-pending-load.html: * http/tests/navigation/page-cache-pending-ping-load-cross-origin.html: * http/tests/navigation/page-cache-pending-ping-load-same-origin.html: * http/tests/navigation/page-cache-requestAnimationFrame.html: * http/tests/navigation/page-cache-xhr-in-pagehide.html: * http/tests/navigation/page-cache-xhr.html: * http/tests/navigation/resources/https-in-page-cache-3.html: * http/tests/navigation/subframe-pagehide-handler-starts-load.html: * http/tests/navigation/subframe-pagehide-handler-starts-load2.html: * http/tests/security/cross-origin-window-open-insert-script.html: * http/tests/security/cross-origin-window-open-javascript-url.html: * http/tests/security/navigate-when-restoring-cached-page.html: * http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html: * http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html: * http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html: * http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html: * http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html: * http/tests/workers/service/page-cache-service-worker-pending-promise.https.html: * http/tests/workers/service/page-caching.html: * http/wpt/beacon/support/sendBeacon-onpagehide-window.html: * legacy-animation-engine/animations/resume-after-page-cache.html: * loader/go-back-cached-main-resource.html: * loader/go-back-to-different-window-size.html: * media/crash-closing-page-with-media-as-plugin-fallback.html: * media/media-source/media-source-page-cache.html: * media/restore-from-page-cache.html: * platform/ios/ios/fixed/fixed-back-forward.html: * plugins/crash-restoring-plugin-page-from-page-cache.html: * plugins/frameset-with-plugin-frame.html: * plugins/netscape-plugin-page-cache-works.html: * storage/indexeddb/IDBRequest-page-cache.html: * storage/indexeddb/IDBTransaction-page-cache.html: * swipe/basic-cached-back-swipe.html: * swipe/main-frame-pinning-requirement.html: * swipe/pushState-cached-back-swipe.html: * swipe/pushState-programmatic-back-while-swiping-crash.html: * swipe/pushstate-with-manual-scrollrestoration.html: * tiled-drawing/scrolling/null-parent-back-crash.html: * tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html: * webrtc/datachannel/datachannel-page-cache-send.html: * webrtc/datachannel/datachannel-page-cache.html: Canonical link: https://commits.webkit.org/216486@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-17 01:44:16 +00:00
history/BackForwardCache.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
history/BackForwardClient.h
history/BackForwardController.h
history/BackForwardItemIdentifier.h
history/CachedFrame.h
history/CachedFramePlatformData.h
Add SPI to suspend / resume a WKWebView https://bugs.webkit.org/show_bug.cgi?id=225333 <rdar://77462543> Reviewed by Geoff Garen. Source/WebCore: Add new function to BackForwardCache to suspend a page and return a CachedPage instead of requiring a HistoryItem and storing the CachedPage on that history item. This is useful when we want to suspend the page in-place and do not want to require a history item (or a navigation). * Headers.cmake: * history/BackForwardCache.cpp: (WebCore::BackForwardCache::trySuspendPage): (WebCore::BackForwardCache::addIfCacheable): (WebCore::BackForwardCache::suspendPage): * history/BackForwardCache.h: * history/CachedPage.h: Source/WebKit: Add SPI to suspend / resume a WKWebView. This suspends the page as if it was in the back/forward cache but the suspension happens in-place, no need to navigate. The suspended page is also not part of the Back/Forward cache so its cap on the number of suspended pages does not apply here. Most of WKWebView's API / SPI will throw an exception when called on a suspended view (The WKPageRefAPI will RELEASE_ASSERT()). Some of the basic API will stay functional (URL, isLoading, title, ...). It is also safe to deallocate / close a suspended WKWebView. * UIProcess/API/C/WKPage.cpp: (crashIfPageIsSuspended): (WKPageLoadURL): (WKPageLoadURLWithShouldOpenExternalURLsPolicy): (WKPageLoadURLWithUserData): (WKPageLoadURLRequest): (WKPageLoadURLRequestWithUserData): (WKPageLoadFile): (WKPageLoadFileWithUserData): (WKPageLoadData): (WKPageLoadDataWithUserData): (WKPageLoadHTMLString): (WKPageLoadHTMLStringWithUserData): (WKPageLoadAlternateHTMLString): (WKPageLoadAlternateHTMLStringWithUserData): (WKPageLoadPlainTextString): (WKPageLoadPlainTextStringWithUserData): (WKPageLoadWebArchiveData): (WKPageLoadWebArchiveDataWithUserData): (WKPageStopLoading): (WKPageReload): (WKPageReloadWithoutContentBlockers): (WKPageReloadFromOrigin): (WKPageReloadExpiredOnly): (WKPageTryClose): (WKPageClose): (WKPageGoForward): (WKPageGoBack): (WKPageGoToBackForwardListItem): (WKPageTryRestoreScrollPosition): (WKPageUpdateWebsitePolicies): (WKPageSetApplicationNameForUserAgent): (WKPageSetCustomUserAgent): (WKPageSetCustomTextEncodingName): (WKPageTerminate): (WKPageRestoreFromSessionState): (WKPageRestoreFromSessionStateWithoutNavigation): (WKPageSetCustomBackingScaleFactor): (WKPageSetTextZoomFactor): (WKPageSetPageZoomFactor): (WKPageSetPageAndTextZoomFactors): (WKPageSetScaleFactor): (WKPageSetUseFixedLayout): (WKPageSetFixedLayoutSize): (WKPageListenForLayoutMilestones): (WKPageSetSuppressScrollbarAnimations): (WKPageSetRubberBandsAtLeft): (WKPageSetRubberBandsAtRight): (WKPageSetRubberBandsAtTop): (WKPageSetRubberBandsAtBottom): (WKPageSetEnableVerticalRubberBanding): (WKPageSetEnableHorizontalRubberBanding): (WKPageSetBackgroundExtendsBeyondPage): (WKPageSetPaginationMode): (WKPageSetPaginationBehavesLikeColumns): (WKPageSetPageLength): (WKPageSetGapBetweenPages): (WKPageSetPaginationLineGridEnabled): (WKPageSetMaintainsInactiveSelection): (WKPageCenterSelectionInVisibleArea): (WKPageFindStringMatches): (WKPageGetImageForFindMatch): (WKPageSelectFindMatch): (WKPageFindString): (WKPageHideFindUI): (WKPageCountStringMatches): (WKPageSetPageContextMenuClient): (WKPageSetPageFindClient): (WKPageSetPageFindMatchesClient): (WKPageSetPageInjectedBundleClient): (WKPageSetPageFormClient): (WKPageSetPageLoaderClient): (WKPageSetPagePolicyClient): (WKPageSetPageUIClient): (WKPageSetPageNavigationClient): (WKPageSetPageStateClient): (WKPageRunJavaScriptInMainFrame): (WKPageRunJavaScriptInMainFrame_b): (WKPageRenderTreeExternalRepresentation): (WKPageGetSourceForFrame): (WKPageGetContentsAsString): (WKPageGetBytecodeProfile): (WKPageGetSamplingProfilerOutput): (WKPageGetSelectionAsWebArchiveData): (WKPageGetContentsAsMHTMLData): (WKPageForceRepaint): (WKPageValidateCommand): (WKPageExecuteCommand): (WKPageComputePagesForPrinting): (WKPageDrawPagesToPDF): (WKPageBeginPrinting): (WKPageEndPrinting): (WKPageSetControlledByAutomation): (WKPageSetAllowsRemoteInspection): (WKPageSetMediaVolume): (WKPageSetMuted): (WKPageSetMediaCaptureEnabled): (WKPageDidAllowPointerLock): (WKPageClearUserMediaState): (WKPageDidDenyPointerLock): (WKPageSetMayStartMediaWhenInWindow): (WKPageSelectContextMenuItem): (WKPageSetScrollPinningBehavior): (WKPageSetAddsVisitedLinks): (WKPageClearWheelEventTestMonitor): (WKPageCallAfterNextPresentationUpdate): (WKPageSetIgnoresViewportScaleLimits): (WKPageGetApplicationManifest_b): (WKPageDumpPrivateClickMeasurement): (WKPageClearPrivateClickMeasurement): (WKPageSetPrivateClickMeasurementOverrideTimerForTesting): (WKPageMarkAttributedPrivateClickMeasurementsAsExpiredForTesting): (WKPageSimulateResourceLoadStatisticsSessionRestart): (WKPageSetPrivateClickMeasurementTokenPublicKeyURLForTesting): (WKPageSetPrivateClickMeasurementTokenSignatureURLForTesting): (WKPageSetPrivateClickMeasurementAttributionReportURLsForTesting): (WKPageMarkPrivateClickMeasurementsAsExpiredForTesting): (WKPageSetPCMFraudPreventionValuesForTesting): (WKPageSetMockCameraOrientation): (WKPageLoadedSubresourceDomains): (WKPageClearLoadedSubresourceDomains): (WKPageSetMediaCaptureReportingDelayForTesting): (WKPageDispatchActivityStateUpdateForTesting): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView loadRequest:]): (-[WKWebView loadFileURL:allowingReadAccessToURL:]): (-[WKWebView loadHTMLString:baseURL:]): (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]): (-[WKWebView startDownloadUsingRequest:completionHandler:]): (-[WKWebView resumeDownloadFromResumeData:completionHandler:]): (-[WKWebView goToBackForwardListItem:]): (-[WKWebView goBack]): (-[WKWebView goForward]): (-[WKWebView reload]): (-[WKWebView reloadFromOrigin]): (-[WKWebView stopLoading]): (-[WKWebView evaluateJavaScript:completionHandler:]): (-[WKWebView evaluateJavaScript:inFrame:inContentWorld:completionHandler:]): (-[WKWebView callAsyncJavaScript:arguments:inFrame:inContentWorld:completionHandler:]): (-[WKWebView closeAllMediaPresentationsWithCompletionHandler:]): (-[WKWebView pauseAllMediaPlaybackWithCompletionHandler:]): (-[WKWebView setAllMediaPlaybackSuspended:completionHandler:]): (-[WKWebView requestMediaPlaybackStateWithCompletionHandler:]): (-[WKWebView setMicrophoneCaptureState:completionHandler:]): (-[WKWebView setCameraCaptureState:completionHandler:]): (-[WKWebView _evaluateJavaScript:asAsyncFunction:withSourceURL:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]): (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]): (-[WKWebView setAllowsBackForwardNavigationGestures:]): (-[WKWebView setCustomUserAgent:]): (-[WKWebView setAllowsLinkPreview:]): (-[WKWebView setPageZoom:]): (-[WKWebView findString:withConfiguration:completionHandler:]): (-[WKWebView setMediaType:]): (-[WKWebView setInteractionState:]): (-[WKWebView setAllowsMagnification:]): (-[WKWebView setMagnification:centeredAtPoint:]): (-[WKWebView setMagnification:]): (-[WKWebView printOperationWithPrintInfo:]): (-[WKWebView createPDFWithConfiguration:completionHandler:]): (-[WKWebView createWebArchiveDataWithCompletionHandler:]): (-[WKWebView loadSimulatedRequest:response:responseData:]): (-[WKWebView loadSimulatedRequest:withResponse:responseData:]): (-[WKWebView loadSimulatedRequest:responseHTMLString:]): (-[WKWebView loadSimulatedRequest:withResponseHTMLString:]): (-[WKWebView loadFileRequest:allowingReadAccessToURL:]): (-[WKWebView _toggleStrikeThrough:]): (-[WKWebView _increaseListLevel:]): (-[WKWebView _decreaseListLevel:]): (-[WKWebView _changeListType:]): (-[WKWebView _setViewportSizeForCSSViewportUnits:]): (-[WKWebView _didEnableBrowserExtensions:]): (-[WKWebView _didDisableBrowserExtensions:]): (-[WKWebView _setEditable:]): (-[WKWebView _executeEditCommand:argument:completion:]): (-[WKWebView _startTextManipulationsWithConfiguration:completion:]): (-[WKWebView _completeTextManipulation:completion:]): (-[WKWebView _completeTextManipulationForItems:completion:]): (-[WKWebView _takeFindStringFromSelection:]): (-[WKWebView _updateMediaPlaybackControlsManager]): (-[WKWebView _togglePictureInPicture]): (-[WKWebView _closeAllMediaPresentations]): (-[WKWebView _stopMediaCapture]): (-[WKWebView _stopAllMediaPlayback]): (-[WKWebView _suspendAllMediaPlayback]): (-[WKWebView _resumeAllMediaPlayback]): (-[WKWebView _restoreAppHighlights:]): (-[WKWebView _restoreAndScrollToAppHighlight:]): (-[WKWebView _addAppHighlight]): (-[WKWebView _loadAlternateHTMLString:baseURL:forUnreachableURL:]): (-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]): (-[WKWebView _loadRequest:shouldOpenExternalURLs:]): (-[WKWebView _loadRequest:shouldOpenExternalURLsPolicy:]): (-[WKWebView _grantAccessToAssetServices]): (-[WKWebView _revokeAccessToAssetServices]): (-[WKWebView _switchFromStaticFontRegistryToUserFontRegistry]): (-[WKWebView _appBoundNavigationDataForDomain:completionHandler:]): (-[WKWebView _suspendPage:]): (-[WKWebView _resumePage:]): (-[WKWebView _setApplicationNameForUserAgent:]): (-[WKWebView _killWebContentProcess]): (-[WKWebView _reloadWithoutContentBlockers]): (-[WKWebView _reloadExpiredOnly]): (-[WKWebView _killWebContentProcessAndResetState]): (-[WKWebView _takePDFSnapshotWithConfiguration:completionHandler:]): (-[WKWebView _getPDFFirstPageSizeInFrame:completionHandler:]): (-[WKWebView _restoreFromSessionStateData:]): (-[WKWebView _restoreSessionState:andNavigate:]): (-[WKWebView _close]): (-[WKWebView _tryClose]): (-[WKWebView _insertAttachmentWithFilename:contentType:data:options:completion:]): (-[WKWebView _insertAttachmentWithFileWrapper:contentType:options:completion:]): (-[WKWebView _insertAttachmentWithFileWrapper:contentType:completion:]): (-[WKWebView _attachmentForIdentifier:]): (-[WKWebView _simulateDeviceOrientationChangeWithAlpha:beta:gamma:]): (-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]): (-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:details:completionHandler:]): (-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:detailsWithLinks:completionHandler:]): (-[WKWebView _isJITEnabled:]): (-[WKWebView _evaluateJavaScriptWithoutUserGesture:completionHandler:]): (-[WKWebView _callAsyncJavaScript:arguments:inFrame:inContentWorld:completionHandler:]): (-[WKWebView _evaluateJavaScript:inFrame:inContentWorld:completionHandler:]): (-[WKWebView _evaluateJavaScript:withSourceURL:inFrame:inContentWorld:completionHandler:]): (-[WKWebView _updateWebpagePreferences:]): (-[WKWebView _notifyUserScripts]): (-[WKWebView _deferrableUserScriptsNeedNotification]): (-[WKWebView _setAllowsRemoteInspection:]): (-[WKWebView _setRemoteInspectionNameOverride:]): (-[WKWebView _setAddsVisitedLinks:]): (-[WKWebView _getMainResourceDataWithCompletionHandler:]): (-[WKWebView _getWebArchiveDataWithCompletionHandler:]): (-[WKWebView _getContentsAsStringWithCompletionHandler:]): (-[WKWebView _getContentsOfAllFramesAsStringWithCompletionHandler:]): (-[WKWebView _getContentsAsAttributedStringWithCompletionHandler:]): (-[WKWebView _getApplicationManifestWithCompletionHandler:]): (-[WKWebView _setPaginationMode:]): (-[WKWebView _setPaginationBehavesLikeColumns:]): (-[WKWebView _setPageLength:]): (-[WKWebView _setGapBetweenPages:]): (-[WKWebView _setPaginationLineGridEnabled:]): (-[WKWebView _setTextZoomFactor:]): (-[WKWebView _setPageZoomFactor:]): (-[WKWebView _countStringMatches:options:maxCount:]): (-[WKWebView _findString:options:maxCount:]): (-[WKWebView _hideFindUI]): (-[WKWebView _saveBackForwardSnapshotForItem:]): (-[WKWebView _clearServiceWorkerEntitlementOverride:]): (-[WKWebView _preconnectToServer:]): (-[WKWebView _setCanUseCredentialStorage:]): (-[WKWebView _setLayoutMode:]): (-[WKWebView _setFixedLayoutSize:]): (-[WKWebView _setBackgroundExtendsBeyondPage:]): (-[WKWebView _setViewScale:]): (-[WKWebView _setCORSDisablingPatterns:]): (-[WKWebView _getProcessDisplayNameWithCompletionHandler:]): (-[WKWebView _setMinimumEffectiveDeviceWidth:]): (-[WKWebView _grantAccessToPreferenceService]): (-[WKWebView _setScrollPerformanceDataCollectionEnabled:]): (-[WKWebView _setAllowsMediaDocumentInlinePlayback:]): (-[WKWebView _setMediaCaptureEnabled:]): (-[WKWebView _setPageMuted:]): (-[WKWebView _removeDataDetectedLinks:]): (-[WKWebView _doAfterNextPresentationUpdate:]): (-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForPainting:]): * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleTouchEvent): (WebKit::WebPageProxy::resumeActiveDOMObjectsAndAnimations): (WebKit::WebPageProxy::suspendActiveDOMObjectsAndAnimations): (WebKit::WebPageProxy::suspend): (WebKit::WebPageProxy::resume): (WebKit::WebPageProxy::requestMediaPlaybackState): (WebKit::WebPageProxy::resetStateAfterProcessExited): * UIProcess/WebPageProxy.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::suspend): (WebKit::WebPage::resume): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Tools: Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspension.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/postMessage-regularly.html: Added. Canonical link: https://commits.webkit.org/237614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-12 05:53:13 +00:00
history/CachedPage.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
history/HistoryItem.h
html/Autocapitalize.h
html/AutocapitalizeTypes.h
html/Autofill.h
html/CachedHTMLCollection.h
html/CanvasBase.h
html/CollectionTraversal.h
html/CollectionType.h
html/DOMTokenList.h
html/DataListSuggestionInformation.h
Add enterkeyhint support https://bugs.webkit.org/show_bug.cgi?id=189546 <rdar://problem/51021148> Reviewed by Tim Horton. Source/WebCore: * Headers.cmake: Add EnterKeyHint.h. Source/WebKit: This patch adds support for the enterkeyhint HTML attribute on iOS. Tests: EnterKeyHintTests.EnterKeyHintInContentEditableElement EnterKeyHintTests.EnterKeyHintInTextInput EnterKeyHintTests.EnterKeyHintInTextArea * Shared/FocusedElementInformation.cpp: (WebKit::FocusedElementInformation::encode const): (WebKit::FocusedElementInformation::decode): * Shared/FocusedElementInformation.h: Add a new flag to FocusedElementInformation to indicate the EnterKeyHint type that should be used when bringing up an input view for the focused element. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView textInputTraits]): Map the given EnterKeyHint type to a UIReturnKeyType. If an unsupported (i.e. "previous") or default EnterKeyHint value is used, then we fall back to existing behavior which deduces the default enterkeyhint value from the input type if the focused element is inside an actionable form; otherwise, we avoid setting any value for the `returnKeyType`, defaulting to `UIReturnKeyDefault`. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getFocusedElementInformation): Tools: Add new API tests to check the resulting UIReturnKeyType that gets set on text input traits in the UI process, given the different values for "enterkeyhint". Also verifies that the default behaviors of search fields and text input fields inside actionable form elements is to show "Search" or "Go" as the return key by default, unless a different value for "enterkeyhint" is specified. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/ios/EnterKeyHintTests.mm: Added. (-[TestWKWebView test:enterKeyHint:returnKeyType:]): (TestWebKitAPI::enterKeyHintTestCases): (TestWebKitAPI::createWebViewAndInputDelegateForTesting): (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/216944@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-29 19:39:47 +00:00
html/EnterKeyHint.h
Implement Feature policy self/none/* parsing https://bugs.webkit.org/show_bug.cgi?id=198078 Reviewed by Eric Carlson. LayoutTests/imported/w3c: * web-platform-tests/mediacapture-streams/MediaStream-feature-policy-none.https-expected.txt: Added. * web-platform-tests/mediacapture-streams/MediaStream-feature-policy-none.https.html: Added. Source/WebCore: Start to implement https://w3c.github.io/webappsec-feature-policy/#algo-parse-policy-directive 'src' is not supported yet. Apply the rules to getUserMedia. Update getDisplayMedia keyword from 'display' to 'display-capture' as per spec. Test: imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-feature-policy-none.https.html * Headers.cmake: * Modules/mediastream/UserMediaController.cpp: (WebCore::isSecure): (WebCore::isAllowedByFeaturePolicy): (WebCore::isAllowedToUse): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * html/FeaturePolicy.cpp: Added. (WebCore::isAllowedByFeaturePolicy): (WebCore::processOriginItem): (WebCore::updateList): (WebCore::FeaturePolicy::parse): (WebCore::FeaturePolicy::allows const): * html/FeaturePolicy.h: Added. * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::featurePolicy const): * html/HTMLIFrameElement.h: Source/WebKit: Fix a case where completion handler might not always be called. * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp: (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted): LayoutTests: * http/tests/media/media-stream/get-display-media-iframe-allow-attribute-expected.txt: * http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html: Canonical link: https://commits.webkit.org/212194@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-22 17:38:42 +00:00
html/FeaturePolicy.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
html/FormAssociatedElement.h
html/FormNamedItem.h
html/HTMLAnchorElement.h
html/HTMLAreaElement.h
html/HTMLAttachmentElement.h
html/HTMLAudioElement.h
html/HTMLBRElement.h
html/HTMLBaseElement.h
html/HTMLBodyElement.h
html/HTMLButtonElement.h
html/HTMLCanvasElement.h
html/HTMLCollection.h
html/HTMLDListElement.h
html/HTMLDataListElement.h
html/HTMLDirectoryElement.h
html/HTMLDivElement.h
html/HTMLDocument.h
html/HTMLElement.h
html/HTMLEmbedElement.h
html/HTMLFieldSetElement.h
html/HTMLFontElement.h
html/HTMLFormControlElement.h
html/HTMLFormControlElementWithState.h
html/HTMLFormElement.h
html/HTMLFrameElement.h
html/HTMLFrameElementBase.h
html/HTMLFrameOwnerElement.h
html/HTMLFrameSetElement.h
html/HTMLHRElement.h
html/HTMLHeadElement.h
html/HTMLHeadingElement.h
html/HTMLHtmlElement.h
html/HTMLIFrameElement.h
html/HTMLImageElement.h
html/HTMLImageLoader.h
html/HTMLInputElement.h
html/HTMLKeygenElement.h
html/HTMLLIElement.h
html/HTMLLabelElement.h
html/HTMLLegendElement.h
html/HTMLLinkElement.h
html/HTMLMapElement.h
html/HTMLMarqueeElement.h
html/HTMLMediaElement.h
html/HTMLMediaElementEnums.h
html/HTMLMenuElement.h
html/HTMLMenuItemElement.h
html/HTMLMetaElement.h
html/HTMLModElement.h
html/HTMLOListElement.h
html/HTMLObjectElement.h
html/HTMLOptGroupElement.h
html/HTMLOptionElement.h
html/HTMLOptionsCollection.h
html/HTMLParagraphElement.h
html/HTMLParamElement.h
html/HTMLPlugInElement.h
html/HTMLPlugInImageElement.h
html/HTMLPreElement.h
html/HTMLQuoteElement.h
html/HTMLScriptElement.h
html/HTMLSelectElement.h
html/HTMLStyleElement.h
html/HTMLSummaryElement.h
html/HTMLTableCaptionElement.h
html/HTMLTableCellElement.h
html/HTMLTableColElement.h
html/HTMLTableElement.h
html/HTMLTablePartElement.h
html/HTMLTableRowElement.h
html/HTMLTableSectionElement.h
html/HTMLTextAreaElement.h
html/HTMLTextFormControlElement.h
html/HTMLTitleElement.h
html/HTMLUListElement.h
html/HTMLUnknownElement.h
html/HTMLVideoElement.h
html/ImageBitmap.h
Move SerializationState from ImageBuffer to ImageBitmap https://bugs.webkit.org/show_bug.cgi?id=216565 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-09-25 Reviewed by Kenneth Russell. Introduce ImageBitmapBacking and make it a member of ImageBitmap. It represents the backing store of an ImageBitmap. Currently it encapsulates an ImageBuffer and the new enum SerializationState. In the future, it can be extended to encapsulate either a texture or an ImageBuffer. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpImageBitmap): (WebCore::CloneDeserializer::deserialize): (WebCore::CloneDeserializer::CloneDeserializer): (WebCore::CloneDeserializer::readTransferredImageBitmap): (WebCore::CloneDeserializer::readImageBitmap): (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::computeMemoryCost const): (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::deserialize): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::SerializedScriptValue): * html/ImageBitmap.cpp: (WebCore::ImageBitmap::create): (WebCore::ImageBitmap::detachBitmaps): (WebCore::ImageBitmap::resolveWithBlankImageBuffer): (WebCore::ImageBitmap::createPromise): (WebCore::ImageBitmap::createFromBuffer): (WebCore::ImageBitmap::ImageBitmap): (WebCore::ImageBitmap::takeImageBitmapBacking): (WebCore::ImageBitmap::takeImageBuffer): (WebCore::ImageBitmap::width const): Deleted. (WebCore::ImageBitmap::height const): Deleted. (WebCore::ImageBitmap::close): Deleted. (WebCore::ImageBitmap::transferOwnershipAndClose): Deleted. * html/ImageBitmap.h: * html/ImageBitmapBacking.cpp: Added. (WebCore::ImageBitmapBacking::ImageBitmapBacking): (WebCore::ImageBitmapBacking::buffer const): (WebCore::ImageBitmapBacking::takeImageBuffer): (WebCore::ImageBitmapBacking::width const): (WebCore::ImageBitmapBacking::height const): * html/ImageBitmapBacking.h: Added. (WebCore::ImageBitmapBacking::originClean const): (WebCore::ImageBitmapBacking::premultiplyAlpha const): (WebCore::ImageBitmapBacking::forciblyPremultiplyAlpha const): (WebCore::ImageBitmapBacking::serializationState const): * html/OffscreenCanvas.cpp: (WebCore::OffscreenCanvas::transferToImageBitmap): * html/canvas/ImageBitmapRenderingContext.cpp: (WebCore::ImageBitmapRenderingContext::setOutputBitmap): * platform/graphics/ImageBuffer.h: (): Deleted. Canonical link: https://commits.webkit.org/229787@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-26 01:42:08 +00:00
html/ImageBitmapBacking.h
html/ImageData.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
html/ImageDocument.h
html/InputMode.h
html/LabelableElement.h
html/LinkIconCollector.h
html/LinkIconType.h
html/LinkRelAttribute.h
html/MediaControllerInterface.h
html/MediaDocument.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
html/MediaElementSession.h
html/MediaError.h
html/PluginDocument.h
html/StepRange.h
html/TimeRanges.h
html/TypeAhead.h
Remove unnecessary inlining and templates for URL decomposition DOM functions https://bugs.webkit.org/show_bug.cgi?id=211025 Reviewed by Alex Christensen. * Headers.cmake: Renamed URLUtils.h to URLDecomposition.h. * Modules/cache/DOMCacheStorage.cpp: Updated include and using namespace. * Sources.txt: Added URLDecomposition.cpp. * WebCore.xcodeproj/project.pbxproj: Added URLDecomposition.cpp and renamed URLUtils.h to URLDecomposition.h. * html/DOMURL.h: Removed the WEBCORE_EXPORT on this class. Added final. Derive from URLDecomposition instead of URLUtils. Changed return type of href to const&. Moved toJSON here from URLUtils. Added overrides of the fullURL and setFullURL functions for URLDecomposition. * html/DOMURL.idl: Removed ImplementationLacksVTable. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::HTMLAnchorElement): Moved initialization of boolean data members to the class definition. * html/HTMLAnchorElement.h: Derive from URLDecomposition instead of URLUtils. Added overrides of the fullURL and setFullURL functions for URLDecomposition. Initialize data members here in the class definition. * html/HTMLMediaElement.cpp: Removed unnecessary include of DOMURL.h. * html/URLDecomposition.cpp: Added. Contains most of the code from the URLUtils class template, which no longer needs to be in a header. * html/URLDecomposition.h: Renamed URLUtils.h to this. It's now an abstract base class rather than a class template using the curiously recurring template pattern. * html/URLSearchParams.h: Forward-declare DOMURL rather than including the DOMURL.h header. * html/URLUtils.h: Removed. Renamed to URLDecompostion.h. * page/DOMWindow.cpp: Removed unneeded include of DOMURL.h. * testing/Internals.cpp: Added include of DOMURL.h. Canonical link: https://commits.webkit.org/223925@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-26 14:53:33 +00:00
html/URLDecomposition.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
html/URLRegistry.h
html/ValidityState.h
html/VoidCallback.h
html/canvas/ImageBitmapRenderingContextSettings.h
html/canvas/WebGLAny.h
html/canvas/WebGLContextAttributes.h
html/forms/FileIconLoader.h
Convert SVG related parsers over to using StringParsingBuffer https://bugs.webkit.org/show_bug.cgi?id=213635 Reviewed by Darin Adler. - Adopt StringParsingBuffer across SVG code. - Remove UTF-16 upconversions in SVGAnimationElement, SVGFitToViewBox, SVGLengthList, SVGLengthValue, SVGNumberList, SVGParserUtilities, SVGPointList, SVGPreserveAspectRatioValue, SVGStringList, SVGTransformList, SVGTransformable and SVGViewSpec. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Export ParsingUtilities.h, which is now included by SVGParserUtilities.h * Sources.txt: Add implementation files for SVGLengthList, SVGNumberList, SVGPointList, SVGStringList and SVGTransformList to hold large functions are unlikely to benefit from inlining. * html/parser/ParsingUtilities.h: (WebCore::skipCharactersExactly): Add new skipCharactersExactly, which takes a c-array (NOT null-terminated) of characters to compare against. * svg/SVGAngleValue.cpp: (WebCore::parseAngleType): (WebCore::SVGAngleValue::setValueAsString): Adopt StringParsingBuffer. * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::parseAttribute): Adapt to new shared parseTransformType, which now returns an Optional and default to SVG_TRANSFORM_UNKNOWN on parse failure as the old parseTransformType did. * svg/SVGAnimationElement.cpp: (WebCore::parseKeySplines): Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters() * svg/SVGFitToViewBox.cpp: (WebCore::SVGFitToViewBox::parseViewBox): (WebCore::SVGFitToViewBox::parseViewBoxGeneric): * svg/SVGFitToViewBox.h: Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters() * svg/SVGLengthList.cpp: Added. (WebCore::SVGLengthList::parse): (WebCore::SVGLengthList::valueAsString const): * svg/SVGLengthList.h: Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters(). Move parse and valueAsString out of line. * svg/SVGLengthValue.cpp: (WebCore::parseLengthType): (WebCore::SVGLengthValue::construct): (WebCore::SVGLengthValue::setValueAsString): * svg/SVGLengthValue.h: Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters() * svg/SVGNumberList.cpp: Added. (WebCore::SVGNumberList::parse): (WebCore::SVGNumberList::valueAsString const): * svg/SVGNumberList.h: Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters(). Move parse and valueAsString out of line. * svg/SVGParserUtilities.cpp: (WebCore::genericParseNumber): (WebCore::parseNumber): (WebCore::genericParseArcFlag): (WebCore::parseArcFlag): (WebCore::parseNumberOptionalNumber): (WebCore::parsePoint): (WebCore::parseRect): (WebCore::parseGlyphName): (WebCore::parseUnicodeRange): (WebCore::parseKerningUnicodeString): (WebCore::genericParseFloatPoint): (WebCore::parseFloatPoint): * svg/SVGParserUtilities.h: (WebCore::isSVGSpaceOrComma): (WebCore::skipOptionalSVGSpaces): (WebCore::skipOptionalSVGSpacesOrDelimiter): (WebCore::skipString): Deleted. Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters(). Move parse and valueAsString out of line. * svg/SVGPathSource.h: Add missing include, which is now needed do to removing unncessary includes in other files. * svg/SVGPathStringSource.cpp: (WebCore::SVGPathStringSource::SVGPathStringSource): (WebCore::SVGPathStringSource::hasMoreData const): (WebCore::SVGPathStringSource::moveToNextToken): (WebCore::nextCommandHelper): (WebCore::SVGPathStringSource::nextCommand): (WebCore::SVGPathStringSource::parse): (WebCore::SVGPathStringSource::parseSVGSegmentType): (WebCore::SVGPathStringSource::parseMoveToSegment): (WebCore::SVGPathStringSource::parseLineToSegment): (WebCore::SVGPathStringSource::parseLineToHorizontalSegment): (WebCore::SVGPathStringSource::parseLineToVerticalSegment): (WebCore::SVGPathStringSource::parseCurveToCubicSegment): (WebCore::SVGPathStringSource::parseCurveToCubicSmoothSegment): (WebCore::SVGPathStringSource::parseCurveToQuadraticSegment): (WebCore::SVGPathStringSource::parseCurveToQuadraticSmoothSegment): (WebCore::SVGPathStringSource::parseArcToSegment): (WebCore::parseSVGSegmentTypeHelper): Deleted. * svg/SVGPathStringSource.h: Adopt StringParsingBuffer. Replace existing set of unions with a single union of StringParsingBuffers. * svg/SVGPointList.cpp: Added. (WebCore::SVGPointList::parse): (WebCore::SVGPointList::valueAsString const): * svg/SVGPointList.h: Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters(). Move parse and valueAsString out of line. * svg/SVGPreserveAspectRatioValue.cpp: (WebCore::SVGPreserveAspectRatioValue::SVGPreserveAspectRatioValue): (WebCore::SVGPreserveAspectRatioValue::parse): (WebCore::SVGPreserveAspectRatioValue::parseInternal): (WebCore::SVGPreserveAspectRatioValue::valueAsString const): * svg/SVGPreserveAspectRatioValue.h: Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters(). * svg/SVGStringList.cpp: Added. (WebCore::SVGStringList::parse): (WebCore::SVGStringList::valueAsString const): * svg/SVGStringList.h: Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters(). Move parse and valueAsString out of line. * svg/SVGTransformList.cpp: Added. (WebCore::SVGTransformList::consolidate): (WebCore::SVGTransformList::concatenate const): (WebCore::SVGTransformList::parseGeneric): (WebCore::SVGTransformList::parse): (WebCore::SVGTransformList::valueAsString const): * svg/SVGTransformList.h: Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters(). Move parse, valueAsString, consolidate and concatenate out of line. * svg/SVGTransformable.cpp: (WebCore::parseTransformParamList): (WebCore::parseTransformValueGeneric): (WebCore::SVGTransformable::parseTransformValue): (WebCore::parseTransformTypeGeneric): (WebCore::SVGTransformable::parseTransformType): (WebCore::SVGTransformable::parseAndSkipType): Deleted. * svg/SVGTransformable.h: Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters(). Unify parseTransformType implementations to all use a single implementation and return an Optional<SVGTransformType>. * svg/SVGViewSpec.cpp: (WebCore::SVGViewSpec::parseViewSpec): * svg/SVGViewSpec.h: Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to StringView::upconvertedCharacters(). * svg/SVGZoomAndPan.cpp: (WebCore::parseZoomAndPanGeneric): (WebCore::SVGZoomAndPan::parseZoomAndPan): * svg/SVGZoomAndPan.h: Adopt StringParsingBuffer. Canonical link: https://commits.webkit.org/226482@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-27 15:29:30 +00:00
html/parser/ParsingUtilities.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
html/parser/HTMLParserIdioms.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
html/parser/HTMLParserScriptingFlagPolicy.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
html/track/AudioTrack.h
html/track/TextTrack.h
html/track/TextTrackCue.h
html/track/TrackBase.h
html/track/VTTCue.h
html/track/VideoTrack.h
inspector/InspectorClient.h
inspector/InspectorController.h
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
inspector/InspectorDebuggableType.h
Web Inspector: move InspectorFrontendAPIDispatcher to WebCore, clean up uses https://bugs.webkit.org/show_bug.cgi?id=217835 <rdar://problem/70384407> Reviewed by Devin Rousso. Source/WebCore: Expose the dispatcher as part of the InspectorFrontendClient API so that other code can use the dispatcher regardless of whether it's a WebInspectorUI or RemoteWebInspectorUI. Add an InspectorFrontendAPIDispatcher instance and getter to InspectorFrontendClientLocal. Adopt the JSONValue-based InspectorFrontendAPIDispatcher::dispatch() method in InspectorFrontendClientLocal. Remove the redundant parallel queuing implementation. Remove redundant public methods that are available on InspectorFrontendAPIDispatcher. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Moved files. * inspector/InspectorFrontendAPIDispatcher.cpp: Renamed from Source/WebKit/WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp. (WebCore::InspectorFrontendAPIDispatcher::InspectorFrontendAPIDispatcher): (WebCore::InspectorFrontendAPIDispatcher::reset): (WebCore::InspectorFrontendAPIDispatcher::frontendLoaded): (WebCore::InspectorFrontendAPIDispatcher::suspend): (WebCore::InspectorFrontendAPIDispatcher::unsuspend): (WebCore::InspectorFrontendAPIDispatcher::dispatchCommand): (WebCore::InspectorFrontendAPIDispatcher::dispatchMessageAsync): (WebCore::InspectorFrontendAPIDispatcher::evaluateOrQueueExpression): (WebCore::InspectorFrontendAPIDispatcher::evaluateQueuedExpressions): (WebCore::InspectorFrontendAPIDispatcher::evaluateExpression): (WebCore::InspectorFrontendAPIDispatcher::evaluateExpressionForTesting): Add new dispatch() method. Remove other dispatch methods that can be expressed using the new JSON::Value-based method. If it's not possible to evaluate JS immediately, schedule a one-shot task to try again on a different event loop turn. * inspector/InspectorFrontendAPIDispatcher.h: Renamed from Source/WebKit/WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h. Add new dispatch() method which takes a vector of JSON::Value objects and serializes them into command arguments for the frontend. * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal): (WebCore::InspectorFrontendClientLocal::frontendLoaded): (WebCore::InspectorFrontendClientLocal::pagePaused): (WebCore::InspectorFrontendClientLocal::pageUnpaused): (WebCore::InspectorFrontendClientLocal::setDockingUnavailable): (WebCore::InspectorFrontendClientLocal::setAttachedWindow): (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled): (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled): (WebCore::InspectorFrontendClientLocal::startProfilingJavaScript): (WebCore::InspectorFrontendClientLocal::stopProfilingJavaScript): (WebCore::InspectorFrontendClientLocal::showConsole): (WebCore::InspectorFrontendClientLocal::showResources): (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame): Use InspectorFrontendAPIDispatcher to dispatch commands to the frontend. (WebCore::InspectorFrontendClientLocal::dispatch): Deleted. (WebCore::InspectorFrontendClientLocal::dispatchMessage): Deleted. (WebCore::InspectorFrontendClientLocal::dispatchMessageAsync): Deleted. (WebCore::InspectorFrontendClientLocal::evaluateOnLoad): Deleted. These are redundant with InspectorFrontendAPIDispatcher. * testing/Internals.cpp: (WebCore::InspectorStubFrontend::sendMessageToFrontend): Use frontend dispatcher directly. Source/WebKit: Adopt the JSONValue-based InspectorFrontendAPIDispatcher::dispatch() method in WebInspectorUI and RemoteInspectorUI methods that dispatch to the frontend. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: Move files. * WebProcess/Inspector/RemoteWebInspectorUI.h: * WebProcess/Inspector/RemoteWebInspectorUI.cpp: (WebKit::RemoteWebInspectorUI::RemoteWebInspectorUI): (WebKit::RemoteWebInspectorUI::initialize): (WebKit::RemoteWebInspectorUI::updateFindString): (WebKit::RemoteWebInspectorUI::didSave): (WebKit::RemoteWebInspectorUI::didAppend): (WebKit::RemoteWebInspectorUI::frontendLoaded): (WebKit::RemoteWebInspectorUI::sendMessageToFrontend): (WebKit::RemoteWebInspectorUI::pagePaused): (WebKit::RemoteWebInspectorUI::pageUnpaused): (WebKit::RemoteWebInspectorUI::setDiagnosticLoggingAvailable): * WebProcess/Inspector/WebInspectorUI.h: * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::WebInspectorUI): (WebKit::WebInspectorUI::setDockSide): (WebKit::WebInspectorUI::setDockingUnavailable): (WebKit::WebInspectorUI::setIsVisible): (WebKit::WebInspectorUI::updateFindString): (WebKit::WebInspectorUI::setDiagnosticLoggingAvailable): (WebKit::WebInspectorUI::showConsole): (WebKit::WebInspectorUI::showResources): (WebKit::WebInspectorUI::showMainResourceForFrame): (WebKit::WebInspectorUI::startPageProfiling): (WebKit::WebInspectorUI::stopPageProfiling): (WebKit::WebInspectorUI::startElementSelection): (WebKit::WebInspectorUI::stopElementSelection): (WebKit::WebInspectorUI::didSave): (WebKit::WebInspectorUI::didAppend): (WebKit::WebInspectorUI::sendMessageToFrontend): (WebKit::WebInspectorUI::evaluateInFrontendForTesting): (WebKit::WebInspectorUI::pagePaused): (WebKit::WebInspectorUI::pageUnpaused): * WebProcess/WebCoreSupport/WebChromeClient.cpp: Add missing header includes (related to unified sources changes from r269168). Source/WebKitLegacy/cf: * WebCoreSupport/WebInspectorClientCF.cpp: (WebInspectorClient::sendMessageToFrontend): LayoutTests: * inspector/dom/dom-remove-events.html: * inspector/dom/remove-multiple-nodes.html: The order of events received has changed slightly due to the new auto-suspend behavior in InspectorFrontendAPIDispatcher. Remove event handlers when the test is complete to ensure that events which arrive after the test has finished do not stomp on the expected results. * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: Some tests seem to call ProtocolTest.completeTest() from the handler of Debugger.paused, when the debugger is still paused. This causes timeouts after this refactoring, since not resuming means that we'll get stuck in the debugger's nested run loop and never return. Canonical link: https://commits.webkit.org/231071@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-30 23:56:26 +00:00
inspector/InspectorFrontendAPIDispatcher.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
inspector/InspectorFrontendClient.h
inspector/InspectorFrontendClientLocal.h
inspector/InspectorFrontendHost.h
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
inspector/InspectorInstrumentationPublic.h
inspector/InspectorInstrumentationWebKit.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
inspector/InspectorOverlay.h
inspector/InspectorWebAgentBase.h
Web Inspector: rename `ScriptDebugServer` subclasses/methods https://bugs.webkit.org/show_bug.cgi?id=215363 <rdar://problem/67310441> Reviewed by Brian Burg. r266074 merged `Inspector::ScriptDebugServer` into `JSC::Debugger`. All subclasses and functions should be renamed to match this change. Source/JavaScriptCore: * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * inspector/InspectorEnvironment.h: * inspector/JSGlobalObjectDebugger.h: Renamed from Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.h. * inspector/JSGlobalObjectDebugger.cpp: Renamed from Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.cpp. * inspector/JSGlobalObjectInspectorController.h: * inspector/JSGlobalObjectInspectorController.cpp: * inspector/agents/InspectorAuditAgent.h: * inspector/agents/InspectorAuditAgent.cpp: * inspector/agents/InspectorDebuggerAgent.h: * inspector/agents/InspectorDebuggerAgent.cpp: * inspector/agents/InspectorRuntimeAgent.h: * inspector/agents/InspectorRuntimeAgent.cpp: * inspector/agents/InspectorScriptProfilerAgent.cpp: * inspector/agents/JSGlobalObjectDebuggerAgent.cpp: * inspector/remote/RemoteInspectionTarget.cpp: * inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm: Source/WebCore: * Headers.cmake: * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorController.h: * inspector/InspectorController.cpp: * inspector/PageDebugger.h: Renamed from Source/WebCore/inspector/PageScriptDebugServer.h. * inspector/PageDebugger.cpp: Renamed from Source/WebCore/inspector/PageScriptDebugServer.cpp. * inspector/mac/PageDebuggerMac.mm: Renamed from Source/WebCore/inspector/mac/PageScriptDebugServerMac.mm. * inspector/WorkerDebugger.h: Renamed from Source/WebCore/inspector/WorkerScriptDebugServer.h. * inspector/WorkerDebugger.cpp: Renamed from Source/WebCore/inspector/WorkerScriptDebugServer.cpp. * inspector/WorkerInspectorController.h: * inspector/WorkerInspectorController.cpp: * inspector/agents/InspectorTimelineAgent.cpp: * inspector/agents/page/PageDebuggerAgent.cpp: Canonical link: https://commits.webkit.org/228554@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-24 18:40:30 +00:00
inspector/PageDebugger.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
inspector/agents/InspectorPageAgent.h
layout/LayoutUnits.h
layout/MarginTypes.h
layout/formattingContexts/inline/InlineRect.h
[LFC][IFC] Move InlineRect from Display to Layout namespace https://bugs.webkit.org/show_bug.cgi?id=216633 Reviewed by Simon Fraser. Let's move the Display type over to Layout namespace. Display tree needs a different set of data types. * WebCore.xcodeproj/project.pbxproj: * layout/displaytree/DisplayLine.h: (WebCore::Display::Line::rect const): (WebCore::Display::Line::scrollableOverflow const): (WebCore::Display::Line::inkOverflow const): (WebCore::Display::Line::Line): * layout/displaytree/DisplayRun.h: (WebCore::Display::Run::rect const): (WebCore::Display::Run::inkOverflow const): (WebCore::Display::Run::Run): * layout/flexformatting/FlexFormattingContext.cpp: (WebCore::Layout::FlexFormattingContext::sizeAndPlaceFlexItems): * layout/inlineformatting/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::computedLineLogicalRect const): (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent): * layout/inlineformatting/InlineFormattingContext.h: * layout/inlineformatting/InlineLineBox.cpp: (WebCore::Layout::LineBox::InlineBox::InlineBox): (WebCore::Layout::LineBox::logicalRectForTextRun const): (WebCore::Layout::LineBox::constructInlineBoxes): * layout/inlineformatting/InlineLineBox.h: (WebCore::Layout::LineBox::InlineBox::logicalRect const): * layout/inlineformatting/InlineRect.h: Renamed from Source/WebCore/layout/displaytree/DisplayInlineRect.h. (WebCore::Layout::InlineRect::expandHorizontally): (WebCore::Layout::InlineRect::expandVertically): (WebCore::Layout::InlineRect::invalidateTop): (WebCore::Layout::InlineRect::invalidateLeft): (WebCore::Layout::InlineRect::invalidateWidth): (WebCore::Layout::InlineRect::invalidateHeight): (WebCore::Layout::InlineRect::hasValidPosition const): (WebCore::Layout::InlineRect::hasValidSize const): (WebCore::Layout::InlineRect::hasValidGeometry const): (WebCore::Layout::InlineRect::InlineRect): (WebCore::Layout::InlineRect::invalidatePosition): (WebCore::Layout::InlineRect::setHasValidPosition): (WebCore::Layout::InlineRect::setHasValidSize): (WebCore::Layout::InlineRect::top const): (WebCore::Layout::InlineRect::left const): (WebCore::Layout::InlineRect::bottom const): (WebCore::Layout::InlineRect::right const): (WebCore::Layout::InlineRect::topLeft const): (WebCore::Layout::InlineRect::size const): (WebCore::Layout::InlineRect::width const): (WebCore::Layout::InlineRect::height const): (WebCore::Layout::InlineRect::setTopLeft): (WebCore::Layout::InlineRect::setTop): (WebCore::Layout::InlineRect::setBottom): (WebCore::Layout::InlineRect::setLeft): (WebCore::Layout::InlineRect::setWidth): (WebCore::Layout::InlineRect::setHeight): (WebCore::Layout::InlineRect::moveHorizontally): (WebCore::Layout::InlineRect::moveVertically): (WebCore::Layout::InlineRect::moveBy): (WebCore::Layout::InlineRect::expand): (WebCore::Layout::InlineRect::expandToContain): (WebCore::Layout::InlineRect::expandVerticallyToContain): (WebCore::Layout::InlineRect::inflate): (WebCore::Layout::InlineRect::operator InlineLayoutRect const): Canonical link: https://commits.webkit.org/229456@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-17 04:40:20 +00:00
[LFC][Integration] Move Display::InlineContent to LayoutIntegration namespace https://bugs.webkit.org/show_bug.cgi?id=217310 Reviewed by Zalan Bujtas. It is only used by the integration code Also move the related classes and rename the path independent iterator run to PathRun * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * display/DisplayView.h: * layout/FormattingContextGeometry.cpp: (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const): * layout/displaytree/DisplayRect.h: Removed. * layout/flexformatting/FlexFormattingContext.cpp: (WebCore::Layout::FlexFormattingContext::sizeAndPlaceFlexItems): * layout/flexformatting/FlexFormattingState.h: (WebCore::Layout::FlexFormattingState::lines const): (WebCore::Layout::FlexFormattingState::addLine): * layout/integration/LayoutIntegrationInlineContent.cpp: Renamed from Source/WebCore/layout/displaytree/DisplayInlineContent.cpp. * layout/integration/LayoutIntegrationInlineContent.h: Renamed from Source/WebCore/layout/displaytree/DisplayInlineContent.h. * layout/integration/LayoutIntegrationLine.h: Renamed from Source/WebCore/layout/displaytree/DisplayLine.h. * layout/integration/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::layout): (WebCore::LayoutIntegration::LineLayout::constructContent): (WebCore::LayoutIntegration::LineLayout::lineCount const): (WebCore::LayoutIntegration::LineLayout::adjustForPagination): (WebCore::LayoutIntegration::LineLayout::collectOverflow): (WebCore::LayoutIntegration::LineLayout::ensureInlineContent): (WebCore::LayoutIntegration::LineLayout::textRunsFor const): (WebCore::LayoutIntegration::LineLayout::runFor const): (WebCore::LayoutIntegration::LineLayout::paint): (WebCore::LayoutIntegration::LineLayout::hitTest): (WebCore::LayoutIntegration::LineLayout::constructDisplayContent): Deleted. (WebCore::LayoutIntegration::LineLayout::ensureDisplayInlineContent): Deleted. * layout/integration/LayoutIntegrationLineLayout.h: (WebCore::LayoutIntegration::LineLayout::inlineContent const): (WebCore::LayoutIntegration::LineLayout::displayInlineContent const): Deleted. * layout/integration/LayoutIntegrationPagination.cpp: (WebCore::LayoutIntegration::computeLineTopAndBottomWithOverflow): (WebCore::LayoutIntegration::updateMinimumPageHeight): (WebCore::LayoutIntegration::makeAdjustedContent): (WebCore::LayoutIntegration::adjustLinePositionsForPagination): * layout/integration/LayoutIntegrationPagination.h: * layout/integration/LayoutIntegrationRun.h: Renamed from Source/WebCore/layout/displaytree/DisplayRun.h. * layout/integration/LayoutIntegrationRunIterator.cpp: (WebCore::LayoutIntegration::RunIterator::RunIterator): (WebCore::LayoutIntegration::TextRunIterator::TextRunIterator): (WebCore::LayoutIntegration::LineRunIterator::LineRunIterator): (WebCore::LayoutIntegration::PathRun::modernPath): (WebCore::LayoutIntegration::PathRun::legacyPath): (WebCore::LayoutIntegration::Run::modernPath): Deleted. (WebCore::LayoutIntegration::Run::legacyPath): Deleted. * layout/integration/LayoutIntegrationRunIterator.h: (WebCore::LayoutIntegration::PathTextRun::legacyInlineBox const): (WebCore::LayoutIntegration::RunIterator::operator* const): (WebCore::LayoutIntegration::RunIterator::operator-> const): (WebCore::LayoutIntegration::TextRunIterator::operator* const): (WebCore::LayoutIntegration::TextRunIterator::operator-> const): (WebCore::LayoutIntegration::TextRunIterator::get const): (WebCore::LayoutIntegration::PathRun::PathRun): (WebCore::LayoutIntegration::PathRun::isText const): (WebCore::LayoutIntegration::PathRun::rect const): (WebCore::LayoutIntegration::PathRun::baseline const): (WebCore::LayoutIntegration::PathRun::isHorizontal const): (WebCore::LayoutIntegration::PathRun::dirOverride const): (WebCore::LayoutIntegration::PathRun::isLineBreak const): (WebCore::LayoutIntegration::PathRun::useLineBreakBoxRenderTreeDumpQuirk const): (WebCore::LayoutIntegration::PathRun::minimumCaretOffset const): (WebCore::LayoutIntegration::PathRun::maximumCaretOffset const): (WebCore::LayoutIntegration::PathRun::bidiLevel const): (WebCore::LayoutIntegration::PathRun::onSameLine const): (WebCore::LayoutIntegration::PathRun::legacyInlineBox const): (WebCore::LayoutIntegration::PathTextRun::hasHyphen const): (WebCore::LayoutIntegration::PathTextRun::PathTextRun): (WebCore::LayoutIntegration::PathTextRun::text const): (WebCore::LayoutIntegration::PathTextRun::localStartOffset const): (WebCore::LayoutIntegration::PathTextRun::localEndOffset const): (WebCore::LayoutIntegration::PathTextRun::length const): (WebCore::LayoutIntegration::PathTextRun::isLastTextRunOnLine const): (WebCore::LayoutIntegration::PathTextRun::isLastTextRun const): (isType): (WebCore::LayoutIntegration::Run::leftmostCaretOffset const): Deleted. (WebCore::LayoutIntegration::Run::rightmostCaretOffset const): Deleted. (WebCore::LayoutIntegration::Run::direction const): Deleted. (WebCore::LayoutIntegration::Run::isLeftToRightDirection const): Deleted. (WebCore::LayoutIntegration::TextRun::legacyInlineBox const): Deleted. (WebCore::LayoutIntegration::Run::Run): Deleted. (WebCore::LayoutIntegration::Run::isText const): Deleted. (WebCore::LayoutIntegration::Run::rect const): Deleted. (WebCore::LayoutIntegration::Run::baseline const): Deleted. (WebCore::LayoutIntegration::Run::isHorizontal const): Deleted. (WebCore::LayoutIntegration::Run::dirOverride const): Deleted. (WebCore::LayoutIntegration::Run::isLineBreak const): Deleted. (WebCore::LayoutIntegration::Run::useLineBreakBoxRenderTreeDumpQuirk const): Deleted. (WebCore::LayoutIntegration::Run::minimumCaretOffset const): Deleted. (WebCore::LayoutIntegration::Run::maximumCaretOffset const): Deleted. (WebCore::LayoutIntegration::Run::bidiLevel const): Deleted. (WebCore::LayoutIntegration::Run::onSameLine const): Deleted. (WebCore::LayoutIntegration::Run::legacyInlineBox const): Deleted. (WebCore::LayoutIntegration::TextRun::hasHyphen const): Deleted. (WebCore::LayoutIntegration::TextRun::TextRun): Deleted. (WebCore::LayoutIntegration::TextRun::text const): Deleted. (WebCore::LayoutIntegration::TextRun::localStartOffset const): Deleted. (WebCore::LayoutIntegration::TextRun::localEndOffset const): Deleted. (WebCore::LayoutIntegration::TextRun::length const): Deleted. (WebCore::LayoutIntegration::TextRun::isLastTextRunOnLine const): Deleted. (WebCore::LayoutIntegration::TextRun::isLastTextRun const): Deleted. * layout/integration/LayoutIntegrationRunIteratorModernPath.h: (WebCore::LayoutIntegration::ModernPath::ModernPath): (WebCore::LayoutIntegration::ModernPath::runs const): (WebCore::LayoutIntegration::ModernPath::run const): (WebCore::LayoutIntegration::ModernPath::line const): * layout/layouttree/LayoutTreeBuilder.cpp: * rendering/RenderTreeAsText.cpp: (WebCore::write): (WebCore::writeTextRun): Deleted. * rendering/TextPainter.cpp: (WebCore::TextPainter::clearGlyphDisplayLists): Canonical link: https://commits.webkit.org/230078@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-05 15:43:07 +00:00
layout/integration/LayoutIntegrationInlineContent.h
layout/integration/LayoutIntegrationLine.h
[LFC][Integration] Add line iterator https://bugs.webkit.org/show_bug.cgi?id=217427 Reviewed by Zalan Bujtas. Add line iterator. In this patch it is only used to replace onSameLine function. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Position.cpp: (WebCore::Position::rendersInDifferentPosition const): * layout/integration/LayoutIntegrationLineIterator.cpp: Added. (WebCore::LayoutIntegration::LineIterator::LineIterator): (WebCore::LayoutIntegration::LineIterator::atEnd const): (WebCore::LayoutIntegration::LineIterator::next const): (WebCore::LayoutIntegration::LineIterator::previous const): (WebCore::LayoutIntegration::LineIterator::traverseNext): (WebCore::LayoutIntegration::LineIterator::traversePrevious): * layout/integration/LayoutIntegrationLineIterator.h: Added. (WebCore::LayoutIntegration::PathLine::operator!= const): (WebCore::LayoutIntegration::LineIterator::LineIterator): (WebCore::LayoutIntegration::LineIterator::operator++): (WebCore::LayoutIntegration::LineIterator::operator bool const): (WebCore::LayoutIntegration::LineIterator::operator== const): (WebCore::LayoutIntegration::LineIterator::operator!= const): (WebCore::LayoutIntegration::LineIterator::operator* const): (WebCore::LayoutIntegration::LineIterator::operator-> const): (WebCore::LayoutIntegration::PathLine::PathLine): (WebCore::LayoutIntegration::PathLine::rect const): (WebCore::LayoutIntegration::PathLine::operator== const): * layout/integration/LayoutIntegrationLineIteratorLegacyPath.h: Added. (WebCore::LayoutIntegration::LegacyLinePath::LegacyLinePath): (WebCore::LayoutIntegration::LegacyLinePath::rect const): (WebCore::LayoutIntegration::LegacyLinePath::traverseNext): (WebCore::LayoutIntegration::LegacyLinePath::traversePrevious): (WebCore::LayoutIntegration::LegacyLinePath::operator== const): (WebCore::LayoutIntegration::LegacyLinePath::atEnd const): (WebCore::LayoutIntegration::LegacyLinePath::setAtEnd): * layout/integration/LayoutIntegrationLineIteratorModernPath.h: Added. (WebCore::LayoutIntegration::ModernLinePath::ModernLinePath): (WebCore::LayoutIntegration::ModernLinePath::rect const): (WebCore::LayoutIntegration::ModernLinePath::traverseNext): (WebCore::LayoutIntegration::ModernLinePath::traversePrevious): (WebCore::LayoutIntegration::ModernLinePath::operator== const): (WebCore::LayoutIntegration::ModernLinePath::atEnd const): (WebCore::LayoutIntegration::ModernLinePath::setAtEnd): (WebCore::LayoutIntegration::ModernLinePath::lines const): (WebCore::LayoutIntegration::ModernLinePath::line const): * layout/integration/LayoutIntegrationRunIterator.cpp: (WebCore::LayoutIntegration::RunIterator::line const): * layout/integration/LayoutIntegrationRunIterator.h: (WebCore::LayoutIntegration::PathRun::logicalLeft const): (WebCore::LayoutIntegration::PathRun::logicalRight const): (WebCore::LayoutIntegration::PathRun::logicalWidth const): (WebCore::LayoutIntegration::PathRun::logicalHeight const): (WebCore::LayoutIntegration::PathRun::onSameLine const): Deleted. * layout/integration/LayoutIntegrationRunIteratorLegacyPath.h: (WebCore::LayoutIntegration::LegacyPath::operator== const): (WebCore::LayoutIntegration::LegacyPath::rootInlineBox const): (WebCore::LayoutIntegration::LegacyPath::onSameLine const): Deleted. * layout/integration/LayoutIntegrationRunIteratorModernPath.h: (WebCore::LayoutIntegration::verticallyRoundedRect): (WebCore::LayoutIntegration::ModernPath::rect const): (WebCore::LayoutIntegration::ModernPath::operator== const): (WebCore::LayoutIntegration::linePosition): Deleted. (WebCore::LayoutIntegration::ModernPath::onSameLine const): Deleted. Canonical link: https://commits.webkit.org/230193@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-07 15:47:16 +00:00
layout/integration/LayoutIntegrationLineIterator.h
layout/integration/LayoutIntegrationLineIteratorLegacyPath.h
layout/integration/LayoutIntegrationLineIteratorModernPath.h
[LFC][Integration] Move Display::InlineContent to LayoutIntegration namespace https://bugs.webkit.org/show_bug.cgi?id=217310 Reviewed by Zalan Bujtas. It is only used by the integration code Also move the related classes and rename the path independent iterator run to PathRun * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * display/DisplayView.h: * layout/FormattingContextGeometry.cpp: (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const): * layout/displaytree/DisplayRect.h: Removed. * layout/flexformatting/FlexFormattingContext.cpp: (WebCore::Layout::FlexFormattingContext::sizeAndPlaceFlexItems): * layout/flexformatting/FlexFormattingState.h: (WebCore::Layout::FlexFormattingState::lines const): (WebCore::Layout::FlexFormattingState::addLine): * layout/integration/LayoutIntegrationInlineContent.cpp: Renamed from Source/WebCore/layout/displaytree/DisplayInlineContent.cpp. * layout/integration/LayoutIntegrationInlineContent.h: Renamed from Source/WebCore/layout/displaytree/DisplayInlineContent.h. * layout/integration/LayoutIntegrationLine.h: Renamed from Source/WebCore/layout/displaytree/DisplayLine.h. * layout/integration/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::layout): (WebCore::LayoutIntegration::LineLayout::constructContent): (WebCore::LayoutIntegration::LineLayout::lineCount const): (WebCore::LayoutIntegration::LineLayout::adjustForPagination): (WebCore::LayoutIntegration::LineLayout::collectOverflow): (WebCore::LayoutIntegration::LineLayout::ensureInlineContent): (WebCore::LayoutIntegration::LineLayout::textRunsFor const): (WebCore::LayoutIntegration::LineLayout::runFor const): (WebCore::LayoutIntegration::LineLayout::paint): (WebCore::LayoutIntegration::LineLayout::hitTest): (WebCore::LayoutIntegration::LineLayout::constructDisplayContent): Deleted. (WebCore::LayoutIntegration::LineLayout::ensureDisplayInlineContent): Deleted. * layout/integration/LayoutIntegrationLineLayout.h: (WebCore::LayoutIntegration::LineLayout::inlineContent const): (WebCore::LayoutIntegration::LineLayout::displayInlineContent const): Deleted. * layout/integration/LayoutIntegrationPagination.cpp: (WebCore::LayoutIntegration::computeLineTopAndBottomWithOverflow): (WebCore::LayoutIntegration::updateMinimumPageHeight): (WebCore::LayoutIntegration::makeAdjustedContent): (WebCore::LayoutIntegration::adjustLinePositionsForPagination): * layout/integration/LayoutIntegrationPagination.h: * layout/integration/LayoutIntegrationRun.h: Renamed from Source/WebCore/layout/displaytree/DisplayRun.h. * layout/integration/LayoutIntegrationRunIterator.cpp: (WebCore::LayoutIntegration::RunIterator::RunIterator): (WebCore::LayoutIntegration::TextRunIterator::TextRunIterator): (WebCore::LayoutIntegration::LineRunIterator::LineRunIterator): (WebCore::LayoutIntegration::PathRun::modernPath): (WebCore::LayoutIntegration::PathRun::legacyPath): (WebCore::LayoutIntegration::Run::modernPath): Deleted. (WebCore::LayoutIntegration::Run::legacyPath): Deleted. * layout/integration/LayoutIntegrationRunIterator.h: (WebCore::LayoutIntegration::PathTextRun::legacyInlineBox const): (WebCore::LayoutIntegration::RunIterator::operator* const): (WebCore::LayoutIntegration::RunIterator::operator-> const): (WebCore::LayoutIntegration::TextRunIterator::operator* const): (WebCore::LayoutIntegration::TextRunIterator::operator-> const): (WebCore::LayoutIntegration::TextRunIterator::get const): (WebCore::LayoutIntegration::PathRun::PathRun): (WebCore::LayoutIntegration::PathRun::isText const): (WebCore::LayoutIntegration::PathRun::rect const): (WebCore::LayoutIntegration::PathRun::baseline const): (WebCore::LayoutIntegration::PathRun::isHorizontal const): (WebCore::LayoutIntegration::PathRun::dirOverride const): (WebCore::LayoutIntegration::PathRun::isLineBreak const): (WebCore::LayoutIntegration::PathRun::useLineBreakBoxRenderTreeDumpQuirk const): (WebCore::LayoutIntegration::PathRun::minimumCaretOffset const): (WebCore::LayoutIntegration::PathRun::maximumCaretOffset const): (WebCore::LayoutIntegration::PathRun::bidiLevel const): (WebCore::LayoutIntegration::PathRun::onSameLine const): (WebCore::LayoutIntegration::PathRun::legacyInlineBox const): (WebCore::LayoutIntegration::PathTextRun::hasHyphen const): (WebCore::LayoutIntegration::PathTextRun::PathTextRun): (WebCore::LayoutIntegration::PathTextRun::text const): (WebCore::LayoutIntegration::PathTextRun::localStartOffset const): (WebCore::LayoutIntegration::PathTextRun::localEndOffset const): (WebCore::LayoutIntegration::PathTextRun::length const): (WebCore::LayoutIntegration::PathTextRun::isLastTextRunOnLine const): (WebCore::LayoutIntegration::PathTextRun::isLastTextRun const): (isType): (WebCore::LayoutIntegration::Run::leftmostCaretOffset const): Deleted. (WebCore::LayoutIntegration::Run::rightmostCaretOffset const): Deleted. (WebCore::LayoutIntegration::Run::direction const): Deleted. (WebCore::LayoutIntegration::Run::isLeftToRightDirection const): Deleted. (WebCore::LayoutIntegration::TextRun::legacyInlineBox const): Deleted. (WebCore::LayoutIntegration::Run::Run): Deleted. (WebCore::LayoutIntegration::Run::isText const): Deleted. (WebCore::LayoutIntegration::Run::rect const): Deleted. (WebCore::LayoutIntegration::Run::baseline const): Deleted. (WebCore::LayoutIntegration::Run::isHorizontal const): Deleted. (WebCore::LayoutIntegration::Run::dirOverride const): Deleted. (WebCore::LayoutIntegration::Run::isLineBreak const): Deleted. (WebCore::LayoutIntegration::Run::useLineBreakBoxRenderTreeDumpQuirk const): Deleted. (WebCore::LayoutIntegration::Run::minimumCaretOffset const): Deleted. (WebCore::LayoutIntegration::Run::maximumCaretOffset const): Deleted. (WebCore::LayoutIntegration::Run::bidiLevel const): Deleted. (WebCore::LayoutIntegration::Run::onSameLine const): Deleted. (WebCore::LayoutIntegration::Run::legacyInlineBox const): Deleted. (WebCore::LayoutIntegration::TextRun::hasHyphen const): Deleted. (WebCore::LayoutIntegration::TextRun::TextRun): Deleted. (WebCore::LayoutIntegration::TextRun::text const): Deleted. (WebCore::LayoutIntegration::TextRun::localStartOffset const): Deleted. (WebCore::LayoutIntegration::TextRun::localEndOffset const): Deleted. (WebCore::LayoutIntegration::TextRun::length const): Deleted. (WebCore::LayoutIntegration::TextRun::isLastTextRunOnLine const): Deleted. (WebCore::LayoutIntegration::TextRun::isLastTextRun const): Deleted. * layout/integration/LayoutIntegrationRunIteratorModernPath.h: (WebCore::LayoutIntegration::ModernPath::ModernPath): (WebCore::LayoutIntegration::ModernPath::runs const): (WebCore::LayoutIntegration::ModernPath::run const): (WebCore::LayoutIntegration::ModernPath::line const): * layout/layouttree/LayoutTreeBuilder.cpp: * rendering/RenderTreeAsText.cpp: (WebCore::write): (WebCore::writeTextRun): Deleted. * rendering/TextPainter.cpp: (WebCore::TextPainter::clearGlyphDisplayLists): Canonical link: https://commits.webkit.org/230078@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-05 15:43:07 +00:00
layout/integration/LayoutIntegrationRun.h
[LFC][Integration] Move run iterator to LayoutIntegration namespace https://bugs.webkit.org/show_bug.cgi?id=217046 Reviewed by Zalan Bujtas. Also use name 'Modern' for LFC and 'Legacy' for the old inline tree path. Also rename box->run for more consistent terminology. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Position.cpp: (WebCore::Position::upstream const): (WebCore::Position::downstream const): * editing/TextIterator.cpp: (WebCore::TextIterator::advance): (WebCore::TextIterator::handleTextNode): (WebCore::TextIterator::handleTextRun): (WebCore::TextIterator::handleTextNodeFirstLetter): (WebCore::TextIterator::handleTextBox): Deleted. * editing/TextIterator.h: * layout/integration/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::textRunsFor const): (WebCore::LayoutIntegration::LineLayout::elementRunFor const): (WebCore::LayoutIntegration::LineLayout::paint): (WebCore::LayoutIntegration::LineLayout::textBoxesFor const): Deleted. (WebCore::LayoutIntegration::LineLayout::elementBoxFor const): Deleted. * layout/integration/LayoutIntegrationLineLayout.h: * layout/integration/LayoutIntegrationRunIterator.cpp: Renamed from Source/WebCore/rendering/line/LineLayoutTraversal.cpp. (WebCore::LayoutIntegration::TextRunIterator::TextRunIterator): (WebCore::LayoutIntegration::TextRunIterator::traverseNextInVisualOrder): (WebCore::LayoutIntegration::TextRunIterator::traverseNextInTextOrder): (WebCore::LayoutIntegration::TextRunIterator::operator== const): (WebCore::LayoutIntegration::TextRunIterator::atEnd const): (WebCore::LayoutIntegration::firstTextRunFor): (WebCore::LayoutIntegration::firstTextRunInTextOrderFor): (WebCore::LayoutIntegration::textRunsFor): (WebCore::LayoutIntegration::ElementRunIterator::ElementRunIterator): (WebCore::LayoutIntegration::ElementRunIterator::atEnd const): (WebCore::LayoutIntegration::elementRunFor): * layout/integration/LayoutIntegrationRunIterator.h: Renamed from Source/WebCore/rendering/line/LineLayoutTraversal.h. (WebCore::LayoutIntegration::TextRunIterator::TextRunIterator): (WebCore::LayoutIntegration::TextRunIterator::operator++): (WebCore::LayoutIntegration::TextRunIterator::operator!= const): (WebCore::LayoutIntegration::TextRunIterator::operator* const): (WebCore::LayoutIntegration::TextRunIterator::operator-> const): (WebCore::LayoutIntegration::ElementRunIterator::ElementRunIterator): (WebCore::LayoutIntegration::ElementRunIterator::operator* const): (WebCore::LayoutIntegration::ElementRunIterator::operator-> const): (WebCore::LayoutIntegration::TextRunRange::TextRunRange): (WebCore::LayoutIntegration::TextRunRange::begin const): (WebCore::LayoutIntegration::Run::Run): (WebCore::LayoutIntegration::Run::rect const): (WebCore::LayoutIntegration::Run::baseline const): (WebCore::LayoutIntegration::Run::isLeftToRightDirection const): (WebCore::LayoutIntegration::Run::isHorizontal const): (WebCore::LayoutIntegration::Run::dirOverride const): (WebCore::LayoutIntegration::Run::isLineBreak const): (WebCore::LayoutIntegration::Run::useLineBreakBoxRenderTreeDumpQuirk const): (WebCore::LayoutIntegration::TextRun::hasHyphen const): (WebCore::LayoutIntegration::TextRun::TextRun): (WebCore::LayoutIntegration::TextRun::text const): (WebCore::LayoutIntegration::TextRun::localStartOffset const): (WebCore::LayoutIntegration::TextRun::localEndOffset const): (WebCore::LayoutIntegration::TextRun::length const): (WebCore::LayoutIntegration::TextRun::isLastOnLine const): (WebCore::LayoutIntegration::TextRun::isLast const): * layout/integration/LayoutIntegrationRunIteratorLegacyPath.h: Renamed from Source/WebCore/rendering/line/LineLayoutTraversalComplexPath.h. (WebCore::LayoutIntegration::LegacyPath::LegacyPath): (WebCore::LayoutIntegration::LegacyPath::operator== const): (WebCore::LayoutIntegration::LegacyPath::nextInlineTextBoxInTextOrder const): * layout/integration/LayoutIntegrationRunIteratorModernPath.h: Renamed from Source/WebCore/rendering/line/LineLayoutTraversalDisplayRunPath.h. (WebCore::LayoutIntegration::ModernPath::ModernPath): (WebCore::LayoutIntegration::ModernPath::operator== const): (WebCore::LayoutIntegration::ModernPath::rect const): * rendering/RenderLineBreak.cpp: (WebCore::RenderLineBreak::linesBoundingBox const): (WebCore::RenderLineBreak::boundingBoxForRenderTreeDump const): (WebCore::RenderLineBreak::absoluteRects const): (WebCore::RenderLineBreak::absoluteQuads const): * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRects const): (WebCore::collectAbsoluteQuadsForNonComplexPaths): (WebCore::RenderText::firstRunLocation const): (WebCore::RenderText::linesBoundingBox const): (WebCore::RenderText::caretMinOffset const): (WebCore::RenderText::caretMaxOffset const): (WebCore::RenderText::countRenderedCharacterOffsetsUntil const): (WebCore::containsOffset): (WebCore::RenderText::hasRenderedText const): * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): (WebCore::writeTextRun): (WebCore::write): (WebCore::writeTextBox): Deleted. Canonical link: https://commits.webkit.org/229834@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-28 13:42:33 +00:00
layout/integration/LayoutIntegrationRunIterator.h
layout/integration/LayoutIntegrationRunIteratorLegacyPath.h
layout/integration/LayoutIntegrationRunIteratorModernPath.h
layout/layouttree/LayoutBox.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
loader/CanvasActivityRecord.h
ContentFilter should access DocumentLoader through an interface https://bugs.webkit.org/show_bug.cgi?id=206564 Reviewed by Andy Estes. This will make it easier to move, like to the NetworkProcess where there are no DocumentLoaders. Also use WTF::Function instead of std::function and UniqueRef instead of std::unique_ptr. No change in behavior. * WebCore.xcodeproj/project.pbxproj: * loader/ContentFilter.cpp: (WebCore::ContentFilter::types): (WebCore::ContentFilter::create): (WebCore::ContentFilter::ContentFilter): (WebCore::ContentFilter::continueAfterWillSendRequest): (WebCore::ContentFilter::continueAfterResponseReceived): (WebCore::ContentFilter::continueAfterDataReceived): (WebCore::ContentFilter::continueAfterNotifyFinished): (WebCore::ContentFilter::forEachContentFilterUntilBlocked): (WebCore::ContentFilter::didDecide): (WebCore::ContentFilter::deliverResourceData): (WebCore::ContentFilter::handleProvisionalLoadFailure): (): Deleted. * loader/ContentFilter.h: * loader/ContentFilterClient.h: Added. (WebCore::ContentFilterClient::~ContentFilterClient): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::handleProvisionalLoadFailure): (WebCore::DocumentLoader::didBlock): * loader/DocumentLoader.h: * platform/cocoa/NetworkExtensionContentFilter.h: * platform/cocoa/NetworkExtensionContentFilter.mm: (WebCore::NetworkExtensionContentFilter::create): * platform/cocoa/ParentalControlsContentFilter.h: * platform/cocoa/ParentalControlsContentFilter.mm: (WebCore::ParentalControlsContentFilter::create): Canonical link: https://commits.webkit.org/219697@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-23 18:50:55 +00:00
loader/ContentFilterClient.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
loader/CookieJar.h
loader/CrossOriginAccessControl.h
Add initial support for 'Cross-Origin-Opener-Policy' HTTP header https://bugs.webkit.org/show_bug.cgi?id=192193 <rdar://problem/42013525> Reviewed by Geoff Garen. LayoutTests/imported/w3c: Rebaseline WPT tests now that most tests are passing. * web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https-expected.txt: * web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/blob-popup.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/coep-navigate-popup.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/coep-redirect.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/coep.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/coop-coep-sandbox.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/coop-navigated-history-popup.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/coop-navigated-popup.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/coop-sandbox.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/header-parsing.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/historical/coep-navigate-popup-unsafe-inherit.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-cross-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-same-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-same-site.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-cross-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-same-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-same-site.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-cross-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-same-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-same-site.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-allow-popups-to-same-origin-allow-popups.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-allow-popups-to-same-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-to-same-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-to-unsafe-none.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/iframe-popup-unsafe-none-to-same-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/javascript-url.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/navigate-to-aboutblank.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/no-https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-coop-by-sw-from-coop.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-coop-by-sw.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-redirect-cache.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-cross-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-same-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-same-site.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-cross-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-same-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-same-site.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-cross-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-same-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-same-site.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-cross-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-same-origin.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/popup-with-structured-header.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/resource-popup.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/resources/resource-popup.html: * web-platform-tests/html/dom/idlharness.worker-expected.txt: Source/WebCore: Add initial support for 'Cross-Origin-Opener-Policy' HTTP header: - https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policy-value Support is complete enough to pass most WPT tests with the exception of: - The ones involving blob. Support for Blob does not seem trivial so I will address separately (https://github.com/whatwg/html/issues/5198). - The ones that requires reporting COOP enforcement as this is not supported yet. This is a fairly large task so I'll handle separately. - The ones that involve Cross-Origin-Embedder-Policy (COEP) and this is not yet supported. I tried to stay as close as possible to the HTML specification as possible in terms of structuring and naming. I also have code comments to link to the relevant HTML spec sections. Note that as it stands, we do not currently swap process based on COOP header. We merely do isolation of the new browsing context at JS level for now. At some point, we'll want to actually process-swap, once we support COEP and we want to re-enable some Web APIs such as SharedArrayBuffer. No new tests, covered by web-plaform-tests/html/cross-origin-opener-policy. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * dom/Document.cpp: (WebCore::Document::initSecurityContext): (WebCore::Document::shouldForceNoOpenerBasedOnCOOP const): (WebCore::Document::crossOriginOpenerPolicy const): (WebCore::Document::setCrossOriginOpenerPolicy): * dom/Document.h: (WebCore::Document::isSameOriginAsTopDocument const): * dom/SecurityContext.cpp: (WebCore::SecurityContext::enforceSandboxFlags): * dom/SecurityContext.h: (WebCore::SecurityContext::creationSandboxFlags const): * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::openURLExternally): * loader/CrossOriginEmbedderPolicy.cpp: Copied from Source/WebCore/page/AbstractFrame.cpp. (WebCore::obtainCrossOriginEmbedderPolicy): * loader/CrossOriginEmbedderPolicy.h: Copied from Source/WebCore/page/AbstractFrame.cpp. * loader/CrossOriginOpenerPolicy.cpp: Added. (WebCore::obtainCrossOriginOpenerPolicy): * loader/CrossOriginOpenerPolicy.h: Copied from Source/WebCore/page/AbstractFrame.h. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::willSendRequest): (WebCore::checkIfCOOPValuesRequireBrowsingContextGroupSwitch): (WebCore::computeResponseOriginAndCOOP): (WebCore::DocumentLoader::doCrossOriginOpenerHandlingOfResponse): (WebCore::DocumentLoader::enforceResponseCrossOriginOpenerPolicy): (WebCore::DocumentLoader::responseReceived): (WebCore::DocumentLoader::maybeLoadEmpty): * loader/DocumentLoader.h: (WebCore::DocumentLoader::crossOriginOpenerPolicy const): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::begin): * loader/FrameLoader.cpp: (WebCore::FrameLoader::didBeginDocument): (WebCore::FrameLoader::setOpener): (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::loadPostRequest): (WebCore::createWindow): (WebCore::FrameLoader::switchBrowsingContextsGroup): * loader/FrameLoader.h: * loader/NavigationAction.cpp: * loader/NavigationAction.h: (WebCore::NavigationAction::Requester::securityOrigin const): (WebCore::NavigationAction::Requester::topOrigin const): (WebCore::NavigationAction::Requester::crossOriginOpenerPolicy const): * page/AbstractFrame.cpp: (WebCore::AbstractFrame::resetWindowProxy): * page/AbstractFrame.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::crossOriginIsolated const): (WebCore::DOMWindow::createWindow): * page/DOMWindow.h: * page/Frame.cpp: (WebCore::Frame::resetScript): * page/Frame.h: * page/Page.h: (WebCore::Page::setOpenedByDOMWithOpener): * page/WindowOrWorkerGlobalScope.idl: * page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::applyPolicyToScriptExecutionContext): * platform/network/HTTPHeaderNames.in: * platform/network/HTTPParsers.cpp: (WebCore::parseStructuredFieldValue): * platform/network/HTTPParsers.h: * platform/network/ResourceResponseBase.cpp: (WebCore::isSafeRedirectionResponseHeader): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::crossOriginIsolated const): * workers/WorkerGlobalScope.h: Source/WTF: Add experimental feature flag for 'Cross-Origin-Opener-Policy' HTTP header support. * Scripts/Preferences/WebPreferencesExperimental.yaml: LayoutTests: Update test expectations. * TestExpectations: * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk2/TestExpectations: * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/240136@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-31 00:07:37 +00:00
loader/CrossOriginEmbedderPolicy.h
loader/CrossOriginOpenerPolicy.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
loader/CrossOriginPreflightResultCache.h
Add SPI to set a list of hosts to which to send custom header fields cross-origin https://bugs.webkit.org/show_bug.cgi?id=197397 Reviewed by Geoff Garen. Source/WebCore: In r223001 I added the ability to send custom headers, but with a restriction that they will not be sent except to the origin of the main document. We need the ability to specify what origins to send these headers to even if they are not first party requests. We get this information in a list of strings which are the hosts to send the headers to. Some of the strings have an asterisk at the beginning, indicating that the headers are to be sent to all subdomains. I repurposed some ObjC SPI that was never adopted, but I keep testing the C API that was to verify no regression. I also added some new API tests for the new behavior. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * loader/CustomHeaderFields.cpp: Added. (WebCore::CustomHeaderFields::thirdPartyDomainsMatch const): * loader/CustomHeaderFields.h: Added. (WebCore::CustomHeaderFields::encode const): (WebCore::CustomHeaderFields::decode): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::setCustomHeaderFields): Deleted. * loader/DocumentLoader.h: (WebCore::DocumentLoader::setCustomHeaderFields): (WebCore::DocumentLoader::customHeaderFields const): (WebCore::DocumentLoader::customHeaderFields): Deleted. * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource): Source/WebKit: * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): * Shared/WebsitePoliciesData.cpp: (WebKit::WebsitePoliciesData::decode): * Shared/WebsitePoliciesData.h: * SourcesCocoa.txt: * UIProcess/API/APICustomHeaderFields.h: Added. * UIProcess/API/APIWebsitePolicies.cpp: (API::WebsitePolicies::WebsitePolicies): (API::WebsitePolicies::copy const): (API::WebsitePolicies::data): * UIProcess/API/APIWebsitePolicies.h: * UIProcess/API/C/WKWebsitePolicies.cpp: (WKWebsitePoliciesCopyCustomHeaderFields): (WKWebsitePoliciesSetCustomHeaderFields): * UIProcess/API/Cocoa/WKWebpagePreferences.mm: (-[WKWebpagePreferences _customHeaderFields]): (-[WKWebpagePreferences _setCustomHeaderFields:]): * UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h: * UIProcess/API/Cocoa/_WKCustomHeaderFields.h: Added. * UIProcess/API/Cocoa/_WKCustomHeaderFields.mm: Added. (-[_WKCustomHeaderFields init]): (-[_WKCustomHeaderFields dealloc]): (-[_WKCustomHeaderFields fields]): (-[_WKCustomHeaderFields setFields:]): (-[_WKCustomHeaderFields thirdPartyDomains]): (-[_WKCustomHeaderFields setThirdPartyDomains:]): (-[_WKCustomHeaderFields _apiObject]): * UIProcess/API/Cocoa/_WKCustomHeaderFieldsInternal.h: Added. * UIProcess/API/Cocoa/_WKWebsitePolicies.h: * UIProcess/API/Cocoa/_WKWebsitePolicies.mm: (-[_WKWebsitePolicies customHeaderFields]): Deleted. (-[_WKWebsitePolicies setCustomHeaderFields:]): Deleted. * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::takeFocus): (WebKit::WebViewImpl::accessibilityAttributeValue): * WebKit.xcodeproj/project.pbxproj: Tools: * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (TEST): (expectLegacyHeaders): (expectHeaders): (-[CustomHeaderFieldsDelegate webView:decidePolicyForNavigationAction:preferences:decisionHandler:]): (-[CustomHeaderFieldsDelegate webView:startURLSchemeTask:]): (-[CustomHeaderFieldsDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted. Canonical link: https://commits.webkit.org/212103@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-17 21:50:02 +00:00
loader/CustomHeaderFields.h
Fix WPT test resource-timing/cross-origin-redirects.html https://bugs.webkit.org/show_bug.cgi?id=190523 <rdar://45227788> Reviewed by Brady Eidson. LayoutTests/imported/w3c: * web-platform-tests/navigation-timing/nav2_test_redirect_server-expected.txt: * web-platform-tests/navigation-timing/nav2_test_redirect_server.html: Sometimes, with our use of Performance::reduceTimeResolution, the event times are equal to each other. Allow this. * web-platform-tests/resource-timing/cross-origin-redirects-expected.txt: Added. * web-platform-tests/resource-timing/cross-origin-redirects.html: Added. * web-platform-tests/resource-timing/resources/entry-invariants.js: Added. (const.assert_all_equal_): (const.assert_ordered_): (const.assert_zeroed_): (const.assert_not_negative_): (const.assert_positive_): (const.attribute_test_internal): (async const): (const.attribute_test_with_validator): * web-platform-tests/resource-timing/resources/resource-loaders.js: Added. (const.load.font.path.return.document.fonts.ready.then): (const.load.stylesheet.async path): (const.load.iframe.async path): (const.load.script.async path): (const.load.xhr_sync.async path): Source/WebCore: Test: imported/w3c/web-platform-tests/resource-timing/cross-origin-redirects.html This test took more to fix than I thought it would. We used to collect our timing data from various sources into various structures, mostly based on Google's work from 2010 with a few things tacked on to it. The timing specifications have changed considerably in the last 11 years, and so should the shape of the structures we put the data into. We used to have a LoadTiming structure in various places that claimed to contain the redirect times, but markRedirectStart and markRedirectEnd were never called. Instead we tried to collect this data from the SubResourceLoader and DocumentLoader reporting redirects in the web process. This wasn't great. Redirect timing is best collected in the network process by the framework doing the redirecting, and now we have the NSURLSessionTaskMetrics API to get the data we need. I've made NetworkLoadMetrics the structure that contains all the network load metrics from the network process. DocumentEventTiming is owned in the web process by the Document, and it contains the load event timing data. ResourceLoadTiming is owned by the ResourceLoader, and it contains the fetch start and end times including the parts of the fetch algorithm that happen in the web process. DocumentLoadTiming inherits from it and is owned by the DocumentLoader, which reflects the fact that PerformanceNavigationTiming inherits from PerformanceResourceTiming in the specs. With these structures in place, we now have the infrastructure to collect timing data and expose it correctly. Another thing that has changed is that these structures consistently store the timing data in the MonotonicTime type, which is the number of seconds since the machine restarted. NetworkLoadMetrics used to confusingly store fetch start time and then other network times as deltas from it, and we would pretend that fetch start time was the same as the fetch start time in the web process and calculate everything from the deltas. This is an unfortunate consequence of my younger self not realizing that the double values from NSURLConnection._timingData are values to be put into [NSDate initWithTimeIntervalSinceReferenceDate] then pulled out with timeIntervalSince1970 to get WallTime. I was confused because they weren't WallTime or MonotonicTime, so I only dealt with them as deltas from each other. Consistently using MonotonicTime makes all this code much more straightforward. I also use std::numeric_limits<uint64_t>::max() instead of std::numeric_limits<uint32_t>::max() as a sentinel value for requestHeaderBytesSent and responseHeaderBytesReceived to make everything more sane. I'm not too worried about the metrics of downloads of exactly 4GB, but they should also be fixed. A consequence of collecting the redirect times in the network process is that we have to move the SecurityOrigin::canRequest checks to see if the redirects are same-origin to ResourceHandle and NetworkDataTask. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::setReadyState): (WebCore::Document::finishedParsing): (WebCore::Document::monotonicTimestamp const): * dom/Document.h: (WebCore::Document::eventTiming const): (WebCore::Document::timing const): Deleted. * dom/DocumentEventTiming.h: Copied from Source/WebCore/dom/DocumentTiming.h. * inspector/agents/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::buildObjectForTiming): (WebCore::InspectorNetworkAgent::buildObjectForMetrics): (WebCore::InspectorNetworkAgent::buildObjectForResourceResponse): (WebCore::InspectorNetworkAgent::didFinishLoading): * inspector/agents/InspectorNetworkAgent.h: * loader/DocumentLoadTiming.h: Renamed from Source/WebCore/loader/LoadTiming.h. (WebCore::DocumentLoadTiming::timeOrigin const): (WebCore::DocumentLoadTiming::markUnloadEventStart): (WebCore::DocumentLoadTiming::markUnloadEventEnd): (WebCore::DocumentLoadTiming::markLoadEventStart): (WebCore::DocumentLoadTiming::markLoadEventEnd): (WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument): (WebCore::DocumentLoadTiming::unloadEventStart const): (WebCore::DocumentLoadTiming::unloadEventEnd const): (WebCore::DocumentLoadTiming::loadEventStart const): (WebCore::DocumentLoadTiming::loadEventEnd const): (WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument const): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::willSendRequest): (WebCore::DocumentLoader::dataReceived): (WebCore::DocumentLoader::startLoadingMainResource): * loader/DocumentLoader.h: (WebCore::DocumentLoader::timing const): (WebCore::DocumentLoader::timing): (WebCore::DocumentLoader::resetTiming): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::loadRequest): * loader/FrameLoader.cpp: (WebCore::FrameLoader::dispatchUnloadEvents): * loader/LoadTiming.cpp: Removed. * loader/ResourceLoadTiming.h: Renamed from Source/WebCore/dom/DocumentTiming.h. (WebCore::ResourceLoadTiming::markStartTime): (WebCore::ResourceLoadTiming::markEndTime): (WebCore::ResourceLoadTiming::startTime const): (WebCore::ResourceLoadTiming::endTime const): (WebCore::ResourceLoadTiming::isolatedCopy const): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::init): * loader/ResourceLoader.h: (WebCore::ResourceLoader::loadTiming): * loader/ResourceTiming.cpp: (WebCore::ResourceTiming::fromMemoryCache): (WebCore::ResourceTiming::fromLoad): (WebCore::ResourceTiming::fromSynchronousLoad): (WebCore::ResourceTiming::ResourceTiming): (WebCore::ResourceTiming::isolatedCopy const): (WebCore::ResourceTiming::fromCache): Deleted. * loader/ResourceTiming.h: (WebCore::ResourceTiming::resourceLoadTiming const): (WebCore::ResourceTiming::ResourceTiming): (WebCore::ResourceTiming::loadTiming const): Deleted. * loader/ResourceTimingInformation.cpp: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequestInternal): (WebCore::SubresourceLoader::didFinishLoading): * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource): * page/DOMWindow.cpp: (WebCore::DOMWindow::performance const): * page/Performance.cpp: (WebCore::Performance::addNavigationTiming): * page/Performance.h: * page/PerformanceNavigation.cpp: (WebCore::PerformanceNavigation::redirectCount const): * page/PerformanceNavigationTiming.cpp: (WebCore::PerformanceNavigationTiming::PerformanceNavigationTiming): (WebCore::PerformanceNavigationTiming::millisecondsSinceOrigin const): (WebCore::PerformanceNavigationTiming::sameOriginCheckFails const): (WebCore::PerformanceNavigationTiming::unloadEventStart const): (WebCore::PerformanceNavigationTiming::unloadEventEnd const): (WebCore::PerformanceNavigationTiming::domInteractive const): (WebCore::PerformanceNavigationTiming::domContentLoadedEventStart const): (WebCore::PerformanceNavigationTiming::domContentLoadedEventEnd const): (WebCore::PerformanceNavigationTiming::domComplete const): (WebCore::PerformanceNavigationTiming::loadEventStart const): (WebCore::PerformanceNavigationTiming::loadEventEnd const): (WebCore::PerformanceNavigationTiming::redirectCount const): * page/PerformanceNavigationTiming.h: * page/PerformanceResourceTiming.cpp: (WebCore::networkLoadTimeToDOMHighResTimeStamp): (WebCore::fetchStart): (WebCore::entryStartTime): (WebCore::entryEndTime): (WebCore::PerformanceResourceTiming::redirectStart const): (WebCore::PerformanceResourceTiming::redirectEnd const): (WebCore::PerformanceResourceTiming::fetchStart const): (WebCore::PerformanceResourceTiming::domainLookupStart const): (WebCore::PerformanceResourceTiming::domainLookupEnd const): (WebCore::PerformanceResourceTiming::connectStart const): (WebCore::PerformanceResourceTiming::connectEnd const): (WebCore::PerformanceResourceTiming::secureConnectionStart const): (WebCore::PerformanceResourceTiming::requestStart const): (WebCore::PerformanceResourceTiming::responseStart const): (WebCore::PerformanceResourceTiming::responseEnd const): (WebCore::monotonicTimeToDOMHighResTimeStamp): Deleted. (WebCore::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp const): Deleted. * page/PerformanceResourceTiming.h: * page/PerformanceTiming.cpp: (WebCore::PerformanceTiming::navigationStart const): (WebCore::PerformanceTiming::unloadEventStart const): (WebCore::PerformanceTiming::unloadEventEnd const): (WebCore::PerformanceTiming::redirectStart const): (WebCore::PerformanceTiming::redirectEnd const): (WebCore::PerformanceTiming::fetchStart const): (WebCore::PerformanceTiming::domainLookupStart const): (WebCore::PerformanceTiming::domainLookupEnd const): (WebCore::PerformanceTiming::connectStart const): (WebCore::PerformanceTiming::connectEnd const): (WebCore::PerformanceTiming::secureConnectionStart const): (WebCore::PerformanceTiming::requestStart const): (WebCore::PerformanceTiming::responseStart const): (WebCore::PerformanceTiming::responseEnd const): (WebCore::PerformanceTiming::domLoading const): (WebCore::PerformanceTiming::domInteractive const): (WebCore::PerformanceTiming::domContentLoadedEventStart const): (WebCore::PerformanceTiming::domContentLoadedEventEnd const): (WebCore::PerformanceTiming::domComplete const): (WebCore::PerformanceTiming::loadEventStart const): (WebCore::PerformanceTiming::loadEventEnd const): (WebCore::PerformanceTiming::documentLoader const): (WebCore::PerformanceTiming::documentEventTiming const): (WebCore::PerformanceTiming::documentLoadTiming const): (WebCore::PerformanceTiming::networkLoadMetrics const): (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds const): (WebCore::PerformanceTiming::documentTiming const): Deleted. (WebCore::PerformanceTiming::loadTiming const): Deleted. (WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart const): Deleted. * page/PerformanceTiming.h: * platform/network/NetworkLoadMetrics.h: (WebCore::NetworkLoadMetrics::isolatedCopy const): (WebCore::NetworkLoadMetrics::operator== const): (WebCore::NetworkLoadMetrics::encode const): (WebCore::NetworkLoadMetrics::decode): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::hasCrossOriginRedirect const): (WebCore::ResourceHandle::setHasCrossOriginRedirect): (WebCore::ResourceHandle::incrementRedirectCount): (WebCore::ResourceHandle::redirectCount const): (WebCore::ResourceHandle::startTimeBeforeRedirects const): (WebCore::ResourceHandle::networkLoadMetrics): (WebCore::ResourceHandle::setNetworkLoadMetrics): * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: * platform/network/cocoa/NetworkLoadMetrics.mm: (WebCore::dateToMonotonicTime): (WebCore::packageTimingData): (WebCore::copyTimingData): * platform/network/cocoa/WebCoreNSURLSession.mm: (networkLoadMetricsDate): (-[WebCoreNSURLSessionTaskTransactionMetrics fetchStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupEndDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics connectStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics secureConnectionStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics connectEndDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics requestStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics responseStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics responseEndDate]): * platform/network/curl/CurlContext.cpp: (WebCore::CurlHandle::getNetworkLoadMetrics): * platform/network/curl/CurlContext.h: * platform/network/curl/CurlRequest.cpp: (WebCore::CurlRequest::didCompleteTransfer): (WebCore::CurlRequest::networkLoadMetrics): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]): Source/WebKit: * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]): (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): * NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup): (WebKit::NetworkDataTaskSoup::clearRequest): (WebKit::NetworkDataTaskSoup::resume): (WebKit::NetworkDataTaskSoup::didSendRequest): (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError): (WebKit::NetworkDataTaskSoup::continueHTTPRedirection): (WebKit::NetworkDataTaskSoup::networkEvent): (WebKit::NetworkDataTaskSoup::didStartRequest): (WebKit::NetworkDataTaskSoup::didRestart): LayoutTests: * http/tests/misc/webtiming-slow-load-expected.txt: * http/tests/misc/webtiming-slow-load.py: Our new metrics gathering now matches Firefox instead of Chrome in PerformanceResourceTiming::responseEnd in this edge case of a deprecated API. Update expectations accordingly. * platform/mac-wk1/TestExpectations: Bringing this test to passing in WK2 makes it flaky in WK1 because we don't get good redirect timing data from CFNetwork through NSURLConnection. * platform/win/http/tests/misc/webtiming-one-redirect-expected.txt: Added. * platform/win/http/tests/misc/webtiming-slow-load-expected.txt: Copied from LayoutTests/http/tests/misc/webtiming-slow-load-expected.txt. * platform/win/http/tests/misc/webtiming-two-redirects-expected.txt: Added. The network layer is now responsible for counting redirects and providing redirect timings. Our friend CFURLConnection doesn't have that ability, so it doesn't pass these tests any more. It never supported any timing APIs and other tests are skipped. Canonical link: https://commits.webkit.org/238416@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-03 01:25:53 +00:00
loader/DocumentLoadTiming.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
loader/DocumentLoader.h
loader/DocumentWriter.h
loader/EmptyClients.h
loader/EmptyFrameLoaderClient.h
loader/FetchOptions.h
Refactor font loading to make it possible for Worker to implement it https://bugs.webkit.org/show_bug.cgi?id=224277 Reviewed by Darin Adler. Introduce FontLoadRequest and FontLoadRequestClient as an abstraction separate from CachedFont and CachedFontClient to allow for separate implementations. Also move Document-specific font-loading behaviour from CSSFontSelector into Document and add non-Document specific accessors to ScriptExecutionContext. These changes should allow for custom font loading to be implementable on a Worker, which will be necessary for FontFace support in OffscreenCanvas. No new tests, no change in behavior. * Headers.cmake: Added FontLoadRequest.h, CachedFontLoadRequest.h and DocumentFontLoader.h. * Sources.txt: Added DocumentFontLoader.cpp. * WebCore.xcodeproj/project.pbxproj: Added files listed above. * css/CSSFontFace.cpp: Update to not require Document for custom font loading. (WebCore::CSSFontFace::appendSources): * css/CSSFontFaceSource.cpp: Update to use FontLoadRequest instead of CachedFont. (WebCore::CSSFontFaceSource::CSSFontFaceSource): (WebCore::CSSFontFaceSource::~CSSFontFaceSource): (WebCore::CSSFontFaceSource::opportunisticallyStartFontDataURLLoading): (WebCore::CSSFontFaceSource::fontLoaded): (WebCore::CSSFontFaceSource::load): (WebCore::CSSFontFaceSource::font): (WebCore::CSSFontFaceSource::isSVGFontFaceSource const): * css/CSSFontFaceSource.h: * css/CSSFontFaceSrcValue.cpp: Update to use FontLoadRequest and ScriptExecutionContext instead of CachedResourceLoader. (WebCore::CSSFontFaceSrcValue::fontLoadRequest): * css/CSSFontFaceSrcValue.h: * css/CSSFontSelector.cpp: Remove Document-specific code. (WebCore::CSSFontSelector::CSSFontSelector): (WebCore::CSSFontSelector::~CSSFontSelector): (WebCore::CSSFontSelector::clearFonts): * css/CSSFontSelector.h: * dom/Document.cpp: Implement ScriptExecutionContext::fontLoadRequest and ::beginLoadingFontSoon. (WebCore::Document::~Document): (WebCore::Document::removedLastRef): (WebCore::Document::resolveStyle): (WebCore::Document::suspendFontLoading): (WebCore::Document::fontLoadRequest): (WebCore::Document::beginLoadingFontSoon): (WebCore::Document::suspend): (WebCore::Document::resume): * dom/Document.h: * dom/DocumentFontLoader.cpp: Added. New class to handle Document-specific font-loading code that was previously in CSSFontSelector and CSSFontFaceSrcValue. (WebCore::DocumentFontLoader::DocumentFontLoader): (WebCore::DocumentFontLoader::~DocumentFontLoader): (WebCore::DocumentFontLoader::cachedFont): (WebCore::DocumentFontLoader::beginLoadingFontSoon): (WebCore::DocumentFontLoader::loadPendingFonts): (WebCore::DocumentFontLoader::fontLoadingTimerFired): (WebCore::DocumentFontLoader::stopLoadingAndClearFonts): (WebCore::DocumentFontLoader::suspendFontLoading): (WebCore::DocumentFontLoader::resumeFontLoading): * dom/DocumentFontLoader.h: * dom/ScriptExecutionContext.cpp: Add functions to initiate font load requests. (WebCore::ScriptExecutionContext::fontLoadRequest): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::beginLoadingFontSoon): * loader/DocumentLoader.cpp: CSSFontSelector::suspendFontLoadingTimer is now Document::suspendFontLoading. (WebCore::DocumentLoader::stopLoading): * loader/FontLoadRequest.h: Added. An interface to manage font loading that abstracts some of the behaviour of CachedResource, CachedFont and CachedFontClient. (WebCore::FontLoadRequestClient::fontLoaded): (WebCore::FontLoadRequestClient::isCachedFontLoadRequest const): * loader/cache/CachedFontLoadRequest.h: Added. An implementation of FontLoadRequest for CachedFont. * workers/WorkerGlobalScope.cpp: Remove now-redundant CSSFontSelector call. (WebCore::WorkerGlobalScope::~WorkerGlobalScope): Canonical link: https://commits.webkit.org/236387@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-12 09:26:42 +00:00
loader/FontLoadRequest.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
loader/FormState.h
loader/FormSubmission.h
loader/FrameLoadRequest.h
loader/FrameLoader.h
loader/FrameLoaderClient.h
loader/FrameLoaderStateMachine.h
loader/FrameLoaderTypes.h
loader/FrameNetworkingContext.h
loader/HTTPHeaderField.h
loader/HistoryController.h
loader/ImageLoader.h
loader/LinkLoader.h
loader/LinkLoaderClient.h
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
loader/LoadSchedulingMode.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
loader/LoaderStrategy.h
loader/MediaResourceLoader.h
loader/MixedContentChecker.h
loader/NavigationAction.h
loader/NetscapePlugInStreamLoader.h
loader/PingLoader.h
loader/PolicyChecker.h
Add Cross-Origin-Embedder-Policy support for Blob URLs https://bugs.webkit.org/show_bug.cgi?id=229041 Reviewed by Alex Christensen. LayoutTests/imported/w3c: Rebaseline WPT tests now that more checks are passing. * web-platform-tests/html/cross-origin-embedder-policy/blob.https-expected.txt: * web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt: * web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https-expected.txt: Source/WebCore: Add Cross-Origin-Embedder-Policy (COEP) support for Blob URLs. We do the same thing as for COOP, we pass the COEP policy when registering the Blob URL and store it in the BlobData. When we need the construct a Blob resource response as a result of a load, we add the right COEP headers based on the BlobData's COEP policy. No new tests, rebaselined existing tests. * Modules/fetch/FetchLoader.cpp: (WebCore::FetchLoader::startLoadingBlobURL): * fileapi/Blob.cpp: (WebCore::BlobURLRegistry::registerURL): (WebCore::Blob::Blob): * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::start): * fileapi/ThreadableBlobRegistry.cpp: (WebCore::ThreadableBlobRegistry::registerBlobURL): * fileapi/ThreadableBlobRegistry.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadResource): * loader/CrossOriginEmbedderPolicy.cpp: (WebCore::addCrossOriginEmbedderPolicyHeaders): * loader/CrossOriginEmbedderPolicy.h: (WebCore::operator==): * loader/CrossOriginOpenerPolicy.cpp: (WebCore::addCrossOriginOpenerPolicyHeaders): * loader/FrameLoader.cpp: (WebCore::FrameLoader::didBeginDocument): * platform/network/BlobData.h: (WebCore::BlobData::crossOriginEmbedderPolicy const): (WebCore::BlobData::setCrossOriginEmbedderPolicy): * platform/network/BlobRegistry.h: * platform/network/BlobRegistryImpl.cpp: (WebCore::BlobRegistryImpl::registerBlobURL): (WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked): * platform/network/BlobRegistryImpl.h: * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::notifyResponseOnSuccess): Source/WebKit: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL): (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkDataTaskBlob.cpp: (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse): * NetworkProcess/NetworkProcessPlatformStrategies.cpp: (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry): * WebProcess/FileAPI/BlobRegistryProxy.cpp: (WebKit::BlobRegistryProxy::registerBlobURL): * WebProcess/FileAPI/BlobRegistryProxy.h: Source/WebKitLegacy/mac: * WebCoreSupport/WebPlatformStrategies.mm: Source/WebKitLegacy/win: * WebCoreSupport/WebPlatformStrategies.cpp: LayoutTests: Update test expectations to unskip tests that are now passing. * TestExpectations: Canonical link: https://commits.webkit.org/240518@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-14 02:28:19 +00:00
loader/PolicyContainer.h
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
loader/PrivateClickMeasurement.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
loader/ProgressTracker.h
loader/ProgressTrackerClient.h
loader/ResourceCryptographicDigest.h
loader/ResourceLoadInfo.h
loader/ResourceLoadNotifier.h
loader/ResourceLoadObserver.h
loader/ResourceLoadStatistics.h
Fix WPT test resource-timing/cross-origin-redirects.html https://bugs.webkit.org/show_bug.cgi?id=190523 <rdar://45227788> Reviewed by Brady Eidson. LayoutTests/imported/w3c: * web-platform-tests/navigation-timing/nav2_test_redirect_server-expected.txt: * web-platform-tests/navigation-timing/nav2_test_redirect_server.html: Sometimes, with our use of Performance::reduceTimeResolution, the event times are equal to each other. Allow this. * web-platform-tests/resource-timing/cross-origin-redirects-expected.txt: Added. * web-platform-tests/resource-timing/cross-origin-redirects.html: Added. * web-platform-tests/resource-timing/resources/entry-invariants.js: Added. (const.assert_all_equal_): (const.assert_ordered_): (const.assert_zeroed_): (const.assert_not_negative_): (const.assert_positive_): (const.attribute_test_internal): (async const): (const.attribute_test_with_validator): * web-platform-tests/resource-timing/resources/resource-loaders.js: Added. (const.load.font.path.return.document.fonts.ready.then): (const.load.stylesheet.async path): (const.load.iframe.async path): (const.load.script.async path): (const.load.xhr_sync.async path): Source/WebCore: Test: imported/w3c/web-platform-tests/resource-timing/cross-origin-redirects.html This test took more to fix than I thought it would. We used to collect our timing data from various sources into various structures, mostly based on Google's work from 2010 with a few things tacked on to it. The timing specifications have changed considerably in the last 11 years, and so should the shape of the structures we put the data into. We used to have a LoadTiming structure in various places that claimed to contain the redirect times, but markRedirectStart and markRedirectEnd were never called. Instead we tried to collect this data from the SubResourceLoader and DocumentLoader reporting redirects in the web process. This wasn't great. Redirect timing is best collected in the network process by the framework doing the redirecting, and now we have the NSURLSessionTaskMetrics API to get the data we need. I've made NetworkLoadMetrics the structure that contains all the network load metrics from the network process. DocumentEventTiming is owned in the web process by the Document, and it contains the load event timing data. ResourceLoadTiming is owned by the ResourceLoader, and it contains the fetch start and end times including the parts of the fetch algorithm that happen in the web process. DocumentLoadTiming inherits from it and is owned by the DocumentLoader, which reflects the fact that PerformanceNavigationTiming inherits from PerformanceResourceTiming in the specs. With these structures in place, we now have the infrastructure to collect timing data and expose it correctly. Another thing that has changed is that these structures consistently store the timing data in the MonotonicTime type, which is the number of seconds since the machine restarted. NetworkLoadMetrics used to confusingly store fetch start time and then other network times as deltas from it, and we would pretend that fetch start time was the same as the fetch start time in the web process and calculate everything from the deltas. This is an unfortunate consequence of my younger self not realizing that the double values from NSURLConnection._timingData are values to be put into [NSDate initWithTimeIntervalSinceReferenceDate] then pulled out with timeIntervalSince1970 to get WallTime. I was confused because they weren't WallTime or MonotonicTime, so I only dealt with them as deltas from each other. Consistently using MonotonicTime makes all this code much more straightforward. I also use std::numeric_limits<uint64_t>::max() instead of std::numeric_limits<uint32_t>::max() as a sentinel value for requestHeaderBytesSent and responseHeaderBytesReceived to make everything more sane. I'm not too worried about the metrics of downloads of exactly 4GB, but they should also be fixed. A consequence of collecting the redirect times in the network process is that we have to move the SecurityOrigin::canRequest checks to see if the redirects are same-origin to ResourceHandle and NetworkDataTask. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::setReadyState): (WebCore::Document::finishedParsing): (WebCore::Document::monotonicTimestamp const): * dom/Document.h: (WebCore::Document::eventTiming const): (WebCore::Document::timing const): Deleted. * dom/DocumentEventTiming.h: Copied from Source/WebCore/dom/DocumentTiming.h. * inspector/agents/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::buildObjectForTiming): (WebCore::InspectorNetworkAgent::buildObjectForMetrics): (WebCore::InspectorNetworkAgent::buildObjectForResourceResponse): (WebCore::InspectorNetworkAgent::didFinishLoading): * inspector/agents/InspectorNetworkAgent.h: * loader/DocumentLoadTiming.h: Renamed from Source/WebCore/loader/LoadTiming.h. (WebCore::DocumentLoadTiming::timeOrigin const): (WebCore::DocumentLoadTiming::markUnloadEventStart): (WebCore::DocumentLoadTiming::markUnloadEventEnd): (WebCore::DocumentLoadTiming::markLoadEventStart): (WebCore::DocumentLoadTiming::markLoadEventEnd): (WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument): (WebCore::DocumentLoadTiming::unloadEventStart const): (WebCore::DocumentLoadTiming::unloadEventEnd const): (WebCore::DocumentLoadTiming::loadEventStart const): (WebCore::DocumentLoadTiming::loadEventEnd const): (WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument const): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::willSendRequest): (WebCore::DocumentLoader::dataReceived): (WebCore::DocumentLoader::startLoadingMainResource): * loader/DocumentLoader.h: (WebCore::DocumentLoader::timing const): (WebCore::DocumentLoader::timing): (WebCore::DocumentLoader::resetTiming): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::loadRequest): * loader/FrameLoader.cpp: (WebCore::FrameLoader::dispatchUnloadEvents): * loader/LoadTiming.cpp: Removed. * loader/ResourceLoadTiming.h: Renamed from Source/WebCore/dom/DocumentTiming.h. (WebCore::ResourceLoadTiming::markStartTime): (WebCore::ResourceLoadTiming::markEndTime): (WebCore::ResourceLoadTiming::startTime const): (WebCore::ResourceLoadTiming::endTime const): (WebCore::ResourceLoadTiming::isolatedCopy const): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::init): * loader/ResourceLoader.h: (WebCore::ResourceLoader::loadTiming): * loader/ResourceTiming.cpp: (WebCore::ResourceTiming::fromMemoryCache): (WebCore::ResourceTiming::fromLoad): (WebCore::ResourceTiming::fromSynchronousLoad): (WebCore::ResourceTiming::ResourceTiming): (WebCore::ResourceTiming::isolatedCopy const): (WebCore::ResourceTiming::fromCache): Deleted. * loader/ResourceTiming.h: (WebCore::ResourceTiming::resourceLoadTiming const): (WebCore::ResourceTiming::ResourceTiming): (WebCore::ResourceTiming::loadTiming const): Deleted. * loader/ResourceTimingInformation.cpp: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequestInternal): (WebCore::SubresourceLoader::didFinishLoading): * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource): * page/DOMWindow.cpp: (WebCore::DOMWindow::performance const): * page/Performance.cpp: (WebCore::Performance::addNavigationTiming): * page/Performance.h: * page/PerformanceNavigation.cpp: (WebCore::PerformanceNavigation::redirectCount const): * page/PerformanceNavigationTiming.cpp: (WebCore::PerformanceNavigationTiming::PerformanceNavigationTiming): (WebCore::PerformanceNavigationTiming::millisecondsSinceOrigin const): (WebCore::PerformanceNavigationTiming::sameOriginCheckFails const): (WebCore::PerformanceNavigationTiming::unloadEventStart const): (WebCore::PerformanceNavigationTiming::unloadEventEnd const): (WebCore::PerformanceNavigationTiming::domInteractive const): (WebCore::PerformanceNavigationTiming::domContentLoadedEventStart const): (WebCore::PerformanceNavigationTiming::domContentLoadedEventEnd const): (WebCore::PerformanceNavigationTiming::domComplete const): (WebCore::PerformanceNavigationTiming::loadEventStart const): (WebCore::PerformanceNavigationTiming::loadEventEnd const): (WebCore::PerformanceNavigationTiming::redirectCount const): * page/PerformanceNavigationTiming.h: * page/PerformanceResourceTiming.cpp: (WebCore::networkLoadTimeToDOMHighResTimeStamp): (WebCore::fetchStart): (WebCore::entryStartTime): (WebCore::entryEndTime): (WebCore::PerformanceResourceTiming::redirectStart const): (WebCore::PerformanceResourceTiming::redirectEnd const): (WebCore::PerformanceResourceTiming::fetchStart const): (WebCore::PerformanceResourceTiming::domainLookupStart const): (WebCore::PerformanceResourceTiming::domainLookupEnd const): (WebCore::PerformanceResourceTiming::connectStart const): (WebCore::PerformanceResourceTiming::connectEnd const): (WebCore::PerformanceResourceTiming::secureConnectionStart const): (WebCore::PerformanceResourceTiming::requestStart const): (WebCore::PerformanceResourceTiming::responseStart const): (WebCore::PerformanceResourceTiming::responseEnd const): (WebCore::monotonicTimeToDOMHighResTimeStamp): Deleted. (WebCore::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp const): Deleted. * page/PerformanceResourceTiming.h: * page/PerformanceTiming.cpp: (WebCore::PerformanceTiming::navigationStart const): (WebCore::PerformanceTiming::unloadEventStart const): (WebCore::PerformanceTiming::unloadEventEnd const): (WebCore::PerformanceTiming::redirectStart const): (WebCore::PerformanceTiming::redirectEnd const): (WebCore::PerformanceTiming::fetchStart const): (WebCore::PerformanceTiming::domainLookupStart const): (WebCore::PerformanceTiming::domainLookupEnd const): (WebCore::PerformanceTiming::connectStart const): (WebCore::PerformanceTiming::connectEnd const): (WebCore::PerformanceTiming::secureConnectionStart const): (WebCore::PerformanceTiming::requestStart const): (WebCore::PerformanceTiming::responseStart const): (WebCore::PerformanceTiming::responseEnd const): (WebCore::PerformanceTiming::domLoading const): (WebCore::PerformanceTiming::domInteractive const): (WebCore::PerformanceTiming::domContentLoadedEventStart const): (WebCore::PerformanceTiming::domContentLoadedEventEnd const): (WebCore::PerformanceTiming::domComplete const): (WebCore::PerformanceTiming::loadEventStart const): (WebCore::PerformanceTiming::loadEventEnd const): (WebCore::PerformanceTiming::documentLoader const): (WebCore::PerformanceTiming::documentEventTiming const): (WebCore::PerformanceTiming::documentLoadTiming const): (WebCore::PerformanceTiming::networkLoadMetrics const): (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds const): (WebCore::PerformanceTiming::documentTiming const): Deleted. (WebCore::PerformanceTiming::loadTiming const): Deleted. (WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart const): Deleted. * page/PerformanceTiming.h: * platform/network/NetworkLoadMetrics.h: (WebCore::NetworkLoadMetrics::isolatedCopy const): (WebCore::NetworkLoadMetrics::operator== const): (WebCore::NetworkLoadMetrics::encode const): (WebCore::NetworkLoadMetrics::decode): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::hasCrossOriginRedirect const): (WebCore::ResourceHandle::setHasCrossOriginRedirect): (WebCore::ResourceHandle::incrementRedirectCount): (WebCore::ResourceHandle::redirectCount const): (WebCore::ResourceHandle::startTimeBeforeRedirects const): (WebCore::ResourceHandle::networkLoadMetrics): (WebCore::ResourceHandle::setNetworkLoadMetrics): * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: * platform/network/cocoa/NetworkLoadMetrics.mm: (WebCore::dateToMonotonicTime): (WebCore::packageTimingData): (WebCore::copyTimingData): * platform/network/cocoa/WebCoreNSURLSession.mm: (networkLoadMetricsDate): (-[WebCoreNSURLSessionTaskTransactionMetrics fetchStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupEndDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics connectStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics secureConnectionStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics connectEndDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics requestStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics responseStartDate]): (-[WebCoreNSURLSessionTaskTransactionMetrics responseEndDate]): * platform/network/curl/CurlContext.cpp: (WebCore::CurlHandle::getNetworkLoadMetrics): * platform/network/curl/CurlContext.h: * platform/network/curl/CurlRequest.cpp: (WebCore::CurlRequest::didCompleteTransfer): (WebCore::CurlRequest::networkLoadMetrics): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]): Source/WebKit: * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]): (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): * NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup): (WebKit::NetworkDataTaskSoup::clearRequest): (WebKit::NetworkDataTaskSoup::resume): (WebKit::NetworkDataTaskSoup::didSendRequest): (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError): (WebKit::NetworkDataTaskSoup::continueHTTPRedirection): (WebKit::NetworkDataTaskSoup::networkEvent): (WebKit::NetworkDataTaskSoup::didStartRequest): (WebKit::NetworkDataTaskSoup::didRestart): LayoutTests: * http/tests/misc/webtiming-slow-load-expected.txt: * http/tests/misc/webtiming-slow-load.py: Our new metrics gathering now matches Firefox instead of Chrome in PerformanceResourceTiming::responseEnd in this edge case of a deprecated API. Update expectations accordingly. * platform/mac-wk1/TestExpectations: Bringing this test to passing in WK2 makes it flaky in WK1 because we don't get good redirect timing data from CFNetwork through NSURLConnection. * platform/win/http/tests/misc/webtiming-one-redirect-expected.txt: Added. * platform/win/http/tests/misc/webtiming-slow-load-expected.txt: Copied from LayoutTests/http/tests/misc/webtiming-slow-load-expected.txt. * platform/win/http/tests/misc/webtiming-two-redirects-expected.txt: Added. The network layer is now responsible for counting redirects and providing redirect timings. Our friend CFURLConnection doesn't have that ability, so it doesn't pass these tests any more. It never supported any timing APIs and other tests are skipped. Canonical link: https://commits.webkit.org/238416@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-03 01:25:53 +00:00
loader/ResourceLoadTiming.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
loader/ResourceLoader.h
loader/ResourceLoaderOptions.h
loader/ResourceLoaderTypes.h
loader/ResourceTimingInformation.h
loader/ShouldTreatAsContinuingLoad.h
loader/SubframeLoader.h
loader/SubresourceLoader.h
loader/SubstituteData.h
loader/SubstituteResource.h
loader/TextResourceDecoder.h
loader/ThreadableLoader.h
loader/ThreadableLoaderClient.h
loader/appcache/ApplicationCache.h
loader/appcache/ApplicationCacheHost.h
loader/appcache/ApplicationCacheStorage.h
loader/archive/Archive.h
loader/archive/ArchiveResource.h
loader/archive/mhtml/MHTMLArchive.h
Refactor font loading to make it possible for Worker to implement it https://bugs.webkit.org/show_bug.cgi?id=224277 Reviewed by Darin Adler. Introduce FontLoadRequest and FontLoadRequestClient as an abstraction separate from CachedFont and CachedFontClient to allow for separate implementations. Also move Document-specific font-loading behaviour from CSSFontSelector into Document and add non-Document specific accessors to ScriptExecutionContext. These changes should allow for custom font loading to be implementable on a Worker, which will be necessary for FontFace support in OffscreenCanvas. No new tests, no change in behavior. * Headers.cmake: Added FontLoadRequest.h, CachedFontLoadRequest.h and DocumentFontLoader.h. * Sources.txt: Added DocumentFontLoader.cpp. * WebCore.xcodeproj/project.pbxproj: Added files listed above. * css/CSSFontFace.cpp: Update to not require Document for custom font loading. (WebCore::CSSFontFace::appendSources): * css/CSSFontFaceSource.cpp: Update to use FontLoadRequest instead of CachedFont. (WebCore::CSSFontFaceSource::CSSFontFaceSource): (WebCore::CSSFontFaceSource::~CSSFontFaceSource): (WebCore::CSSFontFaceSource::opportunisticallyStartFontDataURLLoading): (WebCore::CSSFontFaceSource::fontLoaded): (WebCore::CSSFontFaceSource::load): (WebCore::CSSFontFaceSource::font): (WebCore::CSSFontFaceSource::isSVGFontFaceSource const): * css/CSSFontFaceSource.h: * css/CSSFontFaceSrcValue.cpp: Update to use FontLoadRequest and ScriptExecutionContext instead of CachedResourceLoader. (WebCore::CSSFontFaceSrcValue::fontLoadRequest): * css/CSSFontFaceSrcValue.h: * css/CSSFontSelector.cpp: Remove Document-specific code. (WebCore::CSSFontSelector::CSSFontSelector): (WebCore::CSSFontSelector::~CSSFontSelector): (WebCore::CSSFontSelector::clearFonts): * css/CSSFontSelector.h: * dom/Document.cpp: Implement ScriptExecutionContext::fontLoadRequest and ::beginLoadingFontSoon. (WebCore::Document::~Document): (WebCore::Document::removedLastRef): (WebCore::Document::resolveStyle): (WebCore::Document::suspendFontLoading): (WebCore::Document::fontLoadRequest): (WebCore::Document::beginLoadingFontSoon): (WebCore::Document::suspend): (WebCore::Document::resume): * dom/Document.h: * dom/DocumentFontLoader.cpp: Added. New class to handle Document-specific font-loading code that was previously in CSSFontSelector and CSSFontFaceSrcValue. (WebCore::DocumentFontLoader::DocumentFontLoader): (WebCore::DocumentFontLoader::~DocumentFontLoader): (WebCore::DocumentFontLoader::cachedFont): (WebCore::DocumentFontLoader::beginLoadingFontSoon): (WebCore::DocumentFontLoader::loadPendingFonts): (WebCore::DocumentFontLoader::fontLoadingTimerFired): (WebCore::DocumentFontLoader::stopLoadingAndClearFonts): (WebCore::DocumentFontLoader::suspendFontLoading): (WebCore::DocumentFontLoader::resumeFontLoading): * dom/DocumentFontLoader.h: * dom/ScriptExecutionContext.cpp: Add functions to initiate font load requests. (WebCore::ScriptExecutionContext::fontLoadRequest): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::beginLoadingFontSoon): * loader/DocumentLoader.cpp: CSSFontSelector::suspendFontLoadingTimer is now Document::suspendFontLoading. (WebCore::DocumentLoader::stopLoading): * loader/FontLoadRequest.h: Added. An interface to manage font loading that abstracts some of the behaviour of CachedResource, CachedFont and CachedFontClient. (WebCore::FontLoadRequestClient::fontLoaded): (WebCore::FontLoadRequestClient::isCachedFontLoadRequest const): * loader/cache/CachedFontLoadRequest.h: Added. An implementation of FontLoadRequest for CachedFont. * workers/WorkerGlobalScope.cpp: Remove now-redundant CSSFontSelector call. (WebCore::WorkerGlobalScope::~WorkerGlobalScope): Canonical link: https://commits.webkit.org/236387@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-12 09:26:42 +00:00
loader/cache/CachedFontLoadRequest.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
loader/cache/CachePolicy.h
loader/cache/CachedImage.h
loader/cache/CachedImageClient.h
loader/cache/CachedRawResourceClient.h
loader/cache/CachedResource.h
loader/cache/CachedResourceClient.h
loader/cache/CachedResourceHandle.h
loader/cache/CachedResourceLoader.h
loader/cache/CachedResourceRequest.h
loader/cache/CachedStyleSheetClient.h
loader/cache/KeepaliveRequestTracker.h
loader/cache/MemoryCache.h
page/AbstractDOMWindow.h
page/AbstractFrame.h
page/ActivityState.h
page/ActivityStateChangeObserver.h
page/AdjustViewSizeOrNot.h
page/AlternativeTextClient.h
page/AutoplayEvent.h
page/Base64Utilities.h
page/CacheStorageProvider.h
page/CaptionUserPreferences.h
page/Chrome.h
page/ChromeClient.h
page/ClientOrigin.h
page/ContextMenuClient.h
page/ContextMenuContext.h
page/ContextMenuController.h
page/ContextMenuProvider.h
Resource Load Statistics: Downgrade document.referrer to the referrer's eTLD+1 if the page was navigated to with a prevalent resource referrer containing link decoration https://bugs.webkit.org/show_bug.cgi?id=198227 <rdar://problem/51117258> Reviewed by Alex Christensen. Source/WebCore: Test: http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource.html * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::referrer const): Now checks if the referrer has been overridden. (WebCore::Document::wasLoadedWithDataTransferFromPrevalentResource): (WebCore::Document::downgradeReferrerToRegistrableDomain): * dom/Document.h: * page/CrossSiteNavigationDataTransfer.h: Added. New option set for the growing number of navigational data transfers we care about. * platform/network/NetworkStorageSession.cpp: (WebCore::NetworkStorageSession::didCommitCrossSiteLoadWithDataTransferFromPrevalentResource): (WebCore::NetworkStorageSession::committedCrossSiteLoadWithLinkDecoration): Deleted. New name since we no longer only look for link decoration but also other means of navigational data transfer. * platform/network/NetworkStorageSession.h: Source/WebKit: This patch adds a call back to the UI process if the network process finds the navigational data transfer was done by a prevalent resource and we need to adjust something for the page. Currently, that adjustment is to downgrade document.referrer. The patch also removes an unused completion handler. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::didCommitCrossSiteLoadWithDataTransfer): (WebKit::NetworkProcess::committedCrossSiteLoadWithLinkDecoration): Deleted. New name since we no longer only look for link decoration but also other means of navigational data transfer. * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didCommitCrossSiteLoadWithDataTransfer): (WebKit::NetworkProcessProxy::didCommitCrossSiteLoadWithDataTransferFromPrevalentResource): (WebKit::NetworkProcessProxy::committedCrossSiteLoadWithLinkDecoration): Deleted. New name since we no longer only look for link decoration but also other means of navigational data transfer. * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/NetworkProcessProxy.messages.in: * UIProcess/WebPageProxy.cpp: (WebKit::checkIfNavigationContainsDataTransfer): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::didCommitCrossSiteLoadWithDataTransferFromPrevalentResource): (WebKit::isNonUniqueNavigationWithLinkDecoration): Deleted. New name since we no longer only look for link decoration but also other means of navigational data transfer. * UIProcess/WebPageProxy.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::didCommitCrossSiteLoadWithDataTransfer): (WebKit::WebProcessPool::committedCrossSiteLoadWithLinkDecoration): Deleted. New name since we no longer only look for link decoration but also other means of navigational data transfer. * UIProcess/WebProcessPool.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::wasLoadedWithDataTransferFromPrevalentResource): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: LayoutTests: * http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-expected.txt: Added. * http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource.html: Added. Canonical link: https://commits.webkit.org/212304@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-26 22:39:09 +00:00
page/CrossSiteNavigationDataTransfer.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/DOMSelection.h
page/DOMTimer.h
page/DOMWindow.h
page/DOMWindowExtension.h
page/DOMWindowProperty.h
page/DatabaseProvider.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
page/DebugOverlayRegions.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/DebugPageOverlays.h
page/DeprecatedGlobalSettings.h
page/DeviceClient.h
page/DiagnosticLoggingClient.h
Allow logging minimal info about uploading media files in the system diagnose https://bugs.webkit.org/show_bug.cgi?id=223706 Reviewed by Alex Christensen. Source/WebCore: Give the WebKit client the ability to log info about the media files which were submitted to a web server through an HTMLFormElement. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): * loader/EmptyClients.cpp: * page/DiagnosticLoggingClient.h: * page/DiagnosticLoggingDomain.h: Copied from Source/WebKit/UIProcess/API/APIDiagnosticLoggingClient.h. Source/WebKit: Add the new method logDiagnosticMessageWithDomain to the modern ObjC API WKDiagnosticLoggingDelegate and make it accessible from DiagnosticLoggingClient. * Scripts/webkit/messages.py: (types_that_cannot_be_forward_declared): * UIProcess/API/APIDiagnosticLoggingClient.h: (API::DiagnosticLoggingClient::logDiagnosticMessageWithDomain): * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h: * UIProcess/Cocoa/DiagnosticLoggingClient.h: * UIProcess/Cocoa/DiagnosticLoggingClient.mm: (WebKit::DiagnosticLoggingClient::setDelegate): (WebKit::toWKDiagnosticLoggingDomain): (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithDomain): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::logDiagnosticMessageWithDomain): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp: (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithDomain): * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h: Canonical link: https://commits.webkit.org/235811@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-26 17:08:07 +00:00
page/DiagnosticLoggingDomain.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/DiagnosticLoggingKeys.h
page/DiagnosticLoggingResultType.h
page/DisabledAdaptations.h
page/DragActions.h
page/DragClient.h
page/DragController.h
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
page/DummySpeechRecognitionProvider.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/EditorClient.h
page/EventHandler.h
page/FocusController.h
page/FocusDirection.h
page/Frame.h
page/FrameDestructionObserver.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
page/FrameFlattening.h
Use ObjectIdentifier<FrameIdentifierType> for frameIDs https://bugs.webkit.org/show_bug.cgi?id=199986 Reviewed by Ryosuke Niwa. Use the strongly-typed FrameIdentifier instead of uint64_t as frame identifiers everywhere. Source/WebCore: * WebCore.xcodeproj/project.pbxproj: * loader/CookieJar.cpp: (WebCore::CookieJar::cookies const): (WebCore::CookieJar::setCookies): (WebCore::CookieJar::cookieRequestHeaderFieldValue const): (WebCore::CookieJar::getRawCookies const): * loader/CookieJar.h: * loader/EmptyFrameLoaderClient.h: * loader/FrameLoaderClient.h: * loader/NavigationAction.cpp: * loader/NavigationAction.h: (WebCore::NavigationAction::Requester::frameID const): * page/ChromeClient.h: * page/GlobalFrameIdentifier.h: (WebCore::GlobalFrameIdentifier::decode): * platform/network/CookieRequestHeaderFieldProxy.h: * platform/network/NetworkStorageSession.cpp: (WebCore::NetworkStorageSession::shouldBlockCookies const): (WebCore::NetworkStorageSession::hasStorageAccess const): (WebCore::NetworkStorageSession::grantStorageAccess): (WebCore::NetworkStorageSession::removeStorageAccessForFrame): * platform/network/NetworkStorageSession.h: * platform/network/cocoa/NetworkStorageSessionCocoa.mm: (WebCore::cookiesForURL): (WebCore::cookiesForSession): (WebCore::NetworkStorageSession::cookiesForDOM const): (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): (WebCore::NetworkStorageSession::setCookiesFromDOM const): (WebCore::NetworkStorageSession::getRawCookies const): Source/WebKit: * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: (WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess): (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess): (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess): (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal): * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: (WebKit::ResourceLoadStatisticsMemoryStore::hasStorageAccess): (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess): (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccess): (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal): * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess): (WebKit::WebResourceLoadStatisticsStore::hasStorageAccessForFrame): (WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler): (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess): (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): (WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler): * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: * NetworkProcess/NetworkCORSPreflightChecker.h: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue): (WebKit::NetworkConnectionToWebProcess::getRawCookies): (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame): (WebKit::NetworkConnectionToWebProcess::hasStorageAccess): (WebKit::NetworkConnectionToWebProcess::requestStorageAccess): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkLoadChecker.cpp: (WebKit::NetworkLoadChecker::NetworkLoadChecker): * NetworkProcess/NetworkLoadChecker.h: * NetworkProcess/NetworkLoadParameters.h: * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::start): (WebKit::NetworkResourceLoader::retrieveCacheEntry): (WebKit::NetworkResourceLoader::startNetworkLoad): (WebKit::NetworkResourceLoader::convertToDownload): (WebKit::NetworkResourceLoader::abort): (WebKit::NetworkResourceLoader::didReceiveResponse): (WebKit::NetworkResourceLoader::didReceiveBuffer): (WebKit::NetworkResourceLoader::didFinishLoading): (WebKit::NetworkResourceLoader::didFailLoading): (WebKit::NetworkResourceLoader::continueWillSendRequest): (WebKit::escapeIDForJSON): (WebKit::logBlockedCookieInformation): (WebKit::logCookieInformationInternal): (WebKit::NetworkResourceLoader::logCookieInformation): * NetworkProcess/NetworkResourceLoader.h: * NetworkProcess/cache/NetworkCache.h: * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection): * Scripts/webkit/messages.py: * Shared/API/APIFrameHandle.cpp: (API::FrameHandle::create): (API::FrameHandle::createAutoconverting): (API::FrameHandle::FrameHandle): (API::FrameHandle::decode): * Shared/API/APIFrameHandle.h: (API::FrameHandle::frameID const): * Shared/API/Cocoa/_WKFrameHandle.mm: (-[_WKFrameHandle hash]): (-[_WKFrameHandle _frameID]): (-[_WKFrameHandle initWithCoder:]): (-[_WKFrameHandle encodeWithCoder:]): * Shared/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge): * Shared/Authentication/AuthenticationManager.h: * Shared/FrameInfoData.h: * UIProcess/API/C/WKFrameHandleRef.cpp: (WKFrameHandleGetFrameID): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _printOperationWithPrintInfo:forFrame:]): (-[WKWebView _canChangeFrameLayout:]): * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector showMainResourceForFrame:]): * UIProcess/Automation/SimulatedInputDispatcher.cpp: (WebKit::SimulatedInputDispatcher::run): * UIProcess/Automation/SimulatedInputDispatcher.h: * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::webFrameIDForHandle): (WebKit::WebAutomationSession::handleForWebFrameID): (WebKit::WebAutomationSession::switchToBrowsingContext): (WebKit::WebAutomationSession::waitForNavigationToComplete): (WebKit::findPageForFrameID): (WebKit::WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout): (WebKit::WebAutomationSession::evaluateJavaScriptFunction): (WebKit::WebAutomationSession::resolveChildFrameHandle): (WebKit::WebAutomationSession::resolveParentFrameHandle): (WebKit::WebAutomationSession::computeElementLayout): (WebKit::WebAutomationSession::selectOptionElement): (WebKit::WebAutomationSession::getAllCookies): (WebKit::WebAutomationSession::deleteSingleCookie): (WebKit::WebAutomationSession::viewportInViewCenterPointOfElement): (WebKit::WebAutomationSession::takeScreenshot): * UIProcess/Automation/WebAutomationSession.h: * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin): * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm: (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrameShared): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge): (WebKit::NetworkProcessProxy::requestStorageAccessConfirm): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/NetworkProcessProxy.messages.in: * UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::validateInput): (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::didPerformServerRedirect): (WebKit::ProvisionalPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionSync): (WebKit::ProvisionalPageProxy::contentFilterDidBlockLoadForFrame): * UIProcess/ProvisionalPageProxy.h: * UIProcess/ServiceWorkerProcessProxy.cpp: (WebKit::ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge): * UIProcess/ServiceWorkerProcessProxy.h: * UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::SuspendedPageProxy): * UIProcess/SuspendedPageProxy.h: * UIProcess/UserMediaPermissionCheckProxy.cpp: (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): * UIProcess/UserMediaPermissionCheckProxy.h: (WebKit::UserMediaPermissionCheckProxy::create): (WebKit::UserMediaPermissionCheckProxy::frameID const): * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: (WebKit::UserMediaPermissionRequestManagerProxy::resetAccess): (WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest const): (WebKit::UserMediaPermissionRequestManagerProxy::wasRequestDenied): (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): (WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess): (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): * UIProcess/UserMediaPermissionRequestManagerProxy.h: * UIProcess/UserMediaPermissionRequestProxy.cpp: (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): * UIProcess/UserMediaPermissionRequestProxy.h: (WebKit::UserMediaPermissionRequestProxy::create): (WebKit::UserMediaPermissionRequestProxy::mainFrameID const): (WebKit::UserMediaPermissionRequestProxy::frameID const): * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::WebFrameProxy): * UIProcess/WebFrameProxy.h: (WebKit::WebFrameProxy::create): (WebKit::WebFrameProxy::frameID const): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::suspendCurrentPageIfPossible): (WebKit::WebPageProxy::commitProvisionalPage): (WebKit::WebPageProxy::runJavaScriptInFrame): (WebKit::WebPageProxy::didCreateMainFrame): (WebKit::WebPageProxy::didCreateSubframe): (WebKit::WebPageProxy::didCreateWindow): (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didExplicitOpenForFrame): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared): (WebKit::WebPageProxy::willPerformClientRedirectForFrame): (WebKit::WebPageProxy::didCancelClientRedirectForFrame): (WebKit::WebPageProxy::didChangeProvisionalURLForFrame): (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared): (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): (WebKit::WebPageProxy::didFinishLoadForFrame): (WebKit::WebPageProxy::didFailLoadForFrame): (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): (WebKit::WebPageProxy::didChangeMainDocument): (WebKit::WebPageProxy::didReceiveTitleForFrame): (WebKit::WebPageProxy::didFirstLayoutForFrame): (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame): (WebKit::WebPageProxy::didDisplayInsecureContentForFrame): (WebKit::WebPageProxy::didRunInsecureContentForFrame): (WebKit::WebPageProxy::didDetectXSSForFrame): (WebKit::WebPageProxy::frameDidBecomeFrameSet): (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync): (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared): (WebKit::WebPageProxy::decidePolicyForNavigationActionSync): (WebKit::WebPageProxy::decidePolicyForNavigationActionSyncShared): (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::didPerformServerRedirectShared): (WebKit::WebPageProxy::didUpdateHistoryTitle): (WebKit::WebPageProxy::runJavaScriptAlert): (WebKit::WebPageProxy::runJavaScriptConfirm): (WebKit::WebPageProxy::runJavaScriptPrompt): (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): (WebKit::WebPageProxy::runOpenPanel): (WebKit::WebPageProxy::printFrame): (WebKit::WebPageProxy::focusedFrameChanged): (WebKit::WebPageProxy::frameSetLargestFrameChanged): (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy): (WebKit::WebPageProxy::exceededDatabaseQuota): (WebKit::WebPageProxy::requestStorageSpace): (WebKit::WebPageProxy::makeStorageSpaceRequest): (WebKit::WebPageProxy::requestGeolocationPermissionForFrame): (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): (WebKit::WebPageProxy::enumerateMediaDevicesForFrame): (WebKit::WebPageProxy::shouldAllowDeviceOrientationAndMotionAccess): (WebKit::WebPageProxy::requestStorageAccessConfirm): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::webFrame const): (WebKit::WebProcessProxy::canCreateFrame const): (WebKit::WebProcessProxy::frameCreated): (WebKit::WebProcessProxy::didDestroyFrame): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * UIProcess/ios/WKContentView.mm: (-[WKContentView _wk_pageCountForPrintFormatter:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF): * WebProcess/Automation/WebAutomationSessionProxy.cpp: (WebKit::evaluateJavaScriptCallback): (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame): (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): (WebKit::WebAutomationSessionProxy::didEvaluateJavaScriptFunction): (WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal): (WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle): (WebKit::WebAutomationSessionProxy::resolveChildFrameWithName): (WebKit::WebAutomationSessionProxy::resolveParentFrame): (WebKit::WebAutomationSessionProxy::focusFrame): (WebKit::WebAutomationSessionProxy::computeElementLayout): (WebKit::WebAutomationSessionProxy::selectOptionElement): (WebKit::WebAutomationSessionProxy::takeScreenshot): (WebKit::WebAutomationSessionProxy::getCookiesForFrame): (WebKit::WebAutomationSessionProxy::deleteCookie): * WebProcess/Automation/WebAutomationSessionProxy.h: * WebProcess/Automation/WebAutomationSessionProxy.messages.in: * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm: (+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]): * WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::WebLoaderStrategy::scheduleLoad): (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess): (WebKit::WebLoaderStrategy::loadResourceSynchronously): * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::willSendRequest): (WebKit::WebResourceLoader::didReceiveResponse): (WebKit::WebResourceLoader::didReceiveData): (WebKit::WebResourceLoader::didFinishResourceLoad): (WebKit::WebResourceLoader::didFailResourceLoad): (WebKit::WebResourceLoader::didBlockAuthenticationChallenge): (WebKit::WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied): (WebKit::WebResourceLoader::didReceiveResource): * WebProcess/Network/WebResourceLoader.h: * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::installServiceWorker): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::focusedFrameChanged): (WebKit::WebChromeClient::contentsSizeChanged const): (WebKit::WebChromeClient::hasStorageAccess): (WebKit::WebChromeClient::requestStorageAccess): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::frameID const): (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad): (WebKit::WebFrameLoaderClient::dispatchDidFailLoad): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebPage/WebCookieJar.cpp: (WebKit::WebCookieJar::cookies const): (WebKit::WebCookieJar::setCookies): (WebKit::WebCookieJar::cookieRequestHeaderFieldValue const): (WebKit::WebCookieJar::getRawCookies const): * WebProcess/WebPage/WebCookieJar.h: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::WebFrame): (WebKit::generateFrameID): Deleted. * WebProcess/WebPage/WebFrame.h: (WebKit::WebFrame::frameID const): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::showMainResourceForFrame): * WebProcess/WebPage/WebInspector.h: * WebProcess/WebPage/WebInspector.messages.in: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::loadURLInFrame): (WebKit::WebPage::loadDataInFrame): (WebKit::WebPage::stopLoadingFrame): (WebKit::WebPage::didReceivePolicyDecision): (WebKit::WebPage::continueWillSubmitForm): (WebKit::WebPage::runJavaScriptInFrame): (WebKit::WebPage::getSourceForFrame): (WebKit::WebPage::getMainResourceDataOfFrame): (WebKit::WebPage::getResourceDataFromFrame): (WebKit::WebPage::getWebArchiveOfFrame): (WebKit::WebPage::addConsoleMessage): (WebKit::WebPage::sendCSPViolationReport): (WebKit::WebPage::enqueueSecurityPolicyViolationEvent): (WebKit::WebPage::beginPrinting): (WebKit::WebPage::computePagesForPrinting): (WebKit::WebPage::computePagesForPrintingImpl): (WebKit::WebPage::drawRectToImage): (WebKit::WebPage::drawPagesToPDF): (WebKit::WebPage::drawPagesToPDFImpl): (WebKit::WebPage::drawPagesForPrinting): (WebKit::WebPage::frameBecameRemote): (WebKit::WebPage::hasStorageAccess): (WebKit::WebPage::requestStorageAccess): (WebKit::WebPage::shouldAllowDeviceOrientationAndMotionAccess): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::computePagesForPrintingPDFDocument): (WebKit::WebPage::computePagesForPrintingAndDrawToPDF): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::computePagesForPrintingPDFDocument): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::webFrame const): (WebKit::WebProcess::addWebFrame): (WebKit::WebProcess::removeWebFrame): * WebProcess/WebProcess.h: Source/WebKitLegacy/mac: * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::frameID const): Canonical link: https://commits.webkit.org/214497@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-15 15:35:35 +00:00
page/FrameIdentifier.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/FrameSnapshotting.h
page/FrameTree.h
page/FrameView.h
page/FrameViewLayoutContext.h
page/GlobalFrameIdentifier.h
page/GlobalWindowIdentifier.h
Refactor MacOS keyboard scrolling and use KeyboardScroll struct https://bugs.webkit.org/show_bug.cgi?id=226986 Patch by Dana Estra <destra@apple.com> on 2021-06-28 Reviewed by Tim Horton. Source/WebCore: No tests yet. * page/EventHandler.cpp: (WebCore::EventHandler::defaultSpaceEventHandler): Added usage of switch EventDrivenSmoothKeyboardScrolling that when enabled sends KeyboardEvent to HandleKeyboardScrolling. (WebCore::EventHandler::scrollDistance): (WebCore::EventHandler::handleKeyboardScrolling): Makes KeyboardScroll and calls scrollRecursively. (WebCore::EventHandler::defaultArrowEventHandler): Added usage of switch EventDrivenSmoothKeyboardScrolling that when enabled sends KeyboardEvent to HandleKeyboardScrolling. * page/EventHandler.h: * page/KeyboardScroll.cpp: Added. * page/KeyboardScroll.h: Added. Source/WebKit: In addition to notes underneath, changed usage of WebKit::KeyboardScroll, WebKit::ScrollingIncrement, and WebKit::ScrollingDirection to WebCore::KeyboardScroll, WebCore::ScrollGranularity, and WebCore::ScrollDirection, respectively. * UIProcess/ios/WKKeyboardScrollingAnimator.h: * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator parameters]): Deleted. Now lives in WebCore/KeyboardScroll.h. (unitVector): Deleted. Now lives in WebCore/KeyboardScroll.h. (perpendicularAbsoluteUnitVector): (boxSide): (-[WKKeyboardScrollingAnimator keyboardScrollForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (farthestPointInDirection): (-[WKKeyboardScrollViewAnimator distanceForIncrement:inDirection:]): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::handleEditingKeyboardEvent): (WebKit::WebPage::performNonEditingBehaviorForSelector): Added switch that removes selectors that are now handled by EventHandler when EventHandlerDrivenSmoothKeyboardScrolling is enabled. Canonical link: https://commits.webkit.org/239223@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-29 00:39:15 +00:00
page/KeyboardScroll.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/LayoutMilestone.h
page/MediaCanStartListener.h
[iOS] Add support for the language/subtitle tracks button using `UIMenu` https://bugs.webkit.org/show_bug.cgi?id=221594 <rdar://problem/74129129> Reviewed by Eric Carlson and Wenson Hsieh. Source/WebCore: Tests: media/modern-media-controls/tracks-support/ios/tracks-support-auto-text-track.html media/modern-media-controls/tracks-support/ios/tracks-support-click-track-in-contextmenu.html media/modern-media-controls/tracks-support/ios/tracks-support-hidden-tracks.html media/modern-media-controls/tracks-support/ios/tracks-support-off-text-track.html media/modern-media-controls/tracks-support/ios/tracks-support-show-contextmenu-then-double-click-on-tracks-button.html media/modern-media-controls/tracks-support/ios/tracks-support-text-track-selected-via-media-api.html media/modern-media-controls/tracks-support/mac/tracks-support-auto-text-track.html media/modern-media-controls/tracks-support/mac/tracks-support-click-track-in-panel.html media/modern-media-controls/tracks-support/mac/tracks-support-hidden-tracks.html media/modern-media-controls/tracks-support/mac/tracks-support-off-text-track.html media/modern-media-controls/tracks-support/mac/tracks-support-show-and-populate-panel.html media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-after-dragging-controls.html media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-fullscreen.html media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-then-double-click-on-tracks-button.html media/modern-media-controls/tracks-support/mac/tracks-support-text-track-selected-via-media-api.html * page/MediaControlsContextMenuItem.h: Added. (WebCore::MediaControlsContextMenuItem::encode const): (WebCore::MediaControlsContextMenuItem::decode): Simple POD object for sending data from the WebProcess to the UIProcess for the `UIMenu`. * Modules/modern-media-controls/media/tracks-support.js: (TracksSupport.prototype.buttonWasPressed): (TracksSupport.prototype.syncControl): * Modules/mediacontrols/MediaControlsHost.idl: * Modules/mediacontrols/MediaControlsHost.h: * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::showMediaControlsContextMenu): Added. * page/ChromeClient.h: (WebCore::ChromeClient::showMediaControlsContextMenu): Provide a host hook for generating and sending the `UIMenu` data. When a `UIAction` is selected or the menu is dismissed, the relevant `MediaControlsContextMenuItem::ID` is sent back as the response to the async message and is used to perform the action related to the type of the object (e.g. `AudioTrack`, `TextTrack`, etc.) that was previously associated with that `MediaControlsContextMenuItem::ID`. * en.lproj/Localizable.strings: * platform/LocalizedStrings.h: * platform/LocalizedStrings.cpp: (WebCore::textTrackSubtitlesText): Deleted. Add localizable strings for "Languages" and "Subtitles" headers/submenus. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Source/WebKit: * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::showMediaControlsContextMenu): Added. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::showMediaControlsContextMenu): Added. * UIProcess/WebPageProxy.messages.in: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::showMediaControlsContextMenu): Added. Send the given `MediaControlsContextMenuItem`s to the UIProcess for the `UIMenu`. * UIProcess/PageClient.h: (WebKit::PageClient::showMediaControlsContextMenu): Added. * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::showMediaControlsContextMenu): Added. * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView actionSheetAssistantDidShowContextMenu:]): Added. (-[WKContentView actionSheetAssistantDidDismissContextMenu:]): Added. (-[WKContentView _showMediaControlsContextMenu:items:completionHandler:]): Added. (-[WKContentView _contentsOfUserInterfaceItem:]): Pass the given `MediaControlsContextMenuItem`s to the `WKActionSheetAssistant`. * UIProcess/ios/WKActionSheetAssistant.h: * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant dealloc]): (-[WKActionSheetAssistant _removeContextMenuInteractions]): Added. (-[WKActionSheetAssistant _ensureDataDetectorContextMenuInteraction]): Added. (-[WKActionSheetAssistant _ensureMediaControlsContextMenuInteraction]): Added. (-[WKActionSheetAssistant hasContextMenuInteraction]): (-[WKActionSheetAssistant showDataDetectorsUIForPositionInformation:]): (-[WKActionSheetAssistant _uiMenuElementsForMediaControlContextMenuItems:]): Added. (-[WKActionSheetAssistant showMediaControlsContextMenu:items:completionHandler:]): Added. (-[WKActionSheetAssistant contextMenuInteraction:configurationForMenuAtLocation:]): (-[WKActionSheetAssistant contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]): (-[WKActionSheetAssistant contextMenuInteraction:willDisplayMenuForConfiguration:animator:]): Added. (-[WKActionSheetAssistant contextMenuInteraction:willEndForConfiguration:animator:]): (-[WKActionSheetAssistant _contextMenuInteraction:overrideSuggestedActionsForConfiguration:]): (-[WKActionSheetAssistant _contentsOfContextMenuItem:]): Added. (-[WKActionSheetAssistant currentlyAvailableActionTitles]): Added. (-[WKActionSheetAssistant currentlyAvailableMediaControlsContextMenuItems]): Added. (-[WKActionSheetAssistant currentAvailableActionTitles]): Deleted. (-[WKActionSheetAssistant removeContextMenuInteraction]): Deleted. (-[WKActionSheetAssistant ensureContextMenuInteraction]): Deleted. Instead of assuming that the only `UIContextMenuInteraction` is for data detectors, check the given `interaction` to see if it's the data detector interaction before doing any work. This allows the media controls `UIContextMenuInteraction` to exist side-by-side and use the `WKActionSheetAssistant` as its delegate too (especially since it's not possible for both contextmenus to be active at the same time). Present the media controls contextmenu without a preview (it uses an empty `UIView` for proper sizing) at the location provided. Selecting a `UIAction` will send the `MediaControlsContextMenuItem::ID` back to the WebProcess. Also add support for - `UIScriptController.prototype.contentsOfUserInterfaceItem` - `UIScriptController.prototype.didShowContextMenuCallback` - `UIScriptController.prototype.didDismissContextMenuCallback` for usage in the added `LayoutTests/media/modern-media-controls/tracks-support/ios/` tests. Source/WTF: * Scripts/Preferences/WebPreferences.yaml: Create a `MediaControlsContextMenusEnabled` setting for guarding an IDL hook to WK2 only. Tools: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::rectForMenuAction const): In addition to looking at the active `UICalloutBar` (if it exists), walk the view hierarchy looking for any `UILabel` that contains the given text and use that as the rect to tap. While this isn't the most confident/consistent approach, UIKit doesn't have anything like `UICalloutBar` for contextmenu interactions, and this is only used inside WKTR (which has no other UI outside than the page), so it's expected that callers know what they're doing. LayoutTests: * media/modern-media-controls/resources/media-controls-utils.js: (getTracksContextMenu): Added. * media/modern-media-controls/tracks-support/ios/tracks-support-auto-text-track.html: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-auto-text-track-expected.txt: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-click-track-in-contextmenu.html: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-click-track-in-contextmenu-expected.txt: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-hidden-tracks.html: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-hidden-tracks-expected.txt: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-off-text-track.html: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-off-text-track-expected.txt: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-show-contextmenu-then-double-click-on-tracks-button.html: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-show-contextmenu-then-double-click-on-tracks-button-expected.txt: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-text-track-selected-via-media-api.html: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-text-track-selected-via-media-api-expected.txt: Added. Duplicate existing `TracksSupport` tests to test for similar results but using the new iOS path. * media/modern-media-controls/tracks-support/mac/tracks-support-auto-text-track.html: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-auto-text-track.html. * media/modern-media-controls/tracks-support/mac/tracks-support-auto-text-track-expected.txt: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-auto-text-track-expected.txt. * media/modern-media-controls/tracks-support/mac/tracks-support-click-track-in-panel.html: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html. * media/modern-media-controls/tracks-support/mac/tracks-support-click-track-in-panel-expected.txt: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel-expected.txt. * media/modern-media-controls/tracks-support/mac/tracks-support-hidden-tracks.html: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-hidden-tracks.html. * media/modern-media-controls/tracks-support/mac/tracks-support-hidden-tracks-expected.txt: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-hidden-tracks-expected.txt. * media/modern-media-controls/tracks-support/mac/tracks-support-off-text-track.html: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-off-text-track.html. * media/modern-media-controls/tracks-support/mac/tracks-support-off-text-track-expected.txt: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-off-text-track-expected.txt. * media/modern-media-controls/tracks-support/mac/tracks-support-show-and-populate-panel.html: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-and-populate-panel.html. * media/modern-media-controls/tracks-support/mac/tracks-support-show-and-populate-panel-expected.txt: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-and-populate-panel-expected.txt. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-after-dragging-controls.html: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-after-dragging-controls-expected.txt: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls-expected.txt. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-fullscreen.html: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-fullscreen-expected.txt: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen-expected.txt. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-then-double-click-on-tracks-button.html: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-panel-then-double-click-on-tracks-button.html. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-then-double-click-on-tracks-button-expected.txt: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-show-panel-then-double-click-on-tracks-button-expected.txt. * media/modern-media-controls/tracks-support/mac/tracks-support-text-track-selected-via-media-api.html: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-text-track-selected-via-media-api.html. * media/modern-media-controls/tracks-support/mac/tracks-support-text-track-selected-via-media-api-expected.txt: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-text-track-selected-via-media-api-expected.txt. * platform/mac/TestExpectations: Moved existing `TracksSupport` tests to a `mac` subfolder so they can be skipped on iOS. Canonical link: https://commits.webkit.org/233889@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-10 02:06:01 +00:00
page/MediaControlsContextMenuItem.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/MediaProducer.h
page/MemoryRelease.h
IsLoggedIn: Add as experimental feature https://bugs.webkit.org/show_bug.cgi?id=202707 <rdar://problem/56095064> Reviewed by Brent Fulgham and Chris Dumez. IsLoggedIn was proposed to the WebAppSec WG at TPAC 2019. So far there is only an explainer posted to the mailing list: https://lists.w3.org/Archives/Public/public-webappsec/2019Sep/0004.html Source/WebCore: This patch adds the three experimental web APIs: - Promise<void> setLoggedIn() - Promise<void> setLoggedOut() - Promise<bool> isLoggedIn() It also tests that those APIs are only exposed in secure contexts. The functionality is implemented as a supplement to Navigator. Tests: http/tests/is-logged-in/available-in-secure-contexts.https.html http/tests/is-logged-in/unavailable-in-insecure-contexts.html * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * page/NavigatorIsLoggedIn.cpp: Added. (WebCore::NavigatorIsLoggedIn::from): (WebCore::NavigatorIsLoggedIn::supplementName): (WebCore::NavigatorIsLoggedIn::setLoggedIn): (WebCore::NavigatorIsLoggedIn::setLoggedOut): (WebCore::NavigatorIsLoggedIn::isLoggedIn): * page/NavigatorIsLoggedIn.h: Added. * page/NavigatorIsLoggedIn.idl: Added. * page/PointerCaptureController.cpp: * page/PointerCaptureController.h: * page/Settings.yaml: Source/WebKit: * Shared/WebPreferences.yaml: LayoutTests: * http/tests/is-logged-in/available-in-secure-contexts.https-expected.txt: Added. * http/tests/is-logged-in/available-in-secure-contexts.https.html: Added. * http/tests/is-logged-in/unavailable-in-insecure-contexts-expected.txt: Added. * http/tests/is-logged-in/unavailable-in-insecure-contexts.html: Added. * platform/ios-device-wk1/TestExpectations: * platform/ios-simulator-wk1/TestExpectations: * platform/ios-wk1/TestExpectations: * platform/mac-highsierra/fast/dom/navigator-detached-no-crash-expected.txt: * platform/mac-wk1/TestExpectations: * platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt: * platform/wincairo-wk1/TestExpectations: Canonical link: https://commits.webkit.org/216235@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-10 00:03:47 +00:00
page/NavigatorIsLoggedIn.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
page/PDFImageCachingPolicy.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/Page.h
Sampled Page Top Color: move logic out of `Document` https://bugs.webkit.org/show_bug.cgi?id=225480 <rdar://problem/77984539> Reviewed by Tim Horton. Source/WebCore: Having `determineSampledPageTopColor` be called in `enqueuePaintTimingEntryIfNeeded` as what is basically a side effect is not great. The only reason it was there in the first place was to take advantage of the logic that decided "is this the first contentful paint", but that logic can be replicated elsewhere. Since the sampled page top color deals more with the page as a whole instead of an individual `Document` (which includes subframes), it makes more sense to have this logic be on a utility `PageColorSampler` that's used in `Page` instead. Test: SampledPageTopColor.MainDocumentChange * page/PageColorSampler.h: Added. * page/PageColorSampler.cpp: Added. (WebCore::isValidSampleLocation): (WebCore::sampleColor): (WebCore::colorDifference): (WebCore::averageColor): (WebCore::PageColorSampler::sampleTop): * page/Page.h: * page/Page.cpp: (WebCore::Page::doAfterUpdateRendering): (WebCore::Page::sampledPageTopColor const): (WebCore::Page::didChangeMainDocument): * dom/Document.h: (WebCore::Document::sampledPageTopColor const): Deleted. * dom/Document.cpp: (WebCore::Document::enqueuePaintTimingEntryIfNeeded): (WebCore::isValidPageSampleLocation): Deleted. (WebCore::samplePageColor): Deleted. (WebCore::colorDifference): Deleted. (WebCore::averageColor): Deleted. (WebCore::Document::determineSampledPageTopColor): Deleted. * page/FrameView.h: * page/FrameView.cpp: (WebCore::FrameView::hasContentfulDescendants const): Added. (WebCore::FrameView::hasContenfulDescendants const): Deleted. Drive-by: Fix incorrect spelling. * Source/WebCore/Headers.cmake: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: Tools: * TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (TEST.SampledPageTopColor.MainDocumentChange): Added. Canonical link: https://commits.webkit.org/237751@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-15 00:29:19 +00:00
page/PageColorSampler.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/PageConfiguration.h
page/PageConsoleClient.h
page/PageGroup.h
page/PageIdentifier.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/PageOverlay.h
page/PageOverlayController.h
Plumb an Optional<PageIdentifier> through Pasteboard-related codepaths https://bugs.webkit.org/show_bug.cgi?id=221987 Reviewed by Tim Horton. Source/WebCore: In order to facilitate tagging pasteboard reads and writes with a data owner type on iOS sourced from `WKContentView`, we add infrastructure to (indirectly) tag `Pasteboard` with an optional `PageIdentifier` to indicate which page is triggering the pasteboard operation. However, since the `Pasteboard` class should only be responsible for interfacing with platform-dependent strategies for reading or writing data, we can't directly add a `PageIdentifier` member to `Pasteboard`. Instead, we introduce a separate `PasteboardContext` object, and let `Pasteboard` hold a unique pointer to this context (which is set during construction). `PasteboardContext` is then subclassed by `PagePasteboardContext`, which holds a `PageIdentifier` and is created from call sites of the `Pasteboard` constructor that have access to page identifiers (e.g. `Editor`, `Clipboard`, `EventHandler`). In a future patch, this opaque `PasteboardContext` will be converted back to a `PagePasteboardContext` in order to retrieve the page identifier in the WebKit client layer. * Headers.cmake: * Modules/async-clipboard/Clipboard.cpp: (WebCore::Clipboard::readText): (WebCore::Clipboard::writeText): (WebCore::Clipboard::read): (WebCore::Clipboard::ItemWriter::ItemWriter): Here (and in many places below), create `PagePasteboardContext` objects and use them to create `Pasteboard`s, passing them in as opaque `PasteboardContext`s. * WebCore.xcodeproj/project.pbxproj: * dom/DataTransfer.cpp: (WebCore::DataTransfer::createForDrag): * dom/DataTransfer.h: * editing/Editor.cpp: (WebCore::createDataTransferForClipboardEvent): (WebCore::dispatchClipboardEvent): (WebCore::Editor::pasteAsPlainTextBypassingDHTML): (WebCore::Editor::performCutOrCopy): (WebCore::Editor::paste): (WebCore::Editor::pasteAsPlainText): (WebCore::Editor::pasteAsQuotation): (WebCore::Editor::copyURL): (WebCore::Editor::copyImage): * editing/EditorCommand.cpp: (WebCore::executePasteGlobalSelection): * editing/mac/EditorMac.mm: (WebCore::Editor::readSelectionFromPasteboard): (WebCore::Editor::replaceNodeFromPasteboard): * inspector/CommandLineAPIHost.cpp: (WebCore::CommandLineAPIHost::copyText): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::copyText): * page/DragController.cpp: (WebCore::documentFragmentFromDragData): (WebCore::DragController::dragExited): (WebCore::DragController::performDragOperation): (WebCore::DragController::tryDHTMLDrag): (WebCore::DragController::tryToUpdateDroppedImagePlaceholders): * page/EventHandler.cpp: (WebCore::EventHandler::handleDrag): * page/PagePasteboardContext.h: Added. Add `PagePasteboardContext`, a `PasteboardContext` subclass that contains a `PageIdentifier` indicating which `Page` is requesting pasteboard access. (isType): * platform/DragData.cpp: (WebCore::DragData::DragData): (WebCore::DragData::createPasteboardContext const): Also plumb a `PageIdentifier` through `DragData`, and use it to implement a helper method that returns a context object for `Pasteboard`. * platform/DragData.h: Additionally make `operator=` platform-agnostic, instead of limited to GTK. (It isn't clear why this needs to be limited to the GTK port). (WebCore::DragData::DragData): (WebCore::DragData::pageID const): * platform/Pasteboard.h: Augment `Pasteboard`'s (numerous) platform-specific constructors to take in a `PasteboardContext` unique pointer as well, and store it in `m_context`. (WebCore::Pasteboard::Pasteboard): (WebCore::Pasteboard::context const): * platform/PasteboardContext.h: Added. Add `PasteboardContext`, which provides additional context for an arbitrary pasteboard operation in an opaque fashion. See `PagePasteboardContext` above. (WebCore::PasteboardContext::isPagePasteboardContext const): * platform/StaticPasteboard.cpp: (WebCore::StaticPasteboard::StaticPasteboard): * platform/cocoa/DragDataCocoa.mm: (WebCore::DragData::DragData): (WebCore::DragData::canSmartReplace const): (WebCore::DragData::asPlainText const): * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForGlobalSelection): (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::create): (WebCore::Pasteboard::Pasteboard): * platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::Pasteboard): (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::create): (WebCore::Pasteboard::createForCopyAndPaste): * platform/libwpe/PasteboardLibWPE.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::Pasteboard): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::Pasteboard): (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::create): * platform/win/DragDataWin.cpp: (WebCore::DragData::DragData): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::create): (WebCore::Pasteboard::Pasteboard): Source/WebKit: Update more `DragData` and `Pasteboard` initialization sites by passing in a `PageIdentifier` or `PasteboardContext`, respectively. See WebCore ChangeLog for more details. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<DragData>::encode): (IPC::ArgumentCoder<DragData>::decode): * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::draggingEntered): (WebKit::WebViewImpl::draggingUpdated): (WebKit::WebViewImpl::draggingExited): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView dragDataForDropSession:dragDestinationAction:]): * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::WebEditorClient::updateGlobalSelection): * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::declareAndWriteDragImage): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::performActionOnElement): Source/WebKitLegacy/mac: Create and pass in a `PasteboardContext` when creating a `Pasteboard`. See WebCore ChangeLog for more details. * WebCoreSupport/WebDragClient.mm: (WebDragClient::declareAndWriteDragImage): Canonical link: https://commits.webkit.org/234275@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-18 16:56:42 +00:00
page/PagePasteboardContext.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/PerformanceLogging.h
page/PerformanceLoggingClient.h
page/PointerCaptureController.h
CSS hover and "pointer: fine" media queries do not evaluate to true with iOS 13.4 mouse support https://bugs.webkit.org/show_bug.cgi?id=209292 <rdar://problem/60663124> Reviewed by Tim Horton. Source/WebCore: On iOS, the primary pointer will always be touch input, so the `hover`/`pointer` media query should never change. If a mouse is connected, however, `any-hover`/`any-pointer` should change as now there is at least one device that supports `hover`/`fine`. Note that in the case of `any-pointer` this means that both `coarse` and `fine` will apply. Catalyst assumes that there is always a mouse connected. Spec: https://drafts.csswg.org/mediaqueries-4/#any-input * css/MediaQueryEvaluator.cpp: (WebCore::anyHoverEvaluate): (WebCore::anyPointerEvaluate): * page/ChromeClient.h: * loader/EmptyClients.h: (WebCore::EmptyChromeClient::hoverSupportedByAnyAvailablePointingDevice const): Added. (WebCore::EmptyChromeClient::pointerCharacteristicsOfAllAvailablePointingDevices const): Added. Provide a way for WebCore to get the current state of whether there are any mouse devices. Refactor logic in `anyHoverEvaluate` and `anyPointerEvaluate` to move platform code into the respective `WebKit::WebPage` file. * page/PointerCharacteristics.h: Added. Enum for `Coarse` and `Fine`. * platform/PlatformScreen.h: Export additional functions for use in WebKit. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Source/WebKit: On iOS, the primary pointer will always be touch input, so the `hover`/`pointer` media query should never change. If a mouse is connected, however, `any-hover`/`any-pointer` should change as now there is at least one device that supports `hover`/`fine`. Note that in the case of `any-pointer` this means that both `coarse` and `fine` will apply. Catalyst assumes that there is always a mouse connected. Spec: https://drafts.csswg.org/mediaqueries-4/#any-input * UIProcess/ios/WKMouseDeviceObserver.h: Added. * UIProcess/ios/WKMouseDeviceObserver.mm: Added. (+[WKMouseDeviceObserver sharedInstance]): (-[WKMouseDeviceObserver dealloc]): (-[WKMouseDeviceObserver start]): (-[WKMouseDeviceObserver stop]): (-[WKMouseDeviceObserver mousePointerDevicesDidChange:]): (-[WKMouseDeviceObserver _setHasMouseDeviceForTesting:]): Use `BackBoardServices` to listen for mouse devices changes and notify all WebProcess. * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::WebProcessProxy): (WebKit::WebProcessProxy::platformInitialize): Added. (WebKit::WebProcessProxy::~WebProcessProxy): (WebKit::WebProcessProxy::platformDestroy): Added. * UIProcess/ios/WebProcessProxyIOS.mm: (WebKit::WebProcessProxy::platformInitialize): Added. (WebKit::WebProcessProxy::platformDestroy): Added. (WebKit::WebProcessProxy::notifyHasMouseDeviceChanged): Added. Tell the shared `WKMouseDeviceObserver` to start listening for mouse device changes when creating the WebProcess so that the shared `WKMouseDeviceObserver` knows to notify all instances when mouse devices change. Make `allProcesses` into a `private static` member function so that it can also be used in `UIProcess/ios/WebProcessProxyIOS.mm`. * Shared/WebProcessCreationParameters.h: * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode const): (WebKit::WebProcessCreationParameters::decode): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess): Use the current state of the shared `WKMouseDeviceObserver` when creating WebProcess instead of sending a `SetHasMouseDevice` message immediately after the WebProcess is created. * WebProcess/WebProcess.messages.in: * WebProcess/WebProcess.h: (WebKit::WebProcess::hasMouseDevice const): Added. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setHasMouseDevice): Added. * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): Update style (including `any-hover` and `any-pointer`) whenever mouse devices change. * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::hoverSupportedByAnyAvailablePointingDevice const): Added. (WebKit::WebChromeClient::pointerCharacteristicsOfAllAvailablePointingDevices const): Added. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/gtk/WebPageGtk.cpp: (WebKit::WebPage::hoverSupportedByAnyAvailablePointingDevice const): Added. (WebKit::WebPage::pointerCharacteristicsOfAllAvailablePointingDevices const): Added. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::hasMouseDevice): Added. (WebKit::WebPage::hoverSupportedByAnyAvailablePointingDevice const): Added. (WebKit::WebPage::pointerCharacteristicsOfAllAvailablePointingDevices const): Added. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::hoverSupportedByAnyAvailablePointingDevice const): Added. (WebKit::WebPage::pointerCharacteristicsOfAllAvailablePointingDevices const): Added. * WebProcess/WebPage/playstation/WebPagePlayStation.cpp: (WebKit::WebPage::hoverSupportedByAnyAvailablePointingDevice const): Added. (WebKit::WebPage::pointerCharacteristicsOfAllAvailablePointingDevices const): Added. * WebProcess/WebPage/win/WebPageWin.cpp: (WebKit::WebPage::hoverSupportedByAnyAvailablePointingDevice const): Added. (WebKit::WebPage::pointerCharacteristicsOfAllAvailablePointingDevices const): Added. * WebProcess/WebPage/wpe/WebPageWPE.cpp: (WebKit::WebPage::hoverSupportedByAnyAvailablePointingDevice const): Added. (WebKit::WebPage::pointerCharacteristicsOfAllAvailablePointingDevices const): Added. Provide a way for WebCore to get the current state of whether there are any mouse devices. Refactor logic in `WebCore::anyHoverEvaluate` and `WebCore::anyPointerEvaluate` to move platform code into the respective `WebPage` file. * Configurations/WebKit.xcconfig: * Platform/spi/ios/BackBoardServicesSPI.h: * Platform/spi/ios/BaseBoardSPI.h: Added. * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: Source/WebKitLegacy/ios: * WebCoreSupport/WebChromeClientIOS.h: (WebChromeClientIOS::hoverSupportedByAnyAvailablePointingDevice const): Added. (WebChromeClientIOS::pointerCharacteristicsOfAllAvailablePointingDevices const): Added. Mouse devices are not supported. Source/WebKitLegacy/mac: * WebCoreSupport/WebChromeClient.h: (WebChromeClient::hoverSupportedByAnyAvailablePointingDevice const): Added. (WebChromeClient::pointerCharacteristicsOfAllAvailablePointingDevices const): Added. Mouse devices are always supported. Source/WebKitLegacy/win: * WebCoreSupport/WebChromeClient.h: (WebChromeClient::hoverSupportedByAnyAvailablePointingDevice const): Added. (WebChromeClient::pointerCharacteristicsOfAllAvailablePointingDevices const): Added. Mouse devices are always supported. Tools: * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[TestWKWebView evaluateMediaQuery:]): Added. Create helper function for synchronously testing media queries. * TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm: (iOSMouseSupport.MouseInitiallyDisconnected): Added. (iOSMouseSupport.MouseInitiallyConnected): Added. (iOSMouseSupport.MouseLaterDisconnected): Added. (iOSMouseSupport.MouseLaterConnected): Added. (iOSMouseSupport.MouseAlwaysConnected): Added. WebKitLibraries: * WebKitPrivateFrameworkStubs/iOS/13/BackBoardServices.framework/BackBoardServices.tbd: Added. * WebKitPrivateFrameworkStubs/iOS/14/BackBoardServices.framework/BackBoardServices.tbd: Added. Use `BackBoardServices` to listen for mouse devices changes. Canonical link: https://commits.webkit.org/230175@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-06 23:44:47 +00:00
page/PointerCharacteristics.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/PointerLockController.h
Implement PostMessageOptions for postMessage https://bugs.webkit.org/show_bug.cgi?id=191028 Reviewed by Alex Christensen. LayoutTests/imported/w3c: Rebaseline WPT tests now that we have more passes. * web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt: * web-platform-tests/html/browsers/windows/document-access/document_access_parent_access.tentative-expected.txt: * web-platform-tests/service-workers/service-worker/clients-matchall-frozen.https-expected.txt: * web-platform-tests/service-workers/service-worker/postmessage.https-expected.txt: * web-platform-tests/webmessaging/message-channels/dictionary-transferrable-expected.txt: * web-platform-tests/webmessaging/message-channels/user-activation.tentative-expected.txt: * web-platform-tests/webmessaging/postMessage_MessagePorts_xsite.sub.window-expected.txt: * web-platform-tests/webmessaging/with-options/host-specific-origin-expected.txt: * web-platform-tests/webmessaging/with-options/message-channel-transferable-expected.txt: * web-platform-tests/webmessaging/with-options/no-target-origin-expected.txt: * web-platform-tests/webmessaging/with-options/null-transfer-expected.txt: * web-platform-tests/webmessaging/with-options/one-arg-expected.txt: * web-platform-tests/webmessaging/with-options/slash-origin-expected.txt: * web-platform-tests/webmessaging/with-options/undefined-transferable-expected.txt: * web-platform-tests/webmessaging/with-options/unknown-parameter-expected.txt: * web-platform-tests/webmessaging/without-ports/008-expected.txt: * web-platform-tests/webmessaging/worker_postMessage_user_activation.tentative-expected.txt: * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary-expected.txt: * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-expected.txt: Source/WebCore: Implement PostMessageOptions dictionary parameter for postMessage: - https://github.com/whatwg/html/issues/3799 - https://github.com/w3c/ServiceWorker/pull/1344 Blink and Gecko already support this. No new tests, rebaselined existing tests. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/MessagePort.cpp: (WebCore::MessagePort::postMessage): * dom/MessagePort.h: * dom/MessagePort.idl: * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessage): * page/DOMWindow.h: (WebCore::WindowPostMessageOptions::WindowPostMessageOptions): * page/DOMWindow.idl: * page/PostMessageOptions.h: Copied from Source/WebCore/workers/service/ServiceWorkerClient.idl. (WebCore::PostMessageOptions::PostMessageOptions): * page/PostMessageOptions.idl: Copied from Source/WebCore/workers/service/ServiceWorkerClient.idl. * workers/DedicatedWorkerGlobalScope.cpp: (WebCore::DedicatedWorkerGlobalScope::postMessage): * workers/DedicatedWorkerGlobalScope.h: * workers/DedicatedWorkerGlobalScope.idl: * workers/Worker.cpp: (WebCore::Worker::postMessage): * workers/Worker.h: * workers/Worker.idl: * workers/service/ServiceWorker.cpp: (WebCore::ServiceWorker::postMessage): * workers/service/ServiceWorker.h: * workers/service/ServiceWorker.idl: * workers/service/ServiceWorkerClient.cpp: (WebCore::ServiceWorkerClient::postMessage): * workers/service/ServiceWorkerClient.h: * workers/service/ServiceWorkerClient.idl: LayoutTests: Update a few existing tests due to the behavior change. * TestExpectations: * fast/dom/Window/post-message-crash.html: * fast/events/message-port-multi-expected.txt: * fast/events/resources/message-port-multi.js: * fast/workers/resources/worker-context-thread-multi-port.js: * fast/workers/resources/worker-multi-port.js: * fast/workers/worker-multi-port-expected.txt: * http/tests/security/postMessage/target-origin-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: Canonical link: https://commits.webkit.org/218419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-13 21:36:25 +00:00
page/PostMessageOptions.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/PrewarmInformation.h
page/PrintContext.h
page/ProcessWarming.h
page/Quirks.h
Rendering update steps should use Seconds for the timestamps https://bugs.webkit.org/show_bug.cgi?id=210990 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-04-26 Reviewed by Daniel Bates. Source/WebCore: Make DOMWindow::nowTimestamp() return ReducedResolutionSeconds and change the callers accordingly. ReducedResolutionSeconds is a new type but it's just an alias of the type Seconds. It indicates that the returned value is a web-safe seconds. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * animation/DocumentTimeline.cpp: (WebCore::DocumentTimeline::suspendAnimations): (WebCore::DocumentTimeline::liveCurrentTime const): (WebCore::DocumentTimeline::cacheCurrentTime): (WebCore::DocumentTimeline::documentWillUpdateAnimationsAndSendEvents): * animation/DocumentTimeline.h: * animation/DocumentTimelinesController.cpp: (WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents): * animation/DocumentTimelinesController.h: * dom/Document.cpp: (WebCore::Document::serviceRequestAnimationFrameCallbacks): (WebCore::Document::updateIntersectionObservations): * dom/Document.h: * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks): (WebCore::ScriptedAnimationController::scheduleAnimation): * dom/ScriptedAnimationController.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::getVideoPlaybackQuality): * page/DOMWindow.cpp: (WebCore::DOMWindow::nowTimestamp const): * page/DOMWindow.h: * page/IntersectionObserver.cpp: (WebCore::IntersectionObserver::nowTimestamp const): (WebCore::IntersectionObserver::createTimestamp const): Deleted. * page/IntersectionObserver.h: * page/Page.cpp: (WebCore::Page::updateRendering): * page/Performance.cpp: (WebCore::Performance::now const): (WebCore::Performance::nowInReducedResolutionSeconds const): * page/Performance.h: * page/ReducedResolutionSeconds.h: Added. Source/WebKit: * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: (WebKit::CompositingCoordinator::timestamp const): Canonical link: https://commits.webkit.org/223937@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-27 01:02:58 +00:00
page/ReducedResolutionSeconds.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/RemoteDOMWindow.h
page/RemoteFrame.h
page/RenderingUpdateScheduler.h
page/RuntimeEnabledFeatures.h
Add support for scroll behavior parsing https://bugs.webkit.org/show_bug.cgi?id=205009 Reviewed by Frédéric Wang. Based on the patch by Frédéric Wang. LayoutTests/imported/w3c: * web-platform-tests/css/cssom-view/inheritance-expected.txt: * web-platform-tests/css/cssom-view/inheritance.html: * web-platform-tests/css/cssom-view/parsing/scroll-behavior-computed-expected.txt: * web-platform-tests/css/cssom-view/parsing/scroll-behavior-computed.html: * web-platform-tests/css/cssom-view/parsing/scroll-behavior-valid-expected.txt: * web-platform-tests/css/cssom-view/parsing/scroll-behavior-valid.html: Source/WebCore: Add support for parsing scroll-behavior css property and ScrollOptions. Tests: LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/inheritance.html LayoutTests/web-platform-tests/css/cssom-view/parsing/scroll-behavior-computed.html LayoutTests/web-platform-tests/css/cssom-view/parsing/scroll-behavior-valid.html * CMakeLists.txt: Add IDL files for ScrollOptions and ScrollBehavior. * DerivedSources.make: * Headers.cmake: Add headers for ScrollBehavor and ScrollOptions. * Sources.txt: Add ScrollBehavor and ScrollOptions implementation. * WebCore.xcodeproj/project.pbxproj: Add files to the build system. * css/CSSComputedStyleDeclaration.cpp: Handle scroll-behavior. (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): * css/CSSProperties.json: Add scroll-behavior. * css/CSSValueKeywords.in: Add keywords for scroll-behavior. * css/parser/CSSParserContext.cpp: Add runtime config for scroll-behavior. (WebCore::CSSParserContext::CSSParserContext): (WebCore::operator==): * css/parser/CSSParserContext.h: Ditto. (WebCore::CSSParserContextHash::hash): * css/parser/CSSParserFastPaths.cpp: Remove scroll-behavior templates. It is handled in the slow path since property can be disabled. (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): (WebCore::CSSParserFastPaths::isKeywordPropertyID): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeScrollBehavior): (WebCore::CSSPropertyParser::parseSingleValue): Parse scroll-behavior (only if enabled). * page/ScrollBehavior.cpp: Added. (WebCore::useSmoothScrolling): Helper funciton to determine the scroll behavior to apply to an element from the CSS and DOM behavior. * page/ScrollBehavior.h: Added. * page/ScrollBehavior.idl: Added. * page/ScrollIntoViewOptions.h: Make this class inherits from ScrollOption. Also remove unnecessary forward declaration. * page/ScrollIntoViewOptions.idl: Make this class inherits from ScrollOption. * page/ScrollOptions.h: Added. * page/ScrollOptions.idl: Added. * page/ScrollToOptions.h: Make this struct inherits from ScrollOptions. (WebCore::ScrollToOptions::ScrollToOptions): (WebCore::normalizeNonFiniteCoordinatesOrFallBackTo): Copy the current ScrollToOptions so that the scroll behavior is preserved. * page/ScrollToOptions.idl: Make this class inherit from ScrollOptions. * page/Settings.yaml: New setting for CSSOM View smooth scrolling. * rendering/style/RenderStyle.h: Handle 'smooth scrolling' boolean data. (WebCore::RenderStyle::useSmoothScrolling const): (WebCore::RenderStyle::setUseSmoothScrolling): (WebCore::RenderStyle::initialUseSmoothScrolling): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator== const): * rendering/style/StyleRareNonInheritedData.h: * style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::convertSmoothScrolling): Source/WebKit: Add CSSOM smooth scrolling as an experimental feature. * Shared/WebPreferences.yaml: Source/WebKitLegacy/mac: Add run time flag for CSSOMViewSmoothScrolling. * WebView/WebPreferenceKeysPrivate.h: Handle CSSOMViewSmoothScrolling by. * WebView/WebPreferences.mm: ([WebPreferences initialize]): Disable CSSOMViewSmoothScrolling by default. (-[WebPreferences CSSOMViewSmoothScrollingEnabled]): Getter. (-[WebPreferences setCSSOMViewSmoothScrollingEnabled:]): Setter. * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKitLegacy/win: * Interfaces/IWebPreferencesPrivate.idl: Handle smooth scrolling option. * WebPreferenceKeysPrivate.h: Ditto. * WebPreferences.cpp: Ditto. (WebPreferences::initializeDefaultSettings): (WebPreferences::CSSOMViewSmoothScrollingEnabled): (WebPreferences::setCSSOMViewSmoothScrollingEnabled): * WebPreferences.h: Ditto. * WebView.cpp: Ditto. (WebView::notifyPreferencesChanged): Tools: * DumpRenderTree/TestOptions.cpp: (TestOptions::TestOptions): Parse CSSOMViewSmoothScrollingEnabled. * DumpRenderTree/TestOptions.h: Add CSSOMViewSmoothScrollingEnabled, disabled by default. * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): (setWebPreferencesForTestOptions): Set CSSOMViewSmoothScrollingEnabled from the test options. Canonical link: https://commits.webkit.org/219530@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-18 05:49:24 +00:00
page/ScrollBehavior.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/ScrollIntoViewOptions.h
page/ScrollLogicalPosition.h
Add support for scroll behavior parsing https://bugs.webkit.org/show_bug.cgi?id=205009 Reviewed by Frédéric Wang. Based on the patch by Frédéric Wang. LayoutTests/imported/w3c: * web-platform-tests/css/cssom-view/inheritance-expected.txt: * web-platform-tests/css/cssom-view/inheritance.html: * web-platform-tests/css/cssom-view/parsing/scroll-behavior-computed-expected.txt: * web-platform-tests/css/cssom-view/parsing/scroll-behavior-computed.html: * web-platform-tests/css/cssom-view/parsing/scroll-behavior-valid-expected.txt: * web-platform-tests/css/cssom-view/parsing/scroll-behavior-valid.html: Source/WebCore: Add support for parsing scroll-behavior css property and ScrollOptions. Tests: LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/inheritance.html LayoutTests/web-platform-tests/css/cssom-view/parsing/scroll-behavior-computed.html LayoutTests/web-platform-tests/css/cssom-view/parsing/scroll-behavior-valid.html * CMakeLists.txt: Add IDL files for ScrollOptions and ScrollBehavior. * DerivedSources.make: * Headers.cmake: Add headers for ScrollBehavor and ScrollOptions. * Sources.txt: Add ScrollBehavor and ScrollOptions implementation. * WebCore.xcodeproj/project.pbxproj: Add files to the build system. * css/CSSComputedStyleDeclaration.cpp: Handle scroll-behavior. (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): * css/CSSProperties.json: Add scroll-behavior. * css/CSSValueKeywords.in: Add keywords for scroll-behavior. * css/parser/CSSParserContext.cpp: Add runtime config for scroll-behavior. (WebCore::CSSParserContext::CSSParserContext): (WebCore::operator==): * css/parser/CSSParserContext.h: Ditto. (WebCore::CSSParserContextHash::hash): * css/parser/CSSParserFastPaths.cpp: Remove scroll-behavior templates. It is handled in the slow path since property can be disabled. (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): (WebCore::CSSParserFastPaths::isKeywordPropertyID): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeScrollBehavior): (WebCore::CSSPropertyParser::parseSingleValue): Parse scroll-behavior (only if enabled). * page/ScrollBehavior.cpp: Added. (WebCore::useSmoothScrolling): Helper funciton to determine the scroll behavior to apply to an element from the CSS and DOM behavior. * page/ScrollBehavior.h: Added. * page/ScrollBehavior.idl: Added. * page/ScrollIntoViewOptions.h: Make this class inherits from ScrollOption. Also remove unnecessary forward declaration. * page/ScrollIntoViewOptions.idl: Make this class inherits from ScrollOption. * page/ScrollOptions.h: Added. * page/ScrollOptions.idl: Added. * page/ScrollToOptions.h: Make this struct inherits from ScrollOptions. (WebCore::ScrollToOptions::ScrollToOptions): (WebCore::normalizeNonFiniteCoordinatesOrFallBackTo): Copy the current ScrollToOptions so that the scroll behavior is preserved. * page/ScrollToOptions.idl: Make this class inherit from ScrollOptions. * page/Settings.yaml: New setting for CSSOM View smooth scrolling. * rendering/style/RenderStyle.h: Handle 'smooth scrolling' boolean data. (WebCore::RenderStyle::useSmoothScrolling const): (WebCore::RenderStyle::setUseSmoothScrolling): (WebCore::RenderStyle::initialUseSmoothScrolling): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator== const): * rendering/style/StyleRareNonInheritedData.h: * style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::convertSmoothScrolling): Source/WebKit: Add CSSOM smooth scrolling as an experimental feature. * Shared/WebPreferences.yaml: Source/WebKitLegacy/mac: Add run time flag for CSSOMViewSmoothScrolling. * WebView/WebPreferenceKeysPrivate.h: Handle CSSOMViewSmoothScrolling by. * WebView/WebPreferences.mm: ([WebPreferences initialize]): Disable CSSOMViewSmoothScrolling by default. (-[WebPreferences CSSOMViewSmoothScrollingEnabled]): Getter. (-[WebPreferences setCSSOMViewSmoothScrollingEnabled:]): Setter. * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKitLegacy/win: * Interfaces/IWebPreferencesPrivate.idl: Handle smooth scrolling option. * WebPreferenceKeysPrivate.h: Ditto. * WebPreferences.cpp: Ditto. (WebPreferences::initializeDefaultSettings): (WebPreferences::CSSOMViewSmoothScrollingEnabled): (WebPreferences::setCSSOMViewSmoothScrollingEnabled): * WebPreferences.h: Ditto. * WebView.cpp: Ditto. (WebView::notifyPreferencesChanged): Tools: * DumpRenderTree/TestOptions.cpp: (TestOptions::TestOptions): Parse CSSOMViewSmoothScrollingEnabled. * DumpRenderTree/TestOptions.h: Add CSSOMViewSmoothScrollingEnabled, disabled by default. * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): (setWebPreferencesForTestOptions): Set CSSOMViewSmoothScrollingEnabled from the test options. Canonical link: https://commits.webkit.org/219530@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-18 05:49:24 +00:00
page/ScrollOptions.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/ScrollToOptions.h
page/SecurityOrigin.h
page/SecurityOriginData.h
page/SecurityOriginHash.h
page/SecurityPolicy.h
page/SettingsBase.h
page/ShareData.h
page/SocketProvider.h
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
page/SpeechRecognitionProvider.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/SpeechSynthesisClient.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
page/StorageBlockingPolicy.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/SuspendableTimer.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
page/TextDirectionSubmenuInclusionBehavior.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/TextIndicator.h
[macOS] Set the -isSourceEditable property when presenting webpage translation popup https://bugs.webkit.org/show_bug.cgi?id=225515 <rdar://problem/77658040> Reviewed by Tim Horton. Source/WebCore: Set `-[LTUITranslationViewController isSourceEditable]` to `YES` when showing the context menu for editable content. Instead of plumbing another boolean flag through `ContextMenuClient` and into the client layers through `handleTranslation()`, we roll all of the webpage translation context menu parameters into a single object (`TranslationContextMenuInfo`), including a new flag indicating whether or not the translation controller should be shown in "editable" mode. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * loader/EmptyClients.cpp: * page/ContextMenuClient.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): * page/TranslationContextMenuInfo.h: Added. Pull the translated text string, selection bounds, menu location, and the new mode flag into a separate struct. (WebCore::TranslationContextMenuInfo::encode const): (WebCore::TranslationContextMenuInfo::decode): Source/WebKit: See WebCore/ChangeLog for more details. * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::handleContextMenuTranslation): * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::handleContextMenuTranslation): * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/PageClientImplMac.h: * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::handleContextMenuTranslation): * WebProcess/WebCoreSupport/WebContextMenuClient.h: * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: (WebKit::WebContextMenuClient::handleTranslation): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::handleContextMenuTranslation): * WebProcess/WebPage/WebPage.h: Source/WebKitLegacy/mac: See WebCore/ChangeLog for more details. * WebCoreSupport/WebContextMenuClient.h: * WebCoreSupport/WebContextMenuClient.mm: (WebContextMenuClient::handleTranslation): * WebView/WebView.mm: (-[WebView _handleContextMenuTranslation:]): (-[WebView _handleContextMenuTranslation:selectionBounds:menuLocation:]): Deleted. * WebView/WebViewInternal.h: Canonical link: https://commits.webkit.org/237468@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-07 20:28:04 +00:00
page/TranslationContextMenuInfo.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/UserContentController.h
page/UserContentProvider.h
page/UserContentTypes.h
page/UserContentURLPattern.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
page/UserInterfaceDirectionPolicy.h
Use UserMediaRequestIdentifier in WebKit rather than a mysterious uint64_t https://bugs.webkit.org/show_bug.cgi?id=229308 Reviewed by Youenn Fablet. Source/WebCore: Move UserMediaRequestIdentifier to its own header. * Headers.cmake: * Modules/mediastream/UserMediaRequest.h: * WebCore.xcodeproj/project.pbxproj: Source/WebKit: Use the existing WebCore::UserMediaRequestIdentifier in WebKit code. We need to pull it out of the ENABLE(MEDIA_STREAM) #ifdef. In UserMediaPermissionRequestManagerProxy use a new identifier type, MediaDevicePermissionRequestIdentifier, which is used to identify pending permission requests (but never send to the web process). * Scripts/webkit/messages.py: (types_that_cannot_be_forward_declared): Sort (headers_for_type): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.h: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: (WebKit::UserMediaPermissionRequestManagerProxy::denyRequest): (WebKit::UserMediaPermissionRequestManagerProxy::grantRequest): (WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest): (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest): (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest): (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest): (WebKit::UserMediaPermissionRequestManagerProxy::checkUserMediaPermissionForSpeechRecognition): (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): (WebKit::generateRequestID): Deleted. * UIProcess/UserMediaPermissionRequestManagerProxy.h: * UIProcess/UserMediaPermissionRequestProxy.cpp: (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): * UIProcess/UserMediaPermissionRequestProxy.h: (WebKit::UserMediaPermissionRequestProxy::create): (WebKit::UserMediaPermissionRequestProxy::userMediaID const): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: Some files that were in Sources.txt were missing from the project. * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp: (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest): (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted): (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasDenied): * WebProcess/MediaStream/UserMediaPermissionRequestManager.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::userMediaAccessWasGranted): (WebKit::WebPage::userMediaAccessWasDenied): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Canonical link: https://commits.webkit.org/240775@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-21 02:56:54 +00:00
page/UserMediaRequestIdentifier.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/UserMessageHandler.h
page/UserMessageHandlerDescriptor.h
page/UserMessageHandlersNamespace.h
page/UserScript.h
page/UserScriptTypes.h
page/UserStyleSheet.h
page/UserStyleSheetTypes.h
page/ValidationMessageClient.h
page/ViewportConfiguration.h
page/VisitedLinkStore.h
page/WebCoreKeyboardUIMode.h
page/WebKitNamespace.h
page/WheelEventDeltaFilter.h
Rename WheelEventTestTrigger and improve naming in related code https://bugs.webkit.org/show_bug.cgi?id=202772 Reviewed by Tim Horton. Change the "test trigger" terminology to "monitor wheel events"; after all, tests call monitorWheelEvents() and callAfterScrollingCompletes(), and this is not triggering a test. Source/WebCore: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * page/FrameView.cpp: (WebCore::FrameView::adjustScrollbarsForLayout): (WebCore::FrameView::setScrollPosition): (WebCore::FrameView::didAddScrollbar): * page/Page.cpp: (WebCore::Page::ensureWheelEventTestMonitor): (WebCore::Page::ensureTestTrigger): Deleted. * page/Page.h: (WebCore::Page::wheelEventTestMonitor const): (WebCore::Page::clearWheelEventTestMonitor): (WebCore::Page::isMonitoringWheelEvents const): (WebCore::Page::testTrigger const): Deleted. (WebCore::Page::clearTrigger): Deleted. (WebCore::Page::expectsWheelEventTriggers const): Deleted. * page/WheelEventTestMonitor.cpp: Added. (WebCore::WheelEventTestMonitor::WheelEventTestMonitor): (WebCore::WheelEventTestMonitor::clearAllTestDeferrals): (WebCore::WheelEventTestMonitor::setTestCallbackAndStartNotificationTimer): (WebCore::WheelEventTestMonitor::deferForReason): (WebCore::WheelEventTestMonitor::removeDeferralForReason): (WebCore::WheelEventTestMonitor::triggerTestTimerFired): (WebCore::operator<<): * page/WheelEventTestMonitor.h: Renamed from Source/WebCore/page/WheelEventTestTrigger.h. * page/WheelEventTestTrigger.cpp: Removed. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::platformPrepareForWheelEvents): * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): (WebCore::AsyncScrollingCoordinator::updateIsMonitoringWheelEventsForFrameView): (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): (WebCore::AsyncScrollingCoordinator::deferWheelEventTestCompletionForReason const): (WebCore::AsyncScrollingCoordinator::removeWheelEventTestCompletionDeferralForReason const): (WebCore::AsyncScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView): Deleted. (WebCore::AsyncScrollingCoordinator::deferTestsForReason const): Deleted. (WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason const): Deleted. * page/scrolling/AsyncScrollingCoordinator.h: * page/scrolling/ScrollingCoordinator.h: (WebCore::ScrollingCoordinator::updateIsMonitoringWheelEventsForFrameView): (WebCore::ScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView): Deleted. * page/scrolling/ScrollingStateScrollingNode.cpp: (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): (WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach): (WebCore::ScrollingStateScrollingNode::setIsMonitoringWheelEvents): (WebCore::ScrollingStateScrollingNode::dumpProperties const): (WebCore::ScrollingStateScrollingNode::setExpectsWheelEventTestTrigger): Deleted. * page/scrolling/ScrollingStateScrollingNode.h: (WebCore::ScrollingStateScrollingNode::isMonitoringWheelEvents const): (WebCore::ScrollingStateScrollingNode::expectsWheelEventTestTrigger const): Deleted. * page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::deferWheelEventTestCompletionForReason): (WebCore::ScrollingTree::removeWheelEventTestCompletionDeferralForReason): (WebCore::ScrollingTree::deferTestsForReason): Deleted. (WebCore::ScrollingTree::removeTestDeferralForReason): Deleted. * page/scrolling/ScrollingTreeScrollingNode.cpp: (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren): * page/scrolling/ScrollingTreeScrollingNode.h: * page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::deferWheelEventTestCompletionForReason): (WebCore::ThreadedScrollingTree::removeWheelEventTestCompletionDeferralForReason): (WebCore::ThreadedScrollingTree::deferTestsForReason): Deleted. (WebCore::ThreadedScrollingTree::removeTestDeferralForReason): Deleted. * page/scrolling/ThreadedScrollingTree.h: * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h: * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: (WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent): (WebCore::ScrollingTreeScrollingNodeDelegateMac::deferWheelEventTestCompletionForReason const): (WebCore::ScrollingTreeScrollingNodeDelegateMac::removeWheelEventTestCompletionDeferralForReason const): (WebCore::ScrollingTreeScrollingNodeDelegateMac::deferTestsForReason const): Deleted. (WebCore::ScrollingTreeScrollingNodeDelegateMac::removeTestDeferralForReason const): Deleted. * platform/Logging.h: * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::deferWheelEventTestCompletionForReason const): (WebCore::ScrollAnimator::removeWheelEventTestCompletionDeferralForReason const): (WebCore::ScrollAnimator::deferTestsForReason const): Deleted. (WebCore::ScrollAnimator::removeTestDeferralForReason const): Deleted. * platform/ScrollAnimator.h: (WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestMonitor): (WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestTrigger): Deleted. * platform/cocoa/ScrollController.h: (WebCore::ScrollControllerClient::deferWheelEventTestCompletionForReason const): (WebCore::ScrollControllerClient::removeWheelEventTestCompletionDeferralForReason const): (WebCore::ScrollControllerClient::deferTestsForReason const): Deleted. (WebCore::ScrollControllerClient::removeTestDeferralForReason const): Deleted. * platform/cocoa/ScrollController.mm: (WebCore::ScrollController::startSnapRubberbandTimer): (WebCore::ScrollController::stopSnapRubberbandTimer): (WebCore::ScrollController::scheduleStatelessScrollSnap): (WebCore::ScrollController::startDeferringWheelEventTestCompletionDueToScrollSnapping): (WebCore::ScrollController::stopDeferringWheelEventTestCompletionDueToScrollSnapping): (WebCore::ScrollController::startScrollSnapTimer): (WebCore::ScrollController::stopScrollSnapTimer): (WebCore::ScrollController::startDeferringTestsDueToScrollSnapping): Deleted. (WebCore::ScrollController::stopDeferringTestsDueToScrollSnapping): Deleted. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::didBeginScrollGesture const): (WebCore::ScrollAnimatorMac::didEndScrollGesture const): (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon): (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired): * rendering/RenderBox.cpp: (WebCore::setupWheelEventMonitor): (WebCore::RenderBox::setScrollLeft): (WebCore::RenderBox::setScrollTop): (WebCore::setupWheelEventTestTrigger): Deleted. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::createScrollbar): * rendering/RenderListBox.cpp: (WebCore::setupWheelEventTestMonitor): (WebCore::RenderListBox::setScrollTop): (WebCore::RenderListBox::createScrollbar): (WebCore::setupWheelEventTestTrigger): Deleted. * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::monitorWheelEvents): (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): (WebCoreTestSupport::clearWheelEventTestMonitor): (WebCoreTestSupport::clearWheelEventTestTrigger): Deleted. * testing/js/WebCoreTestSupport.h: Source/WebKit: * UIProcess/API/C/WKPage.cpp: (WKPageClearWheelEventTestMonitor): (WKPageClearWheelEventTestTrigger): Deleted. * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::clearWheelEventTestMonitor): (WebKit::WebPageProxy::clearWheelEventTestTrigger): Deleted. * UIProcess/WebPageProxy.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageStartMonitoringScrollOperations): (WKBundlePageRegisterScrollOperationCompletionCallback): * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::createScrollbar): * WebProcess/WebPage/EventDispatcher.cpp: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::clearWheelEventTestMonitor): (WebKit::WebPage::clearWheelEventTestTrigger): Deleted. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebViewToConsistentStateBeforeTesting): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): Canonical link: https://commits.webkit.org/216237@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-10 00:24:44 +00:00
page/WheelEventTestMonitor.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/WindowFeatures.h
page/csp/ContentSecurityPolicy.h
page/csp/ContentSecurityPolicyClient.h
page/csp/ContentSecurityPolicyHash.h
page/csp/ContentSecurityPolicyResponseHeaders.h
page/scrolling/AsyncScrollingCoordinator.h
page/scrolling/ScrollSnapOffsetsInfo.h
page/scrolling/ScrollingConstraints.h
page/scrolling/ScrollingCoordinator.h
page/scrolling/ScrollingCoordinatorTypes.h
page/scrolling/ScrollingMomentumCalculator.h
page/scrolling/ScrollingStateFixedNode.h
page/scrolling/ScrollingStateFrameHostingNode.h
page/scrolling/ScrollingStateFrameScrollingNode.h
page/scrolling/ScrollingStateNode.h
page/scrolling/ScrollingStateOverflowScrollingNode.h
page/scrolling/ScrollingStatePositionedNode.h
page/scrolling/ScrollingStateScrollingNode.h
page/scrolling/ScrollingStateStickyNode.h
page/scrolling/ScrollingStateTree.h
page/scrolling/ScrollingThread.h
page/scrolling/ScrollingTree.h
page/scrolling/ScrollingTreeFrameHostingNode.h
page/scrolling/ScrollingTreeFrameScrollingNode.h
Overflow scrollbars don't grow when hovered https://bugs.webkit.org/show_bug.cgi?id=210692 <rdar://problem/61977273> Reviewed by Tim Horton. Source/WebCore: Overlay scrollar interaction has a few behaviors that are mediated by ScrollAnimatorMac. These are a trackpad two-finger tap, which sends a "MayBegin" wheel event (which can be followed by a "Cancelled" on fingers up, if they didn't move), and hovering the scrollbar when visible, which causes it to expand (unhovering causes it to fade out). To track these gestures on the scrolling thread, give ScrollingTree a ScrollingTreeGestureState. Flashing the scrollbars on "MayBegin" is driven by didBeginScrollGesture()/didEndScrollGesture(). This relies on sending these for the correct scrollable area, and matching the begin/cancel, so use the normal scrolling tree event handling code path for "MayBegin", and always send "Cancelled" on the node that received "MayBegin. Do the same for "Began" and "Ended". Scrollbars expanding on hover is controlled by these functions on ScrollAnimatorMac: void mouseEnteredContentArea(); void mouseExitedContentArea(); void mouseMovedInContentArea(); void mouseEnteredScrollbar(Scrollbar*) const; void mouseExitedScrollbar(Scrollbar*) const; This mostly (webkit.org/b/211347) works now that the mayBegin/Canceled state is updated correctly, and is tested by a new test. Tests: fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hovered.html fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-reveal.html * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::ScrollingTree): (WebCore::ScrollingTree::handleWheelEvent): * page/scrolling/ScrollingTree.h: * page/scrolling/ScrollingTreeGestureState.cpp: Added. (WebCore::ScrollingTreeGestureState::ScrollingTreeGestureState): (WebCore::ScrollingTreeGestureState::receivedWheelEvent): (WebCore::ScrollingTreeGestureState::handleGestureCancel): (WebCore::ScrollingTreeGestureState::nodeDidHandleEvent): (WebCore::ScrollingTreeGestureState::clearAllNodes): * page/scrolling/ScrollingTreeGestureState.h: Copied from Source/WebCore/page/scrolling/ScrollingTreeLatchingController.h. * page/scrolling/ScrollingTreeLatchingController.cpp: (WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent): * page/scrolling/ScrollingTreeLatchingController.h: * page/scrolling/ScrollingTreeScrollingNode.cpp: (WebCore::ScrollingTreeScrollingNode::canHandleWheelEvent const): (WebCore::ScrollingTreeScrollingNode::canScrollWithWheelEvent const): Deleted. * page/scrolling/ScrollingTreeScrollingNode.h: * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: (WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent): * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: (WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent): * platform/Logging.cpp: (WebCore::initializeLogChannelsIfNecessary): * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::isGestureStart const): (WebCore::PlatformWheelEvent::isGestureCancel const): * platform/cocoa/ScrollController.mm: (WebCore::ScrollController::handleWheelEvent): * platform/mac/ScrollAnimatorMac.mm: (WebCore::scrollbarState): LayoutTests: * fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hovered-expected.txt: Added. * fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hovered.html: Added. * fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-reveal-expected.txt: Added. * fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-reveal.html: Copied from LayoutTests/fast/scrolling/mac/scrollbars/overlay-scrollbar-reveal.html. * fast/scrolling/mac/scrollbars/overlay-scrollbar-reveal.html: Canonical link: https://commits.webkit.org/224305@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-05 00:59:07 +00:00
page/scrolling/ScrollingTreeGestureState.h
[Async overflow scrolling] Vertical scrolls over a horizontally scrollable overflow are captured https://bugs.webkit.org/show_bug.cgi?id=210320 Reviewed by Tim Horton. Source/WebCore: This patch adds somewhat more sophisticated latching logic to the scrolling thread, which fixes the inability to vertically scroll if the mouse is over an enclosed horizontal scroller. ScrollingTree owns a ScrollingTreeLatchingController, which determines when to latch and clear latching. Latch clearing uses a 100ms delay (like main thread latching) so that a starting gesture soon after another gesture, whose initial x and y are small, goes to the same scroller as before. Scrolling tree latching works as follows. When we receive a scroll event which allows use of the latched node, and there is a latched node, send the event directly to that node. Otherwise, hit-test to find the most deeply nested scroll target. Traverse up the parent chain giving each node an opportunity to handle the event. If handled by a node, that node becomes the latched node. ScrollingTree no longer tracks the latched node itself. Tests: scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe.html scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow.html * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): (WebCore::ScrollingTree::handleWheelEvent): (WebCore::ScrollingTree::commitTreeState): (WebCore::ScrollingTree::latchedNodeID const): (WebCore::ScrollingTree::clearLatchedNode): (WebCore::ScrollingTree::mainFrameScrollPosition const): (WebCore::ScrollingTree::scrollingTreeAsText): (WebCore::ScrollingTree::setOrClearLatchedNode): Deleted. (WebCore::ScrollingTree::latchedNode): Deleted. (WebCore::ScrollingTree::setLatchedNode): Deleted. * page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::hasLatchedNode const): Deleted. * page/scrolling/ScrollingTreeLatchingController.cpp: Added. (WebCore::ScrollingTreeLatchingController::receivedWheelEvent): (WebCore::ScrollingTreeLatchingController::latchedNodeForEvent const): (WebCore::ScrollingTreeLatchingController::latchedNodeID const): (WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent): (WebCore::ScrollingTreeLatchingController::nodeWasRemoved): (WebCore::ScrollingTreeLatchingController::clearLatchedNode): * page/scrolling/ScrollingTreeLatchingController.h: Added. * page/scrolling/ScrollingTreeScrollingNode.cpp: (WebCore::ScrollingTreeScrollingNode::isLatchedNode const): (WebCore::ScrollingTreeScrollingNode::canScrollWithWheelEvent const): (WebCore::ScrollingTreeScrollingNode::scrollLimitReached const): * page/scrolling/ScrollingTreeScrollingNode.h: * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: (WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent): LayoutTests: Tests for horizontal inside vertical overflow, test that hit-testing inside scrolled-to-limit horizontal scrollers still allows for swipe navigation, and test the latching timeout. * fast/scrolling/latching/iframe-latch-small-deltas-expected.txt: * fast/scrolling/latching/iframe-latch-small-deltas.html: * scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe-expected.txt: Added. * scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe.html: Added. * scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow-expected.txt: Added. * scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow.html: Added. Canonical link: https://commits.webkit.org/223228@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-10 15:43:57 +00:00
page/scrolling/ScrollingTreeLatchingController.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
page/scrolling/ScrollingTreeNode.h
page/scrolling/ScrollingTreeOverflowScrollingNode.h
page/scrolling/ScrollingTreeScrollingNode.h
page/scrolling/ScrollingTreeScrollingNodeDelegate.h
page/scrolling/ThreadedScrollingTree.h
platform/AbortableTaskQueue.h
platform/CPUMonitor.h
platform/ColorChooser.h
platform/ColorChooserClient.h
platform/ContentFilterUnblockHandler.h
platform/ContentType.h
platform/ContextMenu.h
platform/ContextMenuItem.h
platform/ControlStates.h
platform/Cookie.h
platform/CountedUserActivity.h
platform/Cursor.h
platform/DataListSuggestionPicker.h
platform/DataListSuggestionsClient.h
[iOS] Specify a _UIDataOwner when reading or writing from the system pasteboard https://bugs.webkit.org/show_bug.cgi?id=222072 <rdar://problem/74208576> Reviewed by Devin Rousso. Source/WebCore: Add a static helper method to `PlatformPasteboard`, so that it can perform arbitrary pasteboard operations within the context of a given `DataOwnerType`. We then use this static helper to wrap all pasteboard access (reading, writing, etc.) inside calls to `+[UIPasteboard _performAsDataOwner:block:]` -- see WebKit ChangeLog for more details. Tests: UIPasteboardTests.PerformAsDataOwnerWhenCopying UIPasteboardTests.PerformAsDataOwnerWhenPasting * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/DataOwnerType.h: Added. Add a new enum to represent a data owner type. * platform/PlatformPasteboard.h: * platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::performAsDataOwner): * platform/libwpe/PlatformPasteboardLibWPE.cpp: (WebCore::PlatformPasteboard::performAsDataOwner): * platform/mac/PlatformPasteboardMac.mm: (WebCore::PlatformPasteboard::performAsDataOwner): Source/WebCore/PAL: Import `UIPasteboard_Private.h` so that `PlatformPasteboardIOS.mm` can use the new SPI. * pal/spi/ios/UIKitSPI.h: Source/WebKit: Adds WebKit2 support for tagging `PlatformPasteboard` with the content view's pasteboard data owner type. See below for more details. * Platform/spi/ios/UIKitSPI.h: Import `UIPasteboard_Private.h` so that we know about `+_performAsDataOwner:block:` in the API tests. * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: (WebKit::WebPasteboardProxy::getPasteboardTypes): (WebKit::WebPasteboardProxy::getPasteboardPathnamesForType): (WebKit::WebPasteboardProxy::getPasteboardStringForType): (WebKit::WebPasteboardProxy::getPasteboardStringsForType): (WebKit::WebPasteboardProxy::getPasteboardBufferForType): (WebKit::WebPasteboardProxy::getPasteboardChangeCount): (WebKit::WebPasteboardProxy::getPasteboardColor): (WebKit::WebPasteboardProxy::getPasteboardURL): (WebKit::WebPasteboardProxy::addPasteboardTypes): (WebKit::WebPasteboardProxy::setPasteboardTypes): (WebKit::WebPasteboardProxy::setPasteboardURL): (WebKit::WebPasteboardProxy::setPasteboardColor): (WebKit::WebPasteboardProxy::setPasteboardStringForType): (WebKit::WebPasteboardProxy::containsURLStringSuitableForLoading): Make all of these methods use `dataOwner()` with either a `Read` or `Write` pasteboard access intent to grab the data owner type from the view corresponding to the page identifier, and then wrap all pasteboard access within `PlatformPasteboard`'s new `performAsDataOwner` static helper. (WebKit::WebPasteboardProxy::urlStringSuitableForLoading): (WebKit::WebPasteboardProxy::setPasteboardBufferForType): (WebKit::WebPasteboardProxy::getNumberOfFiles): (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite): (WebKit::WebPasteboardProxy::writeCustomData): (WebKit::WebPasteboardProxy::allPasteboardItemInfo): (WebKit::WebPasteboardProxy::informationForItemAtIndex): (WebKit::WebPasteboardProxy::getPasteboardItemsCount): (WebKit::WebPasteboardProxy::readStringFromPasteboard): (WebKit::WebPasteboardProxy::readURLFromPasteboard): (WebKit::WebPasteboardProxy::readBufferFromPasteboard): (WebKit::WebPasteboardProxy::containsStringSafeForDOMToReadForType): (WebKit::WebPasteboardProxy::writeURLToPasteboard): (WebKit::WebPasteboardProxy::writeWebContentToPasteboard): (WebKit::WebPasteboardProxy::writeImageToPasteboard): (WebKit::WebPasteboardProxy::writeStringToPasteboard): (WebKit::WebPasteboardProxy::updateSupportedTypeIdentifiers): (WebKit::WebPasteboardProxy::determineDataOwner const): Use the given page identifier in various pasteboard IPC endpoints in `WebPasteboardProxy` to ask `WebPageProxy` for its pasteboard data owner type when reading or writing pasteboard data. * UIProcess/PageClient.h: Add a client hook to return a `DataOwnerType` enum, given a `PasteboardAccessIntent` -- that is, copy (write) or paste (read). (WebKit::PageClient::dataOwnerForPasteboard const): * UIProcess/PasteboardAccessIntent.h: Added. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::dataOwnerForPasteboard const): * UIProcess/WebPageProxy.h: * UIProcess/WebPasteboardProxy.h: * UIProcess/WebPasteboardProxy.messages.in: * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::dataOwnerForPasteboard const): * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (coreDataOwnerType): (-[WKContentView _dataOwnerForPasteboard:]): Return `-_dataOwnerForPaste` or `-_dataOwnerForCopy` (depending on the `PasteboardAccessIntent`). * WebKit.xcodeproj/project.pbxproj: Source/WTF: * wtf/PlatformHave.h: Turn several compile-time guards previously in `PlatformPasteboardIOS.mm` into `HAVE()`-s. Tools: Add a couple of new API tests to verify that `+[UIPasteboard _performAsDataOwner:block:]` is invoked with the expected data owner type when copying and pasting. * TestWebKitAPI/Tests/ios/UIPasteboardTests.mm: (+[TestUIPasteboard _performAsDataOwner:block:]): (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[WKWebView contentsAsString]): Additionally add a helper method to grab a `WKWebView`'s contents as an `NSString`, just for convenience. Canonical link: https://commits.webkit.org/234370@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-20 00:51:03 +00:00
platform/DataOwnerType.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/DateComponents.h
[GTK] Turn on editable <input type=date> and <input type=time> fields https://bugs.webkit.org/show_bug.cgi?id=224921 Reviewed by Carlos Garcia Campos. .: Turn on editable date and time inputs for GTK * Source/cmake/OptionsGTK.cmake: Add new source file to the list. Source/WebCore: Turn on editable date and time inputs for GTK. No new tests. This is covered by enabling existing <input type=date> and <input type=time> tests. * Headers.cmake: Add headers to the list. * loader/EmptyClients.cpp: Add missing header include. Source/WebKit: Turn on editable date and time inputs for GTK. * SourcesGTK.txt: Add source file. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDateTimePicker): Added. * UIProcess/API/gtk/PageClientImpl.h: Added method declaration. * UIProcess/gtk/WebDateTimePickerGtk.cpp: Added. Stub for date/time picker which doesn't have any user interface. This will allow clients to use the editable shadow DOM date/time input editable fields. (WebKit::WebDateTimePickerGtk::create): (WebKit::WebDateTimePickerGtk::~WebDateTimePickerGtk): (WebKit::WebDateTimePickerGtk::WebDateTimePickerGtk): (WebKit::WebDateTimePickerGtk::endPicker): (WebKit::WebDateTimePickerGtk::showDateTimePicker): * UIProcess/gtk/WebDateTimePickerGtk.h: Added. Source/WTF: Turn on editable date and time inputs for GTK. * Scripts/Preferences/WebPreferencesInternal.yaml: Set editable date/time inputs on by default for GTK as well. LayoutTests: Turn on editable date and time inputs for GTK. * platform/gtk/TestExpectations: Enable new forms test for WebKitGTK. * platform/gtk/fast/forms/date/date-input-rendering-basic-expected.txt: Added. * platform/gtk/fast/forms/date/date-pseudo-elements-expected.txt: Added. * platform/gtk/fast/forms/time/time-input-rendering-basic-expected.txt: Added. Canonical link: https://commits.webkit.org/236908@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-22 18:09:53 +00:00
platform/DateTimeChooser.h
platform/DateTimeChooserClient.h
platform/DateTimeChooserParameters.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/Decimal.h
platform/DeferrableTask.h
Remove PlatformMediaSessionClient dependency on Document https://bugs.webkit.org/show_bug.cgi?id=207892 Reviewed by Eric Carlson. Move DocumentIdentifier to Platform folder. Use DocumentIdentifier instead of Document in PlatformMediaSession/Manager. No change of behavior. * Headers.cmake: * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::hostingDocumentIdentifier const): * Modules/mediastream/MediaStreamTrack.h: * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::hostingDocumentIdentifier const): (WebCore::AudioContext::hostingDocument const): Deleted. * Modules/webaudio/AudioContext.h: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::stopAllMediaPlayback): (WebCore::Document::suspendAllMediaPlayback): (WebCore::Document::resumeAllMediaPlayback): (WebCore::Document::suspendAllMediaBuffering): (WebCore::Document::resumeAllMediaBuffering): * html/HTMLMediaElement.h: * platform/DocumentIdentifier.h: Renamed from Source/WebCore/dom/DocumentIdentifier.h. * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::PlatformMediaSession): * platform/audio/PlatformMediaSession.h: * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): (WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument): (WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument): (WebCore::PlatformMediaSessionManager::suspendAllMediaBufferingForDocument): (WebCore::PlatformMediaSessionManager::resumeAllMediaBufferingForDocument): (WebCore::PlatformMediaSessionManager::sessionsMatching const): (WebCore::PlatformMediaSessionManager::forEachDocumentSession): * platform/audio/PlatformMediaSessionManager.h: Canonical link: https://commits.webkit.org/220876@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-18 19:42:31 +00:00
platform/DocumentIdentifier.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/DragData.h
platform/DragImage.h
platform/DragItem.h
platform/EventTrackingRegions.h
platform/FileChooser.h
platform/FileHandle.h
platform/FileMonitor.h
platform/FileStreamClient.h
platform/FloatConversion.h
platform/HostWindow.h
platform/KeyedCoding.h
platform/KeypressCommand.h
platform/LayoutUnit.h
Rename SchemeRegistry to LegacySchemeRegistry https://bugs.webkit.org/show_bug.cgi?id=202586 Reviewed by Tim Horton. Source/WebCore: SchemeRegistry is process-global. We need to replace it with a non-process-global registry, but Rome wasn't built in a day. This rename allows me to call the replacement object that will have ownership and configuration "SchemeRegistry" and it also indicates that new development should use the owned object instead of the global object. * Headers.cmake: * Modules/mediastream/UserMediaController.cpp: (WebCore::isSecure): * Modules/mediastream/UserMediaRequest.cpp: * Modules/webauthn/AuthenticatorCoordinator.cpp: (WebCore::AuthenticatorCoordinatorInternal::processAppIdExtension): * Modules/webdatabase/DatabaseContext.cpp: (WebCore::DatabaseContext::allowDatabaseAccess const): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::setDomain): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::hasServiceWorkerScheme const): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): * loader/CrossOriginAccessControl.cpp: (WebCore::isValidCrossOriginRedirectionURL): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::matchRegistration): (WebCore::DocumentLoader::disallowWebArchive const): (WebCore::DocumentLoader::commitData): (WebCore::DocumentLoader::maybeLoadEmpty): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): (WebCore::DocumentThreadableLoader::checkURLSchemeAsCORSEnabled): * loader/archive/mhtml/MHTMLArchive.cpp: (WebCore::MHTMLArchive::create): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::freshnessLifetime const): * page/Page.cpp: (WebCore::Page::userStyleSheetLocationChanged): * page/SecurityOrigin.cpp: (WebCore::shouldTreatAsUniqueOrigin): (WebCore::shouldTreatAsPotentiallyTrustworthy): (WebCore::SecurityOrigin::SecurityOrigin): (WebCore::SecurityOrigin::isSecure): (WebCore::SecurityOrigin::canDisplay const): (WebCore::SecurityOrigin::domainForCachePartition const): * page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::allowObjectFromSource const): (WebCore::ContentSecurityPolicy::allowChildFrameFromSource const): (WebCore::ContentSecurityPolicy::allowResourceFromSource const): (WebCore::ContentSecurityPolicy::allowConnectToSource const): (WebCore::ContentSecurityPolicy::allowBaseURI const): * platform/LegacySchemeRegistry.cpp: Copied from Source/WebCore/platform/SchemeRegistry.cpp. (WebCore::allBuiltinSchemes): (WebCore::LegacySchemeRegistry::registerURLSchemeAsLocal): (WebCore::LegacySchemeRegistry::removeURLSchemeRegisteredAsLocal): (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsLocal): (WebCore::LegacySchemeRegistry::registerURLSchemeAsNoAccess): (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsNoAccess): (WebCore::LegacySchemeRegistry::registerURLSchemeAsDisplayIsolated): (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated): (WebCore::LegacySchemeRegistry::registerURLSchemeAsSecure): (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsSecure): (WebCore::LegacySchemeRegistry::registerURLSchemeAsEmptyDocument): (WebCore::LegacySchemeRegistry::shouldLoadURLSchemeAsEmptyDocument): (WebCore::LegacySchemeRegistry::setDomainRelaxationForbiddenForURLScheme): (WebCore::LegacySchemeRegistry::isDomainRelaxationForbiddenForURLScheme): (WebCore::LegacySchemeRegistry::canDisplayOnlyIfCanRequest): (WebCore::LegacySchemeRegistry::registerAsCanDisplayOnlyIfCanRequest): (WebCore::LegacySchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs): (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs): (WebCore::LegacySchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing): (WebCore::LegacySchemeRegistry::allowsDatabaseAccessInPrivateBrowsing): (WebCore::LegacySchemeRegistry::registerURLSchemeAsCORSEnabled): (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsCORSEnabled): (WebCore::LegacySchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy): (WebCore::LegacySchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy): (WebCore::LegacySchemeRegistry::schemeShouldBypassContentSecurityPolicy): (WebCore::LegacySchemeRegistry::registerURLSchemeAsAlwaysRevalidated): (WebCore::LegacySchemeRegistry::shouldAlwaysRevalidateURLScheme): (WebCore::LegacySchemeRegistry::registerURLSchemeAsCachePartitioned): (WebCore::LegacySchemeRegistry::shouldPartitionCacheForURLScheme): (WebCore::LegacySchemeRegistry::registerURLSchemeServiceWorkersCanHandle): (WebCore::LegacySchemeRegistry::canServiceWorkersHandleURLScheme): (WebCore::LegacySchemeRegistry::isServiceWorkerContainerCustomScheme): (WebCore::LegacySchemeRegistry::isUserExtensionScheme): (WebCore::LegacySchemeRegistry::isBuiltinScheme): (WebCore::SchemeRegistry::registerURLSchemeAsLocal): Deleted. (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsLocal): Deleted. (WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal): Deleted. (WebCore::SchemeRegistry::registerURLSchemeAsNoAccess): Deleted. (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNoAccess): Deleted. (WebCore::SchemeRegistry::registerURLSchemeAsDisplayIsolated): Deleted. (WebCore::SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated): Deleted. (WebCore::SchemeRegistry::registerURLSchemeAsSecure): Deleted. (WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure): Deleted. (WebCore::SchemeRegistry::registerURLSchemeAsEmptyDocument): Deleted. (WebCore::SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument): Deleted. (WebCore::SchemeRegistry::setDomainRelaxationForbiddenForURLScheme): Deleted. (WebCore::SchemeRegistry::isDomainRelaxationForbiddenForURLScheme): Deleted. (WebCore::SchemeRegistry::canDisplayOnlyIfCanRequest): Deleted. (WebCore::SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest): Deleted. (WebCore::SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs): Deleted. (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs): Deleted. (WebCore::SchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing): Deleted. (WebCore::SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing): Deleted. (WebCore::SchemeRegistry::registerURLSchemeAsCORSEnabled): Deleted. (WebCore::SchemeRegistry::shouldTreatURLSchemeAsCORSEnabled): Deleted. (WebCore::SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy): Deleted. (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy): Deleted. (WebCore::SchemeRegistry::schemeShouldBypassContentSecurityPolicy): Deleted. (WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated): Deleted. (WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme): Deleted. (WebCore::SchemeRegistry::registerURLSchemeAsCachePartitioned): Deleted. (WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme): Deleted. (WebCore::SchemeRegistry::registerURLSchemeServiceWorkersCanHandle): Deleted. (WebCore::SchemeRegistry::canServiceWorkersHandleURLScheme): Deleted. (WebCore::SchemeRegistry::isServiceWorkerContainerCustomScheme): Deleted. (WebCore::SchemeRegistry::isUserExtensionScheme): Deleted. (WebCore::SchemeRegistry::isBuiltinScheme): Deleted. * platform/LegacySchemeRegistry.h: Copied from Source/WebCore/platform/SchemeRegistry.h. * platform/SchemeRegistry.cpp: Removed. * platform/SchemeRegistry.h: Removed. * platform/ios/QuickLook.mm: * storage/Storage.cpp: * testing/Internals.cpp: (WebCore::Internals::registerURLSchemeAsBypassingContentSecurityPolicy): (WebCore::Internals::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy): * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::addRegistration): * workers/service/ServiceWorkerProvider.cpp: (WebCore::ServiceWorkerProvider::registerServiceWorkerClients): * workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::runRegisterJob): Source/WebKit: * NetworkProcess/NetworkLoadChecker.cpp: (WebKit::NetworkLoadChecker::doesNotNeedCORSCheck const): * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::registerURLSchemeAsSecure const): (WebKit::NetworkProcess::registerURLSchemeAsBypassingContentSecurityPolicy const): (WebKit::NetworkProcess::registerURLSchemeAsLocal const): (WebKit::NetworkProcess::registerURLSchemeAsNoAccess const): (WebKit::NetworkProcess::registerURLSchemeAsDisplayIsolated const): (WebKit::NetworkProcess::registerURLSchemeAsCORSEnabled const): (WebKit::NetworkProcess::registerURLSchemeAsCanDisplayOnlyIfCanRequest const): * Shared/AuxiliaryProcess.cpp: (WebKit::AuxiliaryProcess::registerURLSchemeServiceWorkersCanHandle const): * UIProcess/API/Cocoa/WKWebView.mm: (+[WKWebView handlesURLScheme:]): * UIProcess/API/glib/WebKitSecurityManager.cpp: (registerSecurityPolicyForURIScheme): (checkSecurityPolicyForURIScheme): * WebProcess/Plugins/WebPluginInfoProvider.cpp: (WebKit::WebPluginInfoProvider::webVisiblePluginInfo): * WebProcess/Storage/WebServiceWorkerProvider.cpp: (WebKit::WebServiceWorkerProvider::handleFetch): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::canHandleRequest): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::registerURLSchemeAsEmptyDocument): (WebKit::WebProcess::registerURLSchemeAsSecure const): (WebKit::WebProcess::registerURLSchemeAsBypassingContentSecurityPolicy const): (WebKit::WebProcess::setDomainRelaxationForbiddenForURLScheme const): (WebKit::WebProcess::registerURLSchemeAsLocal const): (WebKit::WebProcess::registerURLSchemeAsNoAccess const): (WebKit::WebProcess::registerURLSchemeAsDisplayIsolated const): (WebKit::WebProcess::registerURLSchemeAsCORSEnabled const): (WebKit::WebProcess::registerURLSchemeAsAlwaysRevalidated const): (WebKit::WebProcess::registerURLSchemeAsCachePartitioned const): (WebKit::WebProcess::registerURLSchemeAsCanDisplayOnlyIfCanRequest const): * WebProcess/WebStorage/StorageAreaImpl.cpp: Source/WebKitLegacy/mac: * WebView/WebView.mm: (+[WebView _setDomainRelaxationForbidden:forURLScheme:]): (+[WebView _registerURLSchemeAsSecure:]): (+[WebView _registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing:]): (+[WebView registerURLSchemeAsLocal:]): Source/WebKitLegacy/win: * WebView.cpp: (WebView::registerURLSchemeAsLocal): (WebView::setDomainRelaxationForbiddenForURLScheme): (WebView::registerURLSchemeAsSecure): (WebView::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing): Canonical link: https://commits.webkit.org/216072@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-04 19:30:08 +00:00
platform/LegacySchemeRegistry.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/Length.h
platform/LengthBox.h
platform/LengthPoint.h
platform/LengthSize.h
platform/LinkIcon.h
platform/LocalizedStrings.h
platform/LogInitialization.h
platform/Logging.h
platform/LowPowerModeNotifier.h
platform/MIMETypeRegistry.h
[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
platform/MediaCapabilitiesDecodingInfo.h
platform/MediaCapabilitiesEncodingInfo.h
platform/MediaCapabilitiesInfo.h
[Media In GPU Process][MSE] Add the support to forward initialization segment from the GPU Process to Web processes https://bugs.webkit.org/show_bug.cgi?id=219227 Reviewed by Eric Carlson. Source/WebCore: * Headers.cmake: Source/WebKit: This patch adds the support to forward `sourceBufferPrivateDidReceiveInitializationSegment()` callback from the source buffer parser running in the GPU process to the `SourceBufferPrivateRemote` running in the Web process, which in turn provides the initialization segment to `SourceBuffer`. No change in behavior. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/media/InitializationSegmentInfo.h: Added. (WebKit::InitializationSegmentInfo::TrackInformation::encode const): (WebKit::InitializationSegmentInfo::TrackInformation::decode): (WebKit::InitializationSegmentInfo::encode const): (WebKit::InitializationSegmentInfo::decode): * GPUProcess/media/RemoteAudioTrackProxy.cpp: (WebKit::RemoteAudioTrackProxy::RemoteAudioTrackProxy): (WebKit::RemoteAudioTrackProxy::~RemoteAudioTrackProxy): (WebKit::RemoteAudioTrackProxy::configurationChanged): (WebKit::RemoteAudioTrackProxy::willRemove): * GPUProcess/media/RemoteAudioTrackProxy.h: * GPUProcess/media/RemoteAudioTrackProxy.messages.in: Copied from Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in. * GPUProcess/media/RemoteMediaDescription.h: Added. (WebKit::MediaDescriptionInfo::encode const): (WebKit::MediaDescriptionInfo::decode): (WebKit::RemoteMediaDescription::RemoteMediaDescription): * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::loadMediaSource): (WebKit::RemoteMediaPlayerProxy::addRemoteAudioTrackProxy): (WebKit::RemoteMediaPlayerProxy::addRemoteVideoTrackProxy): (WebKit::RemoteMediaPlayerProxy::addRemoteTextTrackProxy): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveAudioTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddVideoTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveVideoTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddTextTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveTextTrack): (WebKit::RemoteMediaPlayerProxy::audioTrackSetEnabled): Deleted. (WebKit::RemoteMediaPlayerProxy::videoTrackSetSelected): Deleted. (WebKit::RemoteMediaPlayerProxy::textTrackSetMode): Deleted. * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/RemoteMediaSourceProxy.cpp: (WebKit::RemoteMediaSourceProxy::RemoteMediaSourceProxy): (WebKit::RemoteMediaSourceProxy::addSourceBuffer): * GPUProcess/media/RemoteMediaSourceProxy.h: * GPUProcess/media/RemoteSourceBufferProxy.cpp: (WebKit::RemoteSourceBufferProxy::create): (WebKit::RemoteSourceBufferProxy::RemoteSourceBufferProxy): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveInitializationSegment): * GPUProcess/media/RemoteSourceBufferProxy.h: * GPUProcess/media/RemoteTextTrackProxy.cpp: (WebKit::RemoteTextTrackProxy::RemoteTextTrackProxy): (WebKit::RemoteTextTrackProxy::~RemoteTextTrackProxy): (WebKit::RemoteTextTrackProxy::configurationChanged): (WebKit::RemoteTextTrackProxy::willRemove): (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: * GPUProcess/media/RemoteTextTrackProxy.messages.in: Copied from Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in. * GPUProcess/media/RemoteVideoTrackProxy.cpp: (WebKit::RemoteVideoTrackProxy::RemoteVideoTrackProxy): (WebKit::RemoteVideoTrackProxy::~RemoteVideoTrackProxy): (WebKit::RemoteVideoTrackProxy::configurationChanged): (WebKit::RemoteVideoTrackProxy::willRemove): * GPUProcess/media/RemoteVideoTrackProxy.h: * GPUProcess/media/RemoteVideoTrackProxy.messages.in: Copied from Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in. * Scripts/webkit/messages.py: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/AudioTrackPrivateRemote.cpp: (WebKit::AudioTrackPrivateRemote::AudioTrackPrivateRemote): (WebKit::AudioTrackPrivateRemote::setEnabled): * WebProcess/GPU/media/AudioTrackPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::addRemoteAudioTrack): (WebKit::MediaPlayerPrivateRemote::addRemoteTextTrack): (WebKit::MediaPlayerPrivateRemote::addRemoteVideoTrack): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * WebProcess/GPU/media/MediaSourcePrivateRemote.cpp: (WebKit::MediaSourcePrivateRemote::create): (WebKit::MediaSourcePrivateRemote::MediaSourcePrivateRemote): (WebKit::MediaSourcePrivateRemote::addSourceBuffer): (WebKit::MediaSourcePrivateRemote::readyState const): * WebProcess/GPU/media/MediaSourcePrivateRemote.h: * WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: (WebKit::SourceBufferPrivateRemote::create): (WebKit::SourceBufferPrivateRemote::SourceBufferPrivateRemote): (WebKit::SourceBufferPrivateRemote::readyState const): (WebKit::SourceBufferPrivateRemote::sourceBufferPrivateDidReceiveInitializationSegment): * WebProcess/GPU/media/SourceBufferPrivateRemote.h: * WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in: * WebProcess/GPU/media/TextTrackPrivateRemote.cpp: (WebKit::TextTrackPrivateRemote::TextTrackPrivateRemote): (WebKit::TextTrackPrivateRemote::setMode): * WebProcess/GPU/media/TextTrackPrivateRemote.h: * WebProcess/GPU/media/VideoTrackPrivateRemote.cpp: (WebKit::VideoTrackPrivateRemote::VideoTrackPrivateRemote): (WebKit::VideoTrackPrivateRemote::setSelected): * WebProcess/GPU/media/VideoTrackPrivateRemote.h: (WebKit::VideoTrackPrivateRemote::create): Canonical link: https://commits.webkit.org/232028@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-02 01:44:43 +00:00
platform/MediaDescription.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/MediaSample.h
platform/MediaSelectionOption.h
Introduce a MediaSessionGroupIdentifier https://bugs.webkit.org/show_bug.cgi?id=220706 Reviewed by Eric Carlson. Instead of going from page to document to media session, introduce a MediaSessionGroupIdentifier which groups sessions by page. We can then directly go from page to media session to suspend/resume play back. Update PlatformMediaSessionClient to implement mediaSessionGroupIdentifier instead of hostingDocumentIdentifier. We remove pausing playback from Document::~Document, as related audio producers (AudioContext, HTMLMediaElement) should be paused in their ActiveDOMObject stop method. Covered by existing tests, this is a refactoring. * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::mediaSessionGroupIdentifier const): (WebCore::AudioContext::hostingDocumentIdentifier const): Deleted. * Modules/webaudio/AudioContext.h: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::~Document): (WebCore::Document::mediaPlaybackExists): Deleted. (WebCore::Document::mediaPlaybackIsPaused): Deleted. (WebCore::Document::pauseAllMediaPlayback): Deleted. (WebCore::Document::suspendAllMediaPlayback): Deleted. (WebCore::Document::resumeAllMediaPlayback): Deleted. (WebCore::Document::suspendAllMediaBuffering): Deleted. (WebCore::Document::resumeAllMediaBuffering): Deleted. * dom/Document.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaSessionGroupIdentifier const): * html/HTMLMediaElement.h: * page/Page.cpp: (WebCore::Page::mediaPlaybackExists): (WebCore::Page::mediaPlaybackIsPaused): (WebCore::Page::pauseAllMediaPlayback): (WebCore::Page::suspendAllMediaPlayback): (WebCore::Page::mediaSessionGroupIdentifier const): (WebCore::Page::resumeAllMediaPlayback): (WebCore::Page::suspendAllMediaBuffering): (WebCore::Page::resumeAllMediaBuffering): * page/Page.h: * platform/MediaSessionGroupIdentifier.h: Added. * platform/audio/PlatformMediaSession.h: * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::pauseAllMediaPlaybackForGroup): (WebCore::PlatformMediaSessionManager::mediaPlaybackIsPaused): (WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForGroup): (WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForGroup): (WebCore::PlatformMediaSessionManager::suspendAllMediaBufferingForGroup): (WebCore::PlatformMediaSessionManager::resumeAllMediaBufferingForGroup): (WebCore::PlatformMediaSessionManager::forEachSessionInGroup): (WebCore::PlatformMediaSessionManager::pauseAllMediaPlaybackForDocument): Deleted. (WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument): Deleted. (WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument): Deleted. (WebCore::PlatformMediaSessionManager::suspendAllMediaBufferingForDocument): Deleted. (WebCore::PlatformMediaSessionManager::resumeAllMediaBufferingForDocument): Deleted. (WebCore::PlatformMediaSessionManager::forEachDocumentSession): Deleted. * platform/audio/PlatformMediaSessionManager.h: Canonical link: https://commits.webkit.org/233169@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-20 10:43:59 +00:00
platform/MediaSessionGroupIdentifier.h
platform/MediaSessionIdentifier.h
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
platform/MediaStrategy.h
Now Playing artwork doesn't update when changed. https://bugs.webkit.org/show_bug.cgi?id=223731 <rdar://problem/75823923> Source/WebCore: Now Playing and Media Remote requires a unique identifier for the currently playing item. If the same identifier is provided for every call to MRMediaRemoteSetNowPlayingInfo, then some updates may be skipped. In earlier changes, the MediaSessionElement identifier was combined with the Media Element identifier which broke Now Playing as the MediaSession identifier never changes for the lifetime of the web content process. So we create a new method HTMLMediaElement::mediaUniqueIdentifier with a new MediaUniqueIdentifier that willthat will be updated whenever the source of a media element changes and stop using the MediaSession identifier when dealing with Now Playing. Patch by Jean-Yves Avenard <jya@apple.com> on 2021-04-01 Reviewed by Eric Carlson. Manually tested, no framework available to test such change. * WebCore.xcodeproj/project.pbxproj: Add MediaUniqueIdentifier.h * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::prepareForLoad): Use setCurrentSrc instead of directly modifying m_currentSrc. (WebCore::HTMLMediaElement::selectMediaResource): Use setCurrentSrc instead of directly modifying m_currentSrc. (WebCore::HTMLMediaElement::loadResource): Use setCurrentSrc instead of directly modifying m_currentSrc. (WebCore::HTMLMediaElement::setCurrentSrc): Add convenience method, generate new MediaUniqueIdentifier each time m_currentSrc is modified. (WebCore::HTMLMediaElement::mediaUniqueIdentifier const): Return unique media identifier. (WebCore::HTMLMediaElement::mediaSessionUniqueIdentifier const): Deleted. * html/HTMLMediaElement.h: * html/MediaElementSession.cpp: (WebCore::MediaElementSession::nowPlayingInfo const): * platform/audio/NowPlayingInfo.h: Use MediaUniqueIdentifier for uniqueIdentifier member. (WebCore::NowPlayingInfo::decode): * platform/audio/PlatformMediaSessionManager.h: Use MediaUniqueIdentifier instead. (WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingInfoUniqueIdentifier const): set kMRMediaRemoteNowPlayingInfoArtworkIdentifier in CFDictionary to the source of the artwork. Workaround a bug in Media Controller component. * platform/audio/cocoa/MediaSessionManagerCocoa.h: * platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::setNowPlayingInfo): * platform/mac/MediaRemoteSoftLink.h: Soft-link kMRMediaRemoteNowPlayingInfoArtworkIdentifier symbol. * platform/mac/MediaRemoteSoftLink.mm: * testing/Internals.h: Add missing header. Source/WebCore/PAL: Patch by Jean-Yves Avenard <jya@apple.com> on 2021-04-01 Reviewed by Eric Carlson. * pal/spi/mac/MediaRemoteSPI.h: Canonical link: https://commits.webkit.org/236030@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-01 15:17:27 +00:00
platform/MediaUniqueIdentifier.h
Add support for NowPlaying commands in GPUProcess https://bugs.webkit.org/show_bug.cgi?id=208707 Reviewed by Eric Carlson. Source/WebCore: Add a NowPlayingManager that is responsible to clear/set/update NowPlaying information as well as receive commands and send them to the current NowPlaying client. Manually tested. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/audio/PlatformMediaSessionManager.h: Source/WebKit: Add a global NowPlayingManager. Each GPUConnectionToWebProcess is now a NowPlayingManager client. On updating NowPlayingInfo, it becomes a client and can start receiving commands. * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::clearNowPlayingInfo): (WebKit::GPUConnectionToWebProcess::setNowPlayingInfo): (WebKit::GPUConnectionToWebProcess::didReceiveRemoteControlCommand): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::nowPlayingManager): * GPUProcess/GPUProcess.h: * GPUProcess/media/RemoteAudioSessionProxy.cpp: * GPUProcess/media/RemoteAudioSessionProxyManager.cpp: (WebKit::RemoteAudioSessionProxyManager::tryToSetActiveForProcess): * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::didReceiveRemoteCommand): * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/GPUProcessConnection.messages.in: Canonical link: https://commits.webkit.org/221629@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-06 20:01:52 +00:00
platform/NowPlayingManager.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/NotImplemented.h
platform/OrientationNotifier.h
platform/PODInterval.h
platform/PODIntervalTree.h
platform/PODRedBlackTree.h
platform/Pasteboard.h
Plumb an Optional<PageIdentifier> through Pasteboard-related codepaths https://bugs.webkit.org/show_bug.cgi?id=221987 Reviewed by Tim Horton. Source/WebCore: In order to facilitate tagging pasteboard reads and writes with a data owner type on iOS sourced from `WKContentView`, we add infrastructure to (indirectly) tag `Pasteboard` with an optional `PageIdentifier` to indicate which page is triggering the pasteboard operation. However, since the `Pasteboard` class should only be responsible for interfacing with platform-dependent strategies for reading or writing data, we can't directly add a `PageIdentifier` member to `Pasteboard`. Instead, we introduce a separate `PasteboardContext` object, and let `Pasteboard` hold a unique pointer to this context (which is set during construction). `PasteboardContext` is then subclassed by `PagePasteboardContext`, which holds a `PageIdentifier` and is created from call sites of the `Pasteboard` constructor that have access to page identifiers (e.g. `Editor`, `Clipboard`, `EventHandler`). In a future patch, this opaque `PasteboardContext` will be converted back to a `PagePasteboardContext` in order to retrieve the page identifier in the WebKit client layer. * Headers.cmake: * Modules/async-clipboard/Clipboard.cpp: (WebCore::Clipboard::readText): (WebCore::Clipboard::writeText): (WebCore::Clipboard::read): (WebCore::Clipboard::ItemWriter::ItemWriter): Here (and in many places below), create `PagePasteboardContext` objects and use them to create `Pasteboard`s, passing them in as opaque `PasteboardContext`s. * WebCore.xcodeproj/project.pbxproj: * dom/DataTransfer.cpp: (WebCore::DataTransfer::createForDrag): * dom/DataTransfer.h: * editing/Editor.cpp: (WebCore::createDataTransferForClipboardEvent): (WebCore::dispatchClipboardEvent): (WebCore::Editor::pasteAsPlainTextBypassingDHTML): (WebCore::Editor::performCutOrCopy): (WebCore::Editor::paste): (WebCore::Editor::pasteAsPlainText): (WebCore::Editor::pasteAsQuotation): (WebCore::Editor::copyURL): (WebCore::Editor::copyImage): * editing/EditorCommand.cpp: (WebCore::executePasteGlobalSelection): * editing/mac/EditorMac.mm: (WebCore::Editor::readSelectionFromPasteboard): (WebCore::Editor::replaceNodeFromPasteboard): * inspector/CommandLineAPIHost.cpp: (WebCore::CommandLineAPIHost::copyText): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::copyText): * page/DragController.cpp: (WebCore::documentFragmentFromDragData): (WebCore::DragController::dragExited): (WebCore::DragController::performDragOperation): (WebCore::DragController::tryDHTMLDrag): (WebCore::DragController::tryToUpdateDroppedImagePlaceholders): * page/EventHandler.cpp: (WebCore::EventHandler::handleDrag): * page/PagePasteboardContext.h: Added. Add `PagePasteboardContext`, a `PasteboardContext` subclass that contains a `PageIdentifier` indicating which `Page` is requesting pasteboard access. (isType): * platform/DragData.cpp: (WebCore::DragData::DragData): (WebCore::DragData::createPasteboardContext const): Also plumb a `PageIdentifier` through `DragData`, and use it to implement a helper method that returns a context object for `Pasteboard`. * platform/DragData.h: Additionally make `operator=` platform-agnostic, instead of limited to GTK. (It isn't clear why this needs to be limited to the GTK port). (WebCore::DragData::DragData): (WebCore::DragData::pageID const): * platform/Pasteboard.h: Augment `Pasteboard`'s (numerous) platform-specific constructors to take in a `PasteboardContext` unique pointer as well, and store it in `m_context`. (WebCore::Pasteboard::Pasteboard): (WebCore::Pasteboard::context const): * platform/PasteboardContext.h: Added. Add `PasteboardContext`, which provides additional context for an arbitrary pasteboard operation in an opaque fashion. See `PagePasteboardContext` above. (WebCore::PasteboardContext::isPagePasteboardContext const): * platform/StaticPasteboard.cpp: (WebCore::StaticPasteboard::StaticPasteboard): * platform/cocoa/DragDataCocoa.mm: (WebCore::DragData::DragData): (WebCore::DragData::canSmartReplace const): (WebCore::DragData::asPlainText const): * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForGlobalSelection): (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::create): (WebCore::Pasteboard::Pasteboard): * platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::Pasteboard): (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::create): (WebCore::Pasteboard::createForCopyAndPaste): * platform/libwpe/PasteboardLibWPE.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::Pasteboard): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::Pasteboard): (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::create): * platform/win/DragDataWin.cpp: (WebCore::DragData::DragData): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::create): (WebCore::Pasteboard::Pasteboard): Source/WebKit: Update more `DragData` and `Pasteboard` initialization sites by passing in a `PageIdentifier` or `PasteboardContext`, respectively. See WebCore ChangeLog for more details. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<DragData>::encode): (IPC::ArgumentCoder<DragData>::decode): * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::draggingEntered): (WebKit::WebViewImpl::draggingUpdated): (WebKit::WebViewImpl::draggingExited): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView dragDataForDropSession:dragDestinationAction:]): * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::WebEditorClient::updateGlobalSelection): * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::declareAndWriteDragImage): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::performActionOnElement): Source/WebKitLegacy/mac: Create and pass in a `PasteboardContext` when creating a `Pasteboard`. See WebCore ChangeLog for more details. * WebCoreSupport/WebDragClient.mm: (WebDragClient::declareAndWriteDragImage): Canonical link: https://commits.webkit.org/234275@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-18 16:56:42 +00:00
platform/PasteboardContext.h
[Clipboard API] Support writing multiple PasteboardCustomData with SharedBuffers to the pasteboard https://bugs.webkit.org/show_bug.cgi?id=202851 Reviewed by Darin Adler. Source/WebCore: This patch refactors some logic around WebCore::PasteboardCustomData, in preparation for implementing the async clipboard API. There are two main goals of this refactoring: 1. Enable writing multiple items (each backed by PasteboardCustomData) to the platform pasteboard. 2. Enable writing platform data in the form of SharedBuffers to the platform pasteboard. See below for more details; no tests, as there is no change in behavior yet. * Headers.cmake: * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: Move PasteboardCustomData out of Pasteboard.h and into its own file. * dom/DataTransfer.cpp: (WebCore::DataTransfer::commitToPasteboard): * editing/cocoa/EditorCocoa.mm: (WebCore::Editor::getPasteboardTypesAndDataForAttachment): * platform/Pasteboard.cpp: (WebCore::PasteboardCustomData::createSharedBuffer const): Deleted. (WebCore::PasteboardCustomData::fromSharedBuffer): Deleted. Moved these method implementations to PasteboardCustomData.cpp. * platform/Pasteboard.h: Refactor PasteboardCustomData so that its member variables are now private, and encapsulated behind methods Additionally, make it so that the only way to set data on PasteboardCustomData is to use the writeString, writeData, and writeStringInCustomData methods, which ensure that the PasteboardCustomData is always in a consistent state. * platform/PasteboardCustomData.cpp: Added. (WebCore::copyPlatformData): (WebCore::PasteboardCustomData::Entry::Entry): (WebCore::PasteboardCustomData::Entry::operator=): Refactor the implementation of PasteboardCustomData, so that it contains a list of PasteboardCustomData entries instead of individual Vectors and HashMaps. (WebCore::PasteboardCustomData::PasteboardCustomData): (WebCore::PasteboardCustomData::createSharedBuffer const): (WebCore::PasteboardCustomData::fromSharedBuffer): (WebCore::PasteboardCustomData::writeString): (WebCore::PasteboardCustomData::writeData): (WebCore::PasteboardCustomData::writeStringInCustomData): (WebCore::PasteboardCustomData::addOrMoveEntryToEnd): Move logic from StaticPasteboard into PasteboardCustomData, and refactor these methods to handle Vector<PasteboardCustomData::Entry>. (WebCore::PasteboardCustomData::clear): (WebCore::PasteboardCustomData::operator=): (WebCore::PasteboardCustomData::orderedTypes const): (WebCore::PasteboardCustomData::hasData const): (WebCore::PasteboardCustomData::hasSameOriginCustomData const): (WebCore::PasteboardCustomData::sameOriginCustomStringData const): (WebCore::PasteboardCustomData::readBuffer const): (WebCore::PasteboardCustomData::readString const): (WebCore::PasteboardCustomData::readStringInCustomData const): (WebCore::PasteboardCustomData::forEachType const): (WebCore::PasteboardCustomData::forEachPlatformString const): (WebCore::PasteboardCustomData::forEachCustomString const): (WebCore::PasteboardCustomData::forEachPlatformStringOrBuffer const): Moved these method implementations from StaticPasteboard to PasteboardCustomData, and also introduced some new methods to help iterate through types and data. * platform/PasteboardCustomData.h: Added. (WebCore::PasteboardCustomData::origin const): (WebCore::PasteboardCustomData::setOrigin): (WebCore::PasteboardCustomData::data const): * platform/PasteboardStrategy.h: * platform/PlatformPasteboard.h: * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::decoder const): * platform/SharedBuffer.h: * platform/StaticPasteboard.cpp: (WebCore::StaticPasteboard::hasData): (WebCore::StaticPasteboard::typesSafeForBindings): (WebCore::StaticPasteboard::typesForLegacyUnsafeBindings): (WebCore::StaticPasteboard::readString): (WebCore::StaticPasteboard::readStringInCustomData): (WebCore::StaticPasteboard::writeString): (WebCore::StaticPasteboard::writeData): (WebCore::StaticPasteboard::writeStringInCustomData): (WebCore::StaticPasteboard::clear): (WebCore::StaticPasteboard::takeCustomData): (WebCore::StaticPasteboard::StaticPasteboard): Deleted. Refactor StaticPasteboard to now contain a PasteboardCustomData; additionally, adjust several methods in StaticPasteboard to simply call into PasteboardCustomData to write, read, or clear data. (WebCore::updateTypes): Deleted. * platform/StaticPasteboard.h: * platform/cocoa/PasteboardCocoa.mm: (WebCore::Pasteboard::readStringInCustomData): (WebCore::Pasteboard::readOrigin): (WebCore::PasteboardCustomData::cocoaType): Deleted. Moved the implementation of PasteboardCustomData::cocoaType from PasteboardCocoa.mm to PasteboardCustomDataCocoa.mm. * platform/cocoa/PasteboardCustomDataCocoa.mm: Added. (WebCore::PasteboardCustomData::cocoaType): * platform/ios/AbstractPasteboard.h: * platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::changeCount const): (WebCore::registerItemsToPasteboard): (WebCore::registerItemToPasteboard): (WebCore::PlatformPasteboard::write): Support writing multiple PasteboardCustomData objects to the platform pasteboard on iOS, by generating NSItemProviders for each one. This refactors the existing `registerItemToPasteboard` helper to handle multiple registration lists, renames it to `registerItemsToPasteboard` (plural), and then reimplements `registerItemToPasteboard` in terms of `registerItemsToPasteboard`. (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): (WebCore::createItemProviderRegistrationList): Adjust these to use getters on PasteboardCustomData instead of accessing the member variables directly. * platform/ios/WebItemProviderPasteboard.mm: (-[WebItemProviderPasteboard init]): (-[WebItemProviderPasteboard stageRegistrationLists:]): (-[WebItemProviderPasteboard clearRegistrationLists]): (-[WebItemProviderPasteboard takeRegistrationLists]): Refactor registration list staging on WebItemProviderPasteboard to support multiple registration lists, each representing a single item provider. (-[WebItemProviderPasteboard stageRegistrationList:]): Deleted. (-[WebItemProviderPasteboard takeRegistrationList]): Deleted. * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::write): * platform/mac/PasteboardWriter.mm: (WebCore::createPasteboardWriter): * platform/mac/PlatformPasteboardMac.mm: (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): (WebCore::PlatformPasteboard::write): Support writing multiple PasteboardCustomData objects to the platform pasteboard on macOS, by creating and setting NSPasteboardItems for each custom data. This means that instead of using legacy macOS pasteboard types, we need to use the "modern" NSPasteboardTypes when writing each item. This is because NSPasteboardItem quietly fails when attempting to set data for a legacy pasteboard type. (WebCore::createPasteboardItem): Source/WebKit: See WebCore ChangeLog for more details. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<PasteboardCustomData::Entry>::encode): (IPC::ArgumentCoder<PasteboardCustomData::Entry>::decode): Add helpers to encode and decode PasteboardCustomData::Entry. (IPC::ArgumentCoder<PasteboardCustomData>::encode): (IPC::ArgumentCoder<PasteboardCustomData>::decode): * Shared/WebCoreArgumentCoders.h: Add support for encoding and decoding PasteboardCustomData by encoding and decoding each of its items (see above). * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::requestDOMPasteAccess): * UIProcess/WebPasteboardProxy.h: * UIProcess/WebPasteboardProxy.messages.in: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView canPerformActionForWebView:withSender:]): (allPasteboardItemOriginsMatchOrigin): (-[WKContentView _didHandleAdditionalDragItemsRequest:]): Tweak several methods to use the new methods on PasteboardCustomData instead of accessing the member variables directly. (-[WKContentView cleanUpDragSourceSessionState]): (-[WKContentView _prepareToDragPromisedAttachment:]): (-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationLists:stagedDragSource:]): (-[WKContentView dragInteraction:itemsForBeginningSession:]): (-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]): Deleted. Adjust these methods to handle multiple staged item providers (for now, it remains that iOS drag and drop codepaths will still only write a single item to the pasteboard). Source/WebKitLegacy/mac: See WebCore ChangeLog for more details. * WebCoreSupport/WebPlatformStrategies.h: Canonical link: https://commits.webkit.org/216383@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-14 21:52:26 +00:00
platform/PasteboardCustomData.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/PasteboardItemInfo.h
platform/PasteboardStrategy.h
platform/PasteboardWriterData.h
platform/PlatformEvent.h
platform/PlatformExportMacros.h
platform/PlatformKeyboardEvent.h
platform/PlatformMouseEvent.h
platform/PlatformPasteboard.h
platform/PlatformScreen.h
platform/PlatformSpeechSynthesisUtterance.h
platform/PlatformSpeechSynthesisVoice.h
platform/PlatformSpeechSynthesizer.h
platform/PlatformStrategies.h
platform/PlatformTouchEvent.h
platform/PlatformTouchPoint.h
platform/PlatformWheelEvent.h
[iOS] Compatibility mouse events aren't prevented by calling preventDefault() on pointerdown https://bugs.webkit.org/show_bug.cgi?id=198124 <rdar://problem/50410863> Reviewed by Tim Horton. LayoutTests/imported/w3c: We add basic support to run a test that wasn't specifically designed for a touch-based interaction such that the test at imported/w3c/web-platform-tests/pointerevents/pointerevent_suppress_compat_events_on_click.html may run on iOS. The trick here is to add a pause after a touch ends to avoid the likelihood or two tap gestures triggering a double tap. * web-platform-tests/resources/testdriver-vendor.js: Source/WebCore: This fix builds atop the one made for wkb.ug/198072 which fixes this bug on macOS alone. In order to correctly prevent "compatibility" mouse events from being dispatched when the initial "pointerdown" event had preventDefault() called while handled, we need to pass the PointerID for the touch that triggered a tap gesture in the UI process down in the Web process and into the resulting PlatformMouseEvent. This will allow upon dispatch of a PlatformMouseEvent to call into PointerCaptureController to identify if the dispatch of mouse events is allowed for the event's PointerID. To support this, some refactoring was required. The PointerID header is now under platform/ such that PlatformMouseEvent may safely use it. Additionally, PointerEvent::defaultMousePointerIdentifier() is now a global mousePointerID defined in PointerID.h. Finally, PointerCaptureController::touchEndedOrWasCancelledForIdentifier() has been renamed to PointerCaptureController::touchWithIdentifierWasRemoved() and has WEBCORE_EXPORT such that it may be called from WebKit as the indication that a pointer is no longer active will now be initiated in WebKit on the UI process side. Testing is covered by the pre-existing imported/w3c/web-platform-tests/pointerevents/pointerevent_suppress_compat_events_on_click.html which will now run on iOS through a change to WebKitAdditions. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * dom/Element.cpp: (WebCore::Element::dispatchMouseEvent): When dealing with a mouse event on iOS, check whether the mouse event's PointerID allows for compatibility mouse events to be dispatched using PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier(). The "click" event is not a compatibility mouse event. * dom/PointerEvent.h: * page/PointerCaptureController.cpp: (WebCore::PointerCaptureController::PointerCaptureController): (WebCore::PointerCaptureController::touchWithIdentifierWasRemoved): (WebCore::PointerCaptureController::touchEndedOrWasCancelledForIdentifier): Deleted. * page/PointerCaptureController.h: * platform/PlatformMouseEvent.h: (WebCore::PlatformMouseEvent::PlatformMouseEvent): (WebCore::PlatformMouseEvent::pointerId const): * platform/PointerID.h: Renamed from Source/WebCore/dom/PointerID.h. (WebCore::mousePointerID): Source/WebKit: In order to correctly prevent "compatibility" mouse events from being dispatched when the initial "pointerdown" event had preventDefault() called while handled, we need to pass the PointerID for the touch that triggered a tap gesture in the UI process down in the Web process and into the resulting PlatformMouseEvent. This means we need to identify the touch identifier, which is the same as the PointerID used for Pointer Events, in the single tap gesture recognizer, an instance of WKSyntheticTapGestureRecognizer. To do this, we subclass the -[UIResponder touchesEnded:withEvent:] method and track the touch identifier as the lastActiveTouchIdentifier, a new public property of WKSyntheticTapGestureRecognizer. To allow for this, we need the support of the content view's UIWebTouchEventsGestureRecognizer which is exposed to the WKSyntheticTapGestureRecognizer as its supportingWebTouchEventsGestureRecognizer property. This lastActiveTouchIdentifier property is cleared as the gesture recognizer is reset. This allows the content view to pass the PointerID down to the Web process starting from -[WKContentView _singleTapRecognized:], going through WebPageProxy::commitPotentialTap() and eventually WebPage::completeSyntheticClick(). While we used to tell the PointerCaptureController that a PointerID was no longer active when a given touch ended or was canceled (in WebKitAdditions code), we can no longer do this as the dispatch of a synthetic tap is performed asynchronously and will happen past the dispatch of "pointerup" and "pointercancel" Pointer Events. To clear inactive PointerIDs from the PointerCaptureController, we add a new touchWithIdentifierWasRemoved() method on the WebPage and its proxy. When the WKSyntheticTapGestureRecognizer resets and -[WKContentView _singleTapDidReset:] is called, we call that method which allows for only active PointerIDs to be tracked by the PointerCaptureController. * UIProcess/WebPageProxy.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView cleanupInteraction]): (-[WKContentView _singleTapDidReset:]): (-[WKContentView _singleTapRecognized:]): * UIProcess/ios/WKSyntheticTapGestureRecognizer.h: * UIProcess/ios/WKSyntheticTapGestureRecognizer.m: (-[WKSyntheticTapGestureRecognizer reset]): (-[WKSyntheticTapGestureRecognizer touchesEnded:withEvent:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::touchWithIdentifierWasRemoved): (WebKit::WebPageProxy::commitPotentialTap): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::dispatchSyntheticMouseMove): (WebKit::WebPage::handleSyntheticClick): (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver): (WebKit::WebPage::completeSyntheticClick): (WebKit::WebPage::commitPotentialTap): (WebKit::WebPage::touchWithIdentifierWasRemoved): LayoutTests: We're adding an iOS-specific expectation since this test prints out the pointer type detected while it runs, which is "touch" on iOS and "mouse" in the expectation that already exists for macOS. * platform/ios/imported/w3c/web-platform-tests/pointerevents/pointerevent_suppress_compat_events_on_click-expected.txt: Added. Canonical link: https://commits.webkit.org/212200@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-22 19:58:15 +00:00
platform/PointerID.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/PopupMenu.h
platform/PopupMenuClient.h
platform/PopupMenuStyle.h
platform/ProcessIdentifier.h
platform/PromisedAttachmentInfo.h
platform/PublicSuffix.h
platform/RectEdges.h
platform/ReferrerPolicy.h
platform/RegistrableDomain.h
platform/RemoteCommandListener.h
platform/RuntimeApplicationChecks.h
platform/SSLKeyGenerator.h
platform/ScreenProperties.h
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
platform/ScriptExecutionContextIdentifier.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/ScrollAnimator.h
platform/ScrollTypes.h
platform/ScrollView.h
platform/ScrollableArea.h
platform/Scrollbar.h
platform/ScrollbarTheme.h
platform/ScrollbarThemeComposite.h
platform/SearchPopupMenu.h
Rename SerializedPlatformRepresentation to SerializedPlatformDataCue https://bugs.webkit.org/show_bug.cgi?id=207695 <rdar://problem/59422673> Reviewed by Youenn Fablet. No new tests, no functional change. * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): (WebCore::DataCue::cueContentsMatch const): * html/track/DataCue.h: * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): (WebCore::InbandDataTextTrack::updateDataCue): (WebCore::InbandDataTextTrack::removeDataCue): (WebCore::InbandDataTextTrack::removeCue): * html/track/InbandDataTextTrack.h: * html/track/InbandTextTrack.h: * platform/SerializedPlatformDataCue.h: Renamed from Source/WebCore/platform/SerializedPlatformRepresentation.h. * platform/graphics/InbandTextTrackPrivateClient.h: * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): * platform/mac/SerializedPlatformDataCueMac.h: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.h. (WebCore::SerializedPlatformDataCueMac::nativeValue const): * platform/mac/SerializedPlatformDataCueMac.mm: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm. (WebCore::SerializedPlatformDataCueMac::SerializedPlatformDataCueMac): (WebCore::SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac): (WebCore::SerializedPlatformDataCueMac::create): (WebCore::SerializedPlatformDataCueMac::data const): (WebCore::SerializedPlatformDataCueMac::deserialize const): (WebCore::SerializedPlatformDataCueMac::isEqual const): (WebCore::toSerializedPlatformDataCueMac): (WebCore::jsValueWithValueInContext): (WebCore::jsValueWithDataInContext): (WebCore::jsValueWithArrayInContext): (WebCore::jsValueWithDictionaryInContext): (WebCore::jsValueWithAVMetadataItemInContext): Canonical link: https://commits.webkit.org/220683@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-13 21:40:08 +00:00
platform/SerializedPlatformDataCue.h
Support in-band metadata cues when loading media in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=207904 <rdar://problem/59561647> Reviewed by Dean Jackson. Source/WebCore: No new tests, unskipped existing tests. * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::selectMediaResource): (WebCore::HTMLMediaElement::play): (WebCore::HTMLMediaElement::mediaEngineWasUpdated): (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): (WebCore::InbandDataTextTrack::findIncompleteCue): (WebCore::InbandDataTextTrack::updateDataCue): (WebCore::InbandDataTextTrack::removeDataCue): (WebCore::InbandDataTextTrack::removeCue): * html/track/InbandDataTextTrack.h: * html/track/TextTrack.cpp: (WebCore::TextTrack::addCue): * html/track/TextTrack.h: (WebCore::TextTrack::cuesInternal const): * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::cueIndex const): * platform/SerializedPlatformDataCue.h: (WebCore::SerializedPlatformDataCue::deserialize const): (WebCore::SerializedPlatformDataCue::data const): (WebCore::SerializedPlatformDataCue::isEqual const): (WebCore::SerializedPlatformDataCue::platformType const): (WebCore::SerializedPlatformDataCue::encodingRequiresPlatformData const): (WebCore::SerializedPlatformDataCue::encodableValue const): * platform/graphics/MediaPlayer.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): * platform/mac/SerializedPlatformDataCueMac.h: * platform/mac/SerializedPlatformDataCueMac.mm: (WebCore::SerializedPlatformDataCue::create): (WebCore::SerializedPlatformDataCueMac::SerializedPlatformDataCueMac): (WebCore::SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac): (WebCore::SerializedPlatformDataCueMac::isEqual const): (WebCore::toSerializedPlatformDataCueMac): (WebCore::SerializedPlatformDataCueMac::allowedClassesForNativeValues): (WebCore::SerializedPlatformDataCueMac::encodableValue const): (WebCore::jsValueWithAVMetadataItemInContext): (WebCore::NSDictionaryWithAVMetadataItem): (WebCore::SerializedPlatformDataCueMac::create): Deleted. Source/WebKit: * GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in: * GPUProcess/media/RemoteTextTrackProxy.cpp: (WebKit::RemoteTextTrackProxy::addDataCue): (WebKit::RemoteTextTrackProxy::updateDataCue): (WebKit::RemoteTextTrackProxy::removeDataCue): * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::encode): (IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::decode): * Shared/WebCoreArgumentCoders.h: * Shared/mac/WebCoreArgumentCodersMac.mm: (IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::encodePlatformData): (IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::decodePlatformData): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): (WebKit::MediaPlayerPrivateRemote::setConfiguration): (WebKit::MediaPlayerPrivateRemote::addDataCue): (WebKit::MediaPlayerPrivateRemote::addDataCueWithType): (WebKit::MediaPlayerPrivateRemote::updateDataCue): (WebKit::MediaPlayerPrivateRemote::removeDataCue): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::createRemoteMediaPlayer): * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/TextTrackPrivateRemote.cpp: (WebKit::TextTrackPrivateRemote::addGenericCue): (WebKit::TextTrackPrivateRemote::updateGenericCue): (WebKit::TextTrackPrivateRemote::removeGenericCue): (WebKit::TextTrackPrivateRemote::parseWebVTTFileHeader): (WebKit::TextTrackPrivateRemote::parseWebVTTCueData): (WebKit::TextTrackPrivateRemote::parseWebVTTCueDataStruct): (WebKit::TextTrackPrivateRemote::addDataCue): (WebKit::TextTrackPrivateRemote::addDataCueWithType): (WebKit::TextTrackPrivateRemote::updateDataCue): (WebKit::TextTrackPrivateRemote::removeDataCue): * WebProcess/GPU/media/TextTrackPrivateRemote.h: LayoutTests: * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/221012@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-21 03:35:50 +00:00
platform/SerializedPlatformDataCueValue.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/SharedBuffer.h
platform/SharedStringHash.h
[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
platform/SleepDisabler.h
platform/SleepDisablerClient.h
platform/SleepDisablerIdentifier.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/SuddenTermination.h
platform/Supplementable.h
[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
platform/SystemSoundDelegate.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/ThemeTypes.h
platform/ThreadCheck.h
platform/ThreadGlobalData.h
platform/ThreadSafeDataBuffer.h
platform/ThreadTimers.h
platform/Timer.h
platform/TouchAction.h
platform/UserActivity.h
platform/UserAgent.h
platform/UserInterfaceLayoutDirection.h
platform/ValidationBubble.h
platform/WebGLStateTracker.h
platform/Widget.h
platform/WindowsKeyboardCodes.h
platform/animation/Animation.h
platform/animation/AnimationList.h
platform/animation/AnimationUtilities.h
platform/animation/TimingFunction.h
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
platform/audio/AudioArray.h
platform/audio/AudioBus.h
platform/audio/AudioChannel.h
platform/audio/AudioDestination.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/audio/AudioHardwareListener.h
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
platform/audio/AudioIOCallback.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/audio/AudioSession.h
platform/audio/AudioSourceProvider.h
Add support for GPUProcess WebAudio media element providers https://bugs.webkit.org/show_bug.cgi?id=217704 Reviewed by Eric Carlson. Source/WebCore: Update AudioSourceProviderAVFObjC so that a specific ring buffer can be provided and to be notified of new samples being pushed. Covered by existing web audio tests run with GPUProcess. * WebCore.xcodeproj/project.pbxproj: * platform/audio/AudioSourceProvider.h: (WebCore::AudioSourceProvider::isHandlingAVPlayer const): * platform/audio/cocoa/AudioSampleDataSource.mm: (WebCore::AudioSampleDataSource::pullSamplesInternal): When we are too close to the end of available data, do as if we are paused and keep the same time entry for the next read operation. This will basically make us wait for the next push of data before restarting to read succesfully. * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h: (isType): * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: (WebCore::AudioSourceProviderAVFObjC::prepare): (WebCore::AudioSourceProviderAVFObjC::process): (WebCore::AudioSourceProviderAVFObjC::setAudioCallback): (WebCore::AudioSourceProviderAVFObjC::setRingBufferCreationCallback): * platform/mediastream/mac/WebAudioSourceProviderCocoa.mm: (WebCore::WebAudioSourceProviderCocoa::receivedNewAudioSamples): We should use the input sample rate to compute the input media time. Source/WebKit: Introduce RemoteAudioSourceProviderManager which receives IPC messages from GPU process for web audio data. RemoteAudioSourceProviderManager sends it to the identified RemoteAudioSourceProvider. Introduce RemoteAudioSourceProviderProxy which is a client to the AV AudioSourceProviderAVFObjC. RemoteAudioSourceProviderProxy will send IPC messages to RemoteAudioSourceProviderManager to send audio data and description. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/media/RemoteAudioSourceProviderProxy.cpp: Added. (WebKit::RemoteAudioSourceProviderProxy::create): (WebKit::RemoteAudioSourceProviderProxy::RemoteAudioSourceProviderProxy): (WebKit::RemoteAudioSourceProviderProxy::createRingBuffer): (WebKit::RemoteAudioSourceProviderProxy::newAudioSamples): (WebKit::RemoteAudioSourceProviderProxy::storageChanged): * GPUProcess/media/RemoteAudioSourceProviderProxy.h: Added. * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::~RemoteMediaPlayerProxy): (WebKit::RemoteMediaPlayerProxy::createAudioSourceProvider): (WebKit::RemoteMediaPlayerProxy::setShouldEnableAudioSourceProvider): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::audioSourceProviderManager): * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/media/RemoteAudioSourceProvider.cpp: (WebKit::RemoteAudioSourceProvider::create): (WebKit::RemoteAudioSourceProvider::RemoteAudioSourceProvider): (WebKit::RemoteAudioSourceProvider::close): (WebKit::RemoteAudioSourceProvider::hasNewClient): * WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp: Added. (WebKit::RemoteAudioSourceProviderManager::RemoteAudioSourceProviderManager): (WebKit::RemoteAudioSourceProviderManager::~RemoteAudioSourceProviderManager): (WebKit::RemoteAudioSourceProviderManager::setConnection): (WebKit::RemoteAudioSourceProviderManager::addProvider): (WebKit::RemoteAudioSourceProviderManager::removeProvider): (WebKit::RemoteAudioSourceProviderManager::dispatchToThread): (WebKit::RemoteAudioSourceProviderManager::audioStorageChanged): (WebKit::RemoteAudioSourceProviderManager::audioSamplesAvailable): (WebKit::RemoteAudioSourceProviderManager::RemoteAudio::RemoteAudio): (WebKit::RemoteAudioSourceProviderManager::RemoteAudio::setStorage): (WebKit::RemoteAudioSourceProviderManager::RemoteAudio::audioSamplesAvailable): * WebProcess/GPU/media/RemoteAudioSourceProviderManager.h: Added. (WebKit::RemoteAudioSourceProviderManager::create): * WebProcess/GPU/media/RemoteAudioSourceProviderManager.messages.in: Added. * WebProcess/cocoa/RemoteCaptureSampleManager.cpp: Canonical link: https://commits.webkit.org/230539@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-16 09:48:57 +00:00
platform/audio/AudioSourceProviderClient.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/audio/AudioStreamDescription.h
WebAudio tests are crashing in debug when enabling the GPU process https://bugs.webkit.org/show_bug.cgi?id=217663 Reviewed by Geoff Garen. Source/WebCore: No new tests, unskipped existing tests. * WebCore.xcodeproj/project.pbxproj: * platform/audio/PushPullFIFO.h: Export PushPullFIFO so that it can be used at WebKit layer. Source/WebKit: WebAudio tests were crashing in debug when enabling the GPU process because it did audio processing on the WebContent process's main thread. To address the issue, I made RemoteAudioDestinationProxy a ThreadMessageReceiver so that it receives IPC on an audio thread instead of the main thread. IPC messages are processed directly on the AudioWorklet thread when active or on an audio thread constructed by RemoteAudioDestinationProxy otherwise. * GPUProcess/media/RemoteAudioDestinationManager.cpp: (WebKit::RemoteAudioDestination::RemoteAudioDestination): Use a PushPullFIFO structure in render() to avoid hanging the audio rendering thread on a semaphore. Hanging the rendering thread was terrible for performance and was also a source of deadlock since the underlying framework is holding a lock while render() is called. We could process a RemoteAudioDestination::CreateAudioDestination sync IPC on the main thread and deadlock on that lock. * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.h: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: * NetworkProcess/IndexedDB/WebIDBServer.h: * NetworkProcess/webrtc/NetworkRTCProvider.h: * WebProcess/Network/webrtc/LibWebRTCNetwork.h: * WebProcess/cocoa/RemoteCaptureSampleManager.h: Use ThreadMessageReceiverRefCounted instead of ThreadMessageReceiver since those classes do not provide their own RefCounting. * Platform/IPC/Connection.cpp: (IPC::Connection::addWorkQueueMessageReceiver): (IPC::Connection::removeWorkQueueMessageReceiver): (IPC::Connection::addThreadMessageReceiver): (IPC::Connection::removeThreadMessageReceiver): (IPC::Connection::processIncomingMessage): (IPC::Connection::dispatchMessageToWorkQueueReceiver): (IPC::Connection::dispatchMessageToThreadReceiver): * Platform/IPC/Connection.h: (IPC::Connection::ThreadMessageReceiver::ref): (IPC::Connection::ThreadMessageReceiver::deref): - Add support for passing a destinationID when registering a WorkQueueMessageReceiver or a ThreadMessageReceiver, similarly to regular MessageReceivers. This was needed here since The GPUProcess sends IPC messages to the RemoteAudioDestinationProxy with a given destinationID and since RemoteAudioDestinationProxy is now a ThreadMessageReceiver. - Stop having ThreadMessageReceiver subclass ThreadSafeRefCounted since RemoteAudioDestinationProxy already subclasses ThreadSafeRefCounted indirectly. A new ThreadMessageReceiverRefCounted class was added for convenience for existing code that relied on its refcounting. * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: (WebKit::RemoteAudioDestinationProxy::RemoteAudioDestinationProxy): (WebKit::RemoteAudioDestinationProxy::~RemoteAudioDestinationProxy): (WebKit::RemoteAudioDestinationProxy::start): (WebKit::RemoteAudioDestinationProxy::stop): (WebKit::RemoteAudioDestinationProxy::renderBuffer): (WebKit::RemoteAudioDestinationProxy::didChangeIsPlaying): (WebKit::RemoteAudioDestinationProxy::dispatchToThread): * WebProcess/GPU/media/RemoteAudioDestinationProxy.h: Use a PushPullFIFO container in render() to avoid handing the audio rendering thread on a semaphore while the Render IPC is getting processed by the WebProcess. Source/WTF: * wtf/CrossThreadQueue.h: (WTF::CrossThreadQueue<DataType>::waitForMessage): If CrossThreadQueue::kill() gets called while another thread is waiting on a CrossThreadQueue::waitForMessage() call, make it so that waitForMessage() returns a default-constructed DataType instead of crashing trying to dequeue (since the queue is empty). LayoutTests: Unskip webaudio tests when the GPU process is enabled. * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/230420@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-13 21:53:22 +00:00
platform/audio/AudioUtilities.h
Export NowPlaying commands to GPUProcess when media playing in GPUProcess is enabled https://bugs.webkit.org/show_bug.cgi?id=208568 Source/WebCore: Reviewed by Eric Carlson. Removed PlatformMediaSessionClient NowPlaying getters since only HTMLMediaElement is eligible. Let MediaElementSession generates its own NowPlayingInfo when requested by the session manager. Use platform strategies to abstract out how to execute NowPlaying orders. Manually tested for NowPlaying functionality. Also covered by existing tests for the refactoring bits. * Headers.cmake: * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::sourceApplicationIdentifier const): Deleted. * Modules/webaudio/AudioContext.h: * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.h: * html/MediaElementSession.cpp: (WebCore::MediaElementSession::allowsPlaybackControlsForAutoplayingAudio const): (WebCore::MediaElementSession::nowPlayingInfo const): (WebCore::MediaElementSession::allowsNowPlayingControlsVisibility const): Deleted. * html/MediaElementSession.h: * platform/MediaStrategy.h: * platform/audio/AudioSession.h: * platform/audio/NowPlayingInfo.h: Added. (WebCore::NowPlayingInfo::encode const): (WebCore::NowPlayingInfo::decode): * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::nowPlayingInfo const): (WebCore::PlatformMediaSession::uniqueIdentifier const): Deleted. (WebCore::PlatformMediaSession::title const): Deleted. (WebCore::PlatformMediaSession::duration const): Deleted. (WebCore::PlatformMediaSession::currentTime const): Deleted. (WebCore::PlatformMediaSession::sourceApplicationIdentifier const): Deleted. (WebCore::PlatformMediaSessionClient::mediaSessionUniqueIdentifier const): Deleted. (WebCore::PlatformMediaSessionClient::mediaSessionTitle const): Deleted. (WebCore::PlatformMediaSessionClient::mediaSessionDuration const): Deleted. (WebCore::PlatformMediaSessionClient::mediaSessionCurrentTime const): Deleted. * platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSession::allowsNowPlayingControlsVisibility const): Deleted. * platform/audio/cocoa/MediaSessionManagerCocoa.h: * platform/audio/cocoa/MediaSessionManagerCocoa.mm: (MediaSessionManagerCocoa::clearNowPlayingInfo): (MediaSessionManagerCocoa::setNowPlayingInfo): (MediaSessionManagerCocoa::nowPlayingEligibleSession): (MediaSessionManagerCocoa::updateNowPlayingInfo): * platform/audio/ios/MediaSessionManagerIOS.h: * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::providePresentingApplicationPIDIfNecessary): (WebCore::MediaSessionManageriOS::providePresentingApplicationPID): Source/WebKit: Reviewed by Eric Carlson. Export NowPlaying orders to GPU process through IPC if GPUProcess is turned on. Otherwise use the regular in process implementation. Make sure to sync the hasAudio state so that it gets set properly in WebProcess. Remove the use of a PlatformMediaSessionManager for capture since it is now using platform strategies in two places. Instead use directly static methods of MediaSessionManageriOS to implement pid forwarding and AudioSession to set category and buffer size. A follow-up refactoring should probably rearchitect AudioSession handling. * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::clearNowPlayingInfo): (WebKit::GPUConnectionToWebProcess::setNowPlayingInfo): (WebKit::GPUConnectionToWebProcess::sessionManager): Deleted. * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::updateCachedState): * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: (WebKit::UserMediaCaptureManagerProxy::SourceProxy::SourceProxy): (WebKit::UserMediaCaptureManagerProxy::SourceProxy::~SourceProxy): (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): (WebKit::UserMediaCaptureManagerProxy::clone): * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h: * UIProcess/WebProcessProxy.cpp: * WebProcess/GPU/media/WebMediaStrategy.cpp: (WebKit::WebMediaStrategy::clearNowPlayingInfo): (WebKit::WebMediaStrategy::setNowPlayingInfo): * WebProcess/GPU/media/WebMediaStrategy.h: Source/WebKitLegacy/mac: Reviewed by Eric Carlson. Use in-process now playing implementation. * WebCoreSupport/WebPlatformStrategies.mm: Canonical link: https://commits.webkit.org/221544@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-05 11:53:35 +00:00
platform/audio/NowPlayingInfo.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/audio/PlatformAudioData.h
platform/audio/PlatformMediaSession.h
platform/audio/PlatformMediaSessionManager.h
WebAudio tests are crashing in debug when enabling the GPU process https://bugs.webkit.org/show_bug.cgi?id=217663 Reviewed by Geoff Garen. Source/WebCore: No new tests, unskipped existing tests. * WebCore.xcodeproj/project.pbxproj: * platform/audio/PushPullFIFO.h: Export PushPullFIFO so that it can be used at WebKit layer. Source/WebKit: WebAudio tests were crashing in debug when enabling the GPU process because it did audio processing on the WebContent process's main thread. To address the issue, I made RemoteAudioDestinationProxy a ThreadMessageReceiver so that it receives IPC on an audio thread instead of the main thread. IPC messages are processed directly on the AudioWorklet thread when active or on an audio thread constructed by RemoteAudioDestinationProxy otherwise. * GPUProcess/media/RemoteAudioDestinationManager.cpp: (WebKit::RemoteAudioDestination::RemoteAudioDestination): Use a PushPullFIFO structure in render() to avoid hanging the audio rendering thread on a semaphore. Hanging the rendering thread was terrible for performance and was also a source of deadlock since the underlying framework is holding a lock while render() is called. We could process a RemoteAudioDestination::CreateAudioDestination sync IPC on the main thread and deadlock on that lock. * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.h: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: * NetworkProcess/IndexedDB/WebIDBServer.h: * NetworkProcess/webrtc/NetworkRTCProvider.h: * WebProcess/Network/webrtc/LibWebRTCNetwork.h: * WebProcess/cocoa/RemoteCaptureSampleManager.h: Use ThreadMessageReceiverRefCounted instead of ThreadMessageReceiver since those classes do not provide their own RefCounting. * Platform/IPC/Connection.cpp: (IPC::Connection::addWorkQueueMessageReceiver): (IPC::Connection::removeWorkQueueMessageReceiver): (IPC::Connection::addThreadMessageReceiver): (IPC::Connection::removeThreadMessageReceiver): (IPC::Connection::processIncomingMessage): (IPC::Connection::dispatchMessageToWorkQueueReceiver): (IPC::Connection::dispatchMessageToThreadReceiver): * Platform/IPC/Connection.h: (IPC::Connection::ThreadMessageReceiver::ref): (IPC::Connection::ThreadMessageReceiver::deref): - Add support for passing a destinationID when registering a WorkQueueMessageReceiver or a ThreadMessageReceiver, similarly to regular MessageReceivers. This was needed here since The GPUProcess sends IPC messages to the RemoteAudioDestinationProxy with a given destinationID and since RemoteAudioDestinationProxy is now a ThreadMessageReceiver. - Stop having ThreadMessageReceiver subclass ThreadSafeRefCounted since RemoteAudioDestinationProxy already subclasses ThreadSafeRefCounted indirectly. A new ThreadMessageReceiverRefCounted class was added for convenience for existing code that relied on its refcounting. * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: (WebKit::RemoteAudioDestinationProxy::RemoteAudioDestinationProxy): (WebKit::RemoteAudioDestinationProxy::~RemoteAudioDestinationProxy): (WebKit::RemoteAudioDestinationProxy::start): (WebKit::RemoteAudioDestinationProxy::stop): (WebKit::RemoteAudioDestinationProxy::renderBuffer): (WebKit::RemoteAudioDestinationProxy::didChangeIsPlaying): (WebKit::RemoteAudioDestinationProxy::dispatchToThread): * WebProcess/GPU/media/RemoteAudioDestinationProxy.h: Use a PushPullFIFO container in render() to avoid handing the audio rendering thread on a semaphore while the Render IPC is getting processed by the WebProcess. Source/WTF: * wtf/CrossThreadQueue.h: (WTF::CrossThreadQueue<DataType>::waitForMessage): If CrossThreadQueue::kill() gets called while another thread is waiting on a CrossThreadQueue::waitForMessage() call, make it so that waitForMessage() returns a default-constructed DataType instead of crashing trying to dequeue (since the queue is empty). LayoutTests: Unskip webaudio tests when the GPU process is enabled. * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/230420@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-13 21:53:22 +00:00
platform/audio/PushPullFIFO.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
[WebAudio] Simplify code related to dispatchToRenderThread https://bugs.webkit.org/show_bug.cgi?id=219990 Reviewed by Geoffrey Garen. Simplify code related to dispatchToRenderThread in WebAudio: 1. AudioDestination::start() now always gets called with a non-null dispatchToRenderThread lambda. In the case where there is no AudioWorkletThread to dispatch to, the lambda simply calls its task synchronously. 2. For Cocoa ports, make it so that only AudioDestinationCocoa needs to worry about the dispatchToRenderThread lambda. The dispatchToRenderThread lambda is no longer exposed to subclasses such as MockAudioDestinationCocoa & RemoteAudioDestinationProxy. Source/WebCore: * Modules/webaudio/DefaultAudioDestinationNode.cpp: (WebCore::Function<void): * platform/audio/cocoa/AudioDestinationCocoa.cpp: (WebCore::AudioDestinationCocoa::start): (WebCore::AudioDestinationCocoa::startRendering): (WebCore::AudioDestinationCocoa::stop): (WebCore::AudioDestinationCocoa::stopRendering): (WebCore::AudioDestinationCocoa::render): * platform/audio/cocoa/AudioDestinationCocoa.h: * platform/audio/gstreamer/AudioDestinationGStreamer.cpp: (WebCore::AudioDestinationGStreamer::start): * platform/mock/MockAudioDestinationCocoa.cpp: (WebCore::MockAudioDestinationCocoa::startRendering): (WebCore::MockAudioDestinationCocoa::stopRendering): (WebCore::MockAudioDestinationCocoa::tick): * platform/mock/MockAudioDestinationCocoa.h: Source/WebKit: * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: (WebKit::RemoteAudioDestinationProxy::startRenderingThread): (WebKit::RemoteAudioDestinationProxy::startRendering): (WebKit::RemoteAudioDestinationProxy::stopRendering): (WebKit::RemoteAudioDestinationProxy::gpuProcessConnectionDidClose): * WebProcess/GPU/media/RemoteAudioDestinationProxy.h: Canonical link: https://commits.webkit.org/232570@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-17 22:23:39 +00:00
platform/audio/gstreamer/AudioDestinationGStreamer.h
Split calc() related files into 1-class per file structure https://bugs.webkit.org/show_bug.cgi?id=226421 Reviewed by Chris Dumez. Source/WebCore: It's bothered me for a while that the calc related classes (both in css/ and in platform/) were bundled all in two big files. This change splits them all out into their own header and implementation files that match their name, and puts them in new calc/ subdirectories (css/calc/... and platform/calc/...). This should hopefully make the modifications I need to make to calc() to support relative color syntax a little easier. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * css/CSSCalculationValue.cpp: Removed. * css/CSSCalculationValue.h: Removed. * css/CSSGradientValue.cpp: * css/CSSPrimitiveValue.cpp: * css/CSSPrimitiveValueMappings.h: * css/CSSValue.cpp: * css/calc: Added. * css/calc/CSSCalcCategoryMapping.cpp: Added. (WebCore::calcUnitCategory): (WebCore::calculationCategoryForCombination): (WebCore::canonicalUnitTypeForCalculationCategory): (WebCore::hasDoubleValue): * css/calc/CSSCalcCategoryMapping.h: Added. * css/calc/CSSCalcExpressionNode.cpp: Added. (WebCore::operator<<): (WebCore::prettyPrintNode): (WebCore::prettyPrintNodes): * css/calc/CSSCalcExpressionNode.h: Added. (WebCore::CSSCalcExpressionNode::equals const): (WebCore::CSSCalcExpressionNode::category const): (WebCore::CSSCalcExpressionNode::CSSCalcExpressionNode): * css/calc/CSSCalcExpressionNodeParser.cpp: Added. (WebCore::CSSCalcExpressionNodeParser::parseCalc): (WebCore::CSSCalcExpressionNodeParser::operatorValue): (WebCore::checkDepthAndIndex): (WebCore::CSSCalcExpressionNodeParser::parseCalcFunction): (WebCore::CSSCalcExpressionNodeParser::parseValue): (WebCore::CSSCalcExpressionNodeParser::parseCalcValue): (WebCore::CSSCalcExpressionNodeParser::parseCalcProduct): (WebCore::CSSCalcExpressionNodeParser::parseCalcSum): * css/calc/CSSCalcExpressionNodeParser.h: Added. (WebCore::CSSCalcExpressionNodeParser::CSSCalcExpressionNodeParser): * css/calc/CSSCalcInvertNode.cpp: Added. (WebCore::CSSCalcInvertNode::createCalcExpression const): (WebCore::CSSCalcInvertNode::doubleValue const): (WebCore::CSSCalcInvertNode::computeLengthPx const): (WebCore::CSSCalcInvertNode::dump const): * css/calc/CSSCalcInvertNode.h: Added. * css/calc/CSSCalcNegateNode.cpp: Added. (WebCore::CSSCalcNegateNode::createCalcExpression const): (WebCore::CSSCalcNegateNode::dump const): * css/calc/CSSCalcNegateNode.h: Added. * css/calc/CSSCalcOperationNode.cpp: Added. (WebCore::determineCategory): (WebCore::categoryForInvert): (WebCore::resolvedTypeForMinOrMaxOrClamp): (WebCore::isSamePair): (WebCore::sortingCategoryForType): (WebCore::sortingCategory): (WebCore::primitiveTypeForCombination): (WebCore::conversionToAddValuesWithTypes): (WebCore::functionFromOperator): (WebCore::CSSCalcOperationNode::create): (WebCore::CSSCalcOperationNode::createSum): (WebCore::CSSCalcOperationNode::createProduct): (WebCore::CSSCalcOperationNode::createMinOrMaxOrClamp): (WebCore::CSSCalcOperationNode::hoistChildrenWithOperator): (WebCore::CSSCalcOperationNode::canCombineAllChildren const): (WebCore::CSSCalcOperationNode::combineChildren): (WebCore::CSSCalcOperationNode::simplify): (WebCore::CSSCalcOperationNode::simplifyRecursive): (WebCore::CSSCalcOperationNode::simplifyNode): (WebCore::CSSCalcOperationNode::primitiveType const): (WebCore::CSSCalcOperationNode::createCalcExpression const): (WebCore::CSSCalcOperationNode::doubleValue const): (WebCore::CSSCalcOperationNode::computeLengthPx const): (WebCore::CSSCalcOperationNode::collectDirectComputationalDependencies const): (WebCore::CSSCalcOperationNode::collectDirectRootComputationalDependencies const): (WebCore::CSSCalcOperationNode::buildCSSText): (WebCore::functionPrefixForOperator): (WebCore::CSSCalcOperationNode::buildCSSTextRecursive): (WebCore::CSSCalcOperationNode::dump const): (WebCore::CSSCalcOperationNode::equals const): (WebCore::CSSCalcOperationNode::evaluateOperator): * css/calc/CSSCalcOperationNode.h: Added. * css/calc/CSSCalcPrimitiveValueNode.cpp: Added. (WebCore::CSSCalcPrimitiveValueNode::create): (WebCore::CSSCalcPrimitiveValueNode::customCSSText const): (WebCore::CSSCalcPrimitiveValueNode::primitiveType const): (WebCore::CSSCalcPrimitiveValueNode::CSSCalcPrimitiveValueNode): (WebCore::CSSCalcPrimitiveValueNode::isNumericValue const): (WebCore::CSSCalcPrimitiveValueNode::isNegative const): (WebCore::CSSCalcPrimitiveValueNode::negate): (WebCore::CSSCalcPrimitiveValueNode::invert): (WebCore::CSSCalcPrimitiveValueNode::add): (WebCore::CSSCalcPrimitiveValueNode::multiply): (WebCore::CSSCalcPrimitiveValueNode::convertToUnitType): (WebCore::CSSCalcPrimitiveValueNode::canonicalizeUnit): (WebCore::CSSCalcPrimitiveValueNode::createCalcExpression const): (WebCore::CSSCalcPrimitiveValueNode::doubleValue const): (WebCore::CSSCalcPrimitiveValueNode::computeLengthPx const): (WebCore::CSSCalcPrimitiveValueNode::collectDirectComputationalDependencies const): (WebCore::CSSCalcPrimitiveValueNode::collectDirectRootComputationalDependencies const): (WebCore::CSSCalcPrimitiveValueNode::isZero const): (WebCore::CSSCalcPrimitiveValueNode::equals const): (WebCore::CSSCalcPrimitiveValueNode::dump const): * css/calc/CSSCalcPrimitiveValueNode.h: Added. * css/calc/CSSCalcValue.cpp: Added. (WebCore::createBlendHalf): (WebCore::createCSS): (WebCore::CSSCalcValue::CSSCalcValue): (WebCore::CSSCalcValue::category const): (WebCore::CSSCalcValue::primitiveType const): (WebCore::CSSCalcValue::createCalculationValue const): (WebCore::CSSCalcValue::setPermittedValueRange): (WebCore::CSSCalcValue::collectDirectComputationalDependencies const): (WebCore::CSSCalcValue::collectDirectRootComputationalDependencies const): (WebCore::CSSCalcValue::customCSSText const): (WebCore::CSSCalcValue::equals const): (WebCore::CSSCalcValue::clampToPermittedRange const): (WebCore::CSSCalcValue::doubleValue const): (WebCore::CSSCalcValue::computeLengthPx const): (WebCore::CSSCalcValue::isCalcFunction): (WebCore::CSSCalcValue::dump const): (WebCore::CSSCalcValue::create): (WebCore::operator<<): * css/calc/CSSCalcValue.h: Added. * css/parser/CSSPropertyParserHelpers.cpp: * platform/CalculationValue.cpp: Removed. * platform/CalculationValue.h: Removed. * platform/Length.cpp: * platform/calc: Added. * platform/calc/CalcExpressionBlendLength.cpp: Added. (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength): (WebCore::CalcExpressionBlendLength::evaluate const): (WebCore::CalcExpressionBlendLength::operator== const): (WebCore::CalcExpressionBlendLength::dump const): * platform/calc/CalcExpressionBlendLength.h: Added. (WebCore::operator==): * platform/calc/CalcExpressionInversion.cpp: Added. (WebCore::CalcExpressionInversion::evaluate const): (WebCore::CalcExpressionInversion::dump const): (WebCore::CalcExpressionInversion::operator== const): (WebCore::operator==): * platform/calc/CalcExpressionInversion.h: Added. * platform/calc/CalcExpressionLength.cpp: Added. (WebCore::CalcExpressionLength::evaluate const): (WebCore::CalcExpressionLength::operator== const): (WebCore::CalcExpressionLength::dump const): * platform/calc/CalcExpressionLength.h: Added. (WebCore::CalcExpressionLength::CalcExpressionLength): (WebCore::operator==): * platform/calc/CalcExpressionNegation.cpp: Added. (WebCore::CalcExpressionNegation::evaluate const): (WebCore::CalcExpressionNegation::operator== const): (WebCore::CalcExpressionNegation::dump const): (WebCore::operator==): * platform/calc/CalcExpressionNegation.h: Added. * platform/calc/CalcExpressionNode.cpp: Added. (WebCore::operator<<): * platform/calc/CalcExpressionNode.h: Added. (WebCore::CalcExpressionNode::type const): (WebCore::CalcExpressionNode::CalcExpressionNode): * platform/calc/CalcExpressionNumber.cpp: Added. (WebCore::CalcExpressionNumber::evaluate const): (WebCore::CalcExpressionNumber::dump const): (WebCore::CalcExpressionNumber::operator== const): * platform/calc/CalcExpressionNumber.h: Added. (WebCore::CalcExpressionNumber::CalcExpressionNumber): (WebCore::operator==): * platform/calc/CalcExpressionOperation.cpp: Added. (WebCore::CalcExpressionOperation::evaluate const): (WebCore::CalcExpressionOperation::operator== const): (WebCore::operator==): (WebCore::CalcExpressionOperation::dump const): * platform/calc/CalcExpressionOperation.h: Added. (WebCore::CalcExpressionOperation::CalcExpressionOperation): * platform/calc/CalcOperator.cpp: Added. (WebCore::operator<<): * platform/calc/CalcOperator.h: Added. * platform/calc/CalculationCategory.cpp: Added. (WebCore::operator<<): * platform/calc/CalculationCategory.h: Added. * platform/calc/CalculationValue.cpp: Added. (WebCore::CalculationValue::create): (WebCore::CalculationValue::CalculationValue): (WebCore::CalculationValue::evaluate const): (WebCore::operator==): (WebCore::operator<<): * platform/calc/CalculationValue.h: Added. (WebCore::CalculationValue::shouldClampToNonNegative const): (WebCore::CalculationValue::expression const): * style/StyleBuilderConverter.h: Tools: * TestWebKitAPI/Tests/WebCore/CalculationValue.cpp: Update test to include additonal header now needed. Canonical link: https://commits.webkit.org/238283@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-30 00:51:26 +00:00
platform/calc/CalcExpressionNode.h
platform/calc/CalculationValue.h
[GPUP] Implement Modern EME API in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=208090 Reviewed by Eric Carlson. Source/WebCore: To enable caching of certain CDM properties, allow them to be fetched rather than queries. As such, CDMPrivate::supportsInitDataType -> supportedInitDataTypes, supportsRobustness -> supportedRobustnesses. To enable CDM types to be passed across XPC, add explicit sizes to the enumerations, and add encode and decode templates to the data types. To enable async messaging form the GPU process's MediaPlayer, send the MediaPlayer the information it needs when both legacy- and modern-EME APIs are both enabled, rather than allow the MediaPlayerPrivate to query the MediaPlayer. Move most of the algorithimic implementation from CDM into CDMPrivate, allowing it to be run from within the GPU process. Similmarly, make most of the synchronous methods in CDMInstance instead take a callback parameter, allowing them to be implemented in a remote process. * Headers.cmake: * Modules/encryptedmedia/CDM.cpp: (WebCore::CDM::getSupportedConfiguration): (WebCore::CDM::supportsInitDataType const): * Modules/encryptedmedia/CDM.h: * Modules/encryptedmedia/MediaKeySession.cpp: (WebCore::MediaKeySession::update): * Modules/encryptedmedia/MediaKeySystemAccess.cpp: (WebCore::MediaKeySystemAccess::createMediaKeys): * Modules/encryptedmedia/MediaKeys.cpp: (WebCore::MediaKeys::setServerCertificate): * Modules/encryptedmedia/MediaKeys.h: * Modules/encryptedmedia/MediaKeys.idl: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateShouldContinueAfterNeedKey): (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): (WebCore::HTMLMediaElement::mediaEngineWasUpdated): (WebCore::HTMLMediaElement::addEventListener): (WebCore::HTMLMediaElement::removeEventListener): * html/HTMLMediaElement.h: * platform/encryptedmedia/CDMEncryptionScheme.h: * platform/encryptedmedia/CDMFactory.cpp: (WebCore::CDMFactory::resetFactories): * platform/encryptedmedia/CDMFactory.h: * platform/encryptedmedia/CDMInstance.h: * platform/encryptedmedia/CDMInstanceSession.h: * platform/encryptedmedia/CDMKeyStatus.h: * platform/encryptedmedia/CDMKeySystemConfiguration.h: (WebCore::CDMKeySystemConfiguration::encode const): (WebCore::CDMKeySystemConfiguration::decode): * platform/encryptedmedia/CDMMediaCapability.h: (WebCore::CDMMediaCapability::encode const): (WebCore::CDMMediaCapability::decode): * platform/encryptedmedia/CDMMessageType.h: * platform/encryptedmedia/CDMPrivate.cpp: (WebCore::CDMPrivate::getSupportedConfiguration): (WebCore::CDMPrivate::doSupportedConfigurationStep): (WebCore::CDMPrivate::isPersistentType): (WebCore::CDMPrivate::getSupportedCapabilitiesForAudioVideoType): (WebCore::CDMPrivate::getConsentStatus): * platform/encryptedmedia/CDMPrivate.h: * platform/encryptedmedia/CDMRequirement.h: * platform/encryptedmedia/CDMRestrictions.h: (WebCore::CDMRestrictions::encode const): (WebCore::CDMRestrictions::decode): * platform/encryptedmedia/CDMSessionType.h: * platform/encryptedmedia/clearkey/CDMClearKey.cpp: (WebCore::CDMPrivateClearKey::supportedInitDataTypes const): (WebCore::CDMPrivateClearKey::supportsSessionTypeWithConfiguration const): (WebCore::CDMPrivateClearKey::supportedRobustnesses const): (WebCore::CDMInstanceClearKey::initializeWithConfiguration): (WebCore::CDMInstanceClearKey::setServerCertificate): (WebCore::CDMInstanceClearKey::setStorageDirectory): (WebCore::CDMInstanceSessionClearKey::updateLicense): * platform/encryptedmedia/clearkey/CDMClearKey.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::setShouldContinueAfterKeyNeeded): (WebCore::MediaPlayer::keyNeeded): * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::setShouldContinueAfterKeyNeeded): * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp: (WebCore::CDMPrivateFairPlayStreaming::supportedInitDataTypes const): (WebCore::CDMPrivateFairPlayStreaming::supportsSessionTypeWithConfiguration const): (WebCore::CDMPrivateFairPlayStreaming::supportedRobustnesses const): (WebCore::CDMPrivateFairPlayStreaming::supportsInitData const): * platform/graphics/avfoundation/CDMFairPlayStreaming.h: * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::AVFWrapper::shouldWaitForLoadingOfResource): * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h: * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration): (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setServerCertificate): (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setStorageDirectory): (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense): (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::sessionIdentifierChanged): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): * testing/MockCDMFactory.cpp: (WebCore::MockCDMFactory::setSupportedRobustness): (WebCore::MockCDM::supportedInitDataTypes const): (WebCore::MockCDM::supportedRobustnesses const): (WebCore::MockCDM::supportsSessionTypeWithConfiguration const): (WebCore::MockCDM::supportsInitData const): (WebCore::MockCDMInstance::initializeWithConfiguration): (WebCore::MockCDMInstance::setServerCertificate): (WebCore::MockCDMInstance::setStorageDirectory): (WebCore::MockCDMInstanceSession::updateLicense): * testing/MockCDMFactory.h: (WebCore::MockCDMFactory::supportedRobustness const): Source/WebKit: Adopt changes to MediaPlayerProxy. * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerKeyNeeded): * GPUProcess/media/RemoteMediaPlayerProxy.h: * WebProcess/GPU/media/WebMediaStrategy.cpp: (WebKit::WebMediaStrategy::registerCDMFactories): * WebProcess/GPU/media/WebMediaStrategy.h: Source/WebKitLegacy/mac: Adopt changes to PlatformStrategies. * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerKeyNeeded): * GPUProcess/media/RemoteMediaPlayerProxy.h: * WebCoreSupport/WebPlatformStrategies.mm: Canonical link: https://commits.webkit.org/221329@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-28 23:20:03 +00:00
platform/encryptedmedia/CDMEncryptionScheme.h
platform/encryptedmedia/CDMFactory.h
platform/encryptedmedia/CDMInstance.h
platform/encryptedmedia/CDMInstanceSession.h
platform/encryptedmedia/CDMKeyStatus.h
platform/encryptedmedia/CDMKeySystemConfiguration.h
platform/encryptedmedia/CDMMediaCapability.h
platform/encryptedmedia/CDMMessageType.h
platform/encryptedmedia/CDMPrivate.h
platform/encryptedmedia/CDMProxy.h
platform/encryptedmedia/CDMRequirement.h
platform/encryptedmedia/CDMRestrictions.h
platform/encryptedmedia/CDMSessionType.h
[GStreamer][EME][OpenCDM] Implement OpenCDM support https://bugs.webkit.org/show_bug.cgi?id=213550 Reviewed by Philippe Normand. .: Added support to enable OpenCDM and find it it needed. * Source/cmake/FindOpenCDM.cmake: Added. * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: * Source/cmake/WebKitFeatures.cmake: Source/WebCore: Implemented the OpenCDM support in the CDMOpenCDM and CDMProxyOpenCDM related classes. CDMOpenCDM classes check for Widevine support in OpenCDM and glues the JavaScript API to the OpenCDM/Thunder framework. Building this is optional and --opencdm parameter needs to be passed to build-webkit to get it. CDMProxy related needed changes because of several reasons. First is that Key was considering only a Vector<uint8_t> as a type and OpenCDM has session objects. Key is also renamed to KeyHandle as this name reflects in a better way the purpose of the class. This bleeds out to all CDMProxy related classes. CDMInstanceSessionProxy gets support to remove itself from the CDMSessionProxy. Regarding ClearKey, we adapt the changes to the CDMProxy classes and de-cable protection system from the decryptors as the OpenCDM decryptor could handle more than one system. No new tests. YouTube TV 2019 tests are green. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/GStreamer.cmake: * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::dataAsUInt8Ptr const): * platform/SharedBuffer.h: * platform/encryptedmedia/CDMInstance.h: * platform/encryptedmedia/CDMOpenCDMTypes.h: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp. * platform/encryptedmedia/CDMProxy.cpp: (WebCore::KeyHandle::idAsString const): (WebCore::KeyHandle::takeValueIfDifferent): (WebCore::KeyStore::containsKeyID const): (WebCore::KeyStore::merge): (WebCore::KeyStore::allKeysAs const): (WebCore::KeyStore::addKeys): (WebCore::KeyStore::add): (WebCore::KeyStore::remove): (WebCore::KeyStore::keyHandle const): (WebCore::CDMProxy::keyHandle const): (WebCore::CDMProxy::tryWaitForKeyHandle const): (WebCore::CDMProxy::keyAvailableUnlocked const): (WebCore::CDMProxy::keyAvailable const): (WebCore::CDMProxy::getOrWaitForKeyHandle const): (WebCore::CDMProxy::getOrWaitForKeyValue const): (WebCore::CDMInstanceSessionProxy::CDMInstanceSessionProxy): (WebCore::CDMInstanceSessionProxy::removeFromInstanceProxy): * platform/encryptedmedia/CDMProxy.h: (WebCore::KeyHandle::create): (WebCore::KeyHandle::id const): (WebCore::KeyHandle::value const): (WebCore::KeyHandle::value): (WebCore::KeyHandle::isStatusCurrentlyValid): (WebCore::KeyHandle::operator==): (WebCore::KeyHandle::operator<): (WebCore::KeyHandle::KeyHandle): (WebCore::KeyStore::isEmpty const): (WebCore::CDMProxy::instance const): (WebCore::CDMInstanceSessionProxy::releaseDecryptionResources): (WebCore::CDMInstanceSessionProxy::cdmInstanceProxy const): (WebCore::CDMInstanceProxy::proxy const): (WebCore::CDMInstanceProxy::removeSession): * platform/encryptedmedia/CDMUtilities.cpp: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp. (WebCore::CDMUtilities::parseJSONObject): * platform/encryptedmedia/CDMUtilities.h: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp. * platform/encryptedmedia/clearkey/CDMClearKey.cpp: (WebCore::parseLicenseFormat): (WebCore::CDMPrivateClearKey::supportsInitData const): (WebCore::CDMPrivateClearKey::sanitizeResponse const): (WebCore::CDMInstanceSessionClearKey::updateLicense): (WebCore::CDMInstanceSessionClearKey::removeSessionData): (WebCore::CDMInstanceSessionClearKey::parentInstance const): * platform/encryptedmedia/clearkey/CDMClearKey.h: * platform/graphics/gstreamer/GStreamerCommon.cpp: (WebCore::isOpenCDMRanked): (WebCore::initializeGStreamerAndRegisterWebKitElements): (WebCore::GstMappedBuffer::createVector): * platform/graphics/gstreamer/GStreamerCommon.h: (WebCore::GstMappedBuffer::create): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::waitForCDMAttachment): * platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp: (WebCore::CDMFactory::platformRegisterFactories): * platform/graphics/gstreamer/eme/CDMOpenCDM.cpp: Added. (openCDMLicenseType): (WebCore::initDataMD5): (WebCore::sessionLoadFailureFromOpenCDM): (WebCore::OpenCDM::destructOpenCDMSession): (WebCore::OpenCDM::createSharedOpenCDMSession): (WebCore::CDMFactoryOpenCDM::singleton): (WebCore::CDMFactoryOpenCDM::createCDM): (WebCore::CDMFactoryOpenCDM::createCDMProxy): (WebCore::CDMFactoryOpenCDM::supportedKeySystems const): (WebCore::CDMFactoryOpenCDM::supportsKeySystem): (WebCore::CDMPrivateOpenCDM::supportedInitDataTypes const): (WebCore::CDMPrivateOpenCDM::supportsConfiguration const): (WebCore::CDMPrivateOpenCDM::supportedRobustnesses const): (WebCore::CDMPrivateOpenCDM::distinctiveIdentifiersRequirement const): (WebCore::CDMPrivateOpenCDM::persistentStateRequirement const): (WebCore::CDMPrivateOpenCDM::distinctiveIdentifiersAreUniquePerOriginAndClearable const): (WebCore::CDMPrivateOpenCDM::createInstance): (WebCore::CDMPrivateOpenCDM::loadAndInitialize): (WebCore::CDMPrivateOpenCDM::supportsServerCertificates const): (WebCore::CDMPrivateOpenCDM::supportsSessions const): (WebCore::CDMPrivateOpenCDM::supportsInitData const): (WebCore::CDMPrivateOpenCDM::sanitizeResponse const): (WebCore::CDMPrivateOpenCDM::sanitizeSessionId const): (WebCore::CDMInstanceOpenCDM::CDMInstanceOpenCDM): (WebCore::CDMInstanceOpenCDM::initializeWithConfiguration): (WebCore::CDMInstanceOpenCDM::setServerCertificate): (WebCore::CDMInstanceOpenCDM::setStorageDirectory): (WebCore::CDMInstanceSessionOpenCDM::CDMInstanceSessionOpenCDM): (WebCore::CDMInstanceOpenCDM::createSession): (WebCore::ParsedResponseMessage::ParsedResponseMessage): (WebCore::ParsedResponseMessage::hasPayload const): (WebCore::ParsedResponseMessage::payload const): (WebCore::ParsedResponseMessage::payload): (WebCore::ParsedResponseMessage::hasType const): (WebCore::ParsedResponseMessage::type const): (WebCore::ParsedResponseMessage::typeOr const): (WebCore::CDMInstanceSessionOpenCDM::challengeGeneratedCallback): (WebCore::toString): (WebCore::CDMInstanceSessionOpenCDM::status const): (WebCore::CDMInstanceSessionOpenCDM::keyUpdatedCallback): (WebCore::CDMInstanceSessionOpenCDM::keysUpdateDoneCallback): (WebCore::CDMInstanceSessionOpenCDM::errorCallback): (WebCore::CDMInstanceSessionOpenCDM::requestLicense): (WebCore::CDMInstanceSessionOpenCDM::sessionFailure): (WebCore::CDMInstanceSessionOpenCDM::updateLicense): (WebCore::CDMInstanceSessionOpenCDM::loadSession): (WebCore::CDMInstanceSessionOpenCDM::closeSession): (WebCore::CDMInstanceSessionOpenCDM::removeSessionData): (WebCore::CDMInstanceSessionOpenCDM::storeRecordOfKeyUsage): (WebCore:: const): * platform/graphics/gstreamer/eme/CDMOpenCDM.h: Added. (WebCore::OpenCDM::OpenCDMSystemDeleter::operator() const): (WebCore::OpenCDM::OpenCDMSessionDeleter::operator() const): * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: (WebCore::CDMProxyClearKey::cencSetDecryptionKey): * platform/graphics/gstreamer/eme/CDMProxyOpenCDM.cpp: Added. (WebCore::CDMProxyOpenCDM::getDecryptionSession const): (WebCore::CDMProxyOpenCDM::decrypt): * platform/graphics/gstreamer/eme/CDMProxyOpenCDM.h: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp. * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h: (WebCore::InitData::InitData): (WebCore::InitData::payload const): (WebCore::GStreamerEMEUtilities::isWidevineKeySystem): (WebCore::GStreamerEMEUtilities::keySystemToUuid): * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp: (webkit_media_clear_key_decrypt_class_init): (protectionSystemId): * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: (transformCaps): (transformInPlace): * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h: * platform/graphics/gstreamer/eme/WebKitOpenCDMDecryptorGStreamer.cpp: Added. (webkit_media_opencdm_decrypt_class_init): (webkit_media_opencdm_decrypt_init): (finalize): (protectionSystemId): (cdmProxyAttached): (decrypt): * platform/graphics/gstreamer/eme/WebKitOpenCDMDecryptorGStreamer.h: Added. Source/WTF: * wtf/PlatformEnable.h: Disable OPENCDM by default. Tools: Added support to build OpenCDM and its dependencies. There is an opt in env var to get JHBuild building Thunder its Widevine dependencies. We also include a couple of GStreamer patches needed to get key IDs in the decryptors. Widevine is obviously proprietary and as you need to be licensed to access it, you need credentials to build it. * Scripts/webkitperl/FeatureList.pm: * gstreamer/jhbuild.modules: * gstreamer/patches/gst-plugins-bad-0006-mssdemux-parse-protection-data.patch: Added. * gstreamer/patches/gst-plugins-good-0002-Check-if-an-upstream-demuxer-provided-a-default-kid.patch: Added. * gtk/install-dependencies: * jhbuild/jhbuildrc_common.py: (init): * wpe/install-dependencies: Canonical link: https://commits.webkit.org/226987@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-10 14:57:57 +00:00
platform/encryptedmedia/CDMUtilities.h
[GPUP] Implement Modern EME API in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=208090 Reviewed by Eric Carlson. Source/WebCore: To enable caching of certain CDM properties, allow them to be fetched rather than queries. As such, CDMPrivate::supportsInitDataType -> supportedInitDataTypes, supportsRobustness -> supportedRobustnesses. To enable CDM types to be passed across XPC, add explicit sizes to the enumerations, and add encode and decode templates to the data types. To enable async messaging form the GPU process's MediaPlayer, send the MediaPlayer the information it needs when both legacy- and modern-EME APIs are both enabled, rather than allow the MediaPlayerPrivate to query the MediaPlayer. Move most of the algorithimic implementation from CDM into CDMPrivate, allowing it to be run from within the GPU process. Similmarly, make most of the synchronous methods in CDMInstance instead take a callback parameter, allowing them to be implemented in a remote process. * Headers.cmake: * Modules/encryptedmedia/CDM.cpp: (WebCore::CDM::getSupportedConfiguration): (WebCore::CDM::supportsInitDataType const): * Modules/encryptedmedia/CDM.h: * Modules/encryptedmedia/MediaKeySession.cpp: (WebCore::MediaKeySession::update): * Modules/encryptedmedia/MediaKeySystemAccess.cpp: (WebCore::MediaKeySystemAccess::createMediaKeys): * Modules/encryptedmedia/MediaKeys.cpp: (WebCore::MediaKeys::setServerCertificate): * Modules/encryptedmedia/MediaKeys.h: * Modules/encryptedmedia/MediaKeys.idl: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateShouldContinueAfterNeedKey): (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): (WebCore::HTMLMediaElement::mediaEngineWasUpdated): (WebCore::HTMLMediaElement::addEventListener): (WebCore::HTMLMediaElement::removeEventListener): * html/HTMLMediaElement.h: * platform/encryptedmedia/CDMEncryptionScheme.h: * platform/encryptedmedia/CDMFactory.cpp: (WebCore::CDMFactory::resetFactories): * platform/encryptedmedia/CDMFactory.h: * platform/encryptedmedia/CDMInstance.h: * platform/encryptedmedia/CDMInstanceSession.h: * platform/encryptedmedia/CDMKeyStatus.h: * platform/encryptedmedia/CDMKeySystemConfiguration.h: (WebCore::CDMKeySystemConfiguration::encode const): (WebCore::CDMKeySystemConfiguration::decode): * platform/encryptedmedia/CDMMediaCapability.h: (WebCore::CDMMediaCapability::encode const): (WebCore::CDMMediaCapability::decode): * platform/encryptedmedia/CDMMessageType.h: * platform/encryptedmedia/CDMPrivate.cpp: (WebCore::CDMPrivate::getSupportedConfiguration): (WebCore::CDMPrivate::doSupportedConfigurationStep): (WebCore::CDMPrivate::isPersistentType): (WebCore::CDMPrivate::getSupportedCapabilitiesForAudioVideoType): (WebCore::CDMPrivate::getConsentStatus): * platform/encryptedmedia/CDMPrivate.h: * platform/encryptedmedia/CDMRequirement.h: * platform/encryptedmedia/CDMRestrictions.h: (WebCore::CDMRestrictions::encode const): (WebCore::CDMRestrictions::decode): * platform/encryptedmedia/CDMSessionType.h: * platform/encryptedmedia/clearkey/CDMClearKey.cpp: (WebCore::CDMPrivateClearKey::supportedInitDataTypes const): (WebCore::CDMPrivateClearKey::supportsSessionTypeWithConfiguration const): (WebCore::CDMPrivateClearKey::supportedRobustnesses const): (WebCore::CDMInstanceClearKey::initializeWithConfiguration): (WebCore::CDMInstanceClearKey::setServerCertificate): (WebCore::CDMInstanceClearKey::setStorageDirectory): (WebCore::CDMInstanceSessionClearKey::updateLicense): * platform/encryptedmedia/clearkey/CDMClearKey.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::setShouldContinueAfterKeyNeeded): (WebCore::MediaPlayer::keyNeeded): * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::setShouldContinueAfterKeyNeeded): * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp: (WebCore::CDMPrivateFairPlayStreaming::supportedInitDataTypes const): (WebCore::CDMPrivateFairPlayStreaming::supportsSessionTypeWithConfiguration const): (WebCore::CDMPrivateFairPlayStreaming::supportedRobustnesses const): (WebCore::CDMPrivateFairPlayStreaming::supportsInitData const): * platform/graphics/avfoundation/CDMFairPlayStreaming.h: * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::AVFWrapper::shouldWaitForLoadingOfResource): * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h: * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration): (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setServerCertificate): (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setStorageDirectory): (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense): (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::sessionIdentifierChanged): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): * testing/MockCDMFactory.cpp: (WebCore::MockCDMFactory::setSupportedRobustness): (WebCore::MockCDM::supportedInitDataTypes const): (WebCore::MockCDM::supportedRobustnesses const): (WebCore::MockCDM::supportsSessionTypeWithConfiguration const): (WebCore::MockCDM::supportsInitData const): (WebCore::MockCDMInstance::initializeWithConfiguration): (WebCore::MockCDMInstance::setServerCertificate): (WebCore::MockCDMInstance::setStorageDirectory): (WebCore::MockCDMInstanceSession::updateLicense): * testing/MockCDMFactory.h: (WebCore::MockCDMFactory::supportedRobustness const): Source/WebKit: Adopt changes to MediaPlayerProxy. * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerKeyNeeded): * GPUProcess/media/RemoteMediaPlayerProxy.h: * WebProcess/GPU/media/WebMediaStrategy.cpp: (WebKit::WebMediaStrategy::registerCDMFactories): * WebProcess/GPU/media/WebMediaStrategy.h: Source/WebKitLegacy/mac: Adopt changes to PlatformStrategies. * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerKeyNeeded): * GPUProcess/media/RemoteMediaPlayerProxy.h: * WebCoreSupport/WebPlatformStrategies.mm: Canonical link: https://commits.webkit.org/221329@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-28 23:20:03 +00:00
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/gamepad/GamepadProvider.h
platform/gamepad/GamepadProviderClient.h
platform/gamepad/PlatformGamepad.h
[GTK] Build broken with ENABLE_GAMEPAD enabled https://bugs.webkit.org/show_bug.cgi?id=217226 Reviewed by Darin Adler. Source/WebCore: No new tests needed. * Headers.cmake: List SharedGamepadValue.h in WebCore_PRIVATE_FRAMEWORK_HEADERS, which was missing. * platform/gamepad/EmptyGamepadProvider.h: Mark class as final, because the destructor is final itself. * platform/gamepad/manette/ManetteGamepad.cpp: (WebCore::ManetteGamepad::ManetteGamepad): Adapt to use SharedGamepadValue. (WebCore::ManetteGamepad::buttonPressedOrReleased): Ditto. (WebCore::ManetteGamepad::absoluteAxisChanged): Ditto. * platform/gamepad/manette/ManetteGamepad.h: Ditto. * platform/gamepad/manette/ManetteGamepadProvider.cpp: Rename m_connectionDelayTimer to m_initialGamepadsConnectedTimer, which better reflects the usage and also makes the provider a bit more similar to HIDGamepadProvider (from the Mac port). Arrange to use the EventMakesGamepadsVisible flag. (WebCore::ManetteGamepadProvider::ManetteGamepadProvider): Remove the loop that iterates over the pre-detected gamepads because they are being added too early before any client has had the chance to be attached. (WebCore::ManetteGamepadProvider::startMonitoringGamepads): The loop that iterates and adds pre-detected gamepads is moved here, once there is at least a client. This solves hitting an assertion later on when UIGamepadProvider checks that the number of gamepads it has been notified of matches the amount tracked by ManetteGamepadProvider. (WebCore::ManetteGamepadProvider::stopMonitoringGamepads): (WebCore::ManetteGamepadProvider::deviceConnected): (WebCore::ManetteGamepadProvider::deviceDisconnected): (WebCore::ManetteGamepadProvider::initialGamepadsConnectedTimerFired): (WebCore::ManetteGamepadProvider::inputNotificationTimerFired): * platform/gamepad/manette/ManetteGamepadProvider.h: Ditto. Source/WebKit: * UIProcess/Gamepad/UIGamepadProvider.h: Mark class as final, because the destructor is final itself. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::numberOfConnectedGamepadsForTesting): Reorganize PLATFORM(MAC) guards to use GameControllerGamepadProvider only on macOS, as it is unavailable on other ports. * WebProcess/Gamepad/WebGamepadProvider.h: Mark class as final, because the destructor is final itself. Canonical link: https://commits.webkit.org/230335@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-10 19:46:34 +00:00
platform/gamepad/SharedGamepadValue.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
Make RenderingMode and AlphaPremultiplication enum classes and move them to separate headers https://bugs.webkit.org/show_bug.cgi?id=206516 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-01-21 Reviewed by Tim Horton. Source/WebCore: RenderingMode and AlphaPremultiplication need to be encoded and decoded when they are sent from the WebProcess to the GPUProcess. * Headers.cmake: * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::sanitizeDataIfNeeded): * WebCore.xcodeproj/project.pbxproj: * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneDeserializer::readImageBitmap): * css/CSSFilterImageValue.cpp: (WebCore::CSSFilterImageValue::image): * html/CustomPaintCanvas.cpp: (WebCore::CustomPaintCanvas::copiedImage const): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createImageBuffer const): * html/ImageBitmap.cpp: * html/OffscreenCanvas.cpp: (WebCore::OffscreenCanvas::transferToImageBitmap): (WebCore::OffscreenCanvas::createImageBuffer const): (WebCore::OffscreenCanvas::takeImageBuffer const): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::createCompositingBuffer): (WebCore::CanvasRenderingContext2DBase::createPattern): * html/canvas/ImageBitmapRenderingContext.cpp: (WebCore::ImageBitmapRenderingContext::isAccelerated const): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): * page/FrameSnapshotting.cpp: (WebCore::snapshotFrameRectWithClip): * platform/graphics/AlphaPremultiplication.h: Added. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation): * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::renderingMode const): * platform/graphics/GraphicsTypes.cpp: * platform/graphics/GraphicsTypes.h: * platform/graphics/ImageBuffer.h: * platform/graphics/RenderingMode.h: Added. * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::getScratchBuffer): (WebCore::ShadowBlur::drawRectShadowWithoutTiling): (WebCore::ShadowBlur::drawInsetShadowWithoutTiling): (WebCore::ShadowBlur::drawRectShadowWithTiling): (WebCore::ShadowBlur::drawInsetShadowWithTiling): (WebCore::ShadowBlur::drawShadowLayer): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBufferData::~ImageBufferData): (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cg/ImageBufferDataCG.h: * platform/graphics/filters/Filter.h: * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::imageBuffer const): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/shapes/Shape.cpp: (WebCore::Shape::createRasterShape): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImageForCurrentFrame): Source/WebKitLegacy/mac: * WebCoreSupport/WebContextMenuClient.mm: (WebContextMenuClient::imageForCurrentSharingServicePickerItem): Canonical link: https://commits.webkit.org/219626@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-22 00:26:24 +00:00
platform/graphics/AlphaPremultiplication.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/ANGLEWebKitBridge.h
Throttling requestAnimationFrame should be controlled by RenderingUpdateScheduler https://bugs.webkit.org/show_bug.cgi?id=204713 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-05-04 Reviewed by Simon Fraser. Source/WebCore: rAF and Page rendering were managed by two different timers. Throttling rAF was implemented by changing its timer. After r242624, RenderingUpdate steps have been managed by RenderingUpdateScheduler. This means rAF is now serviced by the preferredFramesPerSecond which is 60 fps regardless it's throttled or not. Moreover the rAF throttling timer was mistakenly kept and it has been running under the old assumption which is: rAF is serviced by a timer only. This means rAF will be serviced by its timer and by the RenderingUpdate steps at the same time when it is supposed to throttle. This will make it fire more than 60 fps in cases which it is supposed to run less than 60 fps. The solution is to have two throttling types: 1) Page throttling (or full throttling): This slows down all the steps of RenderingUpdate for the main document and all the sub-documents. Page throttling reasons are: -- VisuallyIdle: Aggressive throttling. -- LowPowerMode: Half speed throttling. 2) Document throttling (or partial throttling): This only slows down the rAF of a certain document. Document throttling reasons are: -- OutsideViewport: Aggressive throttling. -- NonInteractedCrossOriginFrame: Half speed throttling. RenderingUpdate steps will still be managed by RenderingUpdateScheduler which can be throttled. The assumption is none of these steps will need to run faster than the Page preferredFramesPerSecond. If rAF wants to run slower than the Page because of a Document throttling reason, no rAF callbacks will be serviced before its preferredFrameInterval has elapsed. In this patch, "Half speed throttling" is only implemented for the Page and the Document throttling. The "Aggressive throttling" will be done in following patches. Page rendering was never throttled before. We need to make sure this is not going to affect PLT. Some tests need to be changed and new tests need to be written. All of the throttling tests checks the state of the code but none of them checks the real user's experience. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * animation/DocumentTimeline.cpp: (WebCore::DocumentTimeline::animationInterval const): (WebCore::DocumentTimeline::updateThrottlingState): Deleted. * animation/DocumentTimeline.h: There is no need to have DocumentTimeline throttling. It is already throttled when the page RenderingUpdate is throttled. * dom/Document.cpp: (WebCore::Document::requestAnimationFrame): (WebCore::Document::updateLastHandledUserGestureTimestamp): LowPowerMode throttling is now handled by the Page. So remove its handling from the Document. * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::ScriptedAnimationController): (WebCore::ScriptedAnimationController::page const): (WebCore::ScriptedAnimationController::interval const): (WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const): (WebCore::ScriptedAnimationController::throttlingReasons const): (WebCore::ScriptedAnimationController::isThrottledRelativeToPage const): (WebCore::ScriptedAnimationController::shouldRescheduleRequestAnimationFrame const): (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::cancelCallback): (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks): (WebCore::ScriptedAnimationController::scheduleAnimation): (WebCore::throttlingReasonToString): Deleted. (WebCore::throttlingReasonsToString): Deleted. (WebCore::ScriptedAnimationController::addThrottlingReason): Deleted. (WebCore::ScriptedAnimationController::removeThrottlingReason): Deleted. (WebCore::ScriptedAnimationController::isThrottled const): Deleted. (WebCore::ScriptedAnimationController::animationTimerFired): Deleted. * dom/ScriptedAnimationController.h: (WebCore::ScriptedAnimationController::addThrottlingReason): (WebCore::ScriptedAnimationController::removeThrottlingReason): Get rid of the rAF throttling timer. Service the rAF callback only when the period from the current time stamp till the last service time stamp is greater than the preferred rAF interval. * page/FrameView.cpp: (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState): ThrottlingReason is now defined outside ScriptedAnimationController. * page/Page.cpp: (WebCore::m_loadsFromNetwork): (WebCore::Page::setLowPowerModeEnabledOverrideForTesting): (WebCore::Page::preferredRenderingUpdateInterval const): Calculate the preferred RenderingUpdate interval from the throttling reasons. (WebCore::Page::setIsVisuallyIdleInternal): (WebCore::Page::handleLowModePowerChange): Call adjustRenderingUpdateFrequency() when isLowPowerModeEnabled or IsVisuallyIdle is toggled. (WebCore::Page::isLowPowerModeEnabled const): Deleted. (WebCore::updateScriptedAnimationsThrottlingReason): Deleted. * page/Page.h: (WebCore::Page::isLowPowerModeEnabled const): (WebCore::Page::throttlingReasons const): (WebCore::Page::canUpdateThrottlingReason const): * page/RenderingUpdateScheduler.cpp: (WebCore::RenderingUpdateScheduler::setPreferredFramesPerSecond): (WebCore::RenderingUpdateScheduler::scheduleAnimation): (WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency): Change the preferredFramesPerSecond of the DisplayRefreshMonitor if the throttling is not aggressive e.g. 10_s. Otherwise use the timer. (WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate): Call adjustFramesPerSecond() when DisplayRefreshMonitor is created. (WebCore::RenderingUpdateScheduler::startTimer): * page/RenderingUpdateScheduler.h: * platform/graphics/AnimationFrameRate.h: Added. (WebCore::preferredFrameInterval): (WebCore::preferredFramesPerSecond): (WebCore::operator<<): Push names of ThrottlingReasons to a TextStream. * platform/graphics/DisplayRefreshMonitor.h: (WebCore::DisplayRefreshMonitor::setPreferredFramesPerSecond): * platform/graphics/DisplayRefreshMonitorManager.cpp: (WebCore::DisplayRefreshMonitorManager::monitorForClient): Rename createMonitorForClient() to monitorForClient() since it may return a cached DisplayRefreshMonitor. (WebCore::DisplayRefreshMonitorManager::setPreferredFramesPerSecond): (WebCore::DisplayRefreshMonitorManager::scheduleAnimation): (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange): No need to call registerClient(). This function was just ensuring the DisplayRefreshMonitor is created. scheduleAnimation() does the same thing. (WebCore::DisplayRefreshMonitorManager::createMonitorForClient): Deleted. (WebCore::DisplayRefreshMonitorManager::registerClient): Deleted. * platform/graphics/DisplayRefreshMonitorManager.h: (WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager): Deleted. * platform/graphics/GraphicsLayerUpdater.cpp: (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater): * platform/graphics/ios/DisplayRefreshMonitorIOS.mm: (-[WebDisplayLinkHandler setPreferredFramesPerSecond:]): Set the preferredFramesPerSecond of the CADisplayLink. * testing/Internals.cpp: (WebCore::Internals::requestAnimationFrameThrottlingReasons const): (WebCore::Internals::isRequestAnimationFrameThrottled const): Deleted. * testing/Internals.h: * testing/Internals.idl: Replace isRequestAnimationFrameThrottled() which returns a boolean by requestAnimationFrameThrottlingReasons() which returns a string. The string represents the throttling reasons. Source/WebKit: Create an IPC message on the DrawingArea to send a message from the WebProcess to the UIProcess to setPreferredFramesPerSecond of the DisplayRefreshMonitor. * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: (-[WKOneShotDisplayLinkHandler setPreferredFramesPerSecond:]): (WebKit::RemoteLayerTreeDrawingAreaProxy::setPreferredFramesPerSecond): Set the preferredFramesPerSecond of the CADisplayLink. * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h: * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm: (WebKit::RemoteLayerTreeDisplayRefreshMonitor::setPreferredFramesPerSecond): Forward the call to RemoteLayerTreeDrawingArea. * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h: * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::setPreferredFramesPerSecond): Send the IPC message from the WebProcess to the UIProcess. LayoutTests: * fast/animation/request-animation-frame-throttle-inside-overflow-scroll-expected.txt: * fast/animation/request-animation-frame-throttle-inside-overflow-scroll.html: * fast/animation/request-animation-frame-throttle-subframe-display-none-expected.txt: * fast/animation/request-animation-frame-throttle-subframe-display-none.html: * fast/animation/request-animation-frame-throttle-subframe-expected.txt: * fast/animation/request-animation-frame-throttle-subframe-zero-size-expected.txt: * fast/animation/request-animation-frame-throttle-subframe-zero-size.html: * fast/animation/request-animation-frame-throttle-subframe.html: * fast/animation/request-animation-frame-throttling-detached-iframe-expected.txt: * fast/animation/request-animation-frame-throttling-detached-iframe.html: Replace the call isRequestAnimationFrameThrottled() by requestAnimationFrameThrottlingReasons(). * fast/animation/request-animation-frame-throttling-lowPowerMode-expected.txt: * fast/animation/request-animation-frame-throttling-lowPowerMode.html: Ensure the actual rAF interval is > 30ms for lowPowerMode. * http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe-expected.txt: * http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html: * http/tests/frame-throttling/resources/requestAnimationFrame-frame.html: Replace the call isRequestAnimationFrameThrottled() by requestAnimationFrameThrottlingReasons(). Canonical link: https://commits.webkit.org/224287@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-04 21:24:49 +00:00
platform/graphics/AnimationFrameRate.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/AudioTrackPrivate.h
Introduce BifurcatedGraphicsContext https://bugs.webkit.org/show_bug.cgi?id=226318 Reviewed by Sam Weinig. Source/WebCore: New test: BifurcatedGraphicsContextTests.BasicBifurcatedContext Introduce a GraphicsContext subclass that forwards painting to two arbitrary child GraphicsContexts. This can be used, for example, to paint into a bitmap and display list simultaneously. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/BifurcatedGraphicsContext.cpp: Added. (WebCore::BifurcatedGraphicsContext::BifurcatedGraphicsContext): (WebCore::BifurcatedGraphicsContext::~BifurcatedGraphicsContext): (WebCore::BifurcatedGraphicsContext::hasPlatformContext const): (WebCore::BifurcatedGraphicsContext::platformContext const): (WebCore::BifurcatedGraphicsContext::save): (WebCore::BifurcatedGraphicsContext::restore): (WebCore::BifurcatedGraphicsContext::drawRect): (WebCore::BifurcatedGraphicsContext::drawLine): (WebCore::BifurcatedGraphicsContext::drawEllipse): (WebCore::BifurcatedGraphicsContext::applyStrokePattern): (WebCore::BifurcatedGraphicsContext::applyFillPattern): (WebCore::BifurcatedGraphicsContext::drawPath): (WebCore::BifurcatedGraphicsContext::fillPath): (WebCore::BifurcatedGraphicsContext::strokePath): (WebCore::BifurcatedGraphicsContext::beginTransparencyLayer): (WebCore::BifurcatedGraphicsContext::endTransparencyLayer): (WebCore::BifurcatedGraphicsContext::applyDeviceScaleFactor): (WebCore::BifurcatedGraphicsContext::fillRect): (WebCore::BifurcatedGraphicsContext::fillRoundedRectImpl): (WebCore::BifurcatedGraphicsContext::fillRectWithRoundedHole): (WebCore::BifurcatedGraphicsContext::clearRect): (WebCore::BifurcatedGraphicsContext::strokeRect): (WebCore::BifurcatedGraphicsContext::fillEllipse): (WebCore::BifurcatedGraphicsContext::strokeEllipse): (WebCore::BifurcatedGraphicsContext::setIsCALayerContext): (WebCore::BifurcatedGraphicsContext::isCALayerContext const): (WebCore::BifurcatedGraphicsContext::setIsAcceleratedContext): (WebCore::BifurcatedGraphicsContext::renderingMode const): (WebCore::BifurcatedGraphicsContext::clip): (WebCore::BifurcatedGraphicsContext::clipOut): (WebCore::BifurcatedGraphicsContext::clipPath): (WebCore::BifurcatedGraphicsContext::clipBounds const): (WebCore::BifurcatedGraphicsContext::setLineCap): (WebCore::BifurcatedGraphicsContext::setLineDash): (WebCore::BifurcatedGraphicsContext::setLineJoin): (WebCore::BifurcatedGraphicsContext::setMiterLimit): (WebCore::BifurcatedGraphicsContext::drawNativeImage): (WebCore::BifurcatedGraphicsContext::drawPattern): (WebCore::BifurcatedGraphicsContext::scale): (WebCore::BifurcatedGraphicsContext::rotate): (WebCore::BifurcatedGraphicsContext::translate): (WebCore::BifurcatedGraphicsContext::concatCTM): (WebCore::BifurcatedGraphicsContext::setCTM): (WebCore::BifurcatedGraphicsContext::getCTM const): (WebCore::BifurcatedGraphicsContext::roundToDevicePixels): (WebCore::BifurcatedGraphicsContext::drawFocusRing): (WebCore::BifurcatedGraphicsContext::drawLinesForText): (WebCore::BifurcatedGraphicsContext::drawDotsForDocumentMarker): (WebCore::BifurcatedGraphicsContext::setURLForRect): (WebCore::BifurcatedGraphicsContext::setDestinationForRect): (WebCore::BifurcatedGraphicsContext::addDestinationAtPoint): (WebCore::BifurcatedGraphicsContext::supportsInternalLinks const): (WebCore::BifurcatedGraphicsContext::updateState): (WebCore::BifurcatedGraphicsContext::deprecatedPrivateContext const): * platform/graphics/BifurcatedGraphicsContext.h: Added. Source/WebKit: * Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp: (WebKit::CGDisplayListImageBufferBackend::create): Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp: Added. (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/238215@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-27 19:14:01 +00:00
platform/graphics/BifurcatedGraphicsContext.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/BitmapImage.h
platform/graphics/Color.h
Extended Color: Refactor FloatComponents and ColorComponents into a single templatized ColorComponents class https://bugs.webkit.org/show_bug.cgi?id=212446 Reviewed by Simon Fraser. Merge FloatComponents and ColorComponents into ColorComponents<T> and move them to their own header. This avoids duplicate code and paves the way for further generalization down the line. Also moves some utility functions to ColorUtilities.h from SimpleColor.h as they make more sense in the former. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add ColorComponents.h * platform/graphics/ColorComponents.h: Copied from Source/WebCore/platform/graphics/ColorUtilities.h. Moved ColorComponents to its own header and templatized it to allow it to serve the needs of both the old ColorComponents and old FloatComponents classes. * platform/graphics/ColorUtilities.cpp: * platform/graphics/ColorUtilities.h: Removed ColorComponents/FloatComponents and update existing usages to their new names. Also moved roundAndClampColorChannel, fastMultiplyBy255, fastDivideBy255 and colorFloatToSimpleColorByte here from SimpleColor to make it clear where general helper functions can go. * platform/graphics/Color.h: * platform/graphics/Color.cpp: (WebCore::Color::colorSpaceAndComponents const): (WebCore::Color::toSRGBAComponentsLossy const): * platform/graphics/ExtendedColor.h: (WebCore::ExtendedColor::channels const): Update for rename of FloatComponents to ColorComponents<float>. * platform/graphics/SimpleColor.cpp: (WebCore::makeSimpleColorFromHSLA): Use structured bindings and simplify code. * platform/graphics/SimpleColor.h: (WebCore::roundAndClampColorChannel): Deleted. (WebCore::fastMultiplyBy255): Deleted. (WebCore::fastDivideBy255): Deleted. (WebCore::colorFloatToSimpleColorByte): Deleted. As noted above, moved roundAndClampColorChannel, fastMultiplyBy255, fastDivideBy255 and colorFloatToSimpleColorByte to ColorUtilities.h * platform/graphics/filters/FEColorMatrix.cpp: Update for rename of FloatComponents to ColorComponents<float>. * platform/graphics/filters/FEDisplacementMap.cpp: (WebCore::byteOffsetOfPixel): Moved byteOffsetOfPixel here from ColorUtilities. This file is the only user and it wasn't general in a way that was clear for other users. * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::drawLighting): Update for rename of FloatComponents to ColorComponents<float>. * platform/graphics/filters/FEMorphology.cpp: (WebCore::makeColorComponentsfromPixelValue): Added. Used to be ColorComponents::fromRGBA(), but was only used here and didn't seem generally useful. (WebCore::makePixelValueFromColorComponents): Added. Used to be ColorComponents::toRGBA(), but was only used here and didn't seem generally useful. (WebCore::minOrMax): (WebCore::columnExtremum): (WebCore::kernelExtremum): (WebCore::FEMorphology::platformApplyGeneric): Update for rename of FloatComponents to ColorComponents<float> and ColorComponents to ColorComponents<uint8_t>. * platform/graphics/filters/FETurbulence.cpp: (WebCore::FETurbulence::noise2D const): (WebCore::toIntBasedColorComponents): (WebCore::FETurbulence::calculateTurbulenceValueForPoint const): (WebCore::FETurbulence::fillRegion const): * platform/graphics/filters/FETurbulence.h: Update for rename of FloatComponents to ColorComponents<float> and ColorComponents to ColorComponents<uint8_t>. Also renames toColorComponents to toIntBasedColorComponents as the former was no longer specific enough. Updated to use std::clamp. * platform/graphics/filters/FilterOperation.cpp: (WebCore::BasicColorMatrixFilterOperation::transformColor const): (WebCore::BasicComponentTransferFilterOperation::transformColor const): (WebCore::InvertLightnessFilterOperation::transformColor const): (WebCore::InvertLightnessFilterOperation::inverseTransformColor const): * platform/graphics/filters/FilterOperation.h: (WebCore::FilterOperation::transformColor const): (WebCore::FilterOperation::inverseTransformColor const): * platform/graphics/filters/FilterOperations.cpp: (WebCore::FilterOperations::transformColor const): (WebCore::FilterOperations::inverseTransformColor const): Update for rename of FloatComponents to ColorComponents<float>. Canonical link: https://commits.webkit.org/225291@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-28 02:30:37 +00:00
platform/graphics/ColorComponents.h
Split color conversion functions out of ColorUtilities.h/cpp into their own file. https://bugs.webkit.org/show_bug.cgi?id=213803 Reviewed by Simon Fraser. Source/WebCore: Moves color conversion functions (both between color spaces like toDisplayP3(const SRGBA&) and between different representations like toHSLA(const SRGBA&)) to their own files. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Add new files. * css/parser/CSSPropertyParserHelpers.cpp: * editing/cocoa/DataDetection.mm: * html/canvas/CanvasRenderingContext2DBase.cpp: * html/canvas/CanvasStyle.cpp: Add include of ColorConversion.h * platform/graphics/ColorConversion.cpp: Added. * platform/graphics/ColorConversion.h: Added. * platform/graphics/ColorUtilities.cpp: * platform/graphics/ColorUtilities.h: Move functions to the new files. * platform/graphics/ExtendedColor.cpp: * platform/graphics/cairo/ImageBufferCairoBackend.cpp: * platform/graphics/filters/FELighting.cpp: Add include of ColorConversion.h, remove unncessary include of ColorUtilities.h * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: * platform/graphics/filters/FEDisplacementMap.cpp: * platform/graphics/filters/FEMorphology.cpp: * platform/graphics/filters/FilterOperations.cpp: Remove unncessary include of ColorUtilities.h * platform/graphics/filters/FilterOperation.cpp: Add include of ColorConversion.h and ColorTypes.h, remove unncessary include of ColorUtilities.h. * platform/graphics/gtk/ColorGtk.cpp: * platform/graphics/win/ColorDirect2D.cpp: Remove unncessary include of ColorUtilities.h. Update to use standard float -> SimpleColor idiom using SRGBA<float>. Tools: * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: Update to include ColorConversion.h and ColorTypes.h rather than ColorUtilities.h Canonical link: https://commits.webkit.org/226729@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-03 16:55:41 +00:00
platform/graphics/ColorConversion.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/ColorHash.h
Add experimental support for CSS Color 5 color-contrast() https://bugs.webkit.org/show_bug.cgi?id=222530 Reviewed by Simon Fraser. Source/WebCore: This feature is off by default and can be enabled via the CSSColorContrastEnabled experimental preference flag. This implementation has the same restriction on it that the recently landed Relative Color Syntax and color-mix() do, in that it does support system colors or currentColor as input, since those can't be resolved at parse time. Ultimately, we will need to add a late binding version of this for those cases. Test: fast/css/parsing-color-contrast.html * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new ColorLuminance.h header where the generic relative luminance and contrast ratio functions live. * css/CSSValueKeywords.in: Add new keywords, color-contrast and vs, that are needed for the color-contrast() function. * css/parser/CSSParserContext.cpp: * css/parser/CSSParserContext.h: Add a setting for color-contrast. * css/parser/CSSPropertyParserHelpers.cpp: (WebCore::CSSPropertyParserHelpers::parseColorContrastFunctionParameters): (WebCore::CSSPropertyParserHelpers::parseColorFunction): Add parsing and computation of color-contrast(). * platform/graphics/ColorUtilities.cpp: (WebCore::lightness): Deleted. (WebCore::luminance): Deleted. (WebCore::contrastRatio): Deleted. Moved luminance related functions to ColorLuminance.h and inlined lightness to its one caller, Color and noted it should be removed. * platform/graphics/ColorUtilities.h: (WebCore::invertedColorWithOverriddenAlpha): (WebCore::invertedcolorWithOverriddenAlpha): Deleted. Fix capitalization issue seen. invertedcolorWithOverriddenAlpha -> invertedColorWithOverriddenAlpha. * platform/graphics/Color.cpp: (WebCore::Color::lightness const): Inline implementation and add comment explaining it should be removed. (WebCore::Color::luminance const): Re-write to use the new WebCore::relativeLuminance that works for any color type without conversion to sRGB. (WebCore::Color::contrastRatio): Add helper to call generic WebCore::contrastRatio that works on any color types to avoid callers needing to do the unfolding themselves. (WebCore::Color::isBlackColor): (WebCore::Color::isWhiteColor): * platform/graphics/Color.h: (WebCore::Color::isBlackColor): Deleted. (WebCore::Color::isWhiteColor): Deleted. Move these rare functions out of line to reduce the number of places in the header we are calling callOnUnderlyingType(), which produces code linerally with the number of color spaces supported. Calling it in the cpp files means we only expand it once for each function. * platform/graphics/ColorLuminance.h: Added. (WebCore::relativeLuminance): This is a generic version of the old luminance function that works for any color type by converting to XYZ and taking the Y component. The old function required always converting to sRGB which could be lossy. (WebCore::contrastRatio): Split out computation of contrastRatio based on relative luminace floats into its own function so that if we have the relative luminance computed already, we don't have to recompute it. Add version contrastRatio that works for any color type utilizing the generic relativeLuminance function above. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::disabledTextColor const): * rendering/TextPaintStyle.cpp: (WebCore::textColorIsLegibleAgainstBackgroundColor): Update to use new Color::contrastRatio helper that handles all color types. Source/WTF: * Scripts/Preferences/WebPreferencesExperimental.yaml: Add new experimental preference for CSS Color 5 color-contrast() which is off by default. Tools: * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): Update luminance values to account for more accurate conversion to XYZ now that we are usuing the actual matrix values from SRGBADescriptor and not a truncated copy. LayoutTests: * fast/css/parsing-color-contrast-expected.txt: Added. * fast/css/parsing-color-contrast.html: Added. Add parsing and computed style computation tests for color-contast(). Canonical link: https://commits.webkit.org/234706@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-01 20:56:56 +00:00
platform/graphics/ColorLuminance.h
platform/graphics/ColorMatrix.h
platform/graphics/ColorModels.h
Split Color serialization out of Color classes https://bugs.webkit.org/show_bug.cgi?id=213820 Reviewed by Darin Adler. Source/WebCore: Move all color serialization related functions out of the Color family of classes, and into a standalone ColorSerialization.h Now all color serialization calls one of the following three functions, depending on need: - serializationForCSS(...) - serializationForHTML(...) - serializationForRenderTreeAsText(...) These are overload for all three Color classes (Color, SimpleColor and ExtendedColor) to allow easy use without necessarily needing to construct another type. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Add new files. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const): * editing/EditingStyle.cpp: (WebCore::EditingStyle::inverseTransformColorIfNeeded): (WebCore::StyleChange::extractTextStyles): * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::detectContentInRange): * html/ColorInputType.cpp: (WebCore::ColorInputType::didChooseColor): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::shadowColor const): * html/canvas/CanvasStyle.h: (WebCore::CanvasStyle::color const): * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): (WebCore::TextTrackCueGeneric::toJSON const): * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::buildArrayForCanvasGradient): * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::CaptionUserPreferencesMediaAF::colorPropertyCSS const): * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): (WebCore::DragController::insertDroppedImagePlaceholdersAtCaret): * platform/graphics/Color.cpp: (WebCore::operator<<): (WebCore::Color::serialized const): Deleted. (WebCore::Color::cssText const): Deleted. (WebCore::Color::nameForRenderTreeAsText const): Deleted. * platform/graphics/Color.h: * platform/graphics/ColorSerialization.cpp: Added. (WebCore::decimalDigit): (WebCore::fractionDigitsForFractionalAlphaValue): (WebCore::serializationForCSS): (WebCore::serializationForHTML): (WebCore::serializationForRenderTreeAsText): (WebCore::serialization): * platform/graphics/ColorSerialization.h: Added. * platform/graphics/ExtendedColor.cpp: (WebCore::ExtendedColor::cssText const): Deleted. * platform/graphics/ExtendedColor.h: * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::dumpProperties const): * platform/graphics/InbandGenericCue.cpp: (WebCore::InbandGenericCue::toJSONString const): * platform/graphics/SimpleColor.cpp: (WebCore::SimpleColor::serializationForHTML const): Deleted. (WebCore::decimalDigit): Deleted. (WebCore::fractionDigitsForFractionalAlphaValue): Deleted. (WebCore::SimpleColor::serializationForCSS const): Deleted. (WebCore::SimpleColor::serializationForRenderTreeAsText const): Deleted. * platform/graphics/SimpleColor.h: * platform/graphics/filters/FEDropShadow.cpp: (WebCore::FEDropShadow::externalRepresentation const): * platform/graphics/filters/FEFlood.cpp: (WebCore::FEFlood::externalRepresentation const): * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writeRenderSVGTextBox): * svg/properties/SVGPropertyTraits.h: (WebCore::SVGPropertyTraits<Color>::toString): * testing/Internals.cpp: (WebCore::Internals::viewBaseBackgroundColor): (WebCore::Internals::highlightPseudoElementColor): (WebCore::Internals::systemColorForCSSValue): (WebCore::Internals::focusRingColor): Adopt new serialization functions. Source/WebKit: Adopt ColorSerialization.h serialization functions. * UIProcess/API/Cocoa/WKWebView.mm: (dictionaryRepresentationForEditorState): * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController _wkChangeColor:]): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _setTextColorForWebView:sender:]): * UIProcess/ios/forms/WKFormColorPicker.mm: (-[WKColorPicker setControlValueFromUIColor:]): * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: (WebKit::PDFPluginTextAnnotation::createAnnotationElement): Source/WebKitLegacy/mac: Adopt ColorSerialization.h serialization functions. * WebView/WebView.mm: (-[WebTextTouchBarItemController _webChangeColor:]): Tools: * TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp: (TestWebKitAPI::TEST): Update tests to use ColorSerialization.h Canonical link: https://commits.webkit.org/226631@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-01 05:53:20 +00:00
platform/graphics/ColorSerialization.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/ColorSpace.h
platform/graphics/ColorTransferFunctions.h
Extended Color: Experiment with strongly typed ColorComponents https://bugs.webkit.org/show_bug.cgi?id=212396 Reviewed by Darin Adler. Source/WebCore: Adds simple explicit types for sRGBA, LinearSRGBA, DisplayP3, LinearDisplayP3, XYZA and HSLA colors. Conversion to/from ColorComponents<float> is easy but explicit to make conversions easier to spot. The goal is to add type clarity (you know when you are dealing with an sRGB color vs. a DisplayP3 color) and make dealing with the colors nicer (color.red rather than color[0]). It also allows us to simplify the naming of functions that convert between color types as now only the output type needs to be in the function name. * Headers.cmake: Add new header, ColorTypes.h * WebCore.xcodeproj/project.pbxproj: Add new header, ColorTypes.h * css/parser/CSSPropertyParserHelpers.cpp: (WebCore::CSSPropertyParserHelpers::parseHSLParameters): Switch from hslToSRGB({ ... }) to toSRGBA(HSLAColor { ... }) * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::detectContentInRange): Update to use toHSLA() and HSLA<float> making the code a bit more readable. * platform/graphics/Color.cpp: (WebCore::Color::lightened const): (WebCore::Color::darkened const): (WebCore::Color::isDark const): (WebCore::Color::lightness const): (WebCore::Color::luminance const): (WebCore::Color::colorSpaceAndComponents const): (WebCore::Color::toSRGBASimpleColorLossy const): (WebCore::Color::toSRGBALossy const): (WebCore::Color::toSRGBAComponentsLossy const): Deleted. * platform/graphics/Color.h: Renames toSRGBAComponentsLossy() to toSRGBALossy() which now returns a SRGBA<float>. * platform/graphics/ColorMatrix.h: (WebCore::ColorMatrix::transformColorComponents const): Deleted. Remove transformColorComponents, keeping just transformedColorComponents to simplify the interface. With late conversion to ColorComponents, the latter is more straightforward to use in most cases anyway. * platform/graphics/ColorUtilities.cpp: (WebCore::linearToRGBColorComponent): (WebCore::rgbToLinearColorComponent): (WebCore::toLinearSRGBA): (WebCore::toSRGBA): (WebCore::toLinearDisplayP3): (WebCore::toDisplayP3): (WebCore::toXYZ): (WebCore::lightness): (WebCore::luminance): (WebCore::contrastRatio): (WebCore::toHSLA): (WebCore::premultiplied): (WebCore::rgbToLinearComponents): Deleted. (WebCore::linearToRGBComponents): Deleted. (WebCore::xyzToLinearSRGB): Deleted. (WebCore::linearSRGBToXYZ): Deleted. (WebCore::XYZToLinearP3): Deleted. (WebCore::linearP3ToXYZ): Deleted. (WebCore::p3ToSRGB): Deleted. (WebCore::sRGBToP3): Deleted. (WebCore::sRGBToHSL): Deleted. (WebCore::hslToSRGB): Deleted. * platform/graphics/ColorUtilities.h: Rename / rework conversion and utility functions to operate on explicit Color types. In doing so, simplify the names of the conversion functions so only name the output type. For instance: ColorComponents<float> p3ToSRGB(const ColorComponents<float>&); is now SRGBA<float> toSRGBA(const DisplayP3<float>&); as the input type is implicit in the call. A little duplication was needed for linearToRGBColorComponent/rgbToLinearColorComponent (as it was used for both sRGB and DisplayP3 linearization), but mostly things stay the same. * platform/graphics/ExtendedColor.cpp: (WebCore::ExtendedColor::toSRGBALossy const): (WebCore::ExtendedColor::toSRGBAComponentsLossy const): Deleted. * platform/graphics/ExtendedColor.h: Renamed toSRGBAComponentsLossy() to toSRGBALossy() and have it return a SRGBA<float>. * platform/graphics/SimpleColor.h: (WebCore::SimpleColor::asSRGBA const): (WebCore::makeSimpleColor): (WebCore::SimpleColor::asSRGBFloatComponents const): Deleted. Rename asSRGBFloatComponents() to asSRGBA<T>() and have it return a SRGBA<float>. Replace makeSimpleColor taking FloatComponents with one taking a SRGBA<float>, making it much clearer that this is only valid for sRGB. * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::drawLighting): Rework to support seperate types for SRGB<float> and LinearSRGBA<float>. * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::drawLighting): * platform/graphics/filters/FilterOperation.cpp: (WebCore::BasicColorMatrixFilterOperation::transformColor const): (WebCore::BasicComponentTransferFilterOperation::transformColor const): (WebCore::InvertLightnessFilterOperation::transformColor const): (WebCore::InvertLightnessFilterOperation::inverseTransformColor const): * platform/graphics/filters/FilterOperation.h: (WebCore::FilterOperation::transformColor const): (WebCore::FilterOperation::inverseTransformColor const): * platform/graphics/filters/FilterOperations.cpp: (WebCore::FilterOperations::transformColor const): (WebCore::FilterOperations::inverseTransformColor const): Use SRGBA<float> rather than ColorComponents<float> to make it clear that the filters only work on sRGB colors right now. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::disabledTextColor const): * rendering/TextPaintStyle.cpp: (WebCore::textColorIsLegibleAgainstBackgroundColor): * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::setSourceRGBAFromColor): * platform/graphics/cairo/GradientCairo.cpp: (WebCore::addColorStopRGBA): (WebCore::setCornerColorRGBA): (WebCore::interpolateColorStop): * platform/graphics/gtk/ColorGtk.cpp: (WebCore::Color::operator GdkRGBA const): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawBorder): (WebCore::TextureMapperGL::drawNumber): (WebCore::prepareFilterProgram): (WebCore::TextureMapperGL::drawSolidColor): (WebCore::TextureMapperGL::clearColor): * platform/graphics/win/ColorDirect2D.cpp: (WebCore::Color::operator D2D1_COLOR_F const): (WebCore::Color::operator D2D1_VECTOR_4F const): * platform/graphics/win/GradientDirect2D.cpp: (WebCore::Gradient::generateGradient): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::colorWithGlobalAlpha const): Update to call toSRGBALossy() rather than toSRGBAComponentsLossy(). Source/WebKit: * UIProcess/API/wpe/WebKitColor.cpp: (webkitColorFillFromWebCoreColor): * UIProcess/gtk/ViewGestureControllerGtk.cpp: (WebKit::ViewGestureController::beginSwipeGesture): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::getDocumentBackgroundColor): Update to call toSRGBALossy() rather than toSRGBAComponentsLossy(). Tools: * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp: (TestWebKitAPI::TEST): Update for changed names (e.g. toSRGBAComponentsLossy() -> toSRGBALossy()) and use of explicit types. Canonical link: https://commits.webkit.org/225940@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-13 16:42:58 +00:00
platform/graphics/ColorTypes.h
Some color-related cleanup https://bugs.webkit.org/show_bug.cgi?id=211991 Reviewed by Sam Weinig. Change FloatComponents and ColorComponents to use std::array<>. Add Color::toSRGBAComponentsLossy() to make explicit potentially lossy conversions between P3 and sRGB colors, and call it in places where we do that conversion. Add const in a few places. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/Color.cpp: (WebCore::Color::Color): (WebCore::Color::toSRGBAComponentsLossy const): (WebCore::Color::asExtended const): * platform/graphics/Color.h: * platform/graphics/ColorUtilities.cpp: (WebCore::ColorMatrix::ColorMatrix): * platform/graphics/ColorUtilities.h: (WebCore::FloatComponents::FloatComponents): (): Deleted. * platform/graphics/ExtendedColor.cpp: (WebCore::ExtendedColor::create): (WebCore::ExtendedColor::cssText const): * platform/graphics/ExtendedColor.h: (WebCore::ExtendedColor::red const): (WebCore::ExtendedColor::green const): (WebCore::ExtendedColor::blue const): (WebCore::ExtendedColor::alpha const): (WebCore::ExtendedColor::channels const): (WebCore::ExtendedColor::ExtendedColor): * platform/graphics/cg/ColorCG.cpp: (WebCore::leakCGColor): * platform/graphics/filters/FETurbulence.cpp: (WebCore::FETurbulence::fillRegion const): * platform/graphics/filters/FilterOperation.cpp: (WebCore::InvertLightnessFilterOperation::transformColor const): (WebCore::InvertLightnessFilterOperation::inverseTransformColor const): * platform/graphics/gtk/ColorGtk.cpp: (WebCore::Color::operator GdkRGBA const): * platform/graphics/win/ColorDirect2D.cpp: (WebCore::Color::operator D2D1_COLOR_F const): (WebCore::Color::operator D2D1_VECTOR_4F const): Canonical link: https://commits.webkit.org/224883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-17 04:55:40 +00:00
platform/graphics/ColorUtilities.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/ComplexTextController.h
Allow different back-ends for ImageBuffer https://bugs.webkit.org/show_bug.cgi?id=207048 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-02-18 Reviewed by Tim Horton. Source/WebCore: ImageBuffer will be re-factored to decouple the platform specifics and the back-end details from the interface "ImageBuffer". A class hierarchy for the ImageBufferBackend will added to allow code sharing and to split the code according to the platform and the back-end details. ImageBuffer will be kept interface with the rest of the code but different back-ends will be created. ConcreteImageBuffer is a template class which inherits ImageBuffer and will act as a bridge to the concrete ImageBufferBackend. Based on the RenderingMode, a ConcreteImageBuffer<BackendType> will be created. Instead of checking the renderingMode in many places of the code and instead of and using preprocessor directives, all these decisions will be made in the concrete ImageBufferBackend. This re-factoring will allow creating new types of ImageBuffers backed by new ImageBufferBackends. These new ImageBufferBackends will implement DisplayList drawing and synchronize remote rendering. * Headers.cmake: * PlatformAppleWin.cmake: * PlatformFTW.cmake: * PlatformMac.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * html/CanvasBase.cpp: (WebCore::CanvasBase::setImageBuffer const): * platform/Cairo.cmake: * platform/SourcesCairo.txt: * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation): * platform/graphics/ConcreteImageBuffer.h: Added. (WebCore::ConcreteImageBuffer::create): (WebCore::ConcreteImageBuffer::ConcreteImageBuffer): (WebCore::ConcreteImageBuffer::ensureBackend const): (WebCore::ConcreteImageBuffer::putImageData): * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::create): (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::sizeNeedsClamping): (WebCore::ImageBuffer::compatibleBufferSize): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::sinkIntoImage): (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::toBGRAData const): Deleted. (WebCore::ImageBuffer::transformColorSpace): Deleted. (WebCore::ImageBuffer::genericConvertToLuminanceMask): Deleted. (WebCore::ImageBuffer::convertToLuminanceMask): Deleted. (WebCore::ImageBuffer::platformLayer const): Deleted. (WebCore::ImageBuffer::copyToPlatformTexture): Deleted. (WebCore::ImageBuffer::memoryCost const): Deleted. (WebCore::ImageBuffer::externalMemoryCost const): Deleted. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::putImageData): (): Deleted. (WebCore::ImageBuffer::internalSize const): Deleted. (WebCore::ImageBuffer::logicalSize const): Deleted. (WebCore::ImageBuffer::resolutionScale const): Deleted. (WebCore::ImageBuffer::baseTransform const): Deleted. * platform/graphics/ImageBufferBackend.cpp: Added. (WebCore::ImageBufferBackend::ImageBufferBackend): (WebCore::ImageBufferBackend::calculateBackendSize): (WebCore::ImageBufferBackend::sinkIntoNativeImage): (WebCore::ImageBufferBackend::sinkIntoImage): (WebCore::ImageBufferBackend::drawConsuming): (WebCore::ImageBufferBackend::convertToLuminanceMask): (WebCore::ImageBufferBackend::toBGRAData const): (WebCore::copyPremultipliedToPremultiplied): (WebCore::copyPremultipliedToUnpremultiplied): (WebCore::copyUnpremultipliedToPremultiplied): (WebCore::copyFunctor): (WebCore::ImageBufferBackend::copyImagePixels const): (WebCore::ImageBufferBackend::getImageData const): (WebCore::ImageBufferBackend::putImageData): * platform/graphics/ImageBufferBackend.h: Added. (WebCore::ImageBufferBackend::flushContext): (WebCore::ImageBufferBackend::logicalSize const): (WebCore::ImageBufferBackend::backendSize const): (WebCore::ImageBufferBackend::resolutionScale const): (WebCore::ImageBufferBackend::colorSpace const): (WebCore::ImageBufferBackend::baseTransform const): (WebCore::ImageBufferBackend::memoryCost const): (WebCore::ImageBufferBackend::externalMemoryCost const): (WebCore::ImageBufferBackend::transformColorSpace): (WebCore::ImageBufferBackend::platformLayer const): (WebCore::ImageBufferBackend::copyToPlatformTexture const): (WebCore::ImageBufferBackend::bytesPerRow const): (WebCore::ImageBufferBackend::backendColorFormat const): (WebCore::ImageBufferBackend::toBackendCoordinates const): (WebCore::ImageBufferBackend::logicalRect const): (WebCore::ImageBufferBackend::backendRect const): * platform/graphics/PlatformImageBuffer.h: Added. * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::drawShadowBuffer): * platform/graphics/cairo/CairoOperations.cpp: (WebCore::Cairo::drawShadowLayerBuffer): (WebCore::Cairo::drawShadowImage): (WebCore::Cairo::fillShadowBuffer): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::clipToImageBuffer): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::clipToImageBuffer): * platform/graphics/cairo/ImageBufferCairo.cpp: Removed. * platform/graphics/cairo/ImageBufferCairoBackend.cpp: Added. (WebCore::ImageBufferCairoBackend::copyImage const): (WebCore::ImageBufferCairoBackend::draw): (WebCore::ImageBufferCairoBackend::drawPattern): (WebCore::ImageBufferCairoBackend::transformColorSpace): (WebCore::ImageBufferCairoBackend::toDataURL const): (WebCore::ImageBufferCairoBackend::toData const): * platform/graphics/cairo/ImageBufferCairoBackend.h: Added. (WebCore::ImageBufferCairoBackend::platformTransformColorSpace): * platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp: Added. (WebCore::clearSurface): (WebCore::ImageBufferCairoGLSurfaceBackend::create): (WebCore::ImageBufferCairoGLSurfaceBackend::ImageBufferCairoGLSurfaceBackend): (WebCore::ImageBufferCairoGLSurfaceBackend::~ImageBufferCairoGLSurfaceBackend): (WebCore::ImageBuffer::platformLayer const): (WebCore::ImageBufferCairoGLSurfaceBackend::copyToPlatformTexture): (WebCore::ImageBufferCairoGLSurfaceBackend::createCompositorBuffer): (WebCore::ImageBufferCairoGLSurfaceBackend::swapBuffersIfNeeded): (WebCore::ImageBufferCairoGLSurfaceBackend::paintToTextureMapper): * platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h: Added. * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp: Added. (WebCore::ImageBufferCairoImageSurfaceBackend::create): (WebCore::ImageBufferCairoImageSurfaceBackend::ImageBufferCairoImageSurfaceBackend): (WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace): * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.h: Added. * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: Added. (WebCore::ImageBufferCairoSurfaceBackend::ImageBufferCairoSurfaceBackend): (WebCore::ImageBufferCairoSurfaceBackend::context const): (WebCore::ImageBufferCairoSurfaceBackend::bytesPerRow const): (WebCore::ImageBufferCairoSurfaceBackend::copyNativeImage const): (WebCore::ImageBufferCairoSurfaceBackend::cairoSurfaceCoerceToImage const): (WebCore::ImageBufferCairoSurfaceBackend::toBGRAData const): (WebCore::ImageBufferCairoSurfaceBackend::getImageData const): (WebCore::ImageBufferCairoSurfaceBackend::putImageData): * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h: Added. * platform/graphics/cg/ImageBufferCG.cpp: Removed. * platform/graphics/cg/ImageBufferCGBackend.cpp: Added. (WebCore::ImageBufferCGBackend::contextColorSpace): (WebCore::ImageBufferCGBackend::setupContext): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferCGBackend::copyImage const): (WebCore::ImageBufferCGBackend::sinkIntoImage): (WebCore::ImageBufferCGBackend::draw): (WebCore::ImageBufferCGBackend::drawPattern): (WebCore::ImageBufferCGBackend::baseTransform const): (WebCore::ImageBufferCGBackend::toCFData const): (WebCore::ImageBufferCGBackend::toData const): (WebCore::ImageBufferCGBackend::toDataURL const): (WebCore::makeVImageBuffer): (WebCore::copyImagePixelsAccelerated): (WebCore::ImageBufferCGBackend::copyImagePixels const): * platform/graphics/cg/ImageBufferCGBackend.h: Added. * platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: Added. (WebCore::ImageBufferCGBitmapBackend::create): (WebCore::ImageBufferCGBitmapBackend::ImageBufferCGBitmapBackend): (WebCore::ImageBufferCGBitmapBackend::context const): (WebCore::ImageBufferCGBitmapBackend::copyNativeImage const): (WebCore::ImageBufferCGBitmapBackend::toBGRAData const): (WebCore::ImageBufferCGBitmapBackend::getImageData const): (WebCore::ImageBufferCGBitmapBackend::putImageData): * platform/graphics/cg/ImageBufferCGBitmapBackend.h: Added. * platform/graphics/cg/ImageBufferDataCG.cpp: Removed. * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: Added. (WebCore::ImageBufferIOSurfaceBackend::calculateBackendSize): (WebCore::ImageBufferIOSurfaceBackend::contextColorSpace): (WebCore::ImageBufferIOSurfaceBackend::create): (WebCore::ImageBufferIOSurfaceBackend::ImageBufferIOSurfaceBackend): (WebCore::ImageBufferIOSurfaceBackend::context const): (WebCore::ImageBufferIOSurfaceBackend::flushContext): (WebCore::ImageBufferIOSurfaceBackend::memoryCost const): (WebCore::ImageBufferIOSurfaceBackend::externalMemoryCost const): (WebCore::ImageBufferIOSurfaceBackend::bytesPerRow const): (WebCore::ImageBufferIOSurfaceBackend::backendColorFormat const): (WebCore::ImageBufferIOSurfaceBackend::copyNativeImage const): (WebCore::ImageBufferIOSurfaceBackend::sinkIntoNativeImage): (WebCore::ImageBufferIOSurfaceBackend::drawConsuming): (WebCore::ImageBufferIOSurfaceBackend::toBGRAData const): (WebCore::ImageBufferIOSurfaceBackend::getImageData const): (WebCore::ImageBufferIOSurfaceBackend::putImageData): * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: Added. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::createFromImageBuffer): Deleted. * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToCanvas): * platform/graphics/win/ImageBufferDataDirect2D.cpp: Removed. * platform/graphics/win/ImageBufferDataDirect2D.h: Removed. * platform/graphics/win/ImageBufferDirect2D.cpp: Removed. * platform/graphics/win/ImageBufferDirect2DBackend.cpp: Added. (WebCore::ImageBufferDirect2DBackend::create): (WebCore::ImageBufferDirect2DBackend::ImageBufferDirect2DBackend): (WebCore::ImageBufferDirect2DBackend::context const): (WebCore::ImageBufferDirect2DBackend::flushContext): (WebCore::ImageBufferDirect2DBackend::copyNativeImage const): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferDirect2DBackend::copyImage const): (WebCore::ImageBufferDirect2DBackend::sinkIntoImage): (WebCore::ImageBufferDirect2DBackend::compatibleBitmap): (WebCore::ImageBufferDirect2DBackend::draw): (WebCore::ImageBufferDirect2DBackend::drawPattern): (WebCore::ImageBufferDirect2DBackend::toDataURL const): (WebCore::ImageBufferDirect2DBackend::toData const): (WebCore::ImageBufferDirect2DBackend::toBGRAData const): (WebCore::ImageBufferDirect2DBackend::getImageData const): (WebCore::ImageBufferDirect2DBackend::putImageData): * platform/graphics/win/ImageBufferDirect2DBackend.h: Added. * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp: (WebCore::WrappedMockRealtimeVideoSource::updateSampleBuffer): * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::bufferForeground): Source/WebKit: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createSelectionSnapshot const): Canonical link: https://commits.webkit.org/220895@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-19 01:12:47 +00:00
platform/graphics/ConcreteImageBuffer.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/DashArray.h
platform/graphics/DecodingOptions.h
Convert DestinationColorSpace from an enum to class wrapping a platform color space (CGColorSpaceRef for CG ports, etc.) https://bugs.webkit.org/show_bug.cgi?id=226143 Reviewed by Darin Adler. Source/WebCore: Replace enumeration based DestinationColorSpace with a struct wrapping a platform color space (CGColorSpaceRef for CG ports, etc.). For ports that don't have a platform level color space type, a builtin PlatformColorSpace type is provided that is just the old enum renamed to PlatformColorSpace::Name. The goal of this change is to unify the currently bifurcated concept of an ImageBuffer's color space, which previosly could either be based on the DestinationColorSpace (and reflected in the colorSpace() member function), or (for CG ports) based on a CGColorSpaceRef, with the colorSpace() function returning sRGB even if the ImageBuffer was not. * Headers.cmake: * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::sanitizeDataIfNeeded): * Modules/mediasession/MediaMetadata.cpp: (WebCore::ArtworkImageLoader::notifyFinished): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpImageBitmap): (WebCore::CloneDeserializer::readImageBitmap): * css/CSSFilterImageValue.cpp: (WebCore::CSSFilterImageValue::image): * html/CustomPaintCanvas.cpp: (WebCore::CustomPaintCanvas::copiedImage const): * html/CustomPaintImage.cpp: (WebCore::CustomPaintImage::drawPattern): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::toMediaSample): (WebCore::HTMLCanvasElement::createImageBuffer const): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::createBufferForPainting const): * html/HTMLVideoElement.h: * html/ImageBitmap.cpp: (WebCore::ImageBitmap::createImageBuffer): (WebCore::ImageBitmap::createPromise): * html/OffscreenCanvas.cpp: (WebCore::OffscreenCanvas::commitToPlaceholderCanvas): * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::colorSpace const): * html/canvas/CanvasRenderingContext.h: * html/canvas/CanvasRenderingContext2D.cpp: * html/canvas/ImageBitmapRenderingContext.cpp: (WebCore::ImageBitmapRenderingContext::setOutputBitmap): * html/canvas/PredefinedColorSpace.cpp: (WebCore::toDestinationColorSpace): (WebCore::toPredefinedColorSpace): * html/canvas/PredefinedColorSpace.h: * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer): * html/shadow/MediaControlTextTrackContainerElement.cpp: (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::indexForData): (WebCore::InspectorCanvas::buildArrayForCanvasPattern): * page/Chrome.cpp: (WebCore::Chrome::createImageBuffer const): * page/Chrome.h: * page/ChromeClient.h: (WebCore::ChromeClient::createImageBuffer const): * page/FrameSnapshotting.cpp: (WebCore::snapshotFrameRectWithClip): * page/PageColorSampler.cpp: (WebCore::sampleColor): * page/PageConsoleClient.cpp: (WebCore::PageConsoleClient::screenshot): * platform/HostWindow.h: * platform/PlatformColorSpace.h: Added. (WebCore::PlatformColorSpace::get const): * platform/PlatformScreen.h: * platform/ScreenProperties.h: (WebCore::ScreenProperties::encode const): (WebCore::ScreenData::encode const): (WebCore::ScreenData::decode): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::preTransformedNativeImageForCurrentFrame): (WebCore::BitmapImage::drawPattern): * platform/graphics/Color.cpp: (WebCore::Color::toColorComponentsInColorSpace const): * platform/graphics/Color.h: * platform/graphics/ColorConversion.cpp: (WebCore::converColorComponents): * platform/graphics/ColorConversion.h: * platform/graphics/ColorSpace.cpp: * platform/graphics/ColorSpace.h: * platform/graphics/ConcreteImageBuffer.h: (WebCore::ConcreteImageBuffer::create): * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::drawPattern): * platform/graphics/DestinationColorSpace.cpp: Added. (WebCore::DestinationColorSpace::SRGB): (WebCore::DestinationColorSpace::LinearSRGB): (WebCore::DestinationColorSpace::DisplayP3): (WebCore::DestinationColorSpace::DestinationColorSpace): (WebCore::operator==): (WebCore::operator!=): (WebCore::operator<<): * platform/graphics/DestinationColorSpace.h: Added. (WebCore::DestinationColorSpace::platformColorSpace const): (WebCore::DestinationColorSpace::encode const): (WebCore::DestinationColorSpace::decode): * platform/graphics/GradientImage.cpp: (WebCore::GradientImage::drawPattern): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::clipToDrawingCommands): * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::create): (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::copyRectToBuffer): * platform/graphics/ImageBuffer.h: * platform/graphics/ImageBufferBackend.cpp: (WebCore::ImageBufferBackend::getPixelBuffer const): (WebCore::ImageBufferBackend::putPixelBuffer): * platform/graphics/ImageBufferBackend.h: (WebCore::ImageBufferBackend::transformColorSpace): (WebCore::ImageBufferBackend::colorSpace const): * platform/graphics/PixelBuffer.h: (WebCore::PixelBuffer::decode): * platform/graphics/PixelBufferConversion.cpp: (WebCore::makeVImageCGImageFormat): * platform/graphics/PixelBufferFormat.h: (WebCore::PixelBufferFormat::decode): * platform/graphics/RemoteVideoSample.cpp: (WebCore::transferBGRAPixelBufferToIOSurface): (WebCore::RemoteVideoSample::create): (WebCore::RemoteVideoSample::RemoteVideoSample): (WebCore::RemoteVideoSample::surface const): * platform/graphics/RemoteVideoSample.h: * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::getScratchBuffer): (WebCore::ShadowBlur::drawRectShadowWithoutTiling): (WebCore::ShadowBlur::drawInsetShadowWithoutTiling): (WebCore::ShadowBlur::drawRectShadowWithTiling): (WebCore::ShadowBlur::drawInsetShadowWithTiling): (WebCore::ShadowBlur::blurShadowBuffer): (WebCore::ShadowBlur::drawShadowLayer): * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults): * platform/graphics/cairo/ImageBufferCairoBackend.cpp: (WebCore::ImageBufferCairoBackend::transformColorSpace): * platform/graphics/cairo/ImageBufferCairoBackend.h: * platform/graphics/cg/ColorCG.cpp: (WebCore::convertToCGCompatibleComponents): (WebCore::createCGColor): (WebCore::platformConvertColorComponents): * platform/graphics/cg/ColorSpaceCG.h: (WebCore::cachedCGColorSpace): Deleted. * platform/graphics/cg/GraphicsContextGLCG.cpp: (WebCore::GraphicsContextGLOpenGL::paintToCanvas): * platform/graphics/cg/IOSurfacePool.cpp: (WebCore::surfaceMatchesParameters): (WebCore::IOSurfacePool::takeSurface): * platform/graphics/cg/IOSurfacePool.h: * platform/graphics/cg/ImageBufferCGBackend.cpp: (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferCGBackend::copyCGImageForEncoding const): * platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: (WebCore::ImageBufferCGBitmapBackend::create): (WebCore::ImageBufferCGBitmapBackend::copyNativeImage const): * platform/graphics/cg/ImageBufferCGBitmapBackend.h: * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: (WebCore::ImageBufferIOSurfaceBackend::create): * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: * platform/graphics/cg/ImageBufferUtilitiesCG.cpp: (WebCore::encode): * platform/graphics/cg/NativeImageCG.cpp: (WebCore::NativeImage::singlePixelSolidColor const): * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking): * platform/graphics/cocoa/IOSurface.h: * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::surfaceFromPool): (WebCore::IOSurface::create): (WebCore::IOSurface::createFromSendRight): (WebCore::IOSurface::createFromSurface): (WebCore::IOSurface::createFromImage): (WebCore::IOSurface::createFromPixelBuffer): (WebCore::IOSurface::IOSurface): (WebCore::IOSurface::ensurePlatformContext): (WebCore::IOSurface::migrateColorSpaceToProperties): * platform/graphics/coreimage/FilterEffectRendererCoreImage.mm: (WebCore::FilterEffectRendererCoreImage::renderToImageBuffer): * platform/graphics/cv/ImageTransferSessionVT.mm: (WebCore::ImageTransferSessionVT::createPixelBuffer): * platform/graphics/cv/PixelBufferConformerCV.cpp: (WebCore::PixelBufferConformerCV::createImageFromPixelBuffer): * platform/graphics/displaylists/DisplayListImageBuffer.h: (WebCore::DisplayList::ImageBuffer::create): * platform/graphics/displaylists/DisplayListItemBuffer.cpp: (WebCore::DisplayList::ItemHandle::destroy): * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::BeginClipToDrawingCommands::BeginClipToDrawingCommands): (WebCore::DisplayList::BeginClipToDrawingCommands::colorSpace const): (WebCore::DisplayList::BeginClipToDrawingCommands::encode const): (WebCore::DisplayList::BeginClipToDrawingCommands::decode): (WebCore::DisplayList::GetPixelBuffer::GetPixelBuffer): (WebCore::DisplayList::GetPixelBuffer::outputFormat const): (WebCore::DisplayList::GetPixelBuffer::encode const): (WebCore::DisplayList::GetPixelBuffer::decode): * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::clipToDrawingCommands): * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/filters/FEDisplacementMap.cpp: (WebCore::FEDisplacementMap::setResultColorSpace): * platform/graphics/filters/FEDisplacementMap.h: * platform/graphics/filters/FEFlood.h: * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::convertPixelBufferToColorSpace): (WebCore::FilterEffect::convertImageBufferToColorSpace): (WebCore::FilterEffect::copyConvertedImageBufferToDestination): (WebCore::FilterEffect::copyConvertedPixelBufferToDestination): (WebCore::FilterEffect::requiresPixelBufferColorSpaceConversion): (WebCore::FilterEffect::transformResultColorSpace): * platform/graphics/filters/FilterEffect.h: (WebCore::FilterEffect::operatingColorSpace const): (WebCore::FilterEffect::setOperatingColorSpace): (WebCore::FilterEffect::resultColorSpace const): (WebCore::FilterEffect::setResultColorSpace): * platform/graphics/filters/SourceGraphic.h: (WebCore::SourceGraphic::SourceGraphic): * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenColorSpace): * platform/ios/PlatformScreenIOS.mm: (WebCore::screenColorSpace): (WebCore::collectScreenProperties): * platform/mac/PlatformScreenMac.mm: (WebCore::collectScreenProperties): (WebCore::screenColorSpace): * platform/mac/ThemeMac.mm: (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): * platform/mediastream/mac/ScreenDisplayCapturerMac.mm: (WebCore::ScreenDisplayCapturerMac::createDisplayStream): * platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::imageBuffer const): * platform/playstation/PlatformScreenPlayStation.cpp: (WebCore::screenColorSpace): * platform/win/PlatformScreenWin.cpp: (WebCore::screenColorSpace): * platform/wpe/PlatformScreenWPE.cpp: (WebCore::screenColorSpace): * platform/xr/PlatformXR.h: (PlatformXR::Device::FrameData::LayerData::decode): * rendering/CSSFilter.cpp: (WebCore::CSSFilter::buildReferenceFilter): (WebCore::CSSFilter::build): (WebCore::CSSFilter::allocateBackingStoreIfNeeded): (WebCore::CSSFilter::apply): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderLayerBacking.cpp: (WebCore::patternForDescription): * rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::paintSystemPreviewBadge): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintProgressBar): * rendering/shapes/Shape.cpp: (WebCore::Shape::createRasterShape): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::buildPrimitives const): (WebCore::RenderSVGResourceFilter::applyResource): (WebCore::RenderSVGResourceFilter::postApplyResource): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): * rendering/svg/RenderSVGResourceMasker.h: * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::createTileImage const): * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::createImageBuffer): (WebCore::SVGRenderingContext::bufferForeground): * rendering/svg/SVGRenderingContext.h: * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): (WebCore::SVGImage::drawPatternForContainer): * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::platformApplySoftware): Source/WebCore/PAL: * pal/spi/cg/CoreGraphicsSPI.h: Add addional SPI for working with CGColorSpaceRefs. Source/WebKit: - Update ImageBuffer subclass signatures to use "const DestinationColorSpace&" to conform to the base class. - Replace ColorSpaceData with Optional<DestinationColorSpace>. No reason to have two types that are the same. - Give all ports a color space configuration for ShareableBitmap now that there is a common class for representing color space. - Update DisplayList decoding to account for BeginClipToDrawingCommands and GetPixelBuffer no longer being inlineable due to now having non-trivial destructors due to DestinationColorSpace member. * GPUProcess/graphics/RemoteImageBuffer.h: (WebKit::RemoteImageBuffer::create): * GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::createImageBuffer): * GPUProcess/graphics/RemoteRenderingBackend.h: * GPUProcess/media/RemoteImageDecoderAVFProxy.cpp: (WebKit::RemoteImageDecoderAVFProxy::createFrameImageAtIndex): * GPUProcess/media/RemoteImageDecoderAVFProxy.h: * GPUProcess/media/RemoteImageDecoderAVFProxy.messages.in: * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/ShareableBitmap.cpp: (WebKit::ShareableBitmap::Configuration::encode const): (WebKit::ShareableBitmap::Configuration::decode): * Shared/ShareableBitmap.h: * Shared/WebCoreArgumentCoders.h: * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * Shared/cg/ShareableBitmapCG.cpp: (WebKit::colorSpace): * Shared/mac/ColorSpaceData.h: Removed. * Shared/mac/ColorSpaceData.mm: Removed. * SourcesCocoa.txt: * UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _takeViewSnapshot]): (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::colorSpace): * UIProcess/PageClient.h: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: (WebKit::recursivelyMapIOSurfaceBackingStore): * UIProcess/WebPageProxy.h: * UIProcess/mac/PageClientImplMac.h: * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::colorSpace): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::colorSpace): * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: (WebKit::ImageBufferShareableBitmapBackend::configuration): * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp: (WebKit::RemoteGraphicsContextGLProxy::prepareForDisplay): * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::create): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::createImageBuffer): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: * WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp: (WebKit::ImageBufferShareableMappedIOSurfaceBackend::create): * WebProcess/GPU/media/RemoteImageDecoderAVF.cpp: (WebKit::RemoteImageDecoderAVF::createFrameImageAtIndex): * WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm: (WebKit::MediaPlayerPrivateRemote::nativeImageForCurrentTime): (WebKit::MediaPlayerPrivateRemote::pixelBufferForCurrentTime): * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::PDFPlugin): * WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp: (WebKit::createShareableBitmap): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createImageBuffer const): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::convertDragImageToBitmap): * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setColorSpace): * WebProcess/WebPage/DrawingArea.messages.in: * WebProcess/WebPage/WebPage.cpp: (WebKit::snapshotOptionsToBitmapConfiguration): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::setColorSpace): Source/WebKitLegacy/mac: * WebCoreSupport/WebContextMenuClient.mm: (WebContextMenuClient::imageForCurrentSharingServicePickerItem): Update for new DestinationColorSpace class. Tools: * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): Upate test to use new DestinationColorSpace type. Canonical link: https://commits.webkit.org/238099@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-25 01:26:18 +00:00
platform/graphics/DestinationColorSpace.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/DisplayRefreshMonitor.h
platform/graphics/DisplayRefreshMonitorClient.h
Add DisplayRefreshMonitorFactory. https://bugs.webkit.org/show_bug.cgi?id=223648 Reviewed by Chris Dumez. Future work will require that it's possible to create a DisplayRefreshMonitor without having a DisplayRefreshMonitorClient. It was also weird that the way to create a DisplayRefreshMonitor was via the DisplayRefreshMonitorClient, so this change fixes both by adding DisplayRefreshMonitorFactory. In WK2, the drawing areas are DisplayRefreshMonitorFactories. If there is no factory, we fall back to the default implementations. Source/WebCore: * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * loader/EmptyClients.cpp: (WebCore::EmptyDisplayRefreshMonitorFactory::sharedEmptyDisplayRefreshMonitorFactory): (WebCore::EmptyChromeClient::displayRefreshMonitorFactory const): (WebCore::EmptyChromeClient::createDisplayRefreshMonitor const): Deleted. * loader/EmptyClients.h: * page/ChromeClient.h: (WebCore::ChromeClient::displayRefreshMonitorFactory const): (WebCore::ChromeClient::createDisplayRefreshMonitor const): Deleted. * page/RenderingUpdateScheduler.cpp: (WebCore::RenderingUpdateScheduler::displayRefreshMonitorFactory const): (WebCore::RenderingUpdateScheduler::createDisplayRefreshMonitor const): Deleted. * page/RenderingUpdateScheduler.h: * platform/graphics/DisplayRefreshMonitor.cpp: (WebCore::DisplayRefreshMonitor::create): * platform/graphics/DisplayRefreshMonitor.h: * platform/graphics/DisplayRefreshMonitorClient.cpp: (WebCore::DisplayRefreshMonitorClient::DisplayRefreshMonitorClient): Deleted. * platform/graphics/DisplayRefreshMonitorClient.h: * platform/graphics/DisplayRefreshMonitorFactory.h: Copied from Source/WebCore/platform/graphics/DisplayRefreshMonitorClient.cpp. * platform/graphics/DisplayRefreshMonitorManager.cpp: (WebCore::DisplayRefreshMonitorManager::monitorForClient): * platform/graphics/GraphicsLayerUpdater.cpp: (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater): (WebCore::GraphicsLayerUpdater::displayRefreshMonitorFactory const): (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor const): Deleted. * platform/graphics/GraphicsLayerUpdater.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::displayRefreshMonitorFactory): (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor const): Deleted. * rendering/RenderLayerCompositor.h: Source/WebKit: Remove DrawingAreaMac.cpp since its code was entirely related to creating DisplayRefreshMonitorMac objects. * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::displayRefreshMonitorFactory const): (WebKit::WebChromeClient::createDisplayRefreshMonitor const): Deleted. * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/DrawingArea.cpp: (WebKit::DrawingArea::createDisplayRefreshMonitor): Deleted. * WebProcess/WebPage/DrawingArea.h: * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h: * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::createDisplayRefreshMonitor): * WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp: Renamed from Source/WebKit/WebProcess/WebPage/mac/DrawingAreaMac.cpp. (WebKit::DisplayRefreshMonitorMac::DisplayRefreshMonitorMac): (WebKit::DisplayRefreshMonitorMac::~DisplayRefreshMonitorMac): (WebKit::DisplayRefreshMonitorMac::requestRefreshCallback): (WebKit::DisplayRefreshMonitorMac::displayLinkFired): * WebProcess/WebPage/mac/DisplayRefreshMonitorMac.h: Copied from Source/WebCore/platform/graphics/GraphicsLayerUpdater.h. (WebKit::DisplayRefreshMonitorMac::create): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::createDisplayRefreshMonitor): Canonical link: https://commits.webkit.org/235687@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 02:35:26 +00:00
platform/graphics/DisplayRefreshMonitorFactory.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/DisplayRefreshMonitorManager.h
Plumb DisplayUpdate through the display refresh monitors https://bugs.webkit.org/show_bug.cgi?id=223847 Reviewed by Sam Weinig. Future work will allow DisplayRefreshMonitorClients to request different frame rates, which are whole fractions of the display's nominal refresh rate. These various frame rate requests flow up through the DisplayRefreshMonitors, and in WebKit2, up through IPC to the per-display DisplayLink which may even service multiple processes. For power reasons, we don't want to trigger display refresh notifications down the chain at the highest possible frequency; at various stages of propagation the rate might be halved if that's necessary for downstream clients. To make this frequency splitting logic simple, this patch introduces DisplayUpdate, which represents an update of the display, and contains data about it in the form of a numerator is the frame index, and the denominator is the nominal frame rate. Frame index wraps to zero every second. For example, a 60Hz display will generate display refreshes with DisplayUpdates which sequentially will be { 0, 60 }, { 1, 60 }, { 2, 60 } ... { 59, 60 }, { 0, 60 }. The zeroth frame is at some arbitrary time and not aligned with wallclock time. Thus a client with a 30Hz update requirement can simply ignore every odd-numbered frame, and a client downstream from it with a 15Hz requirement, which only receives those even-numbered frames, still has enough information to compute which frames to ignore. Classes which are sources of callbacks for DisplayRefreshMonitor need to generate these DisplayUpdates; that includes the various platform DisplayRefreshMonitor subclasses in WebCore, and those in WebKit that live in the UI process and trigger updates over IPC. Source/WebCore: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * loader/EmptyClients.cpp: * platform/graphics/AnimationFrameRate.cpp: * platform/graphics/AnimationFrameRate.h: * platform/graphics/DisplayRefreshMonitor.cpp: (WebCore::DisplayRefreshMonitor::displayLinkFired): (WebCore::DisplayRefreshMonitor::dispatchDisplayDidRefresh): (WebCore::DisplayRefreshMonitor::displayDidRefresh): * platform/graphics/DisplayRefreshMonitor.h: * platform/graphics/DisplayRefreshMonitorManager.cpp: (WebCore::DisplayRefreshMonitorManager::displayWasUpdated): * platform/graphics/DisplayRefreshMonitorManager.h: * platform/graphics/DisplayUpdate.cpp: Copied from Source/WebCore/platform/graphics/win/DisplayRefreshMonitorWin.h. (WebCore::operator<<): * platform/graphics/DisplayUpdate.h: Copied from Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.h. (WebCore::DisplayUpdate::didUpdate): (WebCore::DisplayUpdate::encode const): (WebCore::DisplayUpdate::decode): * platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp: Assume a 60fps refresh rate but this code should probably use gdk_frame_clock_get_refresh_info() to get the correct rate. (WebCore::onFrameClockUpdate): (WebCore::DisplayRefreshMonitorGtk::displayLinkCallbackFired): (WebCore::DisplayRefreshMonitorGtk::startNotificationMechanism): * platform/graphics/gtk/DisplayRefreshMonitorGtk.h: * platform/graphics/ios/DisplayRefreshMonitorIOS.h: * platform/graphics/ios/DisplayRefreshMonitorIOS.mm: (-[WebDisplayLinkHandler initWithMonitor:]): (-[WebDisplayLinkHandler handleDisplayLink:]): (WebCore::DisplayRefreshMonitorIOS::displayLinkCallbackFired): (WebCore::DisplayRefreshMonitorIOS::startNotificationMechanism): (-[WebDisplayLinkHandler setPreferredFramesPerSecond:]): Deleted. * platform/graphics/mac/LegacyDisplayRefreshMonitorMac.cpp: (WebCore::displayLinkCallback): (WebCore::LegacyDisplayRefreshMonitorMac::displayLinkCallbackFired): (WebCore::LegacyDisplayRefreshMonitorMac::dispatchDisplayDidRefresh): (WebCore::LegacyDisplayRefreshMonitorMac::nominalFramesPerSecondFromDisplayLink): (WebCore::LegacyDisplayRefreshMonitorMac::startNotificationMechanism): * platform/graphics/mac/LegacyDisplayRefreshMonitorMac.h: (WebCore::LegacyDisplayRefreshMonitorMac::currentUpdate const): * platform/graphics/win/DisplayRefreshMonitorWin.cpp: (WebCore::DisplayRefreshMonitorWin::DisplayRefreshMonitorWin): (WebCore::DisplayRefreshMonitorWin::displayLinkCallbackFired): * platform/graphics/win/DisplayRefreshMonitorWin.h: Source/WebKit: * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp: (WebKit::ThreadedDisplayRefreshMonitor::invalidate): (WebKit::ThreadedDisplayRefreshMonitor::displayRefreshCallback): (WebKit::ThreadedDisplayRefreshMonitor::ThreadedDisplayRefreshMonitor): Deleted. * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h: * UIProcess/mac/DisplayLink.cpp: (WebKit::DisplayLink::addObserver): (WebKit::DisplayLink::notifyObserversDisplayWasRefreshed): * UIProcess/mac/DisplayLink.h: * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::displayWasRefreshed): * WebProcess/WebPage/EventDispatcher.h: * WebProcess/WebPage/EventDispatcher.messages.in: * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h: * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm: (WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor): (WebKit::RemoteLayerTreeDisplayRefreshMonitor::setPreferredFramesPerSecond): (WebKit::RemoteLayerTreeDisplayRefreshMonitor::didUpdateLayers): * WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp: (WebKit::DisplayRefreshMonitorMac::dispatchDisplayDidRefresh): * WebProcess/WebPage/mac/DisplayRefreshMonitorMac.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::displayWasRefreshed): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Canonical link: https://commits.webkit.org/235866@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-29 17:21:03 +00:00
platform/graphics/DisplayUpdate.h
Rename GraphicsContext3D to GraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=205778 <rdar://problem/58327597> Reviewed by Sam Weinig. Rename all the GraphicsContext3D things to GraphicsContextGL (includes Extensions3D and GRAPHICS_CONTEXT_3D). GraphicsContext3DBase now becomes GraphicsContextGL. GraphicsContext3D is now GraphicsContextGLOpenGL (since it represents the OpenGL implementation of the API). .: * Source/CMakeLists.txt: * Source/cmake/OptionsFTW.cmake: * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsMac.cmake: * Source/cmake/OptionsPlayStation.cmake: * Source/cmake/OptionsWPE.cmake: * Source/cmake/OptionsWinCairo.cmake: PerformanceTests: * StitchMarker/wtf/FeatureDefines.h: * StitchMarker/wtf/Platform.h: Source/WebCore: * CMakeLists.txt: * Headers.cmake: * PlatformAppleWin.cmake: * PlatformFTW.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * SourcesWPE.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLVideoElement.cpp: * html/HTMLVideoElement.h: * html/OffscreenCanvas.cpp: * html/canvas/ANGLEInstancedArrays.cpp: * html/canvas/OESVertexArrayObject.cpp: * html/canvas/WebGL2RenderingContext.cpp: * html/canvas/WebGL2RenderingContext.h: * html/canvas/WebGLActiveInfo.h: * html/canvas/WebGLBuffer.cpp: * html/canvas/WebGLBuffer.h: * html/canvas/WebGLCompressedTextureASTC.cpp: * html/canvas/WebGLCompressedTextureATC.cpp: * html/canvas/WebGLCompressedTextureETC.cpp: * html/canvas/WebGLCompressedTextureETC1.cpp: * html/canvas/WebGLCompressedTexturePVRTC.cpp: * html/canvas/WebGLCompressedTextureS3TC.cpp: * html/canvas/WebGLContextAttributes.h: * html/canvas/WebGLContextGroup.cpp: * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLContextObject.cpp: * html/canvas/WebGLContextObject.h: * html/canvas/WebGLDebugShaders.cpp: * html/canvas/WebGLDepthTexture.cpp: * html/canvas/WebGLDepthTexture.h: * html/canvas/WebGLDrawBuffers.cpp: * html/canvas/WebGLFramebuffer.cpp: * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLObject.cpp: * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: * html/canvas/WebGLProgram.h: * html/canvas/WebGLQuery.cpp: * html/canvas/WebGLQuery.h: * html/canvas/WebGLRenderbuffer.cpp: * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderingContext.cpp: * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContextBase.cpp: * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSampler.cpp: * html/canvas/WebGLSampler.h: * html/canvas/WebGLShader.cpp: * html/canvas/WebGLShader.h: * html/canvas/WebGLShaderPrecisionFormat.h: * html/canvas/WebGLSharedObject.cpp: * html/canvas/WebGLSharedObject.h: * html/canvas/WebGLSync.cpp: * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: * html/canvas/WebGLTexture.h: * html/canvas/WebGLTransformFeedback.cpp: * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLVertexArrayObject.cpp: * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObjectBase.cpp: * html/canvas/WebGLVertexArrayObjectBase.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: * html/canvas/WebGLVertexArrayObjectOES.h: * inspector/InspectorShaderProgram.cpp: * loader/FrameLoaderClient.h: * page/Chrome.cpp: * platform/SourcesCairo.txt: * platform/TextureMapper.cmake: * platform/WebGLStateTracker.cpp: * platform/WebGLStateTracker.h: * platform/graphics/ANGLEWebKitBridge.cpp: * platform/graphics/ExtensionsGL.h: Renamed from Source/WebCore/platform/graphics/Extensions3D.h. * platform/graphics/FormatConverter.cpp: * platform/graphics/FormatConverter.h: * platform/graphics/GLContext.cpp: * platform/graphics/GLContext.h: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContext3D.cpp: Removed. * platform/graphics/GraphicsContext3DBase.cpp: Removed. * platform/graphics/GraphicsContextGL.cpp: Added. * platform/graphics/GraphicsContextGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DBase.h. * platform/graphics/GraphicsContextGLAttributes.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h. * platform/graphics/ImageBuffer.cpp: * platform/graphics/ImageBuffer.h: * platform/graphics/MediaPlayer.cpp: * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/OpenGLShims.cpp: * platform/graphics/angle/ExtensionsGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.cpp. * platform/graphics/angle/ExtensionsGLANGLE.h: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.h. * platform/graphics/angle/GraphicsContextGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/GraphicsContext3DANGLE.cpp. * platform/graphics/angle/TemporaryANGLESetting.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: * platform/graphics/cairo/GraphicsContextGLCairo.cpp: Renamed from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp. * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/cg/GraphicsContextGLCG.cpp: Renamed from Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp. * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: Renamed from Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm. * platform/graphics/cocoa/IOSurface.mm: * platform/graphics/cocoa/WebGLLayer.h: * platform/graphics/cocoa/WebGLLayer.mm: * platform/graphics/cpu/arm/GraphicsContextGLNEON.h: Renamed from Source/WebCore/platform/graphics/cpu/arm/GraphicsContext3DNEON.h. * platform/graphics/cv/TextureCacheCV.h: * platform/graphics/cv/TextureCacheCV.mm: * platform/graphics/cv/VideoTextureCopierCV.cpp: * platform/graphics/cv/VideoTextureCopierCV.h: * platform/graphics/egl/GLContextEGL.cpp: * platform/graphics/egl/GLContextEGL.h: * platform/graphics/glx/GLContextGLX.cpp: * platform/graphics/glx/GLContextGLX.h: * platform/graphics/gpu/Texture.cpp: * platform/graphics/gpu/Texture.h: * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/ios/GraphicsContextGLOpenGLESIOS.h: Renamed from Source/WebCore/platform/graphics/ios/GraphicsContext3DIOS.h. * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp: * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h: * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp. * platform/graphics/opengl/ExtensionsGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp. * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.h. * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp. * platform/graphics/opengl/ExtensionsGLOpenGLES.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h. * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: Added. * platform/graphics/opengl/GraphicsContextGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3D.h. * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLManager.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.h. * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.h. * platform/graphics/opengl/TemporaryOpenGLSetting.cpp: * platform/graphics/opengl/TemporaryOpenGLSetting.h: * platform/graphics/texmap/BitmapTextureGL.cpp: * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp: Renamed from Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp. * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h: * platform/graphics/texmap/TextureMapperGL.cpp: * platform/graphics/win/GraphicsContextGLDirect2D.cpp: Renamed from Source/WebCore/platform/graphics/win/GraphicsContext3DDirect2D.cpp. * testing/Internals.cpp: Source/WebKit: * CMakeLists.txt: * UIProcess/gtk/WaylandCompositor.cpp: (WebKit::WaylandCompositor::initializeEGL): * UIProcess/mac/HighPerformanceGPUManager.cpp: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/mac/WebPageMac.mm: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::displayConfigurationChanged): Source/WTF: * wtf/FeatureDefines.h: * wtf/Platform.h: Tools: * Scripts/webkitpy/common/config/watchlist: Canonical link: https://commits.webkit.org/218939@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-06 18:52:42 +00:00
platform/graphics/ExtensionsGL.h
Web Inspector: Port grid overlay drawing to iOS https://bugs.webkit.org/show_bug.cgi?id=223396 Reviewed by BJ Burg. Source/WebCore: Enable Grid Overlays to be drawn on iOS be including computed overlay objects in the `InspectorOverlay::Highlight`. Some refactoring was also done to reduce code duplication in the normal and iOS paths. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: - FloatLine should be accessible from `WebKit::*` * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::paint): (WebCore::InspectorOverlay::getHighlight): - Add `GridHighlightOverlay`s to the highlight object for iOS. (WebCore::InspectorOverlay::drawGridOverlay): (WebCore::buildLabel): (WebCore::InspectorOverlay::buildGridOverlay): - Refactored actual drawing into a separate method to reduce the amount of code duplication needed between the normal path and the iOS path. * inspector/InspectorOverlay.h: (WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::encode const): (WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::decode): (WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Label::encode const): (WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Label::decode): (WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Area::encode const): (WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Area::decode): - Support encode/decode for sending new Highlight components to the UIProcess. * platform/graphics/FloatLine.h: (WebCore::FloatLine::encode const): (WebCore::FloatLine::decode): - Support encode/decode as part of serialization of `InspectorOverlay::Highlight` Source/WebKit: Port drawing routines from `WebCore::InspectorOverlay` to use `CALayer`s on iOS to enable drawing grid overlays on iOS. Drawing logic is, as much as possible, equivalent to that defined in `WebCore::InspectorOverlay`, with changes to fit the CALayer model. * UIProcess/Inspector/ios/WKInspectorHighlightView.h: * UIProcess/Inspector/ios/WKInspectorHighlightView.mm: (-[WKInspectorHighlightView initWithFrame:]): (-[WKInspectorHighlightView _removeAllLayers]): (-[WKInspectorHighlightView _createLayers:]): (layerPath): - Path should be closed so that objects being stroked are stroked on all edges. (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView _createGridOverlayLayers:scale:]): (createLayoutHatchingLayer): (createLayoutLabelLayer): (-[WKInspectorHighlightView _createGridOverlayLayer:scale:]): - Create layers for the grid overlays. (-[WKInspectorHighlightView update:scale:]): - Obtain the view scale so that `CATextLayer`s can have the correct content scale set. (-[WKInspectorHighlightView update:]): Deleted. * UIProcess/ios/WKContentView.mm: (-[WKContentView _showInspectorHighlight:]): Canonical link: https://commits.webkit.org/235620@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-23 00:05:45 +00:00
platform/graphics/FloatLine.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/FloatPoint.h
platform/graphics/FloatPoint3D.h
platform/graphics/FloatQuad.h
platform/graphics/FloatRect.h
platform/graphics/FloatRoundedRect.h
platform/graphics/FloatSize.h
platform/graphics/Font.h
platform/graphics/FontBaseline.h
platform/graphics/FontCache.h
platform/graphics/FontCascade.h
platform/graphics/FontCascadeDescription.h
platform/graphics/FontCascadeFonts.h
platform/graphics/FontDescription.h
platform/graphics/FontFamilySpecificationNull.h
Move FontGenericFamilies storage from SettingsBase to Settings::Values https://bugs.webkit.org/show_bug.cgi?id=220801 Reviewed by Myles C. Maxfield. Move FontGenericFamilies member from SettingsBase to Settings::Values so that it can potentially be used within Workers. This will aid with font usage off the main thread. No new tests, no behavior change. * Headers.cmake: * Scripts/SettingsTemplates/Settings.cpp.erb: * Scripts/SettingsTemplates/Settings.h.erb: * css/CSSFontSelector.cpp: (WebCore::resolveGenericFamily): (WebCore::CSSFontSelector::fallbackFontAt): * page/SettingsBase.cpp: (WebCore::SettingsBase::SettingsBase): (WebCore::SettingsBase::standardFontFamily const): (WebCore::SettingsBase::setStandardFontFamily): (WebCore::SettingsBase::fixedFontFamily const): (WebCore::SettingsBase::setFixedFontFamily): (WebCore::SettingsBase::serifFontFamily const): (WebCore::SettingsBase::setSerifFontFamily): (WebCore::SettingsBase::sansSerifFontFamily const): (WebCore::SettingsBase::setSansSerifFontFamily): (WebCore::SettingsBase::cursiveFontFamily const): (WebCore::SettingsBase::setCursiveFontFamily): (WebCore::SettingsBase::fantasyFontFamily const): (WebCore::SettingsBase::setFantasyFontFamily): (WebCore::SettingsBase::pictographFontFamily const): (WebCore::SettingsBase::setPictographFontFamily): * page/SettingsBase.h: * platform/graphics/FontGenericFamilies.cpp: (WebCore::setGenericFontFamilyForScript): (WebCore::genericFontFamilyForScript): (WebCore::FontGenericFamilies::FontGenericFamilies): (WebCore::FontGenericFamilies::isolatedCopy const): (WebCore::FontGenericFamilies::standardFontFamily const): (WebCore::FontGenericFamilies::fixedFontFamily const): (WebCore::FontGenericFamilies::serifFontFamily const): (WebCore::FontGenericFamilies::sansSerifFontFamily const): (WebCore::FontGenericFamilies::cursiveFontFamily const): (WebCore::FontGenericFamilies::fantasyFontFamily const): (WebCore::FontGenericFamilies::pictographFontFamily const): (WebCore::FontGenericFamilies::setStandardFontFamily): (WebCore::FontGenericFamilies::setFixedFontFamily): (WebCore::FontGenericFamilies::setSerifFontFamily): (WebCore::FontGenericFamilies::setSansSerifFontFamily): (WebCore::FontGenericFamilies::setCursiveFontFamily): (WebCore::FontGenericFamilies::setFantasyFontFamily): (WebCore::FontGenericFamilies::setPictographFontFamily): * platform/graphics/FontGenericFamilies.h: * style/StyleResolveForFontRaw.cpp: (WebCore::Style::resolveForFontRaw): Canonical link: https://commits.webkit.org/233249@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-22 10:59:50 +00:00
platform/graphics/FontGenericFamilies.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/FontMetrics.h
platform/graphics/FontPlatformData.h
platform/graphics/FontRanges.h
platform/graphics/FontSelectionAlgorithm.h
platform/graphics/FontSelector.h
platform/graphics/FontSelectorClient.h
platform/graphics/FontTaggedSettings.h
platform/graphics/FourCC.h
platform/graphics/GLContext.h
platform/graphics/GeometryUtilities.h
platform/graphics/Glyph.h
platform/graphics/GlyphBuffer.h
Make GlyphBufferAdvance and GlyphBufferOrigin more robust https://bugs.webkit.org/show_bug.cgi?id=215143 Reviewed by Zalan Bujtas. Source/WebCore: GlyphBuffer contains vectors of advances and origins, which are conceptually FloatSizes and FloatPoints. However, we need to pass these arrays into CTFontShapeGlyphs() or CTFontTransformGlyphsWithLanguage(), which expects these vectors to use platform types. Rather than converting in/out of platform types around the call site, we can simply use the platform types throughout. Indeed, that's what we're doing today. However, the mechanism we use today to make this platform-independent is to make a struct which inherits from the platform types. Then, we static_cast the array of the struct to an array of the base type. This is brittle, because it relies on the assumption that the struct doesn't have any members added to it, which would change the stride of the array and feed garbage into the shaping function. Instead, a better design is to typedef the native type, and have all interactions with the types go through standalone functions which deal with the native type. That way, we can't accidentally change the size of the array elements. No new tests because there is no behavior change. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/ComplexTextController.cpp: (WebCore::ComplexTextController::advance): * platform/graphics/FontCascade.cpp: (WebCore::FontCascade::widthForSimpleText const): (WebCore::FontCascade::layoutComplexText const): (WebCore::FontCascade::drawGlyphBuffer const): (WebCore::FontCascade::drawEmphasisMarks const): (WebCore::GlyphToPathTranslator::extents): (WebCore::GlyphToPathTranslator::advance): * platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::add): (WebCore::GlyphBuffer::makeHole): (WebCore::GlyphBuffer::expandLastAdvance): (WebCore::GlyphBuffer::flatten): (WebCore::GlyphBufferAdvance::GlyphBufferAdvance): Deleted. (WebCore::GlyphBufferAdvance::operator FloatSize): Deleted. (WebCore::GlyphBufferAdvance::setWidth): Deleted. (WebCore::GlyphBufferAdvance::setHeight): Deleted. (WebCore::GlyphBufferAdvance::width const): Deleted. (WebCore::GlyphBufferAdvance::height const): Deleted. (WebCore::GlyphBufferAdvance::encode const): Deleted. (WebCore::GlyphBufferAdvance::decode): Deleted. (WebCore::GlyphBufferOrigin::GlyphBufferOrigin): Deleted. (WebCore::GlyphBufferOrigin::operator FloatPoint): Deleted. (WebCore::GlyphBufferOrigin::setX): Deleted. (WebCore::GlyphBufferOrigin::setY): Deleted. (WebCore::GlyphBufferOrigin::x const): Deleted. (WebCore::GlyphBufferOrigin::y const): Deleted. (WebCore::GlyphBufferOrigin::encode const): Deleted. (WebCore::GlyphBufferOrigin::decode): Deleted. (WebCore::toFloatSize): Deleted. * platform/graphics/GlyphBufferMembers.h: Added. (WebCore::createGlyphBufferAdvance): (WebCore::floatSizeFromGlyphBufferAdvance): (WebCore::setGlyphBufferAdvanceWidth): (WebCore::setGlyphBufferAdvanceHeight): (WebCore::glyphBufferAdvanceWidth): (WebCore::glyphBufferAdvanceHeight): (WebCore::createGlyphBufferOrigin): (WebCore::floatPointFromGlyphBufferOrigin): (WebCore::setGlyphBufferOriginX): (WebCore::setGlyphBufferOriginY): (WebCore::glyphBufferOriginX): (WebCore::glyphBufferOriginY): * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::applyFontTransforms): (WebCore::WidthIterator::advanceInternal): (WebCore::WidthIterator::advanceOneCharacter): * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::DrawGlyphs::computeBounds): Tools: * TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/229057@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-07 00:52:52 +00:00
platform/graphics/GlyphBufferMembers.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/GlyphMetricsMap.h
platform/graphics/GlyphPage.h
platform/graphics/Gradient.h
platform/graphics/GraphicsContext.h
Rename GraphicsContext3D to GraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=205778 <rdar://problem/58327597> Reviewed by Sam Weinig. Rename all the GraphicsContext3D things to GraphicsContextGL (includes Extensions3D and GRAPHICS_CONTEXT_3D). GraphicsContext3DBase now becomes GraphicsContextGL. GraphicsContext3D is now GraphicsContextGLOpenGL (since it represents the OpenGL implementation of the API). .: * Source/CMakeLists.txt: * Source/cmake/OptionsFTW.cmake: * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsMac.cmake: * Source/cmake/OptionsPlayStation.cmake: * Source/cmake/OptionsWPE.cmake: * Source/cmake/OptionsWinCairo.cmake: PerformanceTests: * StitchMarker/wtf/FeatureDefines.h: * StitchMarker/wtf/Platform.h: Source/WebCore: * CMakeLists.txt: * Headers.cmake: * PlatformAppleWin.cmake: * PlatformFTW.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * SourcesWPE.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLVideoElement.cpp: * html/HTMLVideoElement.h: * html/OffscreenCanvas.cpp: * html/canvas/ANGLEInstancedArrays.cpp: * html/canvas/OESVertexArrayObject.cpp: * html/canvas/WebGL2RenderingContext.cpp: * html/canvas/WebGL2RenderingContext.h: * html/canvas/WebGLActiveInfo.h: * html/canvas/WebGLBuffer.cpp: * html/canvas/WebGLBuffer.h: * html/canvas/WebGLCompressedTextureASTC.cpp: * html/canvas/WebGLCompressedTextureATC.cpp: * html/canvas/WebGLCompressedTextureETC.cpp: * html/canvas/WebGLCompressedTextureETC1.cpp: * html/canvas/WebGLCompressedTexturePVRTC.cpp: * html/canvas/WebGLCompressedTextureS3TC.cpp: * html/canvas/WebGLContextAttributes.h: * html/canvas/WebGLContextGroup.cpp: * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLContextObject.cpp: * html/canvas/WebGLContextObject.h: * html/canvas/WebGLDebugShaders.cpp: * html/canvas/WebGLDepthTexture.cpp: * html/canvas/WebGLDepthTexture.h: * html/canvas/WebGLDrawBuffers.cpp: * html/canvas/WebGLFramebuffer.cpp: * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLObject.cpp: * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: * html/canvas/WebGLProgram.h: * html/canvas/WebGLQuery.cpp: * html/canvas/WebGLQuery.h: * html/canvas/WebGLRenderbuffer.cpp: * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderingContext.cpp: * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContextBase.cpp: * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSampler.cpp: * html/canvas/WebGLSampler.h: * html/canvas/WebGLShader.cpp: * html/canvas/WebGLShader.h: * html/canvas/WebGLShaderPrecisionFormat.h: * html/canvas/WebGLSharedObject.cpp: * html/canvas/WebGLSharedObject.h: * html/canvas/WebGLSync.cpp: * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: * html/canvas/WebGLTexture.h: * html/canvas/WebGLTransformFeedback.cpp: * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLVertexArrayObject.cpp: * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObjectBase.cpp: * html/canvas/WebGLVertexArrayObjectBase.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: * html/canvas/WebGLVertexArrayObjectOES.h: * inspector/InspectorShaderProgram.cpp: * loader/FrameLoaderClient.h: * page/Chrome.cpp: * platform/SourcesCairo.txt: * platform/TextureMapper.cmake: * platform/WebGLStateTracker.cpp: * platform/WebGLStateTracker.h: * platform/graphics/ANGLEWebKitBridge.cpp: * platform/graphics/ExtensionsGL.h: Renamed from Source/WebCore/platform/graphics/Extensions3D.h. * platform/graphics/FormatConverter.cpp: * platform/graphics/FormatConverter.h: * platform/graphics/GLContext.cpp: * platform/graphics/GLContext.h: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContext3D.cpp: Removed. * platform/graphics/GraphicsContext3DBase.cpp: Removed. * platform/graphics/GraphicsContextGL.cpp: Added. * platform/graphics/GraphicsContextGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DBase.h. * platform/graphics/GraphicsContextGLAttributes.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h. * platform/graphics/ImageBuffer.cpp: * platform/graphics/ImageBuffer.h: * platform/graphics/MediaPlayer.cpp: * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/OpenGLShims.cpp: * platform/graphics/angle/ExtensionsGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.cpp. * platform/graphics/angle/ExtensionsGLANGLE.h: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.h. * platform/graphics/angle/GraphicsContextGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/GraphicsContext3DANGLE.cpp. * platform/graphics/angle/TemporaryANGLESetting.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: * platform/graphics/cairo/GraphicsContextGLCairo.cpp: Renamed from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp. * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/cg/GraphicsContextGLCG.cpp: Renamed from Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp. * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: Renamed from Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm. * platform/graphics/cocoa/IOSurface.mm: * platform/graphics/cocoa/WebGLLayer.h: * platform/graphics/cocoa/WebGLLayer.mm: * platform/graphics/cpu/arm/GraphicsContextGLNEON.h: Renamed from Source/WebCore/platform/graphics/cpu/arm/GraphicsContext3DNEON.h. * platform/graphics/cv/TextureCacheCV.h: * platform/graphics/cv/TextureCacheCV.mm: * platform/graphics/cv/VideoTextureCopierCV.cpp: * platform/graphics/cv/VideoTextureCopierCV.h: * platform/graphics/egl/GLContextEGL.cpp: * platform/graphics/egl/GLContextEGL.h: * platform/graphics/glx/GLContextGLX.cpp: * platform/graphics/glx/GLContextGLX.h: * platform/graphics/gpu/Texture.cpp: * platform/graphics/gpu/Texture.h: * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/ios/GraphicsContextGLOpenGLESIOS.h: Renamed from Source/WebCore/platform/graphics/ios/GraphicsContext3DIOS.h. * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp: * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h: * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp. * platform/graphics/opengl/ExtensionsGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp. * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.h. * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp. * platform/graphics/opengl/ExtensionsGLOpenGLES.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h. * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: Added. * platform/graphics/opengl/GraphicsContextGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3D.h. * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLManager.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.h. * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.h. * platform/graphics/opengl/TemporaryOpenGLSetting.cpp: * platform/graphics/opengl/TemporaryOpenGLSetting.h: * platform/graphics/texmap/BitmapTextureGL.cpp: * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp: Renamed from Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp. * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h: * platform/graphics/texmap/TextureMapperGL.cpp: * platform/graphics/win/GraphicsContextGLDirect2D.cpp: Renamed from Source/WebCore/platform/graphics/win/GraphicsContext3DDirect2D.cpp. * testing/Internals.cpp: Source/WebKit: * CMakeLists.txt: * UIProcess/gtk/WaylandCompositor.cpp: (WebKit::WaylandCompositor::initializeEGL): * UIProcess/mac/HighPerformanceGPUManager.cpp: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/mac/WebPageMac.mm: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::displayConfigurationChanged): Source/WTF: * wtf/FeatureDefines.h: * wtf/Platform.h: Tools: * Scripts/webkitpy/common/config/watchlist: Canonical link: https://commits.webkit.org/218939@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-06 18:52:42 +00:00
platform/graphics/GraphicsContextGL.h
platform/graphics/GraphicsContextGLAttributes.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/GraphicsLayer.h
platform/graphics/GraphicsLayerClient.h
platform/graphics/GraphicsLayerFactory.h
platform/graphics/GraphicsLayerTransform.h
platform/graphics/GraphicsLayerUpdater.h
platform/graphics/GraphicsTypes.h
[WebGL] More GraphicsContext3D to GraphicsContextGL renaming https://bugs.webkit.org/show_bug.cgi?id=205949 <rdar://problem/58416989> Reviewed by Antoine Quint. Source/WebCore: Rename the GC3D-prefixed types. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * html/HTMLVideoElement.cpp: * html/HTMLVideoElement.h: * html/OffscreenCanvas.cpp: * html/canvas/ANGLEInstancedArrays.cpp: * html/canvas/ANGLEInstancedArrays.h: * html/canvas/OESVertexArrayObject.cpp: * html/canvas/OESVertexArrayObject.h: * html/canvas/WebGL2RenderingContext.cpp: * html/canvas/WebGL2RenderingContext.h: * html/canvas/WebGLActiveInfo.h: * html/canvas/WebGLBuffer.cpp: * html/canvas/WebGLBuffer.h: * html/canvas/WebGLDrawBuffers.cpp: * html/canvas/WebGLDrawBuffers.h: * html/canvas/WebGLFramebuffer.cpp: * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLObject.cpp: * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: * html/canvas/WebGLProgram.h: * html/canvas/WebGLQuery.cpp: * html/canvas/WebGLQuery.h: * html/canvas/WebGLRenderbuffer.cpp: * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderingContext.cpp: * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContextBase.cpp: * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSampler.cpp: * html/canvas/WebGLSampler.h: * html/canvas/WebGLShader.cpp: * html/canvas/WebGLShader.h: * html/canvas/WebGLShaderPrecisionFormat.cpp: * html/canvas/WebGLShaderPrecisionFormat.h: * html/canvas/WebGLSync.cpp: * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: * html/canvas/WebGLTexture.h: * html/canvas/WebGLTransformFeedback.cpp: * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLUniformLocation.cpp: * html/canvas/WebGLUniformLocation.h: * html/canvas/WebGLVertexArrayObject.cpp: * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObjectBase.cpp: * html/canvas/WebGLVertexArrayObjectBase.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: * html/canvas/WebGLVertexArrayObjectOES.h: * platform/graphics/ExtensionsGL.h: * platform/graphics/GraphicsContextGL.cpp: * platform/graphics/GraphicsContextGL.h: * platform/graphics/GraphicsTypesGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsTypes3D.h. * platform/graphics/ImageBuffer.cpp: * platform/graphics/ImageBuffer.h: * platform/graphics/MediaPlayer.cpp: * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/angle/ExtensionsGLANGLE.cpp: * platform/graphics/angle/ExtensionsGLANGLE.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: * platform/graphics/angle/TemporaryANGLESetting.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: * platform/graphics/cocoa/WebGLLayer.mm: * platform/graphics/cv/TextureCacheCV.h: * platform/graphics/cv/TextureCacheCV.mm: * platform/graphics/cv/VideoTextureCopierCV.cpp: * platform/graphics/cv/VideoTextureCopierCV.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: * platform/graphics/opengl/ExtensionsGLOpenGL.h: * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: * platform/graphics/opengl/ExtensionsGLOpenGLES.h: * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: * platform/graphics/opengl/GraphicsContextGLOpenGL.h: * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: * platform/graphics/opengl/TemporaryOpenGLSetting.h: * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp: * platform/graphics/texmap/TextureMapperGL.cpp: Source/WebKit: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: Canonical link: https://commits.webkit.org/219073@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-08 20:27:42 +00:00
platform/graphics/GraphicsTypesGL.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/Icon.h
platform/graphics/Image.h
platform/graphics/ImageBackingStore.h
platform/graphics/ImageBuffer.h
Allow different back-ends for ImageBuffer https://bugs.webkit.org/show_bug.cgi?id=207048 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-02-18 Reviewed by Tim Horton. Source/WebCore: ImageBuffer will be re-factored to decouple the platform specifics and the back-end details from the interface "ImageBuffer". A class hierarchy for the ImageBufferBackend will added to allow code sharing and to split the code according to the platform and the back-end details. ImageBuffer will be kept interface with the rest of the code but different back-ends will be created. ConcreteImageBuffer is a template class which inherits ImageBuffer and will act as a bridge to the concrete ImageBufferBackend. Based on the RenderingMode, a ConcreteImageBuffer<BackendType> will be created. Instead of checking the renderingMode in many places of the code and instead of and using preprocessor directives, all these decisions will be made in the concrete ImageBufferBackend. This re-factoring will allow creating new types of ImageBuffers backed by new ImageBufferBackends. These new ImageBufferBackends will implement DisplayList drawing and synchronize remote rendering. * Headers.cmake: * PlatformAppleWin.cmake: * PlatformFTW.cmake: * PlatformMac.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * html/CanvasBase.cpp: (WebCore::CanvasBase::setImageBuffer const): * platform/Cairo.cmake: * platform/SourcesCairo.txt: * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation): * platform/graphics/ConcreteImageBuffer.h: Added. (WebCore::ConcreteImageBuffer::create): (WebCore::ConcreteImageBuffer::ConcreteImageBuffer): (WebCore::ConcreteImageBuffer::ensureBackend const): (WebCore::ConcreteImageBuffer::putImageData): * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::create): (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::sizeNeedsClamping): (WebCore::ImageBuffer::compatibleBufferSize): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::sinkIntoImage): (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::toBGRAData const): Deleted. (WebCore::ImageBuffer::transformColorSpace): Deleted. (WebCore::ImageBuffer::genericConvertToLuminanceMask): Deleted. (WebCore::ImageBuffer::convertToLuminanceMask): Deleted. (WebCore::ImageBuffer::platformLayer const): Deleted. (WebCore::ImageBuffer::copyToPlatformTexture): Deleted. (WebCore::ImageBuffer::memoryCost const): Deleted. (WebCore::ImageBuffer::externalMemoryCost const): Deleted. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::putImageData): (): Deleted. (WebCore::ImageBuffer::internalSize const): Deleted. (WebCore::ImageBuffer::logicalSize const): Deleted. (WebCore::ImageBuffer::resolutionScale const): Deleted. (WebCore::ImageBuffer::baseTransform const): Deleted. * platform/graphics/ImageBufferBackend.cpp: Added. (WebCore::ImageBufferBackend::ImageBufferBackend): (WebCore::ImageBufferBackend::calculateBackendSize): (WebCore::ImageBufferBackend::sinkIntoNativeImage): (WebCore::ImageBufferBackend::sinkIntoImage): (WebCore::ImageBufferBackend::drawConsuming): (WebCore::ImageBufferBackend::convertToLuminanceMask): (WebCore::ImageBufferBackend::toBGRAData const): (WebCore::copyPremultipliedToPremultiplied): (WebCore::copyPremultipliedToUnpremultiplied): (WebCore::copyUnpremultipliedToPremultiplied): (WebCore::copyFunctor): (WebCore::ImageBufferBackend::copyImagePixels const): (WebCore::ImageBufferBackend::getImageData const): (WebCore::ImageBufferBackend::putImageData): * platform/graphics/ImageBufferBackend.h: Added. (WebCore::ImageBufferBackend::flushContext): (WebCore::ImageBufferBackend::logicalSize const): (WebCore::ImageBufferBackend::backendSize const): (WebCore::ImageBufferBackend::resolutionScale const): (WebCore::ImageBufferBackend::colorSpace const): (WebCore::ImageBufferBackend::baseTransform const): (WebCore::ImageBufferBackend::memoryCost const): (WebCore::ImageBufferBackend::externalMemoryCost const): (WebCore::ImageBufferBackend::transformColorSpace): (WebCore::ImageBufferBackend::platformLayer const): (WebCore::ImageBufferBackend::copyToPlatformTexture const): (WebCore::ImageBufferBackend::bytesPerRow const): (WebCore::ImageBufferBackend::backendColorFormat const): (WebCore::ImageBufferBackend::toBackendCoordinates const): (WebCore::ImageBufferBackend::logicalRect const): (WebCore::ImageBufferBackend::backendRect const): * platform/graphics/PlatformImageBuffer.h: Added. * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::drawShadowBuffer): * platform/graphics/cairo/CairoOperations.cpp: (WebCore::Cairo::drawShadowLayerBuffer): (WebCore::Cairo::drawShadowImage): (WebCore::Cairo::fillShadowBuffer): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::clipToImageBuffer): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::clipToImageBuffer): * platform/graphics/cairo/ImageBufferCairo.cpp: Removed. * platform/graphics/cairo/ImageBufferCairoBackend.cpp: Added. (WebCore::ImageBufferCairoBackend::copyImage const): (WebCore::ImageBufferCairoBackend::draw): (WebCore::ImageBufferCairoBackend::drawPattern): (WebCore::ImageBufferCairoBackend::transformColorSpace): (WebCore::ImageBufferCairoBackend::toDataURL const): (WebCore::ImageBufferCairoBackend::toData const): * platform/graphics/cairo/ImageBufferCairoBackend.h: Added. (WebCore::ImageBufferCairoBackend::platformTransformColorSpace): * platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp: Added. (WebCore::clearSurface): (WebCore::ImageBufferCairoGLSurfaceBackend::create): (WebCore::ImageBufferCairoGLSurfaceBackend::ImageBufferCairoGLSurfaceBackend): (WebCore::ImageBufferCairoGLSurfaceBackend::~ImageBufferCairoGLSurfaceBackend): (WebCore::ImageBuffer::platformLayer const): (WebCore::ImageBufferCairoGLSurfaceBackend::copyToPlatformTexture): (WebCore::ImageBufferCairoGLSurfaceBackend::createCompositorBuffer): (WebCore::ImageBufferCairoGLSurfaceBackend::swapBuffersIfNeeded): (WebCore::ImageBufferCairoGLSurfaceBackend::paintToTextureMapper): * platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h: Added. * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp: Added. (WebCore::ImageBufferCairoImageSurfaceBackend::create): (WebCore::ImageBufferCairoImageSurfaceBackend::ImageBufferCairoImageSurfaceBackend): (WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace): * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.h: Added. * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: Added. (WebCore::ImageBufferCairoSurfaceBackend::ImageBufferCairoSurfaceBackend): (WebCore::ImageBufferCairoSurfaceBackend::context const): (WebCore::ImageBufferCairoSurfaceBackend::bytesPerRow const): (WebCore::ImageBufferCairoSurfaceBackend::copyNativeImage const): (WebCore::ImageBufferCairoSurfaceBackend::cairoSurfaceCoerceToImage const): (WebCore::ImageBufferCairoSurfaceBackend::toBGRAData const): (WebCore::ImageBufferCairoSurfaceBackend::getImageData const): (WebCore::ImageBufferCairoSurfaceBackend::putImageData): * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h: Added. * platform/graphics/cg/ImageBufferCG.cpp: Removed. * platform/graphics/cg/ImageBufferCGBackend.cpp: Added. (WebCore::ImageBufferCGBackend::contextColorSpace): (WebCore::ImageBufferCGBackend::setupContext): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferCGBackend::copyImage const): (WebCore::ImageBufferCGBackend::sinkIntoImage): (WebCore::ImageBufferCGBackend::draw): (WebCore::ImageBufferCGBackend::drawPattern): (WebCore::ImageBufferCGBackend::baseTransform const): (WebCore::ImageBufferCGBackend::toCFData const): (WebCore::ImageBufferCGBackend::toData const): (WebCore::ImageBufferCGBackend::toDataURL const): (WebCore::makeVImageBuffer): (WebCore::copyImagePixelsAccelerated): (WebCore::ImageBufferCGBackend::copyImagePixels const): * platform/graphics/cg/ImageBufferCGBackend.h: Added. * platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: Added. (WebCore::ImageBufferCGBitmapBackend::create): (WebCore::ImageBufferCGBitmapBackend::ImageBufferCGBitmapBackend): (WebCore::ImageBufferCGBitmapBackend::context const): (WebCore::ImageBufferCGBitmapBackend::copyNativeImage const): (WebCore::ImageBufferCGBitmapBackend::toBGRAData const): (WebCore::ImageBufferCGBitmapBackend::getImageData const): (WebCore::ImageBufferCGBitmapBackend::putImageData): * platform/graphics/cg/ImageBufferCGBitmapBackend.h: Added. * platform/graphics/cg/ImageBufferDataCG.cpp: Removed. * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: Added. (WebCore::ImageBufferIOSurfaceBackend::calculateBackendSize): (WebCore::ImageBufferIOSurfaceBackend::contextColorSpace): (WebCore::ImageBufferIOSurfaceBackend::create): (WebCore::ImageBufferIOSurfaceBackend::ImageBufferIOSurfaceBackend): (WebCore::ImageBufferIOSurfaceBackend::context const): (WebCore::ImageBufferIOSurfaceBackend::flushContext): (WebCore::ImageBufferIOSurfaceBackend::memoryCost const): (WebCore::ImageBufferIOSurfaceBackend::externalMemoryCost const): (WebCore::ImageBufferIOSurfaceBackend::bytesPerRow const): (WebCore::ImageBufferIOSurfaceBackend::backendColorFormat const): (WebCore::ImageBufferIOSurfaceBackend::copyNativeImage const): (WebCore::ImageBufferIOSurfaceBackend::sinkIntoNativeImage): (WebCore::ImageBufferIOSurfaceBackend::drawConsuming): (WebCore::ImageBufferIOSurfaceBackend::toBGRAData const): (WebCore::ImageBufferIOSurfaceBackend::getImageData const): (WebCore::ImageBufferIOSurfaceBackend::putImageData): * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: Added. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::createFromImageBuffer): Deleted. * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToCanvas): * platform/graphics/win/ImageBufferDataDirect2D.cpp: Removed. * platform/graphics/win/ImageBufferDataDirect2D.h: Removed. * platform/graphics/win/ImageBufferDirect2D.cpp: Removed. * platform/graphics/win/ImageBufferDirect2DBackend.cpp: Added. (WebCore::ImageBufferDirect2DBackend::create): (WebCore::ImageBufferDirect2DBackend::ImageBufferDirect2DBackend): (WebCore::ImageBufferDirect2DBackend::context const): (WebCore::ImageBufferDirect2DBackend::flushContext): (WebCore::ImageBufferDirect2DBackend::copyNativeImage const): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferDirect2DBackend::copyImage const): (WebCore::ImageBufferDirect2DBackend::sinkIntoImage): (WebCore::ImageBufferDirect2DBackend::compatibleBitmap): (WebCore::ImageBufferDirect2DBackend::draw): (WebCore::ImageBufferDirect2DBackend::drawPattern): (WebCore::ImageBufferDirect2DBackend::toDataURL const): (WebCore::ImageBufferDirect2DBackend::toData const): (WebCore::ImageBufferDirect2DBackend::toBGRAData const): (WebCore::ImageBufferDirect2DBackend::getImageData const): (WebCore::ImageBufferDirect2DBackend::putImageData): * platform/graphics/win/ImageBufferDirect2DBackend.h: Added. * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp: (WebCore::WrappedMockRealtimeVideoSource::updateSampleBuffer): * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::bufferForeground): Source/WebKit: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createSelectionSnapshot const): Canonical link: https://commits.webkit.org/220895@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-19 01:12:47 +00:00
platform/graphics/ImageBufferBackend.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/ImageFrame.h
platform/graphics/ImageObserver.h
platform/graphics/ImageOrientation.h
All image drawing functions should take an argument of type ImagePaintingOptions https://bugs.webkit.org/show_bug.cgi?id=201059 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-08-28 Reviewed by Simon Fraser. Source/WebCore: In this patch: -- All the image drawing function will take an argument of type ImagePaintingOptions instead of passing individual options. -- ImagePaintingOptions is made like a set of options. It can be initialized with any number of options and the order does not matter -- Image::originalSize() is deleted because it returns size() and none of the Image concrete classes overrides this implementation. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * html/ImageBitmap.cpp: (WebCore::ImageBitmap::createPromise): (WebCore::ImageBitmap::createFromBuffer): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::drawImage): (WebCore::drawImageToContext): (WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::draw): (WebCore::BitmapImage::drawPattern): * platform/graphics/BitmapImage.h: * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::drawCrossfadeSubimage): (WebCore::CrossfadeGeneratedImage::draw): (WebCore::CrossfadeGeneratedImage::drawPattern): * platform/graphics/CrossfadeGeneratedImage.h: * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::draw): (WebCore::CustomPaintImage::drawPattern): * platform/graphics/CustomPaintImage.h: * platform/graphics/GeneratedImage.h: (WebCore::GeneratedImage::draw): (WebCore::GeneratedImage::drawPattern): * platform/graphics/GradientImage.cpp: (WebCore::GradientImage::draw): (WebCore::GradientImage::drawPattern): * platform/graphics/GradientImage.h: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawTiledImage): (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::drawConsumingImageBuffer): * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawTiledImage): (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::drawConsumingImageBuffer): (WebCore::ImagePaintingOptions::ImagePaintingOptions): Deleted. (WebCore::ImagePaintingOptions::usesDefaultInterpolation const): Deleted. * platform/graphics/GraphicsContextImpl.cpp: (WebCore::GraphicsContextImpl::drawImageImpl): (WebCore::GraphicsContextImpl::drawTiledImageImpl): * platform/graphics/GraphicsContextImpl.h: * platform/graphics/Image.cpp: (WebCore::Image::drawPattern): (WebCore::Image::drawTiled): (WebCore::Image::computeIntrinsicDimensions): * platform/graphics/Image.h: (WebCore::Image::drawPattern): (WebCore::Image::draw): (WebCore::Image::drawTiled): (WebCore::Image::originalSize const): Deleted. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::drawConsuming): * platform/graphics/ImagePaintingOptions.h: Added. (WebCore::ImagePaintingOptions::ImagePaintingOptions): (WebCore::ImagePaintingOptions::compositeOperator const): (WebCore::ImagePaintingOptions::blendMode const): (WebCore::ImagePaintingOptions::decodingMode const): (WebCore::ImagePaintingOptions::orientation const): (WebCore::ImagePaintingOptions::interpolationQuality const): (WebCore::ImagePaintingOptions::setOption): * platform/graphics/NamedImageGeneratedImage.cpp: (WebCore::NamedImageGeneratedImage::draw): (WebCore::NamedImageGeneratedImage::drawPattern): * platform/graphics/NamedImageGeneratedImage.h: * platform/graphics/NativeImage.h: * platform/graphics/cairo/CairoOperations.cpp: (WebCore::Cairo::drawShadowLayerBuffer): (WebCore::Cairo::drawShadowImage): (WebCore::Cairo::drawNativeImage): (WebCore::Cairo::drawPattern): * platform/graphics/cairo/CairoOperations.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawPattern): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::drawNativeImage): (WebCore::GraphicsContextImplCairo::drawPattern): * platform/graphics/cairo/GraphicsContextImplCairo.h: * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): * platform/graphics/cairo/NativeImageCairo.cpp: (WebCore::drawNativeImage): * platform/graphics/cg/GraphicsContext3DCG.cpp: (WebCore::GraphicsContext3D::paintToCanvas): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawPattern): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): * platform/graphics/cg/NativeImageCG.cpp: (WebCore::drawNativeImage): * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::draw): * platform/graphics/cg/PDFDocumentImage.h: * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::DrawNativeImage::DrawNativeImage): (WebCore::DisplayList::DrawNativeImage::apply const): (WebCore::DisplayList::DrawPattern::DrawPattern): (WebCore::DisplayList::DrawPattern::apply const): * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::DrawNativeImage::create): (WebCore::DisplayList::DrawPattern::create): (WebCore::DisplayList::DrawPattern::DrawPattern): * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::drawNativeImage): (WebCore::DisplayList::Recorder::drawPattern): * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/filters/FEBlend.cpp: (WebCore::FEBlend::platformApplySoftware): * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::platformApplySoftware): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::paint): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp: (Nicosia::CairoOperationRecorder::drawNativeImage): (Nicosia::CairoOperationRecorder::drawPattern): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h: * platform/graphics/win/Direct2DOperations.cpp: (WebCore::Direct2D::drawNativeImage): (WebCore::Direct2D::drawPattern): * platform/graphics/win/Direct2DOperations.h: * platform/graphics/win/GraphicsContextImplDirect2D.h: * platform/graphics/win/ImageCGWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/ImageCairoWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::drawNativeImage): * platform/ios/DragImageIOS.mm: (WebCore::createDragImageFromImage): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintSnapshotImage): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): (WebCore::RenderImage::paintIntoRect): * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::paintSnapshot): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawForContainer): (WebCore::SVGImage::nativeImageForCurrentFrame): (WebCore::SVGImage::nativeImage): (WebCore::SVGImage::drawPatternForContainer): (WebCore::SVGImage::draw): * svg/graphics/SVGImage.h: * svg/graphics/SVGImageForContainer.cpp: (WebCore::SVGImageForContainer::draw): (WebCore::SVGImageForContainer::drawPattern): * svg/graphics/SVGImageForContainer.h: Source/WebKit: GraphicsContext::drawImage() now takes an ImagePaintingOptions. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::imagePositionInformation): Canonical link: https://commits.webkit.org/214920@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-28 20:23:39 +00:00
platform/graphics/ImagePaintingOptions.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/ImageSource.h
platform/graphics/ImageTypes.h
Support in-band generic cues when loading media in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=208080 <rdar://problem/59687943> Reviewed by Youenn Fablet. Source/WebCore: No new tests, existing tests enabled for GPU process. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * html/track/InbandGenericTextTrack.cpp: (WebCore::GenericTextTrackCueMap::add): (WebCore::GenericTextTrackCueMap::findIndexOfPair): (WebCore::GenericTextTrackCueMap::find): (WebCore::GenericTextTrackCueMap::remove): (WebCore::InbandGenericTextTrack::updateCueFromCueData): (WebCore::InbandGenericTextTrack::addGenericCue): (WebCore::InbandGenericTextTrack::updateGenericCue): (WebCore::InbandGenericTextTrack::removeGenericCue): * html/track/InbandGenericTextTrack.h: * html/track/InbandTextTrack.h: * html/track/TextTrackCueGeneric.h: * platform/graphics/InbandGenericCue.h: Added. (WebCore::GenericCueData::decode): (WebCore::GenericCueData::encode const): (WebCore::InbandGenericCue::create): (WebCore::InbandGenericCue::startTime const): (WebCore::InbandGenericCue::setStartTime): (WebCore::InbandGenericCue::endTime const): (WebCore::InbandGenericCue::setEndTime): (WebCore::InbandGenericCue::id const): (WebCore::InbandGenericCue::setId): (WebCore::InbandGenericCue::content const): (WebCore::InbandGenericCue::setContent): (WebCore::InbandGenericCue::line const): (WebCore::InbandGenericCue::setLine): (WebCore::InbandGenericCue::position const): (WebCore::InbandGenericCue::setPosition): (WebCore::InbandGenericCue::size const): (WebCore::InbandGenericCue::setSize): (WebCore::InbandGenericCue::align const): (WebCore::InbandGenericCue::setAlign): (WebCore::InbandGenericCue::fontName const): (WebCore::InbandGenericCue::setFontName): (WebCore::InbandGenericCue::baseFontSize const): (WebCore::InbandGenericCue::setBaseFontSize): (WebCore::InbandGenericCue::relativeFontSize const): (WebCore::InbandGenericCue::setRelativeFontSize): (WebCore::InbandGenericCue::foregroundColor const): (WebCore::InbandGenericCue::setForegroundColor): (WebCore::InbandGenericCue::backgroundColor const): (WebCore::InbandGenericCue::setBackgroundColor): (WebCore::InbandGenericCue::highlightColor const): (WebCore::InbandGenericCue::setHighlightColor): (WebCore::InbandGenericCue::status): (WebCore::InbandGenericCue::setStatus): (WebCore::InbandGenericCue::cueData const): (WebCore::InbandGenericCue::InbandGenericCue): (WebCore::InbandGenericCue::toJSONString const): (WebCore::InbandGenericCue::doesExtendCueData const): (WTF::LogArgument<WebCore::InbandGenericCue>::toString): * platform/graphics/InbandTextTrackPrivateClient.h: (WebCore::GenericCueData::create): Deleted. (WebCore::GenericCueData::startTime const): Deleted. (WebCore::GenericCueData::setStartTime): Deleted. (WebCore::GenericCueData::endTime const): Deleted. (WebCore::GenericCueData::setEndTime): Deleted. (WebCore::GenericCueData::id const): Deleted. (WebCore::GenericCueData::setId): Deleted. (WebCore::GenericCueData::content const): Deleted. (WebCore::GenericCueData::setContent): Deleted. (WebCore::GenericCueData::line const): Deleted. (WebCore::GenericCueData::setLine): Deleted. (WebCore::GenericCueData::position const): Deleted. (WebCore::GenericCueData::setPosition): Deleted. (WebCore::GenericCueData::size const): Deleted. (WebCore::GenericCueData::setSize): Deleted. (): Deleted. (WebCore::GenericCueData::align const): Deleted. (WebCore::GenericCueData::setAlign): Deleted. (WebCore::GenericCueData::fontName const): Deleted. (WebCore::GenericCueData::setFontName): Deleted. (WebCore::GenericCueData::baseFontSize const): Deleted. (WebCore::GenericCueData::setBaseFontSize): Deleted. (WebCore::GenericCueData::relativeFontSize const): Deleted. (WebCore::GenericCueData::setRelativeFontSize): Deleted. (WebCore::GenericCueData::foregroundColor const): Deleted. (WebCore::GenericCueData::setForegroundColor): Deleted. (WebCore::GenericCueData::backgroundColor const): Deleted. (WebCore::GenericCueData::setBackgroundColor): Deleted. (WebCore::GenericCueData::highlightColor const): Deleted. (WebCore::GenericCueData::setHighlightColor): Deleted. (WebCore::GenericCueData::status): Deleted. (WebCore::GenericCueData::setStatus): Deleted. (WebCore::GenericCueData::toJSONString const): Deleted. (WebCore::GenericCueData::doesExtendCueData const): Deleted. (WTF::LogArgument<WebCore::GenericCueData>::toString): Deleted. * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: Source/WebKit: * GPUProcess/media/RemoteTextTrackProxy.cpp: (WebKit::RemoteTextTrackProxy::addGenericCue): (WebKit::RemoteTextTrackProxy::updateGenericCue): (WebKit::RemoteTextTrackProxy::removeGenericCue): * GPUProcess/media/RemoteTextTrackProxy.h: * Scripts/webkit/messages.py: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote::load): (WebKit::MediaPlayerPrivateRemote::addGenericCue): (WebKit::MediaPlayerPrivateRemote::updateGenericCue): (WebKit::MediaPlayerPrivateRemote::removeGenericCue): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * WebProcess/GPU/media/TextTrackPrivateRemote.cpp: (WebKit::TextTrackPrivateRemote::addGenericCue): (WebKit::TextTrackPrivateRemote::updateGenericCue): (WebKit::TextTrackPrivateRemote::removeGenericCue): * WebProcess/GPU/media/TextTrackPrivateRemote.h: LayoutTests: * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/221281@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-28 03:05:58 +00:00
platform/graphics/InbandGenericCue.h
[GPU Process] Work towards compiling out on non-Cocoa ports https://bugs.webkit.org/show_bug.cgi?id=208899 Reviewed by Darin Adler. Source/WebCore: Add in additional headers required for GPU Process build. * Headers.cmake: Source/WebKit: Work through some compilation issues on non-Cocoa ports when attempting to build out the GPU Process. Fix platform guards for some methods. Fix compilation issues for non-unified builds. Add in CMake listing of messages.in and include directories required for building with ENABLE_GPU_PROCESS. * CMakeLists.txt: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::didClose): * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/GPUProcess.cpp: * GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h: * GPUProcess/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::create): * GPUProcess/graphics/RemoteRenderingBackendProxy.cpp: * GPUProcess/graphics/RemoteRenderingBackendProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::getConfiguration): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity): (WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode): (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged): (WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged): (WebKit::RemoteMediaPlayerProxy::notifyTrackModeChanged): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * UIProcess/GPU/GPUProcessProxy.h: * WebProcess/GPU/GPUProcessConnection.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h: * WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h: * WebProcess/GPU/graphics/RemoteRenderingBackend.cpp: * WebProcess/GPU/media/AudioTrackPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: * WebProcess/GPU/media/TextTrackPrivateRemote.h: Canonical link: https://commits.webkit.org/221833@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-11 05:44:47 +00:00
platform/graphics/InbandGenericCueIdentifier.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/InbandTextTrackPrivate.h
platform/graphics/InbandTextTrackPrivateClient.h
Lazily generate CGPaths for some simple types of paths, such as arcs and lines https://bugs.webkit.org/show_bug.cgi?id=208464 <rdar://problem/59963226> Reviewed by Daniel Bates, Darin Adler and Tim Horton. Source/WebCore: When the GPU process is enabled and used to render the canvas element, some canvas-related subtests in MotionMark see significant performance regressions. One of the reasons for this is that in the process of decoding display list items that contain `WebCore::Path`s in the GPU process, we end up allocating a new CGPath for each WebCore::Path. This dramatically increases page demand and memory usage in the GPU process in contrast to shipping WebKit, due to the fact that all of these CGPaths allocated up-front, and must all exist somewhere in the heap upon decoding the display list. In contrast, in shipping WebKit, each call to stroke the current canvas path (i.e. invoking GraphicsContext::strokePath) is succeeded by clearing the path, which deallocates the CGPath backing the WebCore Path. The next time a CGPath needs to be created, CoreGraphics is free to then allocate the new CGPath at the address of the previous CGPath which was just destroyed, which prevents us from dirtying more pages than necessary. This phenomenon affects most of the canvas-related MotionMark subtests to some degree, though the impact is most noticeable with Canvas Lines. On top of all this, a significant portion of time is also spent calling CGPathApply and converting the resulting CGPathElements into serializable data when encoding each WebCore Path. To mitigate these two issues and restore the wins we get from memory locality when drawing paths in large quantities, we can: 1. In the case of simple paths, stuff some information about how each path was created as inline data on WebCore::Path itself, as a new data member. For now, this only encompasses lines, arcs, and moves (Paths where only `Path::moveTo` was invoked), but may be expanded in the future to include ellipses and rects. This allows us to achieve two things: (a) make encoding cheaper by not requiring a walk through all of CGPath's elements, and (b) make decoding cheaper by just initializing the Path using inline data, rather than having to create a new CGPath. 2. When painting the StrokePath display list item, just discard `m_path` after we're done painting with it. This, in conjunction with (1), means that the CGPath backing the WebCore::Path in the GPU process is only created when we're just about to paint (i.e. when calling into strokePath()), and destroyed right after we're done painting with it. See below for details. There should be no change in behavior. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/InlinePathData.h: Added. (WebCore::MoveData::encode const): (WebCore::MoveData::decode): (WebCore::LineData::encode const): (WebCore::LineData::decode): (WebCore::ArcData::encode const): (WebCore::ArcData::decode): Introduce InlinePathData, a Variant of several different inline data types, each of which represents one simple path type that is stored using only inline data. This includes line segments (a start point and an end point), as well as arcs (which, in addition to a center and start and end angles) also includes an optional offset, which represents the current position of the path at the time "addArc" was called. For instance, in the following scenario, the path would have an arc that is offset by (100, 0); if filled, it would result in a composite shape resembling a semicircle on top of a triangle: path.moveTo(100, 0); path.addArc(100, 100, 50, 0, PI, false); context.fill(path); When a Path is initialized (or after it is cleared), it starts off with neither a CGPath nor inline data. Moving the path causes it to store inline MoveData; calling calling `addLineTo` or `addArc` then replaces the inline data with either LineData or ArcData. If, at any point, the path changes in a different way (i.e. neither line, arc, nor move), we clear out the inline data and fall back to just representing the path data using the CGPath (m_path). * platform/graphics/Path.cpp: Refactor the following 10 methods: moveTo, addLineTo, addArc, isEmpty, currentPoint, apply, elementCount, hasCurrentPoint, fastBoundingRect, and boundingRect such that their implementations are now in platform-agnostic code in Path.cpp. Logic in this platform-agnostic code will generally attempt to use inline path data to compute an answer (or apply the requested mutations) without having to initialize the platform path representation. Failing this, we fall back to calling -SlowCase versions of these methods, which will exercise the appropriate APIs on each platform. (WebCore::Path::elementCountSlowCase const): (WebCore::Path::apply const): (WebCore::Path::isEmpty const): (WebCore::Path::hasCurrentPoint const): (WebCore::Path::currentPoint const): (WebCore::Path::elementCount const): (WebCore::Path::addArc): (WebCore::Path::addLineTo): (WebCore::Path::moveTo): In the case of these three methods for mutating a path, if we've either only moved the path or haven't touched it at all, we can get away with only updating our inline path data, and avoid creating a CGPath. (WebCore::Path::boundingRect const): (WebCore::Path::fastBoundingRect const): (WebCore::Path::boundingRectFromInlineData const): (WebCore::Path::polygonPathFromPoints): * platform/graphics/Path.h: (WebCore::Path::encode const): (WebCore::Path::decode): Teach Path::encode and Path::decode to respectively serialize and deserialize WebCore::Path by consulting only the inline data, if it is present. For simple types of paths, this decreases the cost of both IPC encoding and decoding, but adds a negligible amount of overhead in the case where the path is non-inline. (WebCore::Path::hasInlineData const): (WebCore::Path::hasAnyInlineData const): (WebCore::Path::isNull const): Deleted. * platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::isEmptySlowCase const): (WebCore::Path::currentPointSlowCase const): (WebCore::Path::moveToSlowCase): (WebCore::Path::addLineToSlowCase): (WebCore::Path::addArcSlowCase): (WebCore::Path::boundingRectSlowCase const): (WebCore::Path::applySlowCase const): (WebCore::Path::fastBoundingRectSlowCase const): (WebCore::Path::isNull const): (WebCore::Path::isEmpty const): Deleted. (WebCore::Path::hasCurrentPoint const): Deleted. (WebCore::Path::currentPoint const): Deleted. (WebCore::Path::moveTo): Deleted. (WebCore::Path::addLineTo): Deleted. (WebCore::Path::addArc): Deleted. (WebCore::Path::boundingRect const): Deleted. (WebCore::Path::apply const): Deleted. * platform/graphics/cg/PathCG.cpp: (WebCore::Path::createCGPath const): Add a helper method that is invoked when the Path is asked for a CGPath. In this case, if there is inline data, we need to lazily create the path and apply any inline path data we've accumulated. Once we're done applying the inline data, set a flag (m_needsToApplyInlineData) to false to avoid re-applying inline data to the path. (WebCore::Path::platformPath const): (WebCore::Path::ensurePlatformPath): When ensurePlatformPath is invoked, we are about to mutate our CGPath in such a way that it can't be expressed in terms of inline data (at least, not with the changes in this patch). Clear out the inline path data in this case, and apply the CGPath mutations that were previously stashed away in inline path data. (WebCore::Path::isNull const): A path is now considered null if it is not only missing a CGPath, but also does not have any inline path data. This maintains the invariant that `isNull()` is true iff the `platformPath()` returns 0x0. (WebCore::Path::Path): (WebCore::Path::swap): Update the constructors and `swap` helper method (used by assignment operators) to account for the new members. (WebCore::Path::contains const): (WebCore::Path::transform): (WebCore::zeroRectIfNull): (WebCore::Path::boundingRectSlowCase const): (WebCore::Path::fastBoundingRectSlowCase const): (WebCore::Path::moveToSlowCase): (WebCore::Path::addLineToSlowCase): (WebCore::Path::addArcSlowCase): (WebCore::Path::clear): When clearing Path, instead of setting `m_path` to a newly allocated CGPath, simply reset it to null. This ensures that if we then apply some changes that can be expressed using only inline path data, we avoid having to update the CGPath, and instead just update the inline path data. (WebCore::Path::isEmptySlowCase const): (WebCore::Path::currentPointSlowCase const): (WebCore::Path::applySlowCase const): (WebCore::Path::elementCountSlowCase const): (WebCore::Path::boundingRect const): Deleted. (WebCore::Path::fastBoundingRect const): Deleted. (WebCore::Path::moveTo): Deleted. (WebCore::Path::addLineTo): Deleted. (WebCore::Path::addArc): Deleted. (WebCore::Path::isEmpty const): Deleted. (WebCore::Path::hasCurrentPoint const): Deleted. (WebCore::Path::currentPoint const): Deleted. (WebCore::Path::apply const): Deleted. (WebCore::Path::elementCount const): Deleted. * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::StrokePath::apply const): Throw out the current WebCore::Path after we're done painting with it (see (2) in the above ChangeLog entry). * platform/graphics/displaylists/DisplayListItems.h: * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::boundingRectSlowCase const): (WebCore::Path::fastBoundingRectSlowCase const): (WebCore::Path::moveToSlowCase): (WebCore::Path::addLineToSlowCase): (WebCore::Path::addArcSlowCase): (WebCore::Path::isEmptySlowCase const): (WebCore::Path::currentPointSlowCase const): (WebCore::Path::applySlowCase const): (WebCore::Path::isNull const): (WebCore::Path::boundingRect const): Deleted. (WebCore::Path::fastBoundingRect const): Deleted. (WebCore::Path::moveTo): Deleted. (WebCore::Path::addLineTo): Deleted. (WebCore::Path::addArc): Deleted. (WebCore::Path::isEmpty const): Deleted. (WebCore::Path::hasCurrentPoint const): Deleted. (WebCore::Path::currentPoint const): Deleted. (WebCore::Path::apply const): Deleted. Source/WebKit: Add argument coders for `WTF::Monostate`, so that Variants of the form: `Variant<Monostate, Foo, Bar>` can be encoded and decoded over IPC. * Platform/IPC/ArgumentCoders.cpp: (IPC::ArgumentCoder<Monostate>::encode): (IPC::ArgumentCoder<Monostate>::decode): * Platform/IPC/ArgumentCoders.h: Source/WTF: Add a feature flag for INLINE_PATH_DATA. This feature flag exists to ensure that we can avoid having m_inlineData on Path in ports that don't implement the necessary facilities for inline path data yet, since it would just end up being wasted memory. * wtf/PlatformEnable.h: Canonical link: https://commits.webkit.org/221725@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-08 23:13:45 +00:00
platform/graphics/InlinePathData.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/IntPoint.h
platform/graphics/IntPointHash.h
platform/graphics/IntRect.h
platform/graphics/IntRectExtent.h
platform/graphics/IntRectHash.h
platform/graphics/IntSize.h
platform/graphics/IntSizeHash.h
Remove duplicate LayerTreeAsText enums and use an OptionSet<> https://bugs.webkit.org/show_bug.cgi?id=229226 Reviewed by Antti Koivisto. GraphicsLayerClient had enum LayerTreeAsTextBehaviorFlags and Frame had an anonymous enum and typedef unsigned LayerTreeFlags. Clean up by adding LayerTreeAsTextOptions.h and using OptionSet<LayerTreeAsTextOptions> everywhere. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * page/Frame.h: * page/PageOverlayController.cpp: (WebCore::PageOverlayController::shouldSkipLayerInDump const): * page/PageOverlayController.h: * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::dumpLayer const): (WebCore::dumpChildren): (WebCore::GraphicsLayer::dumpProperties const): (WebCore::GraphicsLayer::layerTreeAsText const): (showGraphicsLayerTree): * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::dumpLayer): (WebCore::GraphicsLayer::layerTreeAsText): (WebCore::GraphicsLayer::dumpAdditionalProperties const): * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::shouldSkipLayerInDump const): (WebCore::GraphicsLayerClient::shouldDumpPropertyForLayer const): * platform/graphics/LayerTreeAsTextOptions.h: Added. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::dumpAdditionalProperties const): * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::dumpInnerLayer): (WebCore::CoordinatedGraphicsLayer::dumpAdditionalProperties const): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::shouldSkipLayerInDump const): (WebCore::RenderLayerBacking::shouldDumpPropertyForLayer const): * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::layerTreeAsText): * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::toLayerTreeAsTextOptions): (WebCore::Internals::layerTreeAsText const): (WebCore::Internals::pageOverlayLayerTreeAsText const): (WebCore::toLayerTreeFlags): Deleted. * testing/MockPageOverlayClient.cpp: (WebCore::MockPageOverlayClient::layerTreeAsText): * testing/MockPageOverlayClient.h: Canonical link: https://commits.webkit.org/240675@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-19 15:47:35 +00:00
platform/graphics/LayerTreeAsTextOptions.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/LayoutPoint.h
platform/graphics/LayoutRect.h
platform/graphics/LayoutSize.h
platform/graphics/LegacyCDMSession.h
[GPU Process] Work towards compiling out on non-Cocoa ports https://bugs.webkit.org/show_bug.cgi?id=208899 Reviewed by Darin Adler. Source/WebCore: Add in additional headers required for GPU Process build. * Headers.cmake: Source/WebKit: Work through some compilation issues on non-Cocoa ports when attempting to build out the GPU Process. Fix platform guards for some methods. Fix compilation issues for non-unified builds. Add in CMake listing of messages.in and include directories required for building with ENABLE_GPU_PROCESS. * CMakeLists.txt: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::didClose): * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/GPUProcess.cpp: * GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h: * GPUProcess/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::create): * GPUProcess/graphics/RemoteRenderingBackendProxy.cpp: * GPUProcess/graphics/RemoteRenderingBackendProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::getConfiguration): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity): (WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode): (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged): (WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged): (WebKit::RemoteMediaPlayerProxy::notifyTrackModeChanged): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * UIProcess/GPU/GPUProcessProxy.h: * WebProcess/GPU/GPUProcessConnection.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h: * WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h: * WebProcess/GPU/graphics/RemoteRenderingBackend.cpp: * WebProcess/GPU/media/AudioTrackPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: * WebProcess/GPU/media/TextTrackPrivateRemote.h: Canonical link: https://commits.webkit.org/221833@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-11 05:44:47 +00:00
platform/graphics/MIMETypeCache.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/MediaPlaybackTarget.h
platform/graphics/MediaPlaybackTargetClient.h
platform/graphics/MediaPlaybackTargetPicker.h
platform/graphics/MediaPlayer.h
platform/graphics/MediaPlayerEnums.h
Rename MediaPlayerPrivateRemoteIdentifier to MediaPlayerIdentifier https://bugs.webkit.org/show_bug.cgi?id=217397 Reviewed by Tim Horton. Source/WebCore: Move `MediaPlayerPrivateRemoteIdentifier` into WebCore, and rename it to `MediaPlayerIdentifier`, such that it isn't necessarily limited to use for GPU Process code. This is preparation for introducing a display list drawing item which will need to reference a remotely hosted `MediaPlayer`. No change in behavior. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::identifier const): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerIdentifier.h: Renamed from Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemoteIdentifier.h. * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::identifier const): Source/WebKit: Mass rename `MediaPlayerPrivateRemoteIdentifier` to `WebCore::MediaPlayerIdentifier`. See WebCore/ChangeLog for more details. * GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: (WebKit::RemoteLegacyCDMFactoryProxy::createCDM): * GPUProcess/media/RemoteLegacyCDMFactoryProxy.h: * GPUProcess/media/RemoteLegacyCDMFactoryProxy.messages.in: * GPUProcess/media/RemoteLegacyCDMProxy.cpp: (WebKit::RemoteLegacyCDMProxy::create): (WebKit::RemoteLegacyCDMProxy::RemoteLegacyCDMProxy): (WebKit::RemoteLegacyCDMProxy::setPlayerId): * GPUProcess/media/RemoteLegacyCDMProxy.h: * GPUProcess/media/RemoteLegacyCDMProxy.messages.in: * GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp: (WebKit::RemoteMediaPlayerManagerProxy::createMediaPlayer): (WebKit::RemoteMediaPlayerManagerProxy::deleteMediaPlayer): (WebKit::RemoteMediaPlayerManagerProxy::didReceivePlayerMessage): (WebKit::RemoteMediaPlayerManagerProxy::didReceiveSyncPlayerMessage): (WebKit::RemoteMediaPlayerManagerProxy::getProxy): * GPUProcess/media/RemoteMediaPlayerManagerProxy.h: * GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::RemoteMediaPlayerProxy): * GPUProcess/media/RemoteMediaPlayerProxy.h: * Scripts/webkit/messages.py: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): (WebKit::MediaPlayerPrivateRemote::identifier const): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/RemoteLegacyCDM.cpp: (WebKit::RemoteLegacyCDM::setPlayerId): * WebProcess/GPU/media/RemoteLegacyCDM.h: * WebProcess/GPU/media/RemoteLegacyCDMFactory.cpp: (WebKit::RemoteLegacyCDMFactory::createCDM): * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::createRemoteMediaPlayer): (WebKit::RemoteMediaPlayerManager::deleteRemoteMediaPlayer): (WebKit::RemoteMediaPlayerManager::findRemotePlayerId): (WebKit::RemoteMediaPlayerManager::didReceivePlayerMessage): * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): Canonical link: https://commits.webkit.org/230161@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-06 20:37:53 +00:00
platform/graphics/MediaPlayerIdentifier.h
[GPU Process] Work towards compiling out on non-Cocoa ports https://bugs.webkit.org/show_bug.cgi?id=208899 Reviewed by Darin Adler. Source/WebCore: Add in additional headers required for GPU Process build. * Headers.cmake: Source/WebKit: Work through some compilation issues on non-Cocoa ports when attempting to build out the GPU Process. Fix platform guards for some methods. Fix compilation issues for non-unified builds. Add in CMake listing of messages.in and include directories required for building with ENABLE_GPU_PROCESS. * CMakeLists.txt: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::didClose): * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/GPUProcess.cpp: * GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h: * GPUProcess/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::create): * GPUProcess/graphics/RemoteRenderingBackendProxy.cpp: * GPUProcess/graphics/RemoteRenderingBackendProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::getConfiguration): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity): (WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode): (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged): (WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged): (WebKit::RemoteMediaPlayerProxy::notifyTrackModeChanged): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * UIProcess/GPU/GPUProcessProxy.h: * WebProcess/GPU/GPUProcessConnection.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h: * WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h: * WebProcess/GPU/graphics/RemoteRenderingBackend.cpp: * WebProcess/GPU/media/AudioTrackPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: * WebProcess/GPU/media/TextTrackPrivateRemote.h: Canonical link: https://commits.webkit.org/221833@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-11 05:44:47 +00:00
platform/graphics/MediaPlayerPrivate.h
[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
platform/graphics/MediaSourcePrivate.h
platform/graphics/MediaSourcePrivateClient.h
[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
platform/graphics/MediaUsageInfo.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/NativeImage.h
Virtualize GraphicsContext https://bugs.webkit.org/show_bug.cgi?id=226170 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a refactoring. In preparation for future patches which introduce new kinds of GraphicsContexts, virtualize GraphicsContext, moving platform implementations into subclasses GraphicsContext{CG,Cairo,Direct2D}, NullGraphicsContext, DisplayList::Recorder, and Nicosia::CairoOperationRecorder. GraphicsContextImpl dissolves away; platform contexts that were unnecessarily implemented both as `GraphicsContext` and as a subclass of GraphicsContextImpl (GraphicsContextImplCairo and GraphicsContextImplDirect2D) are folded into their GraphicsContext subclass. `paintingDisabled()` is no longer relevant in GraphicsContext implementations, so we no longer have to check it everywhere; NullGraphicsContext overrides everything with an empty implementation. We keep `paintingDisabled()` for use in code outside of GraphicsContext, where it just distinguishes between NullGraphicsContext and the others. Also, a few bits of cleanup to make this easier: - Legacy shadow radius behavior becomes a parameter to setShadow instead of a separate method. - canvasClip(), which hasn't done anything different than clip() since Skia, is removed. - GraphicsContext gains renderingMode() in place of isAcceleratedContext(). - Subclasses override updateState() to respond to GraphicsContext state changes, as was already done for GraphicsContextImpl, to keep subclassing simple. - builderState(), which was unused, is removed. - drawPath() is introduced on all platforms, with a default implementation that just fills and strokes. * Headers.cmake: * PlatformFTW.cmake: * PlatformWin.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * display/css/DisplayBoxDecorationPainter.cpp: (WebCore::Display::BoxDecorationPainter::paintBoxShadow const): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::isAccelerated const): (WebCore::CanvasRenderingContext2DBase::clipInternal): (WebCore::CanvasRenderingContext2DBase::clearRect): (WebCore::CanvasRenderingContext2DBase::applyShadow): (WebCore::CanvasRenderingContext2DBase::createPattern): (WebCore::CanvasRenderingContext2DBase::drawTextUnchecked): * page/FrameView.cpp: (WebCore::FrameView::traverseForPaintInvalidation): (WebCore::FrameView::adjustPageHeightDeprecated): * page/FrameView.h: * page/win/FrameCGWin.cpp: (WebCore::imageFromRect): * page/win/FrameGdiWin.cpp: (WebCore::imageFromRect): * platform/Cairo.cmake: * platform/SourcesCairo.txt: * platform/cocoa/DragImageCocoa.mm: (WebCore::createDragImageForLink): * platform/graphics/FontCascade.cpp: (WebCore::FontCascade::displayListForTextRun const): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContextState::GraphicsContextState): (WebCore::GraphicsContextStateChange::accumulate): (WebCore::GraphicsContextStateChange::apply const): (WebCore::GraphicsContextStateChange::dump const): (WebCore::GraphicsContext::~GraphicsContext): (WebCore::GraphicsContext::save): (WebCore::GraphicsContext::restore): (WebCore::GraphicsContext::drawRaisedEllipse): (WebCore::GraphicsContext::setStrokeColor): (WebCore::GraphicsContext::setShadow): (WebCore::GraphicsContext::clearShadow): (WebCore::GraphicsContext::setFillColor): (WebCore::GraphicsContext::setStrokePattern): (WebCore::GraphicsContext::setFillPattern): (WebCore::GraphicsContext::setStrokeGradient): (WebCore::GraphicsContext::setFillGradient): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): (WebCore::GraphicsContext::drawText): (WebCore::GraphicsContext::drawGlyphs): (WebCore::GraphicsContext::drawEmphasisMarks): (WebCore::GraphicsContext::drawBidiText): (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawTiledImage): (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::drawConsumingImageBuffer): (WebCore::GraphicsContext::clipRoundedRect): (WebCore::GraphicsContext::clipOutRoundedRect): (WebCore::GraphicsContext::clipToDrawingCommands): (WebCore::GraphicsContext::clipToImageBuffer): (WebCore::GraphicsContext::clipBounds const): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::fillRectWithRoundedHole): (WebCore::GraphicsContext::setCompositeOperation): (WebCore::GraphicsContext::drawPath): (WebCore::GraphicsContext::drawLineForText): (WebCore::GraphicsContext::paintFrameForMedia): (WebCore::NullGraphicsContext::drawConsumingImageBuffer): (WebCore::GraphicsContext::GraphicsContext): Deleted. (WebCore::GraphicsContext::hasPlatformContext const): Deleted. (WebCore::GraphicsContext::setStrokeThickness): Deleted. (WebCore::GraphicsContext::setStrokeStyle): Deleted. (WebCore::GraphicsContext::setLegacyShadow): Deleted. (WebCore::GraphicsContext::setShadowsIgnoreTransforms): Deleted. (WebCore::GraphicsContext::setShouldAntialias): Deleted. (WebCore::GraphicsContext::setShouldSmoothFonts): Deleted. (WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts): Deleted. (WebCore::GraphicsContext::setImageInterpolationQuality): Deleted. (WebCore::GraphicsContext::setFillRule): Deleted. (WebCore::GraphicsContext::drawNativeImage): Deleted. (WebCore::GraphicsContext::drawPattern): Deleted. (WebCore::GraphicsContext::setTextDrawingMode): Deleted. (WebCore::GraphicsContext::setAlpha): Deleted. (WebCore::GraphicsContext::setDrawLuminanceMask): Deleted. (WebCore::GraphicsContext::setUseDarkAppearance): Deleted. (WebCore::GraphicsContext::setPlatformTextDrawingMode): Deleted. (WebCore::GraphicsContext::setPlatformStrokeStyle): Deleted. (WebCore::GraphicsContext::setPlatformShouldSmoothFonts): Deleted. (WebCore::GraphicsContext::isAcceleratedContext const): Deleted. (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): Deleted. (WebCore::GraphicsContext::applyDeviceScaleFactor): Deleted. (WebCore::GraphicsContext::fillEllipse): Deleted. (WebCore::GraphicsContext::strokeEllipse): Deleted. (WebCore::GraphicsContext::platformFillEllipse): Deleted. (WebCore::GraphicsContext::platformStrokeEllipse): Deleted. (WebCore::GraphicsContext::builderState): Deleted. (WebCore::GraphicsContext::supportsInternalLinks const): Deleted. (WebCore::GraphicsContext::setDestinationForRect): Deleted. (WebCore::GraphicsContext::addDestinationAtPoint): Deleted. * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::hasPlatformContext const): (WebCore::GraphicsContext::platformContext const): (WebCore::GraphicsContext::paintingDisabled const): (WebCore::GraphicsContext::performingPaintInvalidation const): (WebCore::GraphicsContext::invalidatingControlTints const): (WebCore::GraphicsContext::invalidatingImagesWithAsyncDecodes const): (WebCore::GraphicsContext::detectingContentfulPaint const): (WebCore::GraphicsContext::setStrokeThickness): (WebCore::GraphicsContext::setStrokeStyle): (WebCore::GraphicsContext::setStrokeGradient): (WebCore::GraphicsContext::setFillRule): (WebCore::GraphicsContext::setShadowsIgnoreTransforms): (WebCore::GraphicsContext::setShouldAntialias): (WebCore::GraphicsContext::setShouldSmoothFonts): (WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts): (WebCore::GraphicsContext::setImageInterpolationQuality): (WebCore::GraphicsContext::imageInterpolationQuality const): (WebCore::GraphicsContext::setAlpha): (WebCore::GraphicsContext::alpha const): (WebCore::GraphicsContext::compositeOperation const): (WebCore::GraphicsContext::blendModeOperation const): (WebCore::GraphicsContext::setDrawLuminanceMask): (WebCore::GraphicsContext::drawLuminanceMask const): (WebCore::GraphicsContext::setTextDrawingMode): (WebCore::GraphicsContext::textDrawingMode const): (WebCore::GraphicsContext::hasVisibleShadow const): (WebCore::GraphicsContext::hasShadow const): (WebCore::GraphicsContext::hasBlurredShadow const): (WebCore::GraphicsContext::setUseDarkAppearance): (WebCore::GraphicsContext::useDarkAppearance const): (WebCore::GraphicsContext::state const): (WebCore::GraphicsContext::renderingMode const): (WebCore::GraphicsContext::fillEllipse): (WebCore::GraphicsContext::strokeEllipse): (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawTiledImage): (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::drawConsumingImageBuffer): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::isInTransparencyLayer const): (WebCore::GraphicsContext::scale): (WebCore::GraphicsContext::applyDeviceScaleFactor): (WebCore::GraphicsContext::setURLForRect): (WebCore::GraphicsContext::setDestinationForRect): (WebCore::GraphicsContext::addDestinationAtPoint): (WebCore::GraphicsContext::supportsInternalLinks const): (WebCore::GraphicsContext::setContentfulPaintDetected): (WebCore::GraphicsContext::contenfulPaintDetected const): (WebCore::GraphicsContext::deprecatedPrivateContext const): (WebCore::GraphicsContext::supportsTransparencyLayers const): (WebCore::GraphicsContext::impl): Deleted. * platform/graphics/GraphicsContextImpl.cpp: Removed. * platform/graphics/GraphicsContextImpl.h: Removed. * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): * platform/graphics/Image.h: * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::ShadowBlur): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayerWin::drawTextAtPoint const): * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: (PlatformCALayerWinInternal::displayCallback): (PlatformCALayerWinInternal::drawRepaintCounters): * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: (WebTiledBackingLayerWin::displayCallback): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContextCairo::GraphicsContextCairo): (WebCore::GraphicsContextCairo::~GraphicsContextCairo): (WebCore::GraphicsContextCairo::hasPlatformContext const): (WebCore::GraphicsContextCairo::getCTM const): (WebCore::GraphicsContextCairo::platformContext const): (WebCore::GraphicsContextCairo::save): (WebCore::GraphicsContextCairo::restore): (WebCore::GraphicsContextCairo::drawRect): (WebCore::GraphicsContextCairo::drawNativeImage): (WebCore::GraphicsContextCairo::drawLine): (WebCore::GraphicsContextCairo::drawEllipse): (WebCore::GraphicsContextCairo::fillPath): (WebCore::GraphicsContextCairo::strokePath): (WebCore::GraphicsContextCairo::fillRect): (WebCore::GraphicsContextCairo::clip): (WebCore::GraphicsContextCairo::clipPath): (WebCore::GraphicsContextCairo::clipBounds const): (WebCore::GraphicsContextCairo::clipToImageBuffer): (WebCore::GraphicsContextCairo::drawFocusRing): (WebCore::GraphicsContextCairo::drawLinesForText): (WebCore::GraphicsContextCairo::drawDotsForDocumentMarker): (WebCore::GraphicsContextCairo::roundToDevicePixels): (WebCore::GraphicsContextCairo::translate): (WebCore::GraphicsContextCairo::updateState): (WebCore::GraphicsContextCairo::concatCTM): (WebCore::GraphicsContextCairo::setCTM): (WebCore::GraphicsContextCairo::beginTransparencyLayer): (WebCore::GraphicsContextCairo::endTransparencyLayer): (WebCore::GraphicsContextCairo::clearRect): (WebCore::GraphicsContextCairo::strokeRect): (WebCore::GraphicsContextCairo::setLineCap): (WebCore::GraphicsContextCairo::setLineDash): (WebCore::GraphicsContextCairo::setLineJoin): (WebCore::GraphicsContextCairo::setMiterLimit): (WebCore::GraphicsContextCairo::clipOut): (WebCore::GraphicsContextCairo::rotate): (WebCore::GraphicsContextCairo::scale): (WebCore::GraphicsContextCairo::fillRoundedRectImpl): (WebCore::GraphicsContextCairo::fillRectWithRoundedHole): (WebCore::GraphicsContextCairo::drawPattern): (WebCore::GraphicsContextCairo::renderingMode const): (WebCore::GraphicsContextCairo::drawGlyphs): (WebCore::GraphicsContext::platformInit): Deleted. (WebCore::GraphicsContext::platformDestroy): Deleted. (WebCore::GraphicsContext::getCTM const): Deleted. (WebCore::GraphicsContext::platformContext const): Deleted. (WebCore::GraphicsContext::savePlatformState): Deleted. (WebCore::GraphicsContext::restorePlatformState): Deleted. (WebCore::GraphicsContext::drawRect): Deleted. (WebCore::GraphicsContext::drawPlatformImage): Deleted. (WebCore::GraphicsContext::drawLine): Deleted. (WebCore::GraphicsContext::drawEllipse): Deleted. (WebCore::GraphicsContext::fillPath): Deleted. (WebCore::GraphicsContext::strokePath): Deleted. (WebCore::GraphicsContext::fillRect): Deleted. (WebCore::GraphicsContext::clip): Deleted. (WebCore::GraphicsContext::clipPath): Deleted. (WebCore::GraphicsContext::clipBounds const): Deleted. (WebCore::GraphicsContext::drawFocusRing): Deleted. (WebCore::GraphicsContext::drawLineForText): Deleted. (WebCore::GraphicsContext::drawLinesForText): Deleted. (WebCore::GraphicsContext::drawDotsForDocumentMarker): Deleted. (WebCore::GraphicsContext::roundToDevicePixels): Deleted. (WebCore::GraphicsContext::translate): Deleted. (WebCore::GraphicsContext::setPlatformFillColor): Deleted. (WebCore::GraphicsContext::setPlatformStrokeColor): Deleted. (WebCore::GraphicsContext::setPlatformStrokeThickness): Deleted. (WebCore::GraphicsContext::setPlatformStrokeStyle): Deleted. (WebCore::GraphicsContext::setURLForRect): Deleted. (WebCore::GraphicsContext::concatCTM): Deleted. (WebCore::GraphicsContext::setCTM): Deleted. (WebCore::GraphicsContext::setPlatformShadow): Deleted. (WebCore::GraphicsContext::clearPlatformShadow): Deleted. (WebCore::GraphicsContext::beginPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::endPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::supportsTransparencyLayers): Deleted. (WebCore::GraphicsContext::clearRect): Deleted. (WebCore::GraphicsContext::strokeRect): Deleted. (WebCore::GraphicsContext::setLineCap): Deleted. (WebCore::GraphicsContext::setLineDash): Deleted. (WebCore::GraphicsContext::setLineJoin): Deleted. (WebCore::GraphicsContext::setMiterLimit): Deleted. (WebCore::GraphicsContext::setPlatformAlpha): Deleted. (WebCore::GraphicsContext::setPlatformCompositeOperation): Deleted. (WebCore::GraphicsContext::canvasClip): Deleted. (WebCore::GraphicsContext::clipOut): Deleted. (WebCore::GraphicsContext::rotate): Deleted. (WebCore::GraphicsContext::scale): Deleted. (WebCore::GraphicsContext::platformFillRoundedRect): Deleted. (WebCore::GraphicsContext::fillRectWithRoundedHole): Deleted. (WebCore::GraphicsContext::drawPlatformPattern): Deleted. (WebCore::GraphicsContext::setPlatformShouldAntialias): Deleted. (WebCore::GraphicsContext::setPlatformImageInterpolationQuality): Deleted. (WebCore::GraphicsContext::isAcceleratedContext const): Deleted. * platform/graphics/cairo/GraphicsContextImplCairo.cpp: Removed. * platform/graphics/cairo/GraphicsContextImplCairo.h: Removed. * platform/graphics/cairo/ImageBufferCairoBackend.cpp: * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: (WebCore::ImageBufferCairoSurfaceBackend::ImageBufferCairoSurfaceBackend): * platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::strokeBoundingRect const): (WebCore::Path::strokeContains const): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::coreInterpolationQuality): (WebCore::cgInterpolationQuality): (WebCore::cgTextDrawingMode): (WebCore::GraphicsContextCG::GraphicsContextCG): (WebCore::GraphicsContextCG::~GraphicsContextCG): (WebCore::GraphicsContextCG::hasPlatformContext const): (WebCore::GraphicsContextCG::platformContext const): (WebCore::GraphicsContextCG::save): (WebCore::GraphicsContextCG::restore): (WebCore::GraphicsContextCG::drawNativeImage): (WebCore::drawPatternCallback): (WebCore::GraphicsContextCG::drawPattern): (WebCore::GraphicsContextCG::drawRect): (WebCore::GraphicsContextCG::drawLine): (WebCore::GraphicsContextCG::drawEllipse): (WebCore::GraphicsContextCG::applyStrokePattern): (WebCore::GraphicsContextCG::applyFillPattern): (WebCore::GraphicsContextCG::drawPath): (WebCore::GraphicsContextCG::fillPath): (WebCore::GraphicsContextCG::strokePath): (WebCore::GraphicsContextCG::fillRect): (WebCore::GraphicsContextCG::fillRoundedRectImpl): (WebCore::GraphicsContextCG::fillRectWithRoundedHole): (WebCore::GraphicsContextCG::clip): (WebCore::GraphicsContextCG::clipOut): (WebCore::GraphicsContextCG::clipPath): (WebCore::GraphicsContextCG::clipBounds const): (WebCore::GraphicsContextCG::beginTransparencyLayer): (WebCore::GraphicsContextCG::endTransparencyLayer): (WebCore::applyShadowOffsetWorkaroundIfNeeded): (WebCore::setCGShadow): (WebCore::GraphicsContextCG::updateState): (WebCore::GraphicsContextCG::setMiterLimit): (WebCore::GraphicsContextCG::clearRect): (WebCore::GraphicsContextCG::strokeRect): (WebCore::GraphicsContextCG::setLineCap): (WebCore::GraphicsContextCG::setLineDash): (WebCore::GraphicsContextCG::setLineJoin): (WebCore::GraphicsContextCG::scale): (WebCore::GraphicsContextCG::rotate): (WebCore::GraphicsContextCG::translate): (WebCore::GraphicsContextCG::concatCTM): (WebCore::GraphicsContextCG::setCTM): (WebCore::GraphicsContextCG::getCTM const): (WebCore::GraphicsContextCG::roundToDevicePixels): (WebCore::GraphicsContextCG::drawLinesForText): (WebCore::GraphicsContextCG::setURLForRect): (WebCore::GraphicsContextCG::setIsCALayerContext): (WebCore::GraphicsContextCG::isCALayerContext const): (WebCore::GraphicsContextCG::setIsAcceleratedContext): (WebCore::GraphicsContextCG::renderingMode const): (WebCore::GraphicsContextCG::applyDeviceScaleFactor): (WebCore::GraphicsContextCG::fillEllipse): (WebCore::GraphicsContextCG::strokeEllipse): (WebCore::GraphicsContextCG::supportsInternalLinks const): (WebCore::GraphicsContextCG::setDestinationForRect): (WebCore::GraphicsContextCG::addDestinationAtPoint): (WebCore::setCGStrokeColor): Deleted. (WebCore::convertInterpolationQuality): Deleted. (WebCore::GraphicsContext::platformInit): Deleted. (WebCore::GraphicsContext::platformDestroy): Deleted. (WebCore::GraphicsContext::platformContext const): Deleted. (WebCore::GraphicsContext::savePlatformState): Deleted. (WebCore::GraphicsContext::restorePlatformState): Deleted. (WebCore::GraphicsContext::drawPlatformImage): Deleted. (WebCore::GraphicsContext::drawPlatformPattern): Deleted. (WebCore::GraphicsContext::drawRect): Deleted. (WebCore::GraphicsContext::drawLine): Deleted. (WebCore::GraphicsContext::drawEllipse): Deleted. (WebCore::GraphicsContext::applyStrokePattern): Deleted. (WebCore::GraphicsContext::applyFillPattern): Deleted. (WebCore::GraphicsContext::drawPath): Deleted. (WebCore::GraphicsContext::fillPath): Deleted. (WebCore::GraphicsContext::strokePath): Deleted. (WebCore::GraphicsContext::fillRect): Deleted. (WebCore::GraphicsContext::platformFillRoundedRect): Deleted. (WebCore::GraphicsContext::fillRectWithRoundedHole): Deleted. (WebCore::GraphicsContext::clip): Deleted. (WebCore::GraphicsContext::clipOut): Deleted. (WebCore::GraphicsContext::clipPath): Deleted. (WebCore::GraphicsContext::clipBounds const): Deleted. (WebCore::GraphicsContext::beginPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::endPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::supportsTransparencyLayers): Deleted. (WebCore::GraphicsContext::setPlatformShadow): Deleted. (WebCore::GraphicsContext::clearPlatformShadow): Deleted. (WebCore::GraphicsContext::setMiterLimit): Deleted. (WebCore::GraphicsContext::clearRect): Deleted. (WebCore::GraphicsContext::strokeRect): Deleted. (WebCore::GraphicsContext::setLineCap): Deleted. (WebCore::GraphicsContext::setLineDash): Deleted. (WebCore::GraphicsContext::setLineJoin): Deleted. (WebCore::GraphicsContext::canvasClip): Deleted. (WebCore::GraphicsContext::scale): Deleted. (WebCore::GraphicsContext::rotate): Deleted. (WebCore::GraphicsContext::translate): Deleted. (WebCore::GraphicsContext::concatCTM): Deleted. (WebCore::GraphicsContext::setCTM): Deleted. (WebCore::GraphicsContext::getCTM const): Deleted. (WebCore::GraphicsContext::roundToDevicePixels): Deleted. (WebCore::GraphicsContext::drawLineForText): Deleted. (WebCore::GraphicsContext::drawLinesForText): Deleted. (WebCore::GraphicsContext::setURLForRect): Deleted. (WebCore::GraphicsContext::setPlatformImageInterpolationQuality): Deleted. (WebCore::GraphicsContext::setIsCALayerContext): Deleted. (WebCore::GraphicsContext::isCALayerContext const): Deleted. (WebCore::GraphicsContext::setIsAcceleratedContext): Deleted. (WebCore::GraphicsContext::isAcceleratedContext const): Deleted. (WebCore::GraphicsContext::setPlatformTextDrawingMode): Deleted. (WebCore::GraphicsContext::setPlatformStrokeColor): Deleted. (WebCore::GraphicsContext::setPlatformStrokeThickness): Deleted. (WebCore::GraphicsContext::setPlatformFillColor): Deleted. (WebCore::GraphicsContext::setPlatformShouldAntialias): Deleted. (WebCore::GraphicsContext::setPlatformShouldSmoothFonts): Deleted. (WebCore::GraphicsContext::setPlatformAlpha): Deleted. (WebCore::GraphicsContext::setPlatformCompositeOperation): Deleted. (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): Deleted. (WebCore::GraphicsContext::platformFillEllipse): Deleted. (WebCore::GraphicsContext::platformStrokeEllipse): Deleted. (WebCore::GraphicsContext::supportsInternalLinks const): Deleted. (WebCore::GraphicsContext::setDestinationForRect): Deleted. (WebCore::GraphicsContext::addDestinationAtPoint): Deleted. * platform/graphics/cg/GraphicsContextCG.h: * platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: (WebCore::ImageBufferCGBitmapBackend::create): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::strokeContains const): (WebCore::Path::strokeBoundingRect const): * platform/graphics/cg/PatternCG.cpp: (WebCore::patternCallback): * platform/graphics/cocoa/FontCascadeCocoa.mm: * platform/graphics/cocoa/GraphicsContextCocoa.mm: (WebCore::GraphicsContextCG::drawFocusRing): (WebCore::drawFocusRingToContextAtTime): (WebCore::GraphicsContextCG::drawDotsForDocumentMarker): (WebCore::GraphicsContext::drawFocusRing): Deleted. (WebCore::GraphicsContext::drawDotsForDocumentMarker): Deleted. * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::ensureGraphicsContext): * platform/graphics/displaylists/DisplayListDrawGlyphsRecorder.h: * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderCoreText.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::createInternalContext): (WebCore::DisplayList::DrawGlyphsRecorder::populateInternalContext): (WebCore::DisplayList::DrawGlyphsRecorder::recordDrawGlyphs): * platform/graphics/displaylists/DisplayListDrawingContext.cpp: (WebCore::DisplayList::DrawingContext::DrawingContext): (WebCore::DisplayList::DrawingContext::recorder): Deleted. * platform/graphics/displaylists/DisplayListDrawingContext.h: (WebCore::DisplayList::DrawingContext::recorder): * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::DrawPath::apply const): * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::SetState::encode const): (WebCore::DisplayList::SetState::decode): * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::Recorder): (WebCore::DisplayList::Recorder::drawImageBuffer): (WebCore::DisplayList::Recorder::getCTM const): (WebCore::DisplayList::Recorder::drawLinesForText): (WebCore::DisplayList::Recorder::drawFocusRing): (WebCore::DisplayList::Recorder::clipBounds const): (WebCore::DisplayList::Recorder::clipToDrawingCommands): (WebCore::DisplayList::Recorder::paintFrameForMedia): (WebCore::DisplayList::Recorder::extentFromLocalBounds const): (WebCore::DisplayList::Recorder::clearShadow): Deleted. (WebCore::DisplayList::Recorder::getCTM): Deleted. (WebCore::DisplayList::Recorder::clipBounds): Deleted. (WebCore::DisplayList::Recorder::canPaintFrameForMedia const): Deleted. * platform/graphics/displaylists/DisplayListRecorder.h: (WebCore::DisplayList::Recorder::append): * platform/graphics/mac/ColorMac.mm: (WebCore::makeSimpleColorFromNSColor): * platform/graphics/mac/WebLayer.mm: (-[WebLayer drawInContext:]): (-[WebSimpleLayer drawInContext:]): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp: (Nicosia::CairoOperationRecorder::CairoOperationRecorder): (Nicosia::CairoOperationRecorder::fillRect): (Nicosia::CairoOperationRecorder::fillRoundedRect): (Nicosia::CairoOperationRecorder::fillRectWithRoundedHole): (Nicosia::CairoOperationRecorder::fillPath): (Nicosia::CairoOperationRecorder::fillEllipse): (Nicosia::CairoOperationRecorder::strokeRect): (Nicosia::CairoOperationRecorder::strokePath): (Nicosia::CairoOperationRecorder::strokeEllipse): (Nicosia::CairoOperationRecorder::drawGlyphs): (Nicosia::CairoOperationRecorder::drawNativeImage): (Nicosia::CairoOperationRecorder::drawRect): (Nicosia::CairoOperationRecorder::drawLine): (Nicosia::CairoOperationRecorder::drawLinesForText): (Nicosia::CairoOperationRecorder::drawEllipse): (Nicosia::CairoOperationRecorder::getCTM const): (Nicosia::CairoOperationRecorder::clipBounds const): (Nicosia::CairoOperationRecorder::clipToDrawingCommands): (Nicosia::CairoOperationRecorder::paintFrameForMedia): (Nicosia::CairoOperationRecorder::clearShadow): Deleted. (Nicosia::CairoOperationRecorder::drawPath): Deleted. (Nicosia::CairoOperationRecorder::getCTM): Deleted. (Nicosia::CairoOperationRecorder::clipBounds): Deleted. * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h: * platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp: (Nicosia::PaintingContextCairo::ForPainting::ForPainting): (Nicosia::PaintingContextCairo::ForRecording::ForRecording): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContextCG::GraphicsContextCG): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContext::drawWindowsBitmap): (WebCore::GraphicsContextCG::drawFocusRing): (WebCore::GraphicsContextCG::drawDotsForDocumentMarker): (WebCore::GraphicsContextCG::deprecatedPrivateContext const): (WebCore::GraphicsContext::GraphicsContext): Deleted. (WebCore::GraphicsContext::platformInit): Deleted. (WebCore::GraphicsContext::drawFocusRing): Deleted. (WebCore::GraphicsContext::drawDotsForDocumentMarker): Deleted. * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContextCairo::GraphicsContextCairo): (WebCore::GraphicsContext::releaseWindowsContext): (WebCore::GraphicsContextCairo::deprecatedPrivateContext const): (WebCore::GraphicsContext::GraphicsContext): Deleted. (WebCore::GraphicsContext::platformInit): Deleted. * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContextDirect2D::GraphicsContextDirect2D): (WebCore::GraphicsContextDirect2D::systemFactory): (WebCore::GraphicsContextDirect2D::defaultRenderTarget): (WebCore::GraphicsContextDirect2D::platformInit): (WebCore::GraphicsContextDirect2D::~GraphicsContextDirect2D): (WebCore::GraphicsContextDirect2D::platformContext const): (WebCore::GraphicsContextDirect2D::save): (WebCore::GraphicsContextDirect2D::restore): (WebCore::GraphicsContextDirect2D::drawNativeImage): (WebCore::GraphicsContextDirect2D::releaseWindowsContext): (WebCore::GraphicsContextDirect2D::drawWindowsBitmap): (WebCore::GraphicsContextDirect2D::drawFocusRing): (WebCore::GraphicsContextDirect2D::drawDotsForDocumentMarker): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextDirect2D::brushWithColor): (WebCore::GraphicsContextDirect2D::colorWithGlobalAlpha const): (WebCore::GraphicsContextDirect2D::solidStrokeBrush const): (WebCore::GraphicsContextDirect2D::solidFillBrush const): (WebCore::GraphicsContextDirect2D::patternStrokeBrush const): (WebCore::GraphicsContextDirect2D::patternFillBrush const): (WebCore::GraphicsContextDirect2D::beginDraw): (WebCore::GraphicsContextDirect2D::endDraw): (WebCore::GraphicsContextDirect2D::flush): (WebCore::GraphicsContextDirect2D::drawPattern): (WebCore::GraphicsContextDirect2D::drawRect): (WebCore::GraphicsContextDirect2D::strokeStyle const): (WebCore::GraphicsContextDirect2D::drawLine): (WebCore::GraphicsContextDirect2D::drawEllipse): (WebCore::GraphicsContextDirect2D::applyStrokePattern): (WebCore::GraphicsContextDirect2D::applyFillPattern): (WebCore::GraphicsContextDirect2D::drawPath): (WebCore::GraphicsContextDirect2D::fillPath): (WebCore::GraphicsContextDirect2D::strokePath): (WebCore::GraphicsContextDirect2D::fillRect): (WebCore::GraphicsContextDirect2D::fillRoundedRectImpl): (WebCore::GraphicsContextDirect2D::fillRectWithRoundedHole): (WebCore::GraphicsContextDirect2D::clip): (WebCore::GraphicsContextDirect2D::clipOut): (WebCore::GraphicsContextDirect2D::clipPath): (WebCore::GraphicsContextDirect2D::clipBounds const): (WebCore::GraphicsContextDirect2D::beginTransparencyLayer): (WebCore::GraphicsContextDirect2D::endTransparencyLayer): (WebCore::GraphicsContextDirect2D::supportsTransparencyLayers): (WebCore::GraphicsContextDirect2D::updateState): (WebCore::GraphicsContextDirect2D::setMiterLimit): (WebCore::GraphicsContextDirect2D::clearRect): (WebCore::GraphicsContextDirect2D::strokeRect): (WebCore::GraphicsContextDirect2D::setLineCap): (WebCore::GraphicsContextDirect2D::setLineDash): (WebCore::GraphicsContextDirect2D::setLineJoin): (WebCore::GraphicsContextDirect2D::scale): (WebCore::GraphicsContextDirect2D::rotate): (WebCore::GraphicsContextDirect2D::translate): (WebCore::GraphicsContextDirect2D::concatCTM): (WebCore::GraphicsContextDirect2D::setCTM): (WebCore::GraphicsContextDirect2D::getCTM const): (WebCore::GraphicsContextDirect2D::roundToDevicePixels): (WebCore::GraphicsContextDirect2D::drawLinesForText): (WebCore::GraphicsContextDirect2D::setURLForRect): (WebCore::GraphicsContextDirect2D::setIsCALayerContext): (WebCore::GraphicsContextDirect2D::isCALayerContext const): (WebCore::GraphicsContextDirect2D::setIsAcceleratedContext): (WebCore::GraphicsContextDirect2D::isAcceleratedContext const): (WebCore::GraphicsContextDirect2D::applyDeviceScaleFactor): (WebCore::GraphicsContextDirect2D::fillEllipse): (WebCore::GraphicsContextDirect2D::strokeEllipse): (WebCore::GraphicsContextDirect2D::drawGlyphs): (WebCore::GraphicsContextDirect2D::clipToDrawingCommands): (WebCore::GraphicsContextDirect2D::clipToImageBuffer): (WebCore::GraphicsContextDirect2D::paintFrameForMedia): (WebCore::GraphicsContext::GraphicsContext): Deleted. (WebCore::GraphicsContext::systemFactory): Deleted. (WebCore::GraphicsContext::defaultRenderTarget): Deleted. (WebCore::GraphicsContext::platformInit): Deleted. (WebCore::GraphicsContext::platformDestroy): Deleted. (WebCore::GraphicsContext::platformContext const): Deleted. (WebCore::GraphicsContext::savePlatformState): Deleted. (WebCore::GraphicsContext::restorePlatformState): Deleted. (WebCore::GraphicsContext::drawPlatformImage): Deleted. (WebCore::GraphicsContext::releaseWindowsContext): Deleted. (WebCore::GraphicsContext::drawWindowsBitmap): Deleted. (WebCore::GraphicsContext::drawFocusRing): Deleted. (WebCore::GraphicsContext::drawDotsForDocumentMarker): Deleted. (WebCore::GraphicsContext::brushWithColor): Deleted. (WebCore::GraphicsContext::colorWithGlobalAlpha const): Deleted. (WebCore::GraphicsContext::solidStrokeBrush const): Deleted. (WebCore::GraphicsContext::solidFillBrush const): Deleted. (WebCore::GraphicsContext::patternStrokeBrush const): Deleted. (WebCore::GraphicsContext::patternFillBrush const): Deleted. (WebCore::GraphicsContext::beginDraw): Deleted. (WebCore::GraphicsContext::endDraw): Deleted. (WebCore::GraphicsContext::flush): Deleted. (WebCore::GraphicsContext::drawPlatformPattern): Deleted. (WebCore::GraphicsContext::drawRect): Deleted. (WebCore::GraphicsContext::platformStrokeStyle const): Deleted. (WebCore::GraphicsContext::drawLine): Deleted. (WebCore::GraphicsContext::drawEllipse): Deleted. (WebCore::GraphicsContext::applyStrokePattern): Deleted. (WebCore::GraphicsContext::applyFillPattern): Deleted. (WebCore::GraphicsContext::drawPath): Deleted. (WebCore::GraphicsContext::fillPath): Deleted. (WebCore::GraphicsContext::strokePath): Deleted. (WebCore::GraphicsContext::fillRect): Deleted. (WebCore::GraphicsContext::platformFillRoundedRect): Deleted. (WebCore::GraphicsContext::fillRectWithRoundedHole): Deleted. (WebCore::GraphicsContext::clip): Deleted. (WebCore::GraphicsContext::clipOut): Deleted. (WebCore::GraphicsContext::clipPath): Deleted. (WebCore::GraphicsContext::clipBounds const): Deleted. (WebCore::GraphicsContext::beginPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::endPlatformTransparencyLayer): Deleted. (WebCore::GraphicsContext::supportsTransparencyLayers): Deleted. (WebCore::GraphicsContext::setPlatformShadow): Deleted. (WebCore::GraphicsContext::clearPlatformShadow): Deleted. (WebCore::GraphicsContext::setPlatformStrokeStyle): Deleted. (WebCore::GraphicsContext::setMiterLimit): Deleted. (WebCore::GraphicsContext::clearRect): Deleted. (WebCore::GraphicsContext::strokeRect): Deleted. (WebCore::GraphicsContext::setLineCap): Deleted. (WebCore::GraphicsContext::setLineDash): Deleted. (WebCore::GraphicsContext::setLineJoin): Deleted. (WebCore::GraphicsContext::canvasClip): Deleted. (WebCore::GraphicsContext::scale): Deleted. (WebCore::GraphicsContext::rotate): Deleted. (WebCore::GraphicsContext::translate): Deleted. (WebCore::GraphicsContext::concatCTM): Deleted. (WebCore::GraphicsContext::setCTM): Deleted. (WebCore::GraphicsContext::getCTM const): Deleted. (WebCore::GraphicsContext::roundToDevicePixels): Deleted. (WebCore::GraphicsContext::drawLineForText): Deleted. (WebCore::GraphicsContext::drawLinesForText): Deleted. (WebCore::GraphicsContext::setURLForRect): Deleted. (WebCore::GraphicsContext::setPlatformImageInterpolationQuality): Deleted. (WebCore::GraphicsContext::setIsCALayerContext): Deleted. (WebCore::GraphicsContext::isCALayerContext const): Deleted. (WebCore::GraphicsContext::setIsAcceleratedContext): Deleted. (WebCore::GraphicsContext::isAcceleratedContext const): Deleted. (WebCore::GraphicsContext::setPlatformTextDrawingMode): Deleted. (WebCore::GraphicsContext::setPlatformStrokeColor): Deleted. (WebCore::GraphicsContext::setPlatformStrokeThickness): Deleted. (WebCore::GraphicsContext::setPlatformFillColor): Deleted. (WebCore::GraphicsContext::setPlatformShouldAntialias): Deleted. (WebCore::GraphicsContext::setPlatformShouldSmoothFonts): Deleted. (WebCore::GraphicsContext::setPlatformAlpha): Deleted. (WebCore::GraphicsContext::setPlatformCompositeOperation): Deleted. (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): Deleted. (WebCore::GraphicsContext::platformFillEllipse): Deleted. (WebCore::GraphicsContext::platformStrokeEllipse): Deleted. * platform/graphics/win/GraphicsContextImplDirect2D.cpp: Removed. * platform/graphics/win/GraphicsContextImplDirect2D.h: Removed. * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::setShouldIncludeChildWindows): (WebCore::GraphicsContext::shouldIncludeChildWindows const): (WebCore::GraphicsContext::createWindowsBitmap): (WebCore::GraphicsContext::getWindowsContext): (WebCore::GraphicsContext::hdc const): * platform/graphics/win/ImageBufferDirect2DBackend.cpp: (WebCore::ImageBufferDirect2DBackend::create): * platform/graphics/win/ImageCGWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): * platform/graphics/win/ImageCairoWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): * platform/graphics/win/PathDirect2D.cpp: (WebCore::Path::strokeContains const): (WebCore::Path::strokeBoundingRect const): * platform/ios/DragImageIOS.mm: (WebCore::createDragImageFromImage): (WebCore::createDragImageForLink): (WebCore::createDragImageForSelection): (WebCore::createDragImageForRange): (WebCore::createDragImageForColor): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.cpp: * platform/win/DragImageWin.cpp: (WebCore::createDragImageForLink): * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::paint): * rendering/ContentfulPaintChecker.cpp: (WebCore::ContentfulPaintChecker::qualifiesForContentfulPaint): * rendering/RenderBoxModelObject.cpp: (WebCore::applyBoxShadowForBackground): (WebCore::RenderBoxModelObject::paintBoxShadow): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateEventRegion): Source/WebKit: * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * Shared/win/ShareableBitmapDirect2D.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::incorporateUpdate): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _drawPreview:]): * UIProcess/win/BackingStoreDirect2D.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: (WebKit::WebPopupMenuProxyWin::paint): * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::paintControlForLayerInContext): * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: (WebKit::WebPage::pdfSnapshotAtSize): * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawPagesToPDFImpl): * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::renderPage): Source/WebKitLegacy/mac: * Misc/WebCoreStatistics.mm: (-[WebFrame printToCGContext:pageWidth:pageHeight:]): * Misc/WebKitNSStringExtras.mm: (-[NSString _web_drawAtPoint:font:textColor:]): * WebInspector/WebNodeHighlightView.mm: (-[WebNodeHighlightView drawRect:]): * WebView/WebFrame.mm: (-[WebFrame _drawRect:contentsOnly:]): Source/WebKitLegacy/win: * FullscreenVideoController.cpp: (FullscreenVideoController::draw): * WebFrame.cpp: (WebFrame::paintDocumentRectToContext): (WebFrame::paintScrollViewRectToContextAtPoint): (WebFrame::spoolPages): * WebNodeHighlight.cpp: (WebNodeHighlight::update): * WebView.cpp: (WebView::paintWithDirect2D): (WebView::paintIntoBackingStore): Tools: * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/238144@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-26 00:01:28 +00:00
platform/graphics/NullGraphicsContext.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/OpenGLESShims.h
platform/graphics/OpenGLShims.h
platform/graphics/Path.h
platform/graphics/PathUtilities.h
platform/graphics/Pattern.h
Factor out pixel buffer from DOM specific ImageData class https://bugs.webkit.org/show_bug.cgi?id=225554 Reviewed by Darin Adler. Source/WebCore: Prepare to fix layering violating use of DOM level ImageData being used by platform code by factoring out the pixel storage into a new PixelBuffer class. Since it will be a little more general that ImageData is now (though ImageData will need to gain these soon) PixelBuffer also captures the pixel format and color space the pixel data represents. While here, update ImageData::data() to return a reference rather than a pointer to indicate it is never null and update all the callers. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSImageDataCustom.cpp: (WebCore::toJSNewlyCreated): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpImageBitmap): (WebCore::CloneSerializer::dumpIfTerminal): (WebCore::CloneDeserializer::readTerminal): * html/ImageBitmap.cpp: (WebCore::ImageBitmap::createPromise): * html/ImageData.cpp: (WebCore::ImageData::create): (WebCore::ImageData::ImageData): (WebCore::ImageData::deepClone const): (WebCore::operator<<): * html/ImageData.h: (WebCore::ImageData::size const): (WebCore::ImageData::width const): (WebCore::ImageData::height const): (WebCore::ImageData::data const): (WebCore::ImageData::colorSpace const): (WebCore::ImageData::format const): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::createEmptyImageData): (WebCore::CanvasRenderingContext2DBase::putImageData): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::texImageSourceHelper): * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::buildArrayForImageData): * platform/graphics/GraphicsContextGL.cpp: (WebCore::GraphicsContextGL::extractImageData): * platform/graphics/ImageBufferBackend.cpp: (WebCore::ImageBufferBackend::convertToLuminanceMask): (WebCore::ImageBufferBackend::getImageData const): (WebCore::ImageBufferBackend::putImageData): * platform/graphics/PixelBuffer.cpp: Added. (WebCore::PixelBuffer::PixelBuffer): (WebCore::PixelBuffer::deepClone const): * platform/graphics/PixelBuffer.h: Added. (WebCore::PixelBuffer::colorSpace const): (WebCore::PixelBuffer::format const): (WebCore::PixelBuffer::size const): (WebCore::PixelBuffer::data const): * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::blurShadowBuffer): * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults): * platform/graphics/cg/GraphicsContextGLCG.cpp: (WebCore::GraphicsContextGLOpenGL::paintToCanvas): * platform/graphics/cg/ImageBufferCGBackend.cpp: (WebCore::ImageBufferCGBackend::toCFData const): * platform/graphics/cg/ImageBufferUtilitiesCG.cpp: (WebCore::cfData): * platform/graphics/filters/FEColorMatrix.cpp: (WebCore::FEColorMatrix::platformApplySoftware): * platform/graphics/filters/FEComponentTransfer.cpp: (WebCore::FEComponentTransfer::platformApplySoftware): * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::platformApplySoftware): * platform/graphics/filters/FEConvolveMatrix.cpp: (WebCore::FEConvolveMatrix::platformApplySoftware): * platform/graphics/filters/FEDisplacementMap.cpp: (WebCore::FEDisplacementMap::platformApplySoftware): * platform/graphics/filters/FEDropShadow.cpp: (WebCore::FEDropShadow::platformApplySoftware): * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::platformApplySoftware): * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::platformApplySoftware): * platform/graphics/filters/FEMorphology.cpp: (WebCore::FEMorphology::platformApplySoftware): * platform/graphics/filters/FETurbulence.cpp: (WebCore::FETurbulence::platformApplySoftware): * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::forceValidPreMultipliedPixels): (WebCore::FilterEffect::copyConvertedImageBufferToDestination): (WebCore::FilterEffect::copyConvertedImageDataToDestination): (WebCore::FilterEffect::copyUnmultipliedResult): (WebCore::FilterEffect::copyPremultipliedResult): * rendering/shapes/Shape.cpp: (WebCore::Shape::createRasterShape): Source/WebKit: Update for ImageData::data() returning a reference. * GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::populateGetImageDataSharedMemory): * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<Ref<WebCore::ImageData>>::encode): * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: Canonical link: https://commits.webkit.org/237506@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-09 01:29:38 +00:00
platform/graphics/PixelBuffer.h
Split pixel buffer format data out into a new PixelBufferFormat struct https://bugs.webkit.org/show_bug.cgi?id=225707 Reviewed by Darin Adler. Source/WebCore: Splits out PixelBufferFormat into a new struct and adopts it by PixelBufferConversionView, ConstPixelBufferConversionView and PixelBuffer. This also means that PixelBuffer now tracks the alpha format of the underlying buffer which will come in handy. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Add new files. * platform/graphics/AlphaPremultiplication.cpp: Added. (WebCore::operator<<): Add AlphaPremultiplication.cpp and move TextStream support here from GraphicsTypes.cpp. * platform/graphics/GraphicsTypes.cpp: Move AlphaPremultiplication TextStream to the more appropriate AlphaPremultiplication.cpp. * html/ImageData.cpp: (WebCore::ImageData::create): * html/ImageData.h: (WebCore::ImageData::colorSpace const): Deleted. (WebCore::ImageData::format const): Deleted. * platform/graphics/ImageBufferBackend.cpp: (WebCore::ImageBufferBackend::toBGRAData const): (WebCore::ImageBufferBackend::getPixelBuffer const): (WebCore::ImageBufferBackend::putPixelBuffer): * platform/graphics/ImageBufferBackend.h: * platform/graphics/PixelBuffer.cpp: (WebCore::PixelBuffer::computeBufferSize): (WebCore::PixelBuffer::tryCreateForDecoding): (WebCore::PixelBuffer::tryCreate): (WebCore::PixelBuffer::PixelBuffer): (WebCore::PixelBuffer::deepClone const): (WebCore::operator<<): * platform/graphics/PixelBuffer.h: (WebCore::PixelBuffer::format const): (WebCore::PixelBuffer::encode const): (WebCore::PixelBuffer::decode): (WebCore::PixelBuffer::colorSpace const): Deleted. * platform/graphics/PixelBufferConversion.cpp: (WebCore::convertImagePixelsAccelerated): (WebCore::convertImagePixels): * platform/graphics/PixelBufferConversion.h: * platform/graphics/PixelBufferFormat.cpp: Added. (WebCore::operator<<): * platform/graphics/PixelBufferFormat.h: Added. (WebCore::PixelBufferFormat::encode const): (WebCore::PixelBufferFormat::decode): * platform/graphics/PixelFormat.cpp: Added. (WebCore::operator<<): * platform/graphics/PixelFormat.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults): * platform/graphics/cg/GraphicsContextGLCG.cpp: (WebCore::GraphicsContextGLOpenGL::paintToCanvas): * platform/graphics/cg/ImageBufferCGBackend.cpp: (WebCore::ImageBufferCGBackend::toCFData const): * platform/graphics/cg/ImageBufferUtilitiesCG.cpp: (WebCore::cfData): * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::copyUnmultipliedResult): (WebCore::FilterEffect::copyPremultipliedResult): (WebCore::FilterEffect::createUnmultipliedImageResult): (WebCore::FilterEffect::createPremultipliedImageResult): Adopt PixelBufferFormat. Source/WebKit: * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: Adopt PixelBufferFormat. Canonical link: https://commits.webkit.org/237698@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-13 20:54:21 +00:00
platform/graphics/PixelBufferFormat.h
platform/graphics/PixelFormat.h
Convert DestinationColorSpace from an enum to class wrapping a platform color space (CGColorSpaceRef for CG ports, etc.) https://bugs.webkit.org/show_bug.cgi?id=226143 Reviewed by Darin Adler. Source/WebCore: Replace enumeration based DestinationColorSpace with a struct wrapping a platform color space (CGColorSpaceRef for CG ports, etc.). For ports that don't have a platform level color space type, a builtin PlatformColorSpace type is provided that is just the old enum renamed to PlatformColorSpace::Name. The goal of this change is to unify the currently bifurcated concept of an ImageBuffer's color space, which previosly could either be based on the DestinationColorSpace (and reflected in the colorSpace() member function), or (for CG ports) based on a CGColorSpaceRef, with the colorSpace() function returning sRGB even if the ImageBuffer was not. * Headers.cmake: * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::sanitizeDataIfNeeded): * Modules/mediasession/MediaMetadata.cpp: (WebCore::ArtworkImageLoader::notifyFinished): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpImageBitmap): (WebCore::CloneDeserializer::readImageBitmap): * css/CSSFilterImageValue.cpp: (WebCore::CSSFilterImageValue::image): * html/CustomPaintCanvas.cpp: (WebCore::CustomPaintCanvas::copiedImage const): * html/CustomPaintImage.cpp: (WebCore::CustomPaintImage::drawPattern): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::toMediaSample): (WebCore::HTMLCanvasElement::createImageBuffer const): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::createBufferForPainting const): * html/HTMLVideoElement.h: * html/ImageBitmap.cpp: (WebCore::ImageBitmap::createImageBuffer): (WebCore::ImageBitmap::createPromise): * html/OffscreenCanvas.cpp: (WebCore::OffscreenCanvas::commitToPlaceholderCanvas): * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::colorSpace const): * html/canvas/CanvasRenderingContext.h: * html/canvas/CanvasRenderingContext2D.cpp: * html/canvas/ImageBitmapRenderingContext.cpp: (WebCore::ImageBitmapRenderingContext::setOutputBitmap): * html/canvas/PredefinedColorSpace.cpp: (WebCore::toDestinationColorSpace): (WebCore::toPredefinedColorSpace): * html/canvas/PredefinedColorSpace.h: * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer): * html/shadow/MediaControlTextTrackContainerElement.cpp: (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::indexForData): (WebCore::InspectorCanvas::buildArrayForCanvasPattern): * page/Chrome.cpp: (WebCore::Chrome::createImageBuffer const): * page/Chrome.h: * page/ChromeClient.h: (WebCore::ChromeClient::createImageBuffer const): * page/FrameSnapshotting.cpp: (WebCore::snapshotFrameRectWithClip): * page/PageColorSampler.cpp: (WebCore::sampleColor): * page/PageConsoleClient.cpp: (WebCore::PageConsoleClient::screenshot): * platform/HostWindow.h: * platform/PlatformColorSpace.h: Added. (WebCore::PlatformColorSpace::get const): * platform/PlatformScreen.h: * platform/ScreenProperties.h: (WebCore::ScreenProperties::encode const): (WebCore::ScreenData::encode const): (WebCore::ScreenData::decode): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::preTransformedNativeImageForCurrentFrame): (WebCore::BitmapImage::drawPattern): * platform/graphics/Color.cpp: (WebCore::Color::toColorComponentsInColorSpace const): * platform/graphics/Color.h: * platform/graphics/ColorConversion.cpp: (WebCore::converColorComponents): * platform/graphics/ColorConversion.h: * platform/graphics/ColorSpace.cpp: * platform/graphics/ColorSpace.h: * platform/graphics/ConcreteImageBuffer.h: (WebCore::ConcreteImageBuffer::create): * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::drawPattern): * platform/graphics/DestinationColorSpace.cpp: Added. (WebCore::DestinationColorSpace::SRGB): (WebCore::DestinationColorSpace::LinearSRGB): (WebCore::DestinationColorSpace::DisplayP3): (WebCore::DestinationColorSpace::DestinationColorSpace): (WebCore::operator==): (WebCore::operator!=): (WebCore::operator<<): * platform/graphics/DestinationColorSpace.h: Added. (WebCore::DestinationColorSpace::platformColorSpace const): (WebCore::DestinationColorSpace::encode const): (WebCore::DestinationColorSpace::decode): * platform/graphics/GradientImage.cpp: (WebCore::GradientImage::drawPattern): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::clipToDrawingCommands): * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::create): (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::copyRectToBuffer): * platform/graphics/ImageBuffer.h: * platform/graphics/ImageBufferBackend.cpp: (WebCore::ImageBufferBackend::getPixelBuffer const): (WebCore::ImageBufferBackend::putPixelBuffer): * platform/graphics/ImageBufferBackend.h: (WebCore::ImageBufferBackend::transformColorSpace): (WebCore::ImageBufferBackend::colorSpace const): * platform/graphics/PixelBuffer.h: (WebCore::PixelBuffer::decode): * platform/graphics/PixelBufferConversion.cpp: (WebCore::makeVImageCGImageFormat): * platform/graphics/PixelBufferFormat.h: (WebCore::PixelBufferFormat::decode): * platform/graphics/RemoteVideoSample.cpp: (WebCore::transferBGRAPixelBufferToIOSurface): (WebCore::RemoteVideoSample::create): (WebCore::RemoteVideoSample::RemoteVideoSample): (WebCore::RemoteVideoSample::surface const): * platform/graphics/RemoteVideoSample.h: * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::getScratchBuffer): (WebCore::ShadowBlur::drawRectShadowWithoutTiling): (WebCore::ShadowBlur::drawInsetShadowWithoutTiling): (WebCore::ShadowBlur::drawRectShadowWithTiling): (WebCore::ShadowBlur::drawInsetShadowWithTiling): (WebCore::ShadowBlur::blurShadowBuffer): (WebCore::ShadowBlur::drawShadowLayer): * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults): * platform/graphics/cairo/ImageBufferCairoBackend.cpp: (WebCore::ImageBufferCairoBackend::transformColorSpace): * platform/graphics/cairo/ImageBufferCairoBackend.h: * platform/graphics/cg/ColorCG.cpp: (WebCore::convertToCGCompatibleComponents): (WebCore::createCGColor): (WebCore::platformConvertColorComponents): * platform/graphics/cg/ColorSpaceCG.h: (WebCore::cachedCGColorSpace): Deleted. * platform/graphics/cg/GraphicsContextGLCG.cpp: (WebCore::GraphicsContextGLOpenGL::paintToCanvas): * platform/graphics/cg/IOSurfacePool.cpp: (WebCore::surfaceMatchesParameters): (WebCore::IOSurfacePool::takeSurface): * platform/graphics/cg/IOSurfacePool.h: * platform/graphics/cg/ImageBufferCGBackend.cpp: (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferCGBackend::copyCGImageForEncoding const): * platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: (WebCore::ImageBufferCGBitmapBackend::create): (WebCore::ImageBufferCGBitmapBackend::copyNativeImage const): * platform/graphics/cg/ImageBufferCGBitmapBackend.h: * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: (WebCore::ImageBufferIOSurfaceBackend::create): * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: * platform/graphics/cg/ImageBufferUtilitiesCG.cpp: (WebCore::encode): * platform/graphics/cg/NativeImageCG.cpp: (WebCore::NativeImage::singlePixelSolidColor const): * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking): * platform/graphics/cocoa/IOSurface.h: * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::surfaceFromPool): (WebCore::IOSurface::create): (WebCore::IOSurface::createFromSendRight): (WebCore::IOSurface::createFromSurface): (WebCore::IOSurface::createFromImage): (WebCore::IOSurface::createFromPixelBuffer): (WebCore::IOSurface::IOSurface): (WebCore::IOSurface::ensurePlatformContext): (WebCore::IOSurface::migrateColorSpaceToProperties): * platform/graphics/coreimage/FilterEffectRendererCoreImage.mm: (WebCore::FilterEffectRendererCoreImage::renderToImageBuffer): * platform/graphics/cv/ImageTransferSessionVT.mm: (WebCore::ImageTransferSessionVT::createPixelBuffer): * platform/graphics/cv/PixelBufferConformerCV.cpp: (WebCore::PixelBufferConformerCV::createImageFromPixelBuffer): * platform/graphics/displaylists/DisplayListImageBuffer.h: (WebCore::DisplayList::ImageBuffer::create): * platform/graphics/displaylists/DisplayListItemBuffer.cpp: (WebCore::DisplayList::ItemHandle::destroy): * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::BeginClipToDrawingCommands::BeginClipToDrawingCommands): (WebCore::DisplayList::BeginClipToDrawingCommands::colorSpace const): (WebCore::DisplayList::BeginClipToDrawingCommands::encode const): (WebCore::DisplayList::BeginClipToDrawingCommands::decode): (WebCore::DisplayList::GetPixelBuffer::GetPixelBuffer): (WebCore::DisplayList::GetPixelBuffer::outputFormat const): (WebCore::DisplayList::GetPixelBuffer::encode const): (WebCore::DisplayList::GetPixelBuffer::decode): * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::clipToDrawingCommands): * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/filters/FEDisplacementMap.cpp: (WebCore::FEDisplacementMap::setResultColorSpace): * platform/graphics/filters/FEDisplacementMap.h: * platform/graphics/filters/FEFlood.h: * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::convertPixelBufferToColorSpace): (WebCore::FilterEffect::convertImageBufferToColorSpace): (WebCore::FilterEffect::copyConvertedImageBufferToDestination): (WebCore::FilterEffect::copyConvertedPixelBufferToDestination): (WebCore::FilterEffect::requiresPixelBufferColorSpaceConversion): (WebCore::FilterEffect::transformResultColorSpace): * platform/graphics/filters/FilterEffect.h: (WebCore::FilterEffect::operatingColorSpace const): (WebCore::FilterEffect::setOperatingColorSpace): (WebCore::FilterEffect::resultColorSpace const): (WebCore::FilterEffect::setResultColorSpace): * platform/graphics/filters/SourceGraphic.h: (WebCore::SourceGraphic::SourceGraphic): * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenColorSpace): * platform/ios/PlatformScreenIOS.mm: (WebCore::screenColorSpace): (WebCore::collectScreenProperties): * platform/mac/PlatformScreenMac.mm: (WebCore::collectScreenProperties): (WebCore::screenColorSpace): * platform/mac/ThemeMac.mm: (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): * platform/mediastream/mac/ScreenDisplayCapturerMac.mm: (WebCore::ScreenDisplayCapturerMac::createDisplayStream): * platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::imageBuffer const): * platform/playstation/PlatformScreenPlayStation.cpp: (WebCore::screenColorSpace): * platform/win/PlatformScreenWin.cpp: (WebCore::screenColorSpace): * platform/wpe/PlatformScreenWPE.cpp: (WebCore::screenColorSpace): * platform/xr/PlatformXR.h: (PlatformXR::Device::FrameData::LayerData::decode): * rendering/CSSFilter.cpp: (WebCore::CSSFilter::buildReferenceFilter): (WebCore::CSSFilter::build): (WebCore::CSSFilter::allocateBackingStoreIfNeeded): (WebCore::CSSFilter::apply): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderLayerBacking.cpp: (WebCore::patternForDescription): * rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::paintSystemPreviewBadge): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintProgressBar): * rendering/shapes/Shape.cpp: (WebCore::Shape::createRasterShape): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::buildPrimitives const): (WebCore::RenderSVGResourceFilter::applyResource): (WebCore::RenderSVGResourceFilter::postApplyResource): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): * rendering/svg/RenderSVGResourceMasker.h: * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::createTileImage const): * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::createImageBuffer): (WebCore::SVGRenderingContext::bufferForeground): * rendering/svg/SVGRenderingContext.h: * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): (WebCore::SVGImage::drawPatternForContainer): * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::platformApplySoftware): Source/WebCore/PAL: * pal/spi/cg/CoreGraphicsSPI.h: Add addional SPI for working with CGColorSpaceRefs. Source/WebKit: - Update ImageBuffer subclass signatures to use "const DestinationColorSpace&" to conform to the base class. - Replace ColorSpaceData with Optional<DestinationColorSpace>. No reason to have two types that are the same. - Give all ports a color space configuration for ShareableBitmap now that there is a common class for representing color space. - Update DisplayList decoding to account for BeginClipToDrawingCommands and GetPixelBuffer no longer being inlineable due to now having non-trivial destructors due to DestinationColorSpace member. * GPUProcess/graphics/RemoteImageBuffer.h: (WebKit::RemoteImageBuffer::create): * GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::createImageBuffer): * GPUProcess/graphics/RemoteRenderingBackend.h: * GPUProcess/media/RemoteImageDecoderAVFProxy.cpp: (WebKit::RemoteImageDecoderAVFProxy::createFrameImageAtIndex): * GPUProcess/media/RemoteImageDecoderAVFProxy.h: * GPUProcess/media/RemoteImageDecoderAVFProxy.messages.in: * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/ShareableBitmap.cpp: (WebKit::ShareableBitmap::Configuration::encode const): (WebKit::ShareableBitmap::Configuration::decode): * Shared/ShareableBitmap.h: * Shared/WebCoreArgumentCoders.h: * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * Shared/cg/ShareableBitmapCG.cpp: (WebKit::colorSpace): * Shared/mac/ColorSpaceData.h: Removed. * Shared/mac/ColorSpaceData.mm: Removed. * SourcesCocoa.txt: * UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _takeViewSnapshot]): (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::colorSpace): * UIProcess/PageClient.h: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: (WebKit::recursivelyMapIOSurfaceBackingStore): * UIProcess/WebPageProxy.h: * UIProcess/mac/PageClientImplMac.h: * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::colorSpace): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::colorSpace): * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: (WebKit::ImageBufferShareableBitmapBackend::configuration): * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp: (WebKit::RemoteGraphicsContextGLProxy::prepareForDisplay): * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::create): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::createImageBuffer): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: * WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp: (WebKit::ImageBufferShareableMappedIOSurfaceBackend::create): * WebProcess/GPU/media/RemoteImageDecoderAVF.cpp: (WebKit::RemoteImageDecoderAVF::createFrameImageAtIndex): * WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm: (WebKit::MediaPlayerPrivateRemote::nativeImageForCurrentTime): (WebKit::MediaPlayerPrivateRemote::pixelBufferForCurrentTime): * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::PDFPlugin): * WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp: (WebKit::createShareableBitmap): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createImageBuffer const): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::convertDragImageToBitmap): * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setColorSpace): * WebProcess/WebPage/DrawingArea.messages.in: * WebProcess/WebPage/WebPage.cpp: (WebKit::snapshotOptionsToBitmapConfiguration): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::setColorSpace): Source/WebKitLegacy/mac: * WebCoreSupport/WebContextMenuClient.mm: (WebContextMenuClient::imageForCurrentSharingServicePickerItem): Update for new DestinationColorSpace class. Tools: * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): Upate test to use new DestinationColorSpace type. Canonical link: https://commits.webkit.org/238099@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-25 01:26:18 +00:00
platform/graphics/PlatformColorSpace.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/PlatformDisplay.h
[GPU Process] Control the life cycle of the platform image by a new class named NativeImage https://bugs.webkit.org/show_bug.cgi?id=218427 Reviewed by Simon Fraser. Source/WebCore: This adds a new level of indirection around NativeImagePtr which is now renamed PlatformImagePtr. The goal is to control the life cycle of the PlatfromImagePtr in WebKit regardless if it is retained outside WebKit or not. In future patches, deleting the NativeImage will be observed by RemoteResoureCache such that it will be removed from the GPUP cache when the object is destroyed in WebP. The new structural hierarchy of the bitmap image is the following: - CachedImage (responsible of receiving the encoded image data) - BitmapImage (responsible of decoding the image data) - NativeImage (represents an image frame and controls the life cycle of PlatformImagePtr in WebKit) - PlatformImagePtr (represents a platform image and it is the result of ImageDecoder) * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::nativeImageForCurrentTime): * html/HTMLVideoElement.h: * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::drawImage): * page/mac/TextIndicatorWindow.mm: (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]): (createContentCrossfadeAnimation): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::BitmapImage): (WebCore::BitmapImage::frameImageAtIndexCacheIfNeeded): (WebCore::BitmapImage::nativeImage): (WebCore::BitmapImage::nativeImageForCurrentFrame): (WebCore::BitmapImage::preTransformedNativeImageForCurrentFrame): (WebCore::BitmapImage::nativeImageOfSize): (WebCore::BitmapImage::framesNativeImages): (WebCore::drawNativeImage): (WebCore::BitmapImage::draw): * platform/graphics/BitmapImage.h: * platform/graphics/ConcreteImageBuffer.h: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawNativeImage): * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawPlatformImage): * platform/graphics/GraphicsContextGLImageExtractor.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/Icon.h: * platform/graphics/Image.h: (WebCore::Image::nativeImage): (WebCore::Image::nativeImageForCurrentFrame): (WebCore::Image::preTransformedNativeImageForCurrentFrame): (WebCore::Image::nativeImageOfSize): * platform/graphics/ImageBackingStore.h: * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::sinkIntoNativeImage): * platform/graphics/ImageBuffer.h: * platform/graphics/ImageBufferBackend.cpp: (WebCore::ImageBufferBackend::sinkIntoNativeImage): * platform/graphics/ImageBufferBackend.h: * platform/graphics/ImageDecoder.h: * platform/graphics/ImageFrame.cpp: (WebCore::ImageFrame::clearImage): (WebCore::ImageFrame::singlePixelSolidColor const): * platform/graphics/ImageFrame.h: (WebCore::ImageFrame::nativeImage const): * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::ImageSource): (WebCore::ImageSource::setNativeImage): (WebCore::ImageSource::cacheMetadataAtIndex): (WebCore::ImageSource::cachePlatformImageAtIndex): (WebCore::ImageSource::cachePlatformImageAtIndexAsync): (WebCore::ImageSource::startAsyncDecodingQueue): (WebCore::ImageSource::frameAtIndexCacheIfNeeded): (WebCore::ImageSource::createFrameImageAtIndex): (WebCore::ImageSource::frameImageAtIndex): (WebCore::ImageSource::frameImageAtIndexCacheIfNeeded): (WebCore::ImageSource::cacheNativeImageAtIndex): Deleted. (WebCore::ImageSource::cacheNativeImageAtIndexAsync): Deleted. * platform/graphics/ImageSource.h: (WebCore::ImageSource::create): * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::nativeImageForCurrentTime): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime): * platform/graphics/NativeImage.cpp: Copied from Source/WebCore/platform/graphics/NativeImagePtr.h. (WebCore::NativeImage::create): (WebCore::NativeImage::NativeImage): * platform/graphics/NativeImage.h: (WebCore::NativeImage::platformImage const): * platform/graphics/PlatformImage.h: Renamed from Source/WebCore/platform/graphics/NativeImagePtr.h. * platform/graphics/VideoLayerManager.h: * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h: * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoFullscreenInlineImage): (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): (WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::nativeImageForCurrentTime): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastImage): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h: * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm: (WebCore::VideoLayerManagerObjC::setVideoFullscreenLayer): (WebCore::VideoLayerManagerObjC::updateVideoFullscreenInlineImage): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateContentsImage): * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/cairo/CairoOperations.cpp: (WebCore::Cairo::drawShadowLayerBuffer): (WebCore::Cairo::drawShadowImage): (WebCore::Cairo::fillShadowBuffer): (WebCore::Cairo::drawPlatformImage): (WebCore::Cairo::drawNativeImage): Deleted. * platform/graphics/cairo/CairoOperations.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawPlatformImage): (WebCore::GraphicsContext::clipToImageBuffer): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::platformDrawNativeImage): Deleted. * platform/graphics/cairo/GraphicsContextGLCairo.cpp: (WebCore::GraphicsContextGLImageExtractor::extractImage): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::drawImageBuffer): (WebCore::GraphicsContextImplCairo::drawNativeImage): (WebCore::GraphicsContextImplCairo::drawPattern): (WebCore::GraphicsContextImplCairo::clipToImageBuffer): * platform/graphics/cairo/GraphicsContextImplCairo.h: * platform/graphics/cairo/ImageBufferCairoBackend.cpp: (WebCore::ImageBufferCairoBackend::draw): (WebCore::ImageBufferCairoBackend::drawPattern): * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: (WebCore::ImageBufferCairoSurfaceBackend::copyNativeImage const): (WebCore::ImageBufferCairoSurfaceBackend::cairoSurfaceCoerceToImage const): (WebCore::ImageBufferCairoSurfaceBackend::toBGRAData const): * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h: * platform/graphics/cairo/NativeImageCairo.cpp: (WebCore::NativeImage::size const): (WebCore::NativeImage::hasAlpha const): (WebCore::NativeImage::singlePixelSolidColor const): (WebCore::NativeImage::clearSubimages): (WebCore::nativeImageSize): Deleted. (WebCore::nativeImageHasAlpha): Deleted. (WebCore::nativeImageSinglePixelSolidColor): Deleted. (WebCore::drawNativeImage): Deleted. (WebCore::clearNativeImageSubimages): Deleted. * platform/graphics/cairo/PatternCairo.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawPlatformImage): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::clipToImageBuffer): (WebCore::GraphicsContext::platformDrawNativeImage): Deleted. * platform/graphics/cg/GraphicsContextGLCG.cpp: (WebCore::GraphicsContextGLImageExtractor::extractImage): (WebCore::GraphicsContextGLOpenGL::paintToCanvas): * platform/graphics/cg/ImageBufferCGBackend.cpp: (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferCGBackend::copyImage const): (WebCore::ImageBufferCGBackend::draw): (WebCore::ImageBufferCGBackend::toCFData const): * platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: (WebCore::ImageBufferCGBitmapBackend::copyNativeImage const): * platform/graphics/cg/ImageBufferCGBitmapBackend.h: * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: (WebCore::ImageBufferIOSurfaceBackend::copyNativeImage const): (WebCore::ImageBufferIOSurfaceBackend::sinkIntoNativeImage): (WebCore::ImageBufferIOSurfaceBackend::drawConsuming): * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: * platform/graphics/cg/ImageDecoderCG.cpp: (WebCore::ImageDecoderCG::createFrameImageAtIndex): * platform/graphics/cg/ImageDecoderCG.h: * platform/graphics/cg/NativeImageCG.cpp: (WebCore::NativeImage::size const): (WebCore::NativeImage::hasAlpha const): (WebCore::NativeImage::singlePixelSolidColor const): (WebCore::NativeImage::clearSubimages): (WebCore::nativeImageSize): Deleted. (WebCore::nativeImageHasAlpha): Deleted. (WebCore::nativeImageSinglePixelSolidColor): Deleted. (WebCore::clearNativeImageSubimages): Deleted. * platform/graphics/cg/PatternCG.cpp: (WebCore::Pattern::createPlatformPattern const): * platform/graphics/coreimage/FilterEffectRendererCoreImage.mm: (WebCore::FilterEffectRendererCoreImage::imageForSourceGraphic): * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::DrawNativeImage::DrawNativeImage): * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::DrawNativeImage::decode): * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::drawNativeImage): * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp: (WebCore::ImageDecoderGStreamer::createFrameImageAtIndex): * platform/graphics/gstreamer/ImageDecoderGStreamer.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::nativeImageForCurrentTime): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gtk/ImageGtk.cpp: (WebCore::BitmapImage::getGdkPixbuf): (WebCore::BitmapImage::gdkTexture): * platform/graphics/ios/IconIOS.mm: (WebCore::Icon::Icon): (WebCore::Icon::createIconForImage): (WebCore::Icon::paint): * platform/graphics/mac/ImageMac.mm: (WebCore::BitmapImage::tiffRepresentation): (WebCore::BitmapImage::snapshotNSImage): * platform/graphics/nicosia/NicosiaImageBufferPipe.cpp: (Nicosia::NicosiaImageBufferPipeSource::handle): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp: (Nicosia::CairoOperationRecorder::drawNativeImage): (Nicosia::CairoOperationRecorder::drawPattern): (Nicosia::CairoOperationRecorder::clipToImageBuffer): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h: * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper): (WebCore::GraphicsLayerTextureMapper::setContentsToImage): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::setContentsToImage): (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: * platform/graphics/win/Direct2DOperations.cpp: (WebCore::Direct2D::drawPlatformImage): (WebCore::Direct2D::drawNativeImage): Deleted. * platform/graphics/win/Direct2DOperations.h: * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::drawPlatformImage): (WebCore::GraphicsContext::platformDrawNativeImage): Deleted. * platform/graphics/win/GraphicsContextImplDirect2D.cpp: (WebCore::GraphicsContextImplDirect2D::drawNativeImage): * platform/graphics/win/GraphicsContextImplDirect2D.h: * platform/graphics/win/ImageBufferDirect2DBackend.cpp: (WebCore::ImageBufferDirect2DBackend::create): (WebCore::ImageBufferDirect2DBackend::ImageBufferDirect2DBackend): (WebCore::ImageBufferDirect2DBackend::copyNativeImage const): (WebCore::createCroppedImageIfNecessary): (WebCore::ImageBufferDirect2DBackend::copyImage const): (WebCore::ImageBufferDirect2DBackend::sinkIntoImage): (WebCore::ImageBufferDirect2DBackend::compatibleBitmap): * platform/graphics/win/ImageBufferDirect2DBackend.h: * platform/graphics/win/ImageCGWin.cpp: (WebCore::BitmapImage::create): (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/ImageCairoWin.cpp: (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex): * platform/graphics/win/ImageDecoderDirect2D.h: * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::NativeImage::size const): (WebCore::NativeImage::hasAlpha const): (WebCore::NativeImage::singlePixelSolidColor const): (WebCore::NativeImage::clearSubimages): (WebCore::nativeImageSize): Deleted. (WebCore::nativeImageHasAlpha): Deleted. (WebCore::nativeImageSinglePixelSolidColor): Deleted. (WebCore::drawNativeImage): Deleted. (WebCore::clearNativeImageSubimages): Deleted. * platform/gtk/CursorGtk.cpp: (WebCore::createCustomCursor): * platform/gtk/DragImageGtk.cpp: (WebCore::createDragImageFromImage): * platform/image-decoders/ScalableImageDecoder.cpp: (WebCore::ScalableImageDecoder::createFrameImageAtIndex): * platform/image-decoders/ScalableImageDecoder.h: * platform/image-decoders/cairo/ImageBackingStoreCairo.cpp: (WebCore::ImageBackingStore::image const): * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp: (WebCore::DisplayCaptureSourceCocoa::emitFrame): * platform/mediastream/mac/DisplayCaptureSourceCocoa.h: * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm: (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer): * platform/win/DragImageCGWin.cpp: (WebCore::createDragImageFromImage): * platform/win/DragImageCairoWin.cpp: (WebCore::createDragImageFromImage): * rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::paintSystemPreviewBadge): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImageForCurrentFrame): (WebCore::SVGImage::nativeImage): * svg/graphics/SVGImage.h: * svg/graphics/SVGImageForContainer.cpp: (WebCore::SVGImageForContainer::nativeImageForCurrentFrame): * svg/graphics/SVGImageForContainer.h: Source/WebKit: * Scripts/webkit/messages.py: * Shared/API/c/cg/WKImageCG.cpp: (WKImageCreateFromCGImage): * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<Ref<NativeImage>>::encode): (IPC::ArgumentCoder<Ref<NativeImage>>::decode): (IPC::encodeNativeImage): Deleted. (IPC::decodeNativeImage): Deleted. (IPC::encodeOptionalNativeImage): Deleted. (IPC::decodeOptionalNativeImage): Deleted. (IPC::ArgumentCoder<NativeImagePtr>::encode): Deleted. (IPC::ArgumentCoder<NativeImagePtr>::decode): Deleted. * Shared/WebCoreArgumentCoders.h: * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::createImage): * Shared/win/ShareableBitmapDirect2D.cpp: (WebKit::ShareableBitmap::paint): * UIProcess/API/glib/IconDatabase.cpp: (WebKit::IconDatabase::loadIconForPageURL): (WebKit::IconDatabase::setIconForPageURL): * UIProcess/API/glib/IconDatabase.h: * UIProcess/ios/DragDropInteractionState.mm: (WebKit::uiImageForImage): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _deliverDelayedDropPreviewIfPossible:]): (uiImageForImage): (-[WKContentView _handleDropByInsertingImagePlaceholders:session:]): (-[WKContentView _presentationSnapshotForPreviewItemController:]): * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: (WebKit::ImageBufferShareableBitmapBackend::copyNativeImage const): * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::nativeImageForCurrentTime): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/Plugins/PluginView.cpp: (WebKit::isAlmostSolidColor): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon): Source/WebKitLegacy/mac: * DOM/DOM.mm: (-[DOMNode getPreviewSnapshotImage:andRects:]): * Misc/WebCache.mm: (+[WebCache imageForURL:]): * WebView/WebView.mm: (-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]): Canonical link: https://commits.webkit.org/231404@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-10 03:14:18 +00:00
platform/graphics/PlatformImage.h
Allow different back-ends for ImageBuffer https://bugs.webkit.org/show_bug.cgi?id=207048 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-02-18 Reviewed by Tim Horton. Source/WebCore: ImageBuffer will be re-factored to decouple the platform specifics and the back-end details from the interface "ImageBuffer". A class hierarchy for the ImageBufferBackend will added to allow code sharing and to split the code according to the platform and the back-end details. ImageBuffer will be kept interface with the rest of the code but different back-ends will be created. ConcreteImageBuffer is a template class which inherits ImageBuffer and will act as a bridge to the concrete ImageBufferBackend. Based on the RenderingMode, a ConcreteImageBuffer<BackendType> will be created. Instead of checking the renderingMode in many places of the code and instead of and using preprocessor directives, all these decisions will be made in the concrete ImageBufferBackend. This re-factoring will allow creating new types of ImageBuffers backed by new ImageBufferBackends. These new ImageBufferBackends will implement DisplayList drawing and synchronize remote rendering. * Headers.cmake: * PlatformAppleWin.cmake: * PlatformFTW.cmake: * PlatformMac.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * html/CanvasBase.cpp: (WebCore::CanvasBase::setImageBuffer const): * platform/Cairo.cmake: * platform/SourcesCairo.txt: * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation): * platform/graphics/ConcreteImageBuffer.h: Added. (WebCore::ConcreteImageBuffer::create): (WebCore::ConcreteImageBuffer::ConcreteImageBuffer): (WebCore::ConcreteImageBuffer::ensureBackend const): (WebCore::ConcreteImageBuffer::putImageData): * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::create): (WebCore::ImageBuffer::createCompatibleBuffer): (WebCore::ImageBuffer::sizeNeedsClamping): (WebCore::ImageBuffer::compatibleBufferSize): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::sinkIntoImage): (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::toBGRAData const): Deleted. (WebCore::ImageBuffer::transformColorSpace): Deleted. (WebCore::ImageBuffer::genericConvertToLuminanceMask): Deleted. (WebCore::ImageBuffer::convertToLuminanceMask): Deleted. (WebCore::ImageBuffer::platformLayer const): Deleted. (WebCore::ImageBuffer::copyToPlatformTexture): Deleted. (WebCore::ImageBuffer::memoryCost const): Deleted. (WebCore::ImageBuffer::externalMemoryCost const): Deleted. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::putImageData): (): Deleted. (WebCore::ImageBuffer::internalSize const): Deleted. (WebCore::ImageBuffer::logicalSize const): Deleted. (WebCore::ImageBuffer::resolutionScale const): Deleted. (WebCore::ImageBuffer::baseTransform const): Deleted. * platform/graphics/ImageBufferBackend.cpp: Added. (WebCore::ImageBufferBackend::ImageBufferBackend): (WebCore::ImageBufferBackend::calculateBackendSize): (WebCore::ImageBufferBackend::sinkIntoNativeImage): (WebCore::ImageBufferBackend::sinkIntoImage): (WebCore::ImageBufferBackend::drawConsuming): (WebCore::ImageBufferBackend::convertToLuminanceMask): (WebCore::ImageBufferBackend::toBGRAData const): (WebCore::copyPremultipliedToPremultiplied): (WebCore::copyPremultipliedToUnpremultiplied): (WebCore::copyUnpremultipliedToPremultiplied): (WebCore::copyFunctor): (WebCore::ImageBufferBackend::copyImagePixels const): (WebCore::ImageBufferBackend::getImageData const): (WebCore::ImageBufferBackend::putImageData): * platform/graphics/ImageBufferBackend.h: Added. (WebCore::ImageBufferBackend::flushContext): (WebCore::ImageBufferBackend::logicalSize const): (WebCore::ImageBufferBackend::backendSize const): (WebCore::ImageBufferBackend::resolutionScale const): (WebCore::ImageBufferBackend::colorSpace const): (WebCore::ImageBufferBackend::baseTransform const): (WebCore::ImageBufferBackend::memoryCost const): (WebCore::ImageBufferBackend::externalMemoryCost const): (WebCore::ImageBufferBackend::transformColorSpace): (WebCore::ImageBufferBackend::platformLayer const): (WebCore::ImageBufferBackend::copyToPlatformTexture const): (WebCore::ImageBufferBackend::bytesPerRow const): (WebCore::ImageBufferBackend::backendColorFormat const): (WebCore::ImageBufferBackend::toBackendCoordinates const): (WebCore::ImageBufferBackend::logicalRect const): (WebCore::ImageBufferBackend::backendRect const): * platform/graphics/PlatformImageBuffer.h: Added. * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::drawShadowBuffer): * platform/graphics/cairo/CairoOperations.cpp: (WebCore::Cairo::drawShadowLayerBuffer): (WebCore::Cairo::drawShadowImage): (WebCore::Cairo::fillShadowBuffer): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::clipToImageBuffer): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::clipToImageBuffer): * platform/graphics/cairo/ImageBufferCairo.cpp: Removed. * platform/graphics/cairo/ImageBufferCairoBackend.cpp: Added. (WebCore::ImageBufferCairoBackend::copyImage const): (WebCore::ImageBufferCairoBackend::draw): (WebCore::ImageBufferCairoBackend::drawPattern): (WebCore::ImageBufferCairoBackend::transformColorSpace): (WebCore::ImageBufferCairoBackend::toDataURL const): (WebCore::ImageBufferCairoBackend::toData const): * platform/graphics/cairo/ImageBufferCairoBackend.h: Added. (WebCore::ImageBufferCairoBackend::platformTransformColorSpace): * platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp: Added. (WebCore::clearSurface): (WebCore::ImageBufferCairoGLSurfaceBackend::create): (WebCore::ImageBufferCairoGLSurfaceBackend::ImageBufferCairoGLSurfaceBackend): (WebCore::ImageBufferCairoGLSurfaceBackend::~ImageBufferCairoGLSurfaceBackend): (WebCore::ImageBuffer::platformLayer const): (WebCore::ImageBufferCairoGLSurfaceBackend::copyToPlatformTexture): (WebCore::ImageBufferCairoGLSurfaceBackend::createCompositorBuffer): (WebCore::ImageBufferCairoGLSurfaceBackend::swapBuffersIfNeeded): (WebCore::ImageBufferCairoGLSurfaceBackend::paintToTextureMapper): * platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h: Added. * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp: Added. (WebCore::ImageBufferCairoImageSurfaceBackend::create): (WebCore::ImageBufferCairoImageSurfaceBackend::ImageBufferCairoImageSurfaceBackend): (WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace): * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.h: Added. * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: Added. (WebCore::ImageBufferCairoSurfaceBackend::ImageBufferCairoSurfaceBackend): (WebCore::ImageBufferCairoSurfaceBackend::context const): (WebCore::ImageBufferCairoSurfaceBackend::bytesPerRow const): (WebCore::ImageBufferCairoSurfaceBackend::copyNativeImage const): (WebCore::ImageBufferCairoSurfaceBackend::cairoSurfaceCoerceToImage const): (WebCore::ImageBufferCairoSurfaceBackend::toBGRAData const): (WebCore::ImageBufferCairoSurfaceBackend::getImageData const): (WebCore::ImageBufferCairoSurfaceBackend::putImageData): * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h: Added. * platform/graphics/cg/ImageBufferCG.cpp: Removed. * platform/graphics/cg/ImageBufferCGBackend.cpp: Added. (WebCore::ImageBufferCGBackend::contextColorSpace): (WebCore::ImageBufferCGBackend::setupContext): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferCGBackend::copyImage const): (WebCore::ImageBufferCGBackend::sinkIntoImage): (WebCore::ImageBufferCGBackend::draw): (WebCore::ImageBufferCGBackend::drawPattern): (WebCore::ImageBufferCGBackend::baseTransform const): (WebCore::ImageBufferCGBackend::toCFData const): (WebCore::ImageBufferCGBackend::toData const): (WebCore::ImageBufferCGBackend::toDataURL const): (WebCore::makeVImageBuffer): (WebCore::copyImagePixelsAccelerated): (WebCore::ImageBufferCGBackend::copyImagePixels const): * platform/graphics/cg/ImageBufferCGBackend.h: Added. * platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: Added. (WebCore::ImageBufferCGBitmapBackend::create): (WebCore::ImageBufferCGBitmapBackend::ImageBufferCGBitmapBackend): (WebCore::ImageBufferCGBitmapBackend::context const): (WebCore::ImageBufferCGBitmapBackend::copyNativeImage const): (WebCore::ImageBufferCGBitmapBackend::toBGRAData const): (WebCore::ImageBufferCGBitmapBackend::getImageData const): (WebCore::ImageBufferCGBitmapBackend::putImageData): * platform/graphics/cg/ImageBufferCGBitmapBackend.h: Added. * platform/graphics/cg/ImageBufferDataCG.cpp: Removed. * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: Added. (WebCore::ImageBufferIOSurfaceBackend::calculateBackendSize): (WebCore::ImageBufferIOSurfaceBackend::contextColorSpace): (WebCore::ImageBufferIOSurfaceBackend::create): (WebCore::ImageBufferIOSurfaceBackend::ImageBufferIOSurfaceBackend): (WebCore::ImageBufferIOSurfaceBackend::context const): (WebCore::ImageBufferIOSurfaceBackend::flushContext): (WebCore::ImageBufferIOSurfaceBackend::memoryCost const): (WebCore::ImageBufferIOSurfaceBackend::externalMemoryCost const): (WebCore::ImageBufferIOSurfaceBackend::bytesPerRow const): (WebCore::ImageBufferIOSurfaceBackend::backendColorFormat const): (WebCore::ImageBufferIOSurfaceBackend::copyNativeImage const): (WebCore::ImageBufferIOSurfaceBackend::sinkIntoNativeImage): (WebCore::ImageBufferIOSurfaceBackend::drawConsuming): (WebCore::ImageBufferIOSurfaceBackend::toBGRAData const): (WebCore::ImageBufferIOSurfaceBackend::getImageData const): (WebCore::ImageBufferIOSurfaceBackend::putImageData): * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: Added. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::createFromImageBuffer): Deleted. * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToCanvas): * platform/graphics/win/ImageBufferDataDirect2D.cpp: Removed. * platform/graphics/win/ImageBufferDataDirect2D.h: Removed. * platform/graphics/win/ImageBufferDirect2D.cpp: Removed. * platform/graphics/win/ImageBufferDirect2DBackend.cpp: Added. (WebCore::ImageBufferDirect2DBackend::create): (WebCore::ImageBufferDirect2DBackend::ImageBufferDirect2DBackend): (WebCore::ImageBufferDirect2DBackend::context const): (WebCore::ImageBufferDirect2DBackend::flushContext): (WebCore::ImageBufferDirect2DBackend::copyNativeImage const): (WebCore::createCroppedImageIfNecessary): (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferDirect2DBackend::copyImage const): (WebCore::ImageBufferDirect2DBackend::sinkIntoImage): (WebCore::ImageBufferDirect2DBackend::compatibleBitmap): (WebCore::ImageBufferDirect2DBackend::draw): (WebCore::ImageBufferDirect2DBackend::drawPattern): (WebCore::ImageBufferDirect2DBackend::toDataURL const): (WebCore::ImageBufferDirect2DBackend::toData const): (WebCore::ImageBufferDirect2DBackend::toBGRAData const): (WebCore::ImageBufferDirect2DBackend::getImageData const): (WebCore::ImageBufferDirect2DBackend::putImageData): * platform/graphics/win/ImageBufferDirect2DBackend.h: Added. * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp: (WebCore::WrappedMockRealtimeVideoSource::updateSampleBuffer): * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::bufferForeground): Source/WebKit: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createSelectionSnapshot const): Canonical link: https://commits.webkit.org/220895@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-19 01:12:47 +00:00
platform/graphics/PlatformImageBuffer.h
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
platform/graphics/PlatformImageBufferBackend.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/PlatformLayer.h
platform/graphics/PlatformMediaResourceLoader.h
platform/graphics/PlatformTextTrack.h
platform/graphics/PlatformTimeRanges.h
platform/graphics/Region.h
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
platform/graphics/RemoteGraphicsContextGLProxyBase.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/RemoteVideoSample.h
[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
platform/graphics/RenderingResourceIdentifier.h
Make RenderingMode and AlphaPremultiplication enum classes and move them to separate headers https://bugs.webkit.org/show_bug.cgi?id=206516 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-01-21 Reviewed by Tim Horton. Source/WebCore: RenderingMode and AlphaPremultiplication need to be encoded and decoded when they are sent from the WebProcess to the GPUProcess. * Headers.cmake: * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::sanitizeDataIfNeeded): * WebCore.xcodeproj/project.pbxproj: * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneDeserializer::readImageBitmap): * css/CSSFilterImageValue.cpp: (WebCore::CSSFilterImageValue::image): * html/CustomPaintCanvas.cpp: (WebCore::CustomPaintCanvas::copiedImage const): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createImageBuffer const): * html/ImageBitmap.cpp: * html/OffscreenCanvas.cpp: (WebCore::OffscreenCanvas::transferToImageBitmap): (WebCore::OffscreenCanvas::createImageBuffer const): (WebCore::OffscreenCanvas::takeImageBuffer const): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::createCompositingBuffer): (WebCore::CanvasRenderingContext2DBase::createPattern): * html/canvas/ImageBitmapRenderingContext.cpp: (WebCore::ImageBitmapRenderingContext::isAccelerated const): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): * page/FrameSnapshotting.cpp: (WebCore::snapshotFrameRectWithClip): * platform/graphics/AlphaPremultiplication.h: Added. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation): * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::renderingMode const): * platform/graphics/GraphicsTypes.cpp: * platform/graphics/GraphicsTypes.h: * platform/graphics/ImageBuffer.h: * platform/graphics/RenderingMode.h: Added. * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::getScratchBuffer): (WebCore::ShadowBlur::drawRectShadowWithoutTiling): (WebCore::ShadowBlur::drawInsetShadowWithoutTiling): (WebCore::ShadowBlur::drawRectShadowWithTiling): (WebCore::ShadowBlur::drawInsetShadowWithTiling): (WebCore::ShadowBlur::drawShadowLayer): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBufferData::~ImageBufferData): (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cg/ImageBufferDataCG.h: * platform/graphics/filters/Filter.h: * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::imageBuffer const): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/shapes/Shape.cpp: (WebCore::Shape::createRasterShape): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImageForCurrentFrame): Source/WebKitLegacy/mac: * WebCoreSupport/WebContextMenuClient.mm: (WebContextMenuClient::imageForCurrentSharingServicePickerItem): Canonical link: https://commits.webkit.org/219626@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-22 00:26:24 +00:00
platform/graphics/RenderingMode.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/RoundedRect.h
[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
platform/graphics/SourceBufferPrivate.h
platform/graphics/SourceBufferPrivateClient.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/StringTruncator.h
Implement tab-size with units https://bugs.webkit.org/show_bug.cgi?id=179022 Reviewed by Simon Fraser. This change is ported from Blink. The committed revision is https://src.chromium.org/viewvc/blink?revision=189430&view=revision. Additionally, this patch lets css "number" value be allowed as tab-size's property value, not css "integer" value, according to https://drafts.csswg.org/css-text-3/#tab-size-property. LayoutTests/imported/w3c: * web-platform-tests/css/css-text/inheritance-expected.txt: * web-platform-tests/css/css-text/parsing/tab-size-valid-expected.txt: * web-platform-tests/css/css-values/calc-numbers-expected.txt: Added. * web-platform-tests/css/css-values/calc-numbers.html: Added. Source/WebCore: Tests: css3/tab-size.html imported/w3c/web-platform-tests/css/css-values/calc-numbers.html * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): * css/CSSProperties.json: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertTabSize): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeTabSize): * layout/inlineformatting/text/TextUtil.cpp: (WebCore::Layout::TextUtil::width): * platform/graphics/FontCascade.h: (WebCore::FontCascade::tabWidth const): * platform/graphics/TabSize.h: Added. (WebCore::TabSize::TabSize): (WebCore::TabSize::isSpaces const): (WebCore::TabSize::widthInPixels const): (WebCore::TabSize::operator bool const): (WebCore::operator==): (WebCore::operator!=): * platform/graphics/TextRun.cpp: * platform/graphics/TextRun.h: (WebCore::TextRun::tabSize const): (WebCore::TextRun::setTabSize): * rendering/SimpleLineLayoutTextFragmentIterator.cpp: (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): * rendering/SimpleLineLayoutTextFragmentIterator.h: * rendering/style/RenderStyle.h: (WebCore::RenderStyle::tabSize const): (WebCore::RenderStyle::setTabSize): (WebCore::RenderStyle::initialTabSize): * rendering/style/StyleRareInheritedData.cpp: * rendering/style/StyleRareInheritedData.h: LayoutTests: * TestExpectations: * css3/tab-size-expected.txt: Added. * css3/tab-size.html: Added. * fast/css/tab-size-expected.html: * fast/css/tab-size.html: Canonical link: https://commits.webkit.org/212641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-06-07 08:27:25 +00:00
platform/graphics/TabSize.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/TextRun.h
[Media in GPU Process] Use VideoLayerManager to manage layers of MediaPlayerPrivateRemote https://bugs.webkit.org/show_bug.cgi?id=216995 Reviewed by Eric Carlson. Source/WebCore: No new tests since no functional changes. * Headers.cmake: Export TextTrackRepresentation and VideoLayerManager. * WebCore.xcodeproj/project.pbxproj: Add VideoLayerManager.h. Export TextTrackRepresentation, WebVideoContainerLayer and VideoLayerManager. * platform/graphics/TextTrackRepresentation.cpp: * platform/graphics/TextTrackRepresentation.h: Minor clean-up. * platform/graphics/VideoLayerManager.h: Added. Add this interface so that we can use VideoLayerManager in the C++ code. * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h: * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm: (WebCore::VideoLayerManagerObjC::videoInlineLayer const): (WebCore::VideoLayerManagerObjC::videoFullscreenLayer const): (WebCore::VideoLayerManagerObjC::videoFullscreenFrame const): (WebCore::VideoLayerManagerObjC::updateVideoFullscreenInlineImage): Fix the issue when RELEASE_LOG_DISABLED is defined and add WEBCORE_EXPORT to some functions. Source/WebKit: This patch removes the remote hosting layer in the GPU process for video fullscreen and picture-in-picture. We don't need to keep a layer in the GPU process for video fullscreen and picture-in-picture because no rendering will be done for that layer. We don't need EnterFullscreen, ExitFullscreen and SetVideoFullscreenFrameFenced IPC messages after removing the layer because the RemoteMediaPlayerPrivateRemote in the web process can deal with the video presentation mode change. * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm: (WebKit::RemoteMediaPlayerProxy::prepareForPlayback): (WebKit::RemoteMediaPlayerProxy::enterFullscreen): Deleted. (WebKit::RemoteMediaPlayerProxy::exitFullscreen): Deleted. (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenFrameFenced): Deleted. Remove unused IPC messages after removing the remote hosting layer for video fullscreen and picture-in-picture. * GPUProcess/media/gstreamer/RemoteMediaPlayerProxyGStreamer.cpp: (WebKit::RemoteMediaPlayerProxy::prepareForPlayback): (WebKit::RemoteMediaPlayerProxy::enterFullscreen): Deleted. (WebKit::RemoteMediaPlayerProxy::exitFullscreen): Deleted. Ditto. * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): (WebKit::MediaPlayerPrivateRemote::~MediaPlayerPrivateRemote): (WebKit::MediaPlayerPrivateRemote::prepareForPlayback): Remove the code related to the remote hosting layer for video fullscreen and picture-in-picture. (WebKit::MediaPlayerPrivateRemote::platformLayer const): (WebKit::MediaPlayerPrivateRemote::setVideoFullscreenLayer): Use VideoLayerManager to manage the layer. (WebKit::MediaPlayerPrivateRemote::setVideoFullscreenFrame): Ditto. (WebKit::MediaPlayerPrivateRemote::requiresTextTrackRepresentation const): Ditto. (WebKit::MediaPlayerPrivateRemote::setTextTrackRepresentation): Ditto. (WebKit::MediaPlayerPrivateRemote::syncTextTrackBounds): Ditto. (WebKit::MediaPlayerPrivateRemote::setVideoFullscreenFrameFenced): Deleted. * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: Need to move the Logger up in the data members so that other members can use it in the constructor, e.g., VideoLayerManager. * WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): (WebKit::MediaPlayerPrivateRemote::createVideoFullscreenLayer): (WebKit::MediaPlayerPrivateRemote::setVideoFullscreenFrame): Deleted. (WebKit::MediaPlayerPrivateRemote::setTextTrackRepresentation): Deleted. (WebKit::MediaPlayerPrivateRemote::syncTextTrackBounds): Deleted. Simplify the implementation by managing layers with VideoLayerManager. Canonical link: https://commits.webkit.org/229854@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 04:52:54 +00:00
platform/graphics/TextTrackRepresentation.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/TiledBacking.h
platform/graphics/TrackPrivateBase.h
[GPUP] Some media-capabilities tests fail when media in GPU Process is enabled https://bugs.webkit.org/show_bug.cgi?id=221691 <rdar://problem/74439420> Reviewed by Jer Noble. Source/WebCore: No new tests, this fixes existing tests. * Headers.cmake: * platform/cocoa/SystemBattery.h: * platform/cocoa/SystemBattery.mm: (WebCore::systemHasBattery): (WebCore::systemHasAC): (WebCore::SystemBatteryStatusTestingOverrides::singleton): (WebCore::SystemBatteryStatusTestingOverrides::setHasBattery): (WebCore::SystemBatteryStatusTestingOverrides::setHasAC): (WebCore::SystemBatteryStatusTestingOverrides::setConfigurationChangedCallback): (WebCore::setOverrideSystemHasBatteryForTesting): Deleted. (WebCore::setOverrideSystemHasACForTesting): Deleted. * platform/graphics/VP9Utilities.h: (WebCore::ScreenDataOverrides::encode const): (WebCore::ScreenDataOverrides::decode): (WebCore::operator==): * platform/graphics/cocoa/VP9UtilitiesCocoa.h: * platform/graphics/cocoa/VP9UtilitiesCocoa.mm: (WebCore::VP9TestingOverrides::singleton): (WebCore::VP9TestingOverrides::setHardwareDecoderDisabled): (WebCore::VP9TestingOverrides::setVP9ScreenSizeAndScale): (WebCore::VP9TestingOverrides::setConfigurationChangedCallback): (WebCore::vp9HardwareDecoderAvailable): (WebCore::isVP9CodecConfigurationRecordSupported): (WebCore::validateVPParameters): (): Deleted. (WebCore::setOverrideVP9HardwareDecoderDisabledForTesting): Deleted. (WebCore::setOverrideVP9ScreenSizeAndScaleForTesting): Deleted. (WebCore::resetOverrideVP9ScreenSizeAndScaleForTesting): Deleted. * testing/Internals.cpp: (WebCore::Internals::Internals): (WebCore::Internals::setSystemHasBatteryForTesting): (WebCore::Internals::setSystemHasACForTesting): (WebCore::Internals::setHardwareVP9DecoderDisabledForTesting): (WebCore::Internals::setVP9ScreenSizeAndScaleForTesting): Source/WebKit: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::setMediaOverridesForTesting): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::updateMediaConfiguration): * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/media/MediaOverridesForTesting.h: Added. (WebKit::MediaOverridesForTesting::encode const): (WebKit::MediaOverridesForTesting::decode): * WebProcess/GPU/media/RemoteMediaEngineConfigurationFactory.cpp: (WebKit::RemoteMediaEngineConfigurationFactory::registerFactory): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setUseGPUProcessForMedia): LayoutTests: * platform/wk2/TestExpectations: Un-skip tests that no longer fail. Canonical link: https://commits.webkit.org/234581@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-25 21:04:50 +00:00
platform/graphics/VP9Utilities.h
Move VelocityData to WebCore https://bugs.webkit.org/show_bug.cgi?id=198261 Reviewed by Antti Koivisto. Move VelocityData and HistoricalVelocityData to WebCore for future use in overflow scroll. Source/WebCore: VisibleContentRectUpdateInfo can now store a VelocityData (its timestamp is used as the timetamp for the entire update). No behavior change. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * page/FrameView.cpp: (WebCore::FrameView::setScrollVelocity): * page/FrameView.h: * platform/graphics/TiledBacking.h: (WebCore::VelocityData::VelocityData): Deleted. (WebCore::VelocityData::velocityOrScaleIsChanging const): Deleted. * platform/graphics/ca/TileController.cpp: (WebCore::TileController::adjustTileCoverageRect const): * platform/graphics/ca/TileController.h: Source/WebKit: VisibleContentRectUpdateInfo can now store a VelocityData (its timestamp is used as the timetamp for the entire update). * Shared/VisibleContentRectUpdateInfo.cpp: (WebKit::VisibleContentRectUpdateInfo::encode const): (WebKit::VisibleContentRectUpdateInfo::decode): (WebKit::operator<<): * Shared/VisibleContentRectUpdateInfo.h: (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo): (WebKit::VisibleContentRectUpdateInfo::scrollVelocity const): (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView const): (WebKit::VisibleContentRectUpdateInfo::timestamp const): (WebKit::operator==): (WebKit::VisibleContentRectUpdateInfo::horizontalVelocity const): Deleted. (WebKit::VisibleContentRectUpdateInfo::verticalVelocity const): Deleted. (WebKit::VisibleContentRectUpdateInfo::scaleChangeRate const): Deleted. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<VelocityData>::encode): (IPC::ArgumentCoder<VelocityData>::decode): * Shared/WebCoreArgumentCoders.h: * UIProcess/ios/WKContentView.mm: (-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]): (WebKit::HistoricalVelocityData::VelocityData::VelocityData): Deleted. (WebKit::HistoricalVelocityData::HistoricalVelocityData): Deleted. (WebKit::HistoricalVelocityData::velocityForNewData): Deleted. (WebKit::HistoricalVelocityData::clear): Deleted. (WebKit::HistoricalVelocityData::append): Deleted. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::dynamicViewportSizeUpdate): (WebKit::WebPage::viewportConfigurationChanged): (WebKit::adjustVelocityDataForBoundedScale): (WebKit::WebPage::updateVisibleContentRects): Canonical link: https://commits.webkit.org/212306@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-27 01:12:00 +00:00
platform/graphics/VelocityData.h
[Media in GPU Process] Use VideoLayerManager to manage layers of MediaPlayerPrivateRemote https://bugs.webkit.org/show_bug.cgi?id=216995 Reviewed by Eric Carlson. Source/WebCore: No new tests since no functional changes. * Headers.cmake: Export TextTrackRepresentation and VideoLayerManager. * WebCore.xcodeproj/project.pbxproj: Add VideoLayerManager.h. Export TextTrackRepresentation, WebVideoContainerLayer and VideoLayerManager. * platform/graphics/TextTrackRepresentation.cpp: * platform/graphics/TextTrackRepresentation.h: Minor clean-up. * platform/graphics/VideoLayerManager.h: Added. Add this interface so that we can use VideoLayerManager in the C++ code. * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h: * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm: (WebCore::VideoLayerManagerObjC::videoInlineLayer const): (WebCore::VideoLayerManagerObjC::videoFullscreenLayer const): (WebCore::VideoLayerManagerObjC::videoFullscreenFrame const): (WebCore::VideoLayerManagerObjC::updateVideoFullscreenInlineImage): Fix the issue when RELEASE_LOG_DISABLED is defined and add WEBCORE_EXPORT to some functions. Source/WebKit: This patch removes the remote hosting layer in the GPU process for video fullscreen and picture-in-picture. We don't need to keep a layer in the GPU process for video fullscreen and picture-in-picture because no rendering will be done for that layer. We don't need EnterFullscreen, ExitFullscreen and SetVideoFullscreenFrameFenced IPC messages after removing the layer because the RemoteMediaPlayerPrivateRemote in the web process can deal with the video presentation mode change. * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm: (WebKit::RemoteMediaPlayerProxy::prepareForPlayback): (WebKit::RemoteMediaPlayerProxy::enterFullscreen): Deleted. (WebKit::RemoteMediaPlayerProxy::exitFullscreen): Deleted. (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenFrameFenced): Deleted. Remove unused IPC messages after removing the remote hosting layer for video fullscreen and picture-in-picture. * GPUProcess/media/gstreamer/RemoteMediaPlayerProxyGStreamer.cpp: (WebKit::RemoteMediaPlayerProxy::prepareForPlayback): (WebKit::RemoteMediaPlayerProxy::enterFullscreen): Deleted. (WebKit::RemoteMediaPlayerProxy::exitFullscreen): Deleted. Ditto. * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): (WebKit::MediaPlayerPrivateRemote::~MediaPlayerPrivateRemote): (WebKit::MediaPlayerPrivateRemote::prepareForPlayback): Remove the code related to the remote hosting layer for video fullscreen and picture-in-picture. (WebKit::MediaPlayerPrivateRemote::platformLayer const): (WebKit::MediaPlayerPrivateRemote::setVideoFullscreenLayer): Use VideoLayerManager to manage the layer. (WebKit::MediaPlayerPrivateRemote::setVideoFullscreenFrame): Ditto. (WebKit::MediaPlayerPrivateRemote::requiresTextTrackRepresentation const): Ditto. (WebKit::MediaPlayerPrivateRemote::setTextTrackRepresentation): Ditto. (WebKit::MediaPlayerPrivateRemote::syncTextTrackBounds): Ditto. (WebKit::MediaPlayerPrivateRemote::setVideoFullscreenFrameFenced): Deleted. * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: Need to move the Logger up in the data members so that other members can use it in the constructor, e.g., VideoLayerManager. * WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): (WebKit::MediaPlayerPrivateRemote::createVideoFullscreenLayer): (WebKit::MediaPlayerPrivateRemote::setVideoFullscreenFrame): Deleted. (WebKit::MediaPlayerPrivateRemote::setTextTrackRepresentation): Deleted. (WebKit::MediaPlayerPrivateRemote::syncTextTrackBounds): Deleted. Simplify the implementation by managing layers with VideoLayerManager. Canonical link: https://commits.webkit.org/229854@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 04:52:54 +00:00
platform/graphics/VideoLayerManager.h
platform/graphics/VideoPlaybackQualityMetrics.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/VideoTrackPrivate.h
platform/graphics/WidthCache.h
platform/graphics/WindRule.h
platform/graphics/angle/ANGLEHeaders.h
Rename GraphicsContext3D to GraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=205778 <rdar://problem/58327597> Reviewed by Sam Weinig. Rename all the GraphicsContext3D things to GraphicsContextGL (includes Extensions3D and GRAPHICS_CONTEXT_3D). GraphicsContext3DBase now becomes GraphicsContextGL. GraphicsContext3D is now GraphicsContextGLOpenGL (since it represents the OpenGL implementation of the API). .: * Source/CMakeLists.txt: * Source/cmake/OptionsFTW.cmake: * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsMac.cmake: * Source/cmake/OptionsPlayStation.cmake: * Source/cmake/OptionsWPE.cmake: * Source/cmake/OptionsWinCairo.cmake: PerformanceTests: * StitchMarker/wtf/FeatureDefines.h: * StitchMarker/wtf/Platform.h: Source/WebCore: * CMakeLists.txt: * Headers.cmake: * PlatformAppleWin.cmake: * PlatformFTW.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * SourcesWPE.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLVideoElement.cpp: * html/HTMLVideoElement.h: * html/OffscreenCanvas.cpp: * html/canvas/ANGLEInstancedArrays.cpp: * html/canvas/OESVertexArrayObject.cpp: * html/canvas/WebGL2RenderingContext.cpp: * html/canvas/WebGL2RenderingContext.h: * html/canvas/WebGLActiveInfo.h: * html/canvas/WebGLBuffer.cpp: * html/canvas/WebGLBuffer.h: * html/canvas/WebGLCompressedTextureASTC.cpp: * html/canvas/WebGLCompressedTextureATC.cpp: * html/canvas/WebGLCompressedTextureETC.cpp: * html/canvas/WebGLCompressedTextureETC1.cpp: * html/canvas/WebGLCompressedTexturePVRTC.cpp: * html/canvas/WebGLCompressedTextureS3TC.cpp: * html/canvas/WebGLContextAttributes.h: * html/canvas/WebGLContextGroup.cpp: * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLContextObject.cpp: * html/canvas/WebGLContextObject.h: * html/canvas/WebGLDebugShaders.cpp: * html/canvas/WebGLDepthTexture.cpp: * html/canvas/WebGLDepthTexture.h: * html/canvas/WebGLDrawBuffers.cpp: * html/canvas/WebGLFramebuffer.cpp: * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLObject.cpp: * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: * html/canvas/WebGLProgram.h: * html/canvas/WebGLQuery.cpp: * html/canvas/WebGLQuery.h: * html/canvas/WebGLRenderbuffer.cpp: * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderingContext.cpp: * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContextBase.cpp: * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSampler.cpp: * html/canvas/WebGLSampler.h: * html/canvas/WebGLShader.cpp: * html/canvas/WebGLShader.h: * html/canvas/WebGLShaderPrecisionFormat.h: * html/canvas/WebGLSharedObject.cpp: * html/canvas/WebGLSharedObject.h: * html/canvas/WebGLSync.cpp: * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: * html/canvas/WebGLTexture.h: * html/canvas/WebGLTransformFeedback.cpp: * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLVertexArrayObject.cpp: * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObjectBase.cpp: * html/canvas/WebGLVertexArrayObjectBase.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: * html/canvas/WebGLVertexArrayObjectOES.h: * inspector/InspectorShaderProgram.cpp: * loader/FrameLoaderClient.h: * page/Chrome.cpp: * platform/SourcesCairo.txt: * platform/TextureMapper.cmake: * platform/WebGLStateTracker.cpp: * platform/WebGLStateTracker.h: * platform/graphics/ANGLEWebKitBridge.cpp: * platform/graphics/ExtensionsGL.h: Renamed from Source/WebCore/platform/graphics/Extensions3D.h. * platform/graphics/FormatConverter.cpp: * platform/graphics/FormatConverter.h: * platform/graphics/GLContext.cpp: * platform/graphics/GLContext.h: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContext3D.cpp: Removed. * platform/graphics/GraphicsContext3DBase.cpp: Removed. * platform/graphics/GraphicsContextGL.cpp: Added. * platform/graphics/GraphicsContextGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DBase.h. * platform/graphics/GraphicsContextGLAttributes.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h. * platform/graphics/ImageBuffer.cpp: * platform/graphics/ImageBuffer.h: * platform/graphics/MediaPlayer.cpp: * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/OpenGLShims.cpp: * platform/graphics/angle/ExtensionsGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.cpp. * platform/graphics/angle/ExtensionsGLANGLE.h: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.h. * platform/graphics/angle/GraphicsContextGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/GraphicsContext3DANGLE.cpp. * platform/graphics/angle/TemporaryANGLESetting.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: * platform/graphics/cairo/GraphicsContextGLCairo.cpp: Renamed from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp. * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/cg/GraphicsContextGLCG.cpp: Renamed from Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp. * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: Renamed from Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm. * platform/graphics/cocoa/IOSurface.mm: * platform/graphics/cocoa/WebGLLayer.h: * platform/graphics/cocoa/WebGLLayer.mm: * platform/graphics/cpu/arm/GraphicsContextGLNEON.h: Renamed from Source/WebCore/platform/graphics/cpu/arm/GraphicsContext3DNEON.h. * platform/graphics/cv/TextureCacheCV.h: * platform/graphics/cv/TextureCacheCV.mm: * platform/graphics/cv/VideoTextureCopierCV.cpp: * platform/graphics/cv/VideoTextureCopierCV.h: * platform/graphics/egl/GLContextEGL.cpp: * platform/graphics/egl/GLContextEGL.h: * platform/graphics/glx/GLContextGLX.cpp: * platform/graphics/glx/GLContextGLX.h: * platform/graphics/gpu/Texture.cpp: * platform/graphics/gpu/Texture.h: * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/ios/GraphicsContextGLOpenGLESIOS.h: Renamed from Source/WebCore/platform/graphics/ios/GraphicsContext3DIOS.h. * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp: * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h: * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp. * platform/graphics/opengl/ExtensionsGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp. * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.h. * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp. * platform/graphics/opengl/ExtensionsGLOpenGLES.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h. * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: Added. * platform/graphics/opengl/GraphicsContextGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3D.h. * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLManager.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.h. * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.h. * platform/graphics/opengl/TemporaryOpenGLSetting.cpp: * platform/graphics/opengl/TemporaryOpenGLSetting.h: * platform/graphics/texmap/BitmapTextureGL.cpp: * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp: Renamed from Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp. * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h: * platform/graphics/texmap/TextureMapperGL.cpp: * platform/graphics/win/GraphicsContextGLDirect2D.cpp: Renamed from Source/WebCore/platform/graphics/win/GraphicsContext3DDirect2D.cpp. * testing/Internals.cpp: Source/WebKit: * CMakeLists.txt: * UIProcess/gtk/WaylandCompositor.cpp: (WebKit::WaylandCompositor::initializeEGL): * UIProcess/mac/HighPerformanceGPUManager.cpp: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/mac/WebPageMac.mm: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::displayConfigurationChanged): Source/WTF: * wtf/FeatureDefines.h: * wtf/Platform.h: Tools: * Scripts/webkitpy/common/config/watchlist: Canonical link: https://commits.webkit.org/218939@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-06 18:52:42 +00:00
platform/graphics/angle/ExtensionsGLANGLE.h
rAF driven WebGL submits excessive amount of GPU work when frames are slow https://bugs.webkit.org/show_bug.cgi?id=227059 Reviewed by Dean Jackson. Advertise GL_ARB_sync for the Metal backend. Since GL_ARB_sync is core in OpenGL ES 3.0 and the Metal backend advertises OpenGL ES 3.0, the API must be working already. Limit in-flight WebGL frames to three frames. Do not continue preparation for display until the commands for the oldest frame have been executed by the GPU. This limits the impact slow frames have, especially in the case where the compositor skip frames and WebKit would issue a new slow frame on top of the skipped frame. Source/ThirdParty/ANGLE: An additional change ensures that Nvidia configs, which do not support MTLEvents to a level of conformance required (See http://crbug.com/1136673), continue to run. The more powerful eGPUs will not experience throttling to the same level as integrated GPUS. * src/libANGLE/renderer/metal/DisplayMtl.mm: (rx::DisplayMtl::initializeExtensions const): Source/WebCore: An additional change ensures that Nvidia configs, which do not support MTLEvents to a level of conformance required (See http://crbug.com/1136673), continue to run. The more powerful eGPUs will not experience throttling to the same level as integrated GPUS. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/GraphicsContextGLAttributes.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::waitAndUpdateOldestFrame): * platform/graphics/angle/GraphicsContextGLANGLEUtilities.h: (WebCore::ScopedGLFence::ScopedGLFence): (WebCore::ScopedGLFence::~ScopedGLFence): (WebCore::ScopedGLFence::operator=): (WebCore::ScopedGLFence::reset): (WebCore::ScopedGLFence::abandon): (WebCore::ScopedGLFence::fenceSync): (WebCore::ScopedGLFence::operator GLsync const): (WebCore::ScopedGLFence::operator bool const): * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::InitializeEGLDisplay): (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::prepareForDisplay): * platform/graphics/opengl/GraphicsContextGLOpenGL.h: Canonical link: https://commits.webkit.org/239635@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-13 19:28:19 +00:00
platform/graphics/angle/GraphicsContextGLANGLEUtilities.h
[GTK] Add ANGLE backend to GTK port https://bugs.webkit.org/show_bug.cgi?id=199060 Reviewed by Žan Doberšek. .: This change brings ANGLE support for WebGL to GTK port. USE_ANGLE_WEBGL is newly defined in OptionGTK.cmake, and turns on the USE_ANGLE_EGL flag. * Source/cmake/OptionsGTK.cmake: USE_ANGLE_WEBGL added. Source/ThirdParty/ANGLE: * CMakeLists.txt: When USE_ANGLE_WEBGL is enabled, necessary glesv2 entry points headers are installed in the derived source directory. And then adjust-angle-include-path.sh is applied to change include paths in the entry points header files. * GLESv2.cmake: libglesv2_entry_points_headers is newly defined, which is a gathering of entry point headers of libGLESv2. * PlatformGTK.cmake: In this file, we append gl and glx related angle code as a build target. Since we want gl context and gles context simultaneously, we remove gl prototype calls from the generated libGLESv2 library. Instead, we invoke egl and gl calls of ANGLE via their non-prototype function names. * adjust-angle-include-paths.sh: sed is slightly different in unix and linux systems. In particular, its inplace option needs to be changed for better compatibility on linux. * include/CMakeLists.txt: ANGLE_WEBGL_HEADERS is newly defined. It gathers header files of ANGLE for WebGL support. Source/WebCore: This change aims to bring ANGLE support for WebGL to GTK port. The port wants to have a gl context for texture mapper and a gles/egl context for webgl simultaneously, we adopt the readPixel-copyToTexture approach for now because sharing textures between the two different contextes is not a feasible direction. Also, to avoid conflicts between gl and gles calls, we use non-prototype functions of ANGLE for WebGL context (i.e., GraphicsContext3D). Although many combinations of graphic configurations exist, only default configuration (Nicosia layers running on ANGLE + GLX is supported. Other combinations like ANGLE + GLES or WPE will be covered by following patches. No new tests since no functionality changed. * Headers.cmake: * PlatformGTK.cmake: * SourcesGTK.txt: * platform/TextureMapper.cmake: * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GLContext.cpp: * platform/graphics/GLContext.h: * platform/graphics/GraphicsContext3D.h: * platform/graphics/OpenGLShims.cpp: (WebCore::initializeOpenGLShims): * platform/graphics/OpenGLShims.h: * platform/graphics/PlatformDisplay.cpp: * platform/graphics/angle/GraphicsContext3DANGLE.cpp: (WebCore::GraphicsContext3D::reshapeFBOs): (WebCore::GraphicsContext3D::prepareTexture): * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp: Added. (Nicosia::GC3DANGLELayer::ANGLEContext::errorString): (Nicosia::GC3DANGLELayer::ANGLEContext::lastErrorString): (Nicosia::GC3DANGLELayer::ANGLEContext::createContext): (Nicosia::GC3DANGLELayer::ANGLEContext::ANGLEContext): (Nicosia::GC3DANGLELayer::ANGLEContext::~ANGLEContext): (Nicosia::GC3DANGLELayer::ANGLEContext::makeContextCurrent): (Nicosia::GC3DANGLELayer::ANGLEContext::platformContext): (Nicosia::GC3DANGLELayer::GC3DANGLELayer): (Nicosia::GC3DANGLELayer::~GC3DANGLELayer): (Nicosia::GC3DANGLELayer::makeContextCurrent): (Nicosia::GC3DANGLELayer::platformContext): * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h: Copied from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h. * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: (Nicosia::GC3DLayer::GC3DLayer): (Nicosia::GC3DLayer::swapBuffersIfNeeded): * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h: * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::setPendingContents): (WebCore::BitmapTextureGL::updatePendingContents): * platform/graphics/texmap/BitmapTextureGL.h: * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: (WebCore::TextureMapperPlatformLayerProxy::pushNextBuffer): Source/WebKit: * UIProcess/API/glib/WebKitProtocolHandler.cpp: Extention3DANGLE is used instead where ANGLE for WebGL is enabled. * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: Append gl extensions for ANGLE. (WebKit::AcceleratedBackingStoreWayland::checkRequirements): Source/WTF: The GTK port uses TEXTURE_MAPPER that has a gl context for accelerated rendering, and ANGLE has an egl context for WebGL. We want to make both live together so an exception is made where TEXTURE_MAPPER is enabled. * wtf/Platform.h: Canonical link: https://commits.webkit.org/217698@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-11-20 23:59:11 +00:00
platform/graphics/displaylists/DisplayList.h
[Cocoa] [GPU Process] Perform image decoding of color fonts in the Web Process https://bugs.webkit.org/show_bug.cgi?id=217506 Reviewed by Simon Fraser. Source/WebCore: Core Text itself doesn't know how to draw things; it has to rely on Core Graphics to do that. However, Core Graphics only understands the simplest of text drawing concepts; it doesn't understand things like color fonts or emoji. Core Text sits between the application and Core Graphics, and is responsible for splitting up an arbitrary draw command into individual simple pieces which Core Graphics can understand. For example, when you ask Core Text to draw a string which is of the form "outlines emoji outlines", Core Text will end up telling Core Graphics to draw the first outlines, then draw the emoji image (using Core Graphics's normal image drawing routines), then draw the remaining outlines. This is exactly the same kind of filtering we want to do for the GPU Process. We want to be able to separate out the glyphs which are rendered using outlines from the emoji glyphs which are rendered using images. We want to handle the image glyphs ourself in WebKit using our own image drawing display list facilities, which will cause images to be decoded in the Web Process, thereby increasing the security of the GPU Process. So, this patch implements a custom CGContext, backed by a function table that is populated in WebKit. We pass this custom CGContext into Core Text, which does its normal splitting up of outlines / images, and calls glyph / image drawing functions on our CGContext. Because these functions are implemented by WebKit, this effectively makes WebKit able to intercept the drawing calls, and implement them ourself by appending items to the current display list. So, when Core Text tells our CGContext to draw an emoji, our callback runs and we "just" append a DrawImage display list item. I use scare-quotes around "just" because it is a bit more complicated than that. Core Text internally can change the fill/stroke color (for COLR glyphs), the text matrix (it should be updated between adjacent runs), the CTM, and the shadow state (because Core Text sometimes will implement shadows itself by just drawing the text two times). So, in our CGContext callback, we have to look at the state of the CGContext, figure out if anything changed (because we're not notified when changes happen), and if things did change, append additional display list items to make a parallel change happen at draw time. Tests added in https://trac.webkit.org/r269177 * Headers.cmake: * PlatformAppleWin.cmake: * PlatformWinCairo.cmake: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * platform/FreeType.cmake: * platform/graphics/cg/ImageBufferCGBackend.cpp: (WebCore::ImageBufferCGBackend::setupContext): * platform/graphics/coretext/FontCascadeCoreText.cpp: (WebCore::fillVectorWithHorizontalGlyphPositions): * platform/graphics/displaylists/DisplayListDrawGlyphsRecorder.h: Added. * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderCoreText.cpp: Added. (WebCore::DisplayList::beginLayer): VTable callback for creating a transparency layer. (WebCore::DisplayList::endLayer): Ditto for ending a transparency layer. (WebCore::DisplayList::drawGlyphs): VTable callback for drawing outline glyphs. (WebCore::DisplayList::drawImage): VTable callback for drawing an image. (WebCore::DisplayList::DrawGlyphsRecorder::createInternalContext): Set up the custom CGContext infrastructure. Hook up the VTable callbacks. (WebCore::DisplayList::DrawGlyphsRecorder::DrawGlyphsRecorder): (WebCore::DisplayList::DrawGlyphsRecorder::populateInternalState): We need to save the GraphicsContext state at the beginning of the entry point, so we can restore anything that changed when we're done. (WebCore::DisplayList::DrawGlyphsRecorder::populateInternalContext): Because Core Text internally interrogates the CGContext to see if it needs to do things like draw shadows itself, we need to make sure that the recorder's state is mirrored in our custom CGContext. This applies all the relevant state to our CGContext so it's ready when Core Text asks for it. (WebCore::DisplayList::DrawGlyphsRecorder::prepareInternalContext): Call the above two functions. (WebCore::DisplayList::DrawGlyphsRecorder::concludeInternalContext): Called once when we're done. This function cleans up, by possibly appending additional display list items to restore the state back to what it was when we started. (WebCore::DisplayList::DrawGlyphsRecorder::updateFillColor): Detect a changed fill color, and if it has changed, append a display list item to make a parallel change at drawing time. (WebCore::DisplayList::DrawGlyphsRecorder::updateStrokeColor): Ditto for the stroke color. (WebCore::DisplayList::DrawGlyphsRecorder::updateCTM): Ditto for the CTM. (WebCore::DisplayList::shadowIsCleared): (WebCore::DisplayList::DrawGlyphsRecorder::updateShadow): Ditto for the shadow state. (WebCore::DisplayList::DrawGlyphsRecorder::recordBeginLayer): Hook this up to beginTransparencyLayer(). (WebCore::DisplayList::DrawGlyphsRecorder::recordEndLayer): Hook this up to endTransparencyLayer(). (WebCore::DisplayList::computeAdvancesFromPositions): CGContext gives us positions, but our display list infrastructure requires advances. Simply subtract to convert between them. (WebCore::DisplayList::DrawGlyphsRecorder::recordDrawGlyphs): The callback that appends a DrawGlyphs display list item. Note it has to call the various update() functions to detect changes in the CGContext state. (WebCore::DisplayList::DrawGlyphsRecorder::recordDrawImage): Ditto for a DrawImage display list item. (WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphs): The main entry point. Simply set up, do the work, then clean up. * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderHarfBuzz.cpp: Added. Dummy implementation to make the other ports continue to compile. (WebCore::DisplayList::DrawGlyphsRecorder::DrawGlyphsRecorder): (WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphs): * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::Recorder): (WebCore::DisplayList::Recorder::drawGlyphs): Call m_drawGlyphsRecorder.drawGlyphs() instead of just appending a DrawGlyphs command. (WebCore::DisplayList::Recorder::concatCTM): Tiny optimization. (WebCore::DisplayList::Recorder::clipToDrawingCommands): The current clipToDrawingCommands's context CTM didn't match the parallel one used during playback. In order to make the CTMs match are recording and playback time, we have to make sure they start off the same. * platform/graphics/displaylists/DisplayListRecorder.h: DisplayList::Recorder owns a DrawGlyphsRecorder, whose lifetime equals that of the DisplayList::Recorder. Rather than destroying / recreating the DrawGlyphsRecorder, the DrawGlyphsRecorder class is smart enough to clean up after itself so it can be reused multiple times. Source/WebCore/PAL: Add some new entry points, and do some various cleanup. * pal/spi/cg/CoreGraphicsSPI.h: Canonical link: https://commits.webkit.org/231072@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-31 00:01:02 +00:00
platform/graphics/displaylists/DisplayListDrawGlyphsRecorder.h
[GPU Process] Work towards compiling out on non-Cocoa ports https://bugs.webkit.org/show_bug.cgi?id=208899 Reviewed by Darin Adler. Source/WebCore: Add in additional headers required for GPU Process build. * Headers.cmake: Source/WebKit: Work through some compilation issues on non-Cocoa ports when attempting to build out the GPU Process. Fix platform guards for some methods. Fix compilation issues for non-unified builds. Add in CMake listing of messages.in and include directories required for building with ENABLE_GPU_PROCESS. * CMakeLists.txt: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::didClose): * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/GPUProcess.cpp: * GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h: * GPUProcess/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::create): * GPUProcess/graphics/RemoteRenderingBackendProxy.cpp: * GPUProcess/graphics/RemoteRenderingBackendProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::getConfiguration): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity): (WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode): (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged): (WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged): (WebKit::RemoteMediaPlayerProxy::notifyTrackModeChanged): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * UIProcess/GPU/GPUProcessProxy.h: * WebProcess/GPU/GPUProcessConnection.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h: * WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h: * WebProcess/GPU/graphics/RemoteRenderingBackend.cpp: * WebProcess/GPU/media/AudioTrackPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: * WebProcess/GPU/media/TextTrackPrivateRemote.h: Canonical link: https://commits.webkit.org/221833@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-11 05:44:47 +00:00
platform/graphics/displaylists/DisplayListDrawingContext.h
[GPU Process] Clean up recreating the ImageBufferBackend because of GPU crashing https://bugs.webkit.org/show_bug.cgi?id=219007 Reviewed by Simon Fraser. Source/WebCore: To allow answering questions about the backend creation parameters without having the backend created, the new structure ImageBufferBackend::Parameters is introduced. This structure contains the parameters which were passed by the caller in the WebProcess and which are sufficient to recreate RemoteImageBuffer if the GPU Process crashes even before the backend of RemoteImageBufferProxy is created. ConcreteImageBuffer and ImageBufferBackend will hold an instance of the new structure ImageBufferBackend::Parameters. Also replace all the instances of 'isAccelerated' by 'renderingMode'. So no need to convert one type to the other. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/ConcreteImageBuffer.h: (WebCore::ConcreteImageBuffer::create): (WebCore::ConcreteImageBuffer::ConcreteImageBuffer): -- Make ConcreteImageBuffer own an instance of ImageBufferBackend::Parameters. -- Add methods to set and clear the backend of an ImageBuffer. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::backend const): (WebCore::ImageBuffer::submitDisplayList): (WebCore::ImageBuffer::didFlush): -- Expose the ImageBufferBackend creation parameters through methods. -- Expose submitDisplayList() and didFlush() so no casting is needed when calling these functions through RemoteImageBuferProxy. * platform/graphics/ImageBufferBackend.cpp: (WebCore::ImageBufferBackend::ImageBufferBackend): (WebCore::ImageBufferBackend::toBGRAData const): * platform/graphics/ImageBufferBackend.h: (WebCore::ImageBufferBackend::backendSize const): (WebCore::ImageBufferBackend::memoryCost const): (WebCore::ImageBufferBackend::bytesPerRow const): (WebCore::ImageBufferBackend::toBackendCoordinates const): (WebCore::ImageBufferBackend::logicalSize const): (WebCore::ImageBufferBackend::resolutionScale const): (WebCore::ImageBufferBackend::colorSpace const): (WebCore::ImageBufferBackend::pixelFormat const): (WebCore::ImageBufferBackend::logicalRect const): (WebCore::ImageBufferBackend::backendRect const): (WebCore::ImageBufferBackend::baseTransform const): Deleted. -- Add the structure ImageBufferBackend::Parameters. -- Make ImageBufferBackend own an instance of this structure. -- Make backendSize() a pure virtual method. -- Delete baseTransform() since it is implemented in ConcreteImageBuffer. * platform/graphics/PlatformImageBuffer.h: (isType): * platform/graphics/cairo/ImageBufferCairoBackend.cpp: (WebCore::ImageBufferCairoBackend::drawPattern): * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp: (WebCore::ImageBufferCairoImageSurfaceBackend::create): (WebCore::ImageBufferCairoImageSurfaceBackend::ImageBufferCairoImageSurfaceBackend): (WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace): * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.h: * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: (WebCore::ImageBufferCairoSurfaceBackend::ImageBufferCairoSurfaceBackend): (WebCore::ImageBufferCairoSurfaceBackend::backendSize const): * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h: * platform/graphics/cg/ImageBufferCGBackend.cpp: (WebCore::ImageBufferCGBackend::setupContext const): (WebCore::ImageBufferCGBackend::copyImage const): (WebCore::ImageBufferCGBackend::sinkIntoImage): (WebCore::ImageBufferCGBackend::draw): (WebCore::ImageBufferCGBackend::drawPattern): (WebCore::ImageBufferCGBackend::toCFData const): (WebCore::ImageBufferCGBackend::baseTransform const): Deleted. * platform/graphics/cg/ImageBufferCGBackend.h: * platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: (WebCore::ImageBufferCGBitmapBackend::create): (WebCore::ImageBufferCGBitmapBackend::ImageBufferCGBitmapBackend): (WebCore::ImageBufferCGBitmapBackend::backendSize const): (WebCore::ImageBufferCGBitmapBackend::copyNativeImage const): * platform/graphics/cg/ImageBufferCGBitmapBackend.h: * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: (WebCore::ImageBufferIOSurfaceBackend::create): (WebCore::ImageBufferIOSurfaceBackend::ImageBufferIOSurfaceBackend): (WebCore::ImageBufferIOSurfaceBackend::backendSize const): (WebCore::ImageBufferIOSurfaceBackend::drawConsuming): * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: -- Change the create() methods to take a "Parameters" argument. -- Use the backend method to access the "Parameters" structure. * platform/graphics/displaylists/DisplayList.h: * platform/graphics/displaylists/DisplayListFlushIdentifier.h: Added. Move DisplayListFlushIdentifier to a separate file so it can be included in ImageBuffer.h without having to include DisplayList.h. * platform/graphics/displaylists/DisplayListImageBuffer.h: (WebCore::DisplayList::ImageBuffer::create): (WebCore::DisplayList::ImageBuffer::ImageBuffer): (WebCore::DisplayList::ImageBuffer::initialDrawingContextCTM): Deleted. -- No need to pass the 'size' argument twice in the 'create' methods. The structure Parameters has to be passed to the constructor anyway. -- No need for initialDrawingContextCTM() since it is equivalent to baseTransform(). * platform/graphics/win/ImageBufferDirect2DBackend.cpp: (WebCore::ImageBufferDirect2DBackend::copyImage const): (WebCore::ImageBufferDirect2DBackend::draw): (WebCore::ImageBufferDirect2DBackend::drawPattern): -- Use the backend method to access the "Parameters" structure. Source/WebKit: There is no need to store the backend parameters in RemoteImageBufferProxy. These parameters are now stored in the base class ImageBuffer before the backend is created. Remove the traits definition for RemoteImageBufferProxy types because they are wrong. All ImageBuffers have valid renderingResourceIdentifier() regardless whether they are remote or not. ImageBuffer::setBackend and ImageBuffer::submitDisplayList() are now implemented in WebCore. So no casting is needed. * GPUProcess/graphics/RemoteImageBuffer.h: (WebKit::RemoteImageBuffer::RemoteImageBuffer): (WebKit::RemoteImageBuffer::submitDisplayList): Deleted. submitDisplayList() is now a virtual method of ImageBuffer. So make it private and ignore the return of DisplayList::Replayer::replay() since the caller does not use it. * GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::didCreateImageBufferBackend): (WebKit::RemoteRenderingBackend::applyDisplayListsFromHandle): (WebKit::RemoteRenderingBackend::imageBufferBackendWasCreated): Deleted. * GPUProcess/graphics/RemoteRenderingBackend.h: Rename 'imageBufferBackendWasCreated()' to 'didCreateImageBufferBackend()' to be consistent with 'didFlush()'. * Shared/ConcreteShareableImageBuffer.h: (WebKit::ConcreteShareableImageBuffer::create): (WebKit::ConcreteShareableImageBuffer::ConcreteShareableImageBuffer): Deleted. * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::encode const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): Call the function with the new name and delete the FIXME comment. * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: (WebKit::ImageBufferShareableBitmapBackend::create): (WebKit::ImageBufferShareableBitmapBackend::ImageBufferShareableBitmapBackend): (WebKit::ImageBufferShareableBitmapBackend::backendSize const): * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h: Use the new structure 'ImageBufferBackend::Parameters'. Implement the virtual method 'backendSize()'. * WebProcess/GPU/graphics/PlatformRemoteImageBufferProxy.h: (isType): Deleted. Delete the wrong traits. * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::create): (WebKit::RemoteImageBufferProxy::RemoteImageBufferProxy): Use the new structure 'ImageBufferBackend::Parameters'. (WebKit::RemoteImageBufferProxy::clearBackend): Deleted. (WebKit::RemoteImageBufferProxy::createBackend): Deleted. (WebKit::RemoteImageBufferProxy::didFlush): Deleted. (WebKit::RemoteImageBufferProxy::size const): Deleted. (WebKit::RemoteImageBufferProxy::renderingMode const): Deleted. (WebKit::RemoteImageBufferProxy::colorSpace const): Deleted. (WebKit::RemoteImageBufferProxy::pixelFormat const): Deleted. These functions are now implemented in ConcreteImageBuffer. (WebKit::RemoteImageBufferProxy::submitDisplayList): Deleted. submitDisplayList() is now virtual. * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::reestablishGPUProcessConnection): (WebKit::RemoteRenderingBackendProxy::waitForDidCreateImageBufferBackend): (WebKit::RemoteRenderingBackendProxy::createImageBuffer): (WebKit::RemoteRenderingBackendProxy::didCreateImageBufferBackend): (WebKit::RemoteRenderingBackendProxy::didFlush): (WebKit::recreateImageBuffer): Deleted. (WebKit::RemoteRenderingBackendProxy::waitForImageBufferBackendWasCreated): Deleted. (WebKit::RemoteRenderingBackendProxy::imageBufferBackendWasCreated): Deleted. * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: No need to cast the ImageBuffer to RemoteImageBufferProxy since all what RemoteRenderingBackendProxy needs can be accessed through the base class. * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in: Rename 'ImageBufferBackendWasCreated' to 'DidCreateImageBufferBackend' to be consistent with 'DidFlush'. No need to pass the creation parameters since they set in the ConcreteImageBuffer. No need to pass the backendSize since it can be retrieved through the backend itself. * WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp: (WebKit::ImageBufferShareableIOSurfaceBackend::create): * WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.h: * WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp: (WebKit::ImageBufferShareableMappedIOSurfaceBackend::create): * WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.h: Use the new structure 'ImageBufferBackend::Parameters'. Canonical link: https://commits.webkit.org/232136@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-04 22:30:23 +00:00
platform/graphics/displaylists/DisplayListFlushIdentifier.h
[GPU Process] Work towards compiling out on non-Cocoa ports https://bugs.webkit.org/show_bug.cgi?id=208899 Reviewed by Darin Adler. Source/WebCore: Add in additional headers required for GPU Process build. * Headers.cmake: Source/WebKit: Work through some compilation issues on non-Cocoa ports when attempting to build out the GPU Process. Fix platform guards for some methods. Fix compilation issues for non-unified builds. Add in CMake listing of messages.in and include directories required for building with ENABLE_GPU_PROCESS. * CMakeLists.txt: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::didClose): * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/GPUProcess.cpp: * GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h: * GPUProcess/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::create): * GPUProcess/graphics/RemoteRenderingBackendProxy.cpp: * GPUProcess/graphics/RemoteRenderingBackendProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::getConfiguration): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity): (WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode): (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged): (WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged): (WebKit::RemoteMediaPlayerProxy::notifyTrackModeChanged): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * UIProcess/GPU/GPUProcessProxy.h: * WebProcess/GPU/GPUProcessConnection.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h: * WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h: * WebProcess/GPU/graphics/RemoteRenderingBackend.cpp: * WebProcess/GPU/media/AudioTrackPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: * WebProcess/GPU/media/TextTrackPrivateRemote.h: Canonical link: https://commits.webkit.org/221833@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-11 05:44:47 +00:00
platform/graphics/displaylists/DisplayListImageBuffer.h
[Concurrent display lists] Encode display list items directly into shared memory https://bugs.webkit.org/show_bug.cgi?id=218406 Reviewed by Tim Horton. Source/WebCore: This patch refactors display lists (and display list items) in preparation for upcoming changes to allow the GPU and web processes to concurrently read and write display list item data, which allows us to achieve significant improvements in performance on many graphics benchmarks in MotionMark by removing overhead involved in serializing and deserializing display list items over IPC. To implement this, rather than using IPC to encode and decode each item, we will instead store display list items directly in memory shared between the web and GPU processes. This strategy, of course, will not work for display list items that contain pointers. Unfortunately, this affects all display list items at the moment, since all items are subclasses of `DisplayList::Item`, and therefore contain vtable pointers, even if all members are plain data types. Thus, the first step towards being able to read and write items directly in shared memory is to remove this vtable pointer by making display list items no longer inherit from `DrawingItem` or `Item`. Currently, display lists are backed by `Vector<Ref<Item>>`; however, this no longer works once none of the display list items are descended from a common base class. To address this, we introduce `DisplayList::ItemBuffer`, which encapsulates logic to manage one or more data segments that contain display list item data (i.e. display list items stacked adjacent to each other in memory). Display lists now append inline display list items by constructing these items directly inside the item buffer using placement-new. However, many types of display list items do not consist entirely of inline data; some of these are obvious, such as `DrawImage`, `DrawGlyphs`, or `StrokePath` (since a `Path` may be arbitrarily complex). Other out-of- line item types are less obvious: for instance, `FillRoundedRect` is an out-of-line item due to the fact that the color of the rect (`FillRoundedRect::m_color`) may be an extended color, which then contains a pointer. In these cases, we can't simply encode the item in shared memory and read it in the GPU process, since the pointer (if it pointed to anything other than null in the web process) will point to arbitrary memory in the GPU process. Instead, we can leverage our existing IPC infrastructure here by encoding each of these out-of-line items as data and decoding them from this data in the GPU process. To do this, we delegate out to WebKit2 to encode out-of-line display list items using WebKit's `IPC::Encoder`, and pass back a `SharedBuffer` which we then copy into the item buffer. This delegation happens through the `ItemBufferWritingClient` class, which has an implementation in WebKit2. On the decoding side in the GPU process, we then ask `ItemBufferReadingClient` (if set) to convert this encoded data back into a display list item. In WebKit2, we implement this interface and use the corresponding `IPC::Decoder` to decode the data we serialized earlier. If no client is specified or the client does not require custom encoding/decoding for the given item type, we fall back to constructing the item directly inside the writable item buffer data. To make it easier to reason about these new (inheritance-free) display list items, we additionally introduce `ItemHandle`, which wraps a pointer to a display list item and provides several helper methods. The first byte of each item handle always points to an `ItemType`, and the following `N` bytes contain the item itself, where `N` is the size of the item class. Here are some examples of how to use an `ItemHandle`: `DisplayList::ItemType type = itemHandle.type();` (This matches the current inheritance model) `if (itemHandle.is<StrokePath>()) {...` (Replaces is<> in the current model) `auto& setStateItem = itemHandle.get<SetState>();` (Replaces downcast<> in the current model) `itemHandle.apply(myGraphicsContext);` (This matches the current inheritance model) `bool isDrawingItem = itemHandle.isDrawingItem();` (Replaces checks for `is<DrawingItem>(item)`) When writing display lists for the GPU process, the writing client (a `ItemBufferWritingClient`) will be asked to provide `ItemBufferHandle`s where the item buffer will place item data (whether encoded, or as an inline object). However, when using display lists outside of this context (e.g. in other parts of WebCore, such as the glyph drawing cache), we don't have a `ItemBufferWritingClient`. To handle this, the item buffer instead allocates its own (non-shared-memory) buffers, which it manages and deletes when it is done. If any out-of-line items are constructed within these buffers, `ItemBuffer` will additionally call their destructors prior to deleting these buffers. See per-change comments below for more details. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/GraphicsContext.h: * platform/graphics/displaylists/DisplayList.cpp: (WebCore::DisplayList::DisplayList::DisplayList): (WebCore::DisplayList::DisplayList::operator=): Implement the move assignment operator and move constructor by exchanging ownership of the item buffer. (WebCore::DisplayList::DisplayList::clear): (WebCore::DisplayList::DisplayList::shouldDumpForFlags): (WebCore::DisplayList::DisplayList::asText const): (WebCore::DisplayList::DisplayList::dump const): Adjust the format when printing display lists to `TextStream`. Now that drawing item extents are tracked on the display list rather than being on each drawing item, we print them out after each item (as opposed to being in the middle of each item). (WebCore::DisplayList::DisplayList::sizeInBytes const): Tally up the size of the display list by taking the sum of the sizes of each readonly segment, as well as the writable buffer size. (WebCore::DisplayList::DisplayList::isEmpty const): A DisplayList is empty if it contains no item data: in other words, there are no readonly buffer segments, and there is also nothing written to the writable buffer segment. (WebCore::DisplayList::DisplayList::itemBuffer): (WebCore::DisplayList::DisplayList::setItemBufferClient): (WebCore::DisplayList::DisplayList::forEachItemBuffer const): Add a helper to iterate over each ItemBufferHandle in the display list. This includes all readonly handles, and then the writable handle (if it exists). (WebCore::DisplayList::DisplayList::setTracksDrawingItemExtents): Add an option to allow the display list to track drawing item extents. Currently, display lists always track extents for drawing items; however, when propagating display lists to the GPU process for playback, these extents were never sent along with IPC, and so this ended up just being unnecessary work. Additionally, the initial clip in the GPU process is also never set, so computing these extents never helped. That said, drawing item extents are still printed out for the purposes of testing, so we need to keep this logic intact; this refactoring only disables extent computation for display lists being sent to the GPU process via remote image buffers. In a future patch, we could refactor this so that drawing items contain extent rects as inline data that can be consulted in the GPU process. (WebCore::DisplayList::DisplayList::append): Display list items are no longer constructed ahead of time, and then appended to the display list. Instead, `append` now takes the type of the item to append as a template typename argument, as well as the arguments that will be used to construct the item. (WebCore::DisplayList::DisplayList::iterator::atEnd const): (WebCore::DisplayList::DisplayList::iterator::updateCurrentItem): (WebCore::DisplayList::DisplayList::iterator::advance): (WebCore::DisplayList::DisplayList::iterator::clearCurrentItem): (WebCore::DisplayList::DisplayList::iterator::moveToEnd): (WebCore::DisplayList::DisplayList::iterator::moveCursorToStartOfCurrentBuffer): Implement a C++ iterator for DisplayList. This makes it possible to write code like this: ``` // Suppose displayList is an instance of DisplayList::DisplayList. for (auto [item, extent] : displayList) { // Do things with item, which is a DisplayList::ItemHandle. // Maybe do things with extent, which is an Optional<FloatRect>. } ``` * platform/graphics/displaylists/DisplayList.h: (WebCore::DisplayList::DisplayList::tracksDrawingItemExtents const): (WebCore::DisplayList::DisplayList::iterator::iterator): (WebCore::DisplayList::DisplayList::iterator::~iterator): (WebCore::DisplayList::DisplayList::iterator::operator==): (WebCore::DisplayList::DisplayList::iterator::operator!=): (WebCore::DisplayList::DisplayList::iterator::operator++): (WebCore::DisplayList::DisplayList::iterator::operator* const): (WebCore::DisplayList::DisplayList::begin const): (WebCore::DisplayList::DisplayList::end const): (WebCore::DisplayList::DisplayList::itemBufferIfExists const): (WebCore::DisplayList::DisplayList::addDrawingItemExtent): (WebCore::DisplayList::DisplayList::append): (WebCore::DisplayList::Item::type const): Deleted. (WebCore::DisplayList::Item::isDrawingItem const): Deleted. (WebCore::DisplayList::DisplayList::list const): Deleted. (WebCore::DisplayList::DisplayList::itemAt): Deleted. (WebCore::DisplayList::DisplayList::isEmpty const): Deleted. (WebCore::DisplayList::DisplayList::appendItem): Deleted. (WebCore::DisplayList::DisplayList::list): Deleted. (WebCore::DisplayList::DisplayList::encode const): Deleted. (WebCore::DisplayList::DisplayList::decode): Deleted. Remove the ability to `encode` and `decode` display lists, for the time being. For the communication between the web and GPU processes, we now use `SharedDisplayListHandle`. Unfortunately, this does mean that the extant `ClipToDrawingCommands` display list item will be broken for the time being. In a followup patch, I plan to reimplement `DisplayList::encode` and `decode` in the new inline item model by encoding each item (either as inline data or via `IPC::Encoder::encodeSingleObject`). However, this is contingent on all display list item types (e.g. `DrawImage` and `DrawGlyph`) not relying on `IPC::Attachment` for encoding, so support for `ClipToDrawingCommands` will need to wait until after fonts and images are working. * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderCoreText.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::recordDrawGlyphs): (WebCore::DisplayList::DrawGlyphsRecorder::recordDrawImage): * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderHarfBuzz.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphs): * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderWin.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphs): Change these to use the new templated `DisplayList::append` method. * platform/graphics/displaylists/DisplayListDrawingContext.h: (WebCore::DisplayList::DrawingContext::takeDisplayList): Use `std::exchange` instead of `WTFMove`. This is actually necessary in order to ensure correctness (i.e. no leaks or double-freeing), since the `DisplayList` instance that is being moved from needs to be empty so that it does not try to call destructors on the items formerly inside of it. * platform/graphics/displaylists/DisplayListItemBuffer.cpp: Added. (WebCore::DisplayList::ItemHandle::apply): (WebCore::DisplayList::ItemHandle::destroy): Add helper methods to apply a display list item to a `GraphicsContext` and call the display list item's destructor, respectively. (WebCore::DisplayList::ItemHandle::copyTo const): Add a helper method to copy the item into the destination handle (calling the copy constructor of the item type in the process). This is used when copying a validated display list item into the temporary item buffer in `DisplayList::iterator`. (WebCore::DisplayList::ItemBuffer::ItemBuffer): (WebCore::DisplayList::ItemBuffer::~ItemBuffer): (WebCore::DisplayList::m_allocatedBuffers): In the case where there is no `m_writingClient` (for instance, when using in-process `DisplayList`s to optimize text painting), the display list item buffer is responsible for creating and managing data buffers. As such, it needs to remember to free any buffers that it allocated when appending, and must also destroy any out-of-line display list items (i.e. items with nontrivial destructors) when it is finished. (WebCore::DisplayList::m_readOnlyBuffers): (WebCore::DisplayList::m_writableBuffer): (WebCore::DisplayList::m_writtenNumberOfBytes): See main ChangeLog entry above for more details. (WebCore::DisplayList::ItemBuffer::operator=): (WebCore::DisplayList::ItemBuffer::createItemBuffer): (WebCore::DisplayList::ItemBuffer::forEachItemBuffer const): (WebCore::DisplayList::ItemBuffer::clear): (WebCore::DisplayList::ItemBuffer::swapWritableBufferIfNeeded): (WebCore::DisplayList::ItemBuffer::appendDataAndLength): * platform/graphics/displaylists/DisplayListItemBuffer.h: Added. (WebCore::DisplayList::ItemBufferHandle::operator bool const): (WebCore::DisplayList::ItemBufferHandle::operator! const): (WebCore::DisplayList::ItemHandle::operator bool const): (WebCore::DisplayList::ItemHandle::operator! const): (WebCore::DisplayList::ItemHandle::type const): (WebCore::DisplayList::ItemHandle::size const): (WebCore::DisplayList::ItemHandle::is const): (WebCore::DisplayList::ItemHandle::get const): (WebCore::DisplayList::ItemBufferWritingClient::~ItemBufferWritingClient): (WebCore::DisplayList::ItemBufferReadingClient::~ItemBufferReadingClient): (WebCore::DisplayList::ItemBuffer::sizeInBytes const): (WebCore::DisplayList::ItemBuffer::isEmpty const): (WebCore::DisplayList::ItemBuffer::append): (WebCore::DisplayList::ItemBuffer::setClient): (WebCore::DisplayList::ItemBuffer::readOnlyBuffers const): (WebCore::DisplayList::ItemBuffer::uncheckedAppend): * platform/graphics/displaylists/DisplayListItems.cpp: The changes in this file make up most of the code churn in this patch, but the changes are mostly mechanical. In summary, this patch: - Add static constexprs for the `ItemType` of each display list item class, as well as whether or not each class is inline, and also whether or not each class is a drawing item. - Remove `encode` and `decode` methods from inline item classes. - Remove all overridden methods; each class now implements individual methods to `apply`, compute `globalBounds` (if applicable), and compute `localBounds` (again, if applicable). - Adjusts textstream dumping helpers, so that they no longer dump as a `DrawingItem` before dumping each member. (WebCore::DisplayList::SetInlineFillGradient::SetInlineFillGradient): (WebCore::DisplayList::SetState::SetState): (WebCore::DisplayList::DrawGlyphs::DrawGlyphs): (WebCore::DisplayList::DrawGlyphs::generateGlyphBuffer const): (WebCore::DisplayList::DrawGlyphs::apply const): (WebCore::DisplayList::operator<<): (WebCore::DisplayList::DrawNativeImage::DrawNativeImage): (WebCore::DisplayList::DrawPattern::DrawPattern): (WebCore::DisplayList::DrawLinesForText::DrawLinesForText): (WebCore::DisplayList::DrawFocusRingRects::DrawFocusRingRects): (WebCore::DisplayList::FillRectWithGradient::FillRectWithGradient): (WebCore::DisplayList::PutImageData::PutImageData): (WebCore::DisplayList::PaintFrameForMedia::PaintFrameForMedia): (WebCore::DisplayList::Item::Item): Deleted. (WebCore::DisplayList::Item::sizeInBytes): Deleted. (WebCore::DisplayList::DrawingItem::DrawingItem): Deleted. (WebCore::DisplayList::Save::Save): Deleted. (WebCore::DisplayList::Restore::Restore): Deleted. (WebCore::DisplayList::Translate::Translate): Deleted. (WebCore::DisplayList::Rotate::Rotate): Deleted. (WebCore::DisplayList::Scale::Scale): Deleted. (WebCore::DisplayList::SetCTM::SetCTM): Deleted. (WebCore::DisplayList::ConcatenateCTM::ConcatenateCTM): Deleted. (WebCore::DisplayList::SetInlineFillGradient::create): Deleted. (WebCore::DisplayList::SetInlineFillColor::create): Deleted. (WebCore::DisplayList::SetInlineStrokeColor::create): Deleted. (WebCore::DisplayList::SetStrokeThickness::create): Deleted. (WebCore::DisplayList::SetLineCap::SetLineCap): Deleted. (WebCore::DisplayList::SetLineDash::SetLineDash): Deleted. (WebCore::DisplayList::SetLineJoin::SetLineJoin): Deleted. (WebCore::DisplayList::SetMiterLimit::SetMiterLimit): Deleted. (WebCore::DisplayList::ClearShadow::ClearShadow): Deleted. (WebCore::DisplayList::Clip::Clip): Deleted. (WebCore::DisplayList::ClipOut::ClipOut): Deleted. (WebCore::DisplayList::ClipOutToPath::ClipOutToPath): Deleted. (WebCore::DisplayList::ClipPath::ClipPath): Deleted. (WebCore::DisplayList::ClipToDrawingCommands::ClipToDrawingCommands): Deleted. (WebCore::DisplayList::DrawGlyphs::localBounds const): Deleted. (WebCore::DisplayList::DrawImage::DrawImage): Deleted. (WebCore::DisplayList::DrawTiledImage::DrawTiledImage): Deleted. (WebCore::DisplayList::DrawTiledScaledImage::DrawTiledScaledImage): Deleted. (WebCore::DisplayList::DrawImageBuffer::DrawImageBuffer): Deleted. (WebCore::DisplayList::DrawRect::DrawRect): Deleted. (WebCore::DisplayList::DrawLine::DrawLine): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker): Deleted. (WebCore::DisplayList::DrawEllipse::DrawEllipse): Deleted. (WebCore::DisplayList::DrawPath::DrawPath): Deleted. (WebCore::DisplayList::DrawFocusRingPath::DrawFocusRingPath): Deleted. (WebCore::DisplayList::FillRect::FillRect): Deleted. (WebCore::DisplayList::FillRectWithColor::FillRectWithColor): Deleted. (WebCore::DisplayList::FillCompositedRect::FillCompositedRect): Deleted. (WebCore::DisplayList::FillRoundedRect::FillRoundedRect): Deleted. (WebCore::DisplayList::FillRectWithRoundedHole::FillRectWithRoundedHole): Deleted. (WebCore::DisplayList::FillInlinePath::FillInlinePath): Deleted. (WebCore::DisplayList::FillPath::FillPath): Deleted. (WebCore::DisplayList::FillEllipse::FillEllipse): Deleted. (WebCore::DisplayList::PaintFrameForMedia::create): Deleted. (WebCore::DisplayList::StrokeRect::StrokeRect): Deleted. (WebCore::DisplayList::StrokeEllipse::StrokeEllipse): Deleted. (WebCore::DisplayList::StrokeInlinePath::StrokeInlinePath): Deleted. (WebCore::DisplayList::StrokePath::StrokePath): Deleted. (WebCore::DisplayList::ClearRect::ClearRect): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::BeginTransparencyLayer): Deleted. (WebCore::DisplayList::EndTransparencyLayer::EndTransparencyLayer): Deleted. (WebCore::DisplayList::ApplyStrokePattern::ApplyStrokePattern): Deleted. (WebCore::DisplayList::ApplyFillPattern::ApplyFillPattern): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::ApplyDeviceScaleFactor): Deleted. * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::Save::localBounds const): (WebCore::DisplayList::Save::globalBounds const): (WebCore::DisplayList::Restore::localBounds const): (WebCore::DisplayList::Restore::globalBounds const): (WebCore::DisplayList::Translate::Translate): (WebCore::DisplayList::Translate::localBounds const): (WebCore::DisplayList::Translate::globalBounds const): (WebCore::DisplayList::Rotate::Rotate): (WebCore::DisplayList::Rotate::localBounds const): (WebCore::DisplayList::Rotate::globalBounds const): (WebCore::DisplayList::Scale::Scale): (WebCore::DisplayList::Scale::localBounds const): (WebCore::DisplayList::Scale::globalBounds const): (WebCore::DisplayList::SetCTM::SetCTM): (WebCore::DisplayList::SetCTM::localBounds const): (WebCore::DisplayList::SetCTM::globalBounds const): (WebCore::DisplayList::ConcatenateCTM::ConcatenateCTM): (WebCore::DisplayList::ConcatenateCTM::localBounds const): (WebCore::DisplayList::ConcatenateCTM::globalBounds const): (WebCore::DisplayList::SetInlineFillGradient::localBounds const): (WebCore::DisplayList::SetInlineFillGradient::globalBounds const): (WebCore::DisplayList::SetInlineFillColor::SetInlineFillColor): (WebCore::DisplayList::SetInlineFillColor::color const): (WebCore::DisplayList::SetInlineFillColor::localBounds const): (WebCore::DisplayList::SetInlineFillColor::globalBounds const): (WebCore::DisplayList::SetInlineStrokeColor::SetInlineStrokeColor): (WebCore::DisplayList::SetInlineStrokeColor::color const): (WebCore::DisplayList::SetInlineStrokeColor::localBounds const): (WebCore::DisplayList::SetInlineStrokeColor::globalBounds const): (WebCore::DisplayList::SetStrokeThickness::SetStrokeThickness): (WebCore::DisplayList::SetStrokeThickness::thickness const): (WebCore::DisplayList::SetStrokeThickness::localBounds const): (WebCore::DisplayList::SetStrokeThickness::globalBounds const): (WebCore::DisplayList::SetState::localBounds const): (WebCore::DisplayList::SetState::globalBounds const): (WebCore::DisplayList::SetState::decode): (WebCore::DisplayList::SetLineCap::SetLineCap): (WebCore::DisplayList::SetLineCap::localBounds const): (WebCore::DisplayList::SetLineCap::globalBounds const): (WebCore::DisplayList::SetLineDash::SetLineDash): (WebCore::DisplayList::SetLineDash::localBounds const): (WebCore::DisplayList::SetLineDash::globalBounds const): (WebCore::DisplayList::SetLineDash::decode): (WebCore::DisplayList::SetLineJoin::SetLineJoin): (WebCore::DisplayList::SetLineJoin::localBounds const): (WebCore::DisplayList::SetLineJoin::globalBounds const): (WebCore::DisplayList::SetMiterLimit::SetMiterLimit): (WebCore::DisplayList::SetMiterLimit::localBounds const): (WebCore::DisplayList::SetMiterLimit::globalBounds const): (WebCore::DisplayList::ClearShadow::localBounds const): (WebCore::DisplayList::ClearShadow::globalBounds const): (WebCore::DisplayList::Clip::Clip): (WebCore::DisplayList::Clip::rect const): (WebCore::DisplayList::Clip::localBounds const): (WebCore::DisplayList::Clip::globalBounds const): (WebCore::DisplayList::ClipOut::ClipOut): (WebCore::DisplayList::ClipOut::rect const): (WebCore::DisplayList::ClipOut::localBounds const): (WebCore::DisplayList::ClipOut::globalBounds const): (WebCore::DisplayList::ClipOutToPath::ClipOutToPath): (WebCore::DisplayList::ClipOutToPath::localBounds const): (WebCore::DisplayList::ClipOutToPath::globalBounds const): (WebCore::DisplayList::ClipOutToPath::decode): (WebCore::DisplayList::ClipPath::ClipPath): (WebCore::DisplayList::ClipPath::localBounds const): (WebCore::DisplayList::ClipPath::globalBounds const): (WebCore::DisplayList::ClipPath::decode): (WebCore::DisplayList::ClipToDrawingCommands::ClipToDrawingCommands): (WebCore::DisplayList::ClipToDrawingCommands::localBounds const): (WebCore::DisplayList::ClipToDrawingCommands::globalBounds const): (WebCore::DisplayList::ClipToDrawingCommands::encode const): (WebCore::DisplayList::ClipToDrawingCommands::decode): (WebCore::DisplayList::DrawGlyphs::globalBounds const): (WebCore::DisplayList::DrawGlyphs::localBounds const): (WebCore::DisplayList::DrawGlyphs::encode const): (WebCore::DisplayList::DrawGlyphs::decode): (WebCore::DisplayList::DrawImage::DrawImage): (WebCore::DisplayList::DrawImage::globalBounds const): (WebCore::DisplayList::DrawImage::localBounds const): (WebCore::DisplayList::DrawImage::decode): (WebCore::DisplayList::DrawTiledImage::DrawTiledImage): (WebCore::DisplayList::DrawTiledImage::globalBounds const): (WebCore::DisplayList::DrawTiledImage::localBounds const): (WebCore::DisplayList::DrawTiledImage::decode): (WebCore::DisplayList::DrawTiledScaledImage::DrawTiledScaledImage): (WebCore::DisplayList::DrawTiledScaledImage::globalBounds const): (WebCore::DisplayList::DrawTiledScaledImage::localBounds const): (WebCore::DisplayList::DrawTiledScaledImage::decode): (WebCore::DisplayList::DrawImageBuffer::DrawImageBuffer): (WebCore::DisplayList::DrawImageBuffer::globalBounds const): (WebCore::DisplayList::DrawImageBuffer::localBounds const): (WebCore::DisplayList::DrawImageBuffer::decode): (WebCore::DisplayList::DrawNativeImage::source const): (WebCore::DisplayList::DrawNativeImage::destinationRect const): (WebCore::DisplayList::DrawNativeImage::globalBounds const): (WebCore::DisplayList::DrawNativeImage::localBounds const): (WebCore::DisplayList::DrawNativeImage::decode): (WebCore::DisplayList::DrawPattern::DrawPattern): (WebCore::DisplayList::DrawPattern::globalBounds const): (WebCore::DisplayList::DrawPattern::localBounds const): (WebCore::DisplayList::DrawPattern::decode): (WebCore::DisplayList::BeginTransparencyLayer::BeginTransparencyLayer): (WebCore::DisplayList::BeginTransparencyLayer::localBounds const): (WebCore::DisplayList::BeginTransparencyLayer::globalBounds const): (WebCore::DisplayList::EndTransparencyLayer::localBounds const): (WebCore::DisplayList::EndTransparencyLayer::globalBounds const): (WebCore::DisplayList::DrawRect::DrawRect): (WebCore::DisplayList::DrawRect::globalBounds const): (WebCore::DisplayList::DrawRect::localBounds const): (WebCore::DisplayList::DrawLine::DrawLine): (WebCore::DisplayList::DrawLine::globalBounds const): (WebCore::DisplayList::DrawLinesForText::globalBounds const): (WebCore::DisplayList::DrawLinesForText::decode): (WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker): (WebCore::DisplayList::DrawDotsForDocumentMarker::globalBounds const): (WebCore::DisplayList::DrawEllipse::DrawEllipse): (WebCore::DisplayList::DrawEllipse::rect const): (WebCore::DisplayList::DrawEllipse::globalBounds const): (WebCore::DisplayList::DrawEllipse::localBounds const): (WebCore::DisplayList::DrawPath::DrawPath): (WebCore::DisplayList::DrawPath::globalBounds const): (WebCore::DisplayList::DrawPath::localBounds const): (WebCore::DisplayList::DrawPath::decode): (WebCore::DisplayList::DrawFocusRingPath::DrawFocusRingPath): (WebCore::DisplayList::DrawFocusRingPath::globalBounds const): (WebCore::DisplayList::DrawFocusRingPath::decode): (WebCore::DisplayList::DrawFocusRingRects::globalBounds const): (WebCore::DisplayList::DrawFocusRingRects::decode): (WebCore::DisplayList::FillRect::FillRect): (WebCore::DisplayList::FillRect::rect const): (WebCore::DisplayList::FillRect::globalBounds const): (WebCore::DisplayList::FillRect::localBounds const): (WebCore::DisplayList::FillRectWithColor::FillRectWithColor): (WebCore::DisplayList::FillRectWithColor::globalBounds const): (WebCore::DisplayList::FillRectWithColor::localBounds const): (WebCore::DisplayList::FillRectWithColor::decode): (WebCore::DisplayList::FillRectWithGradient::rect const): (WebCore::DisplayList::FillRectWithGradient::gradient const): (WebCore::DisplayList::FillRectWithGradient::globalBounds const): (WebCore::DisplayList::FillRectWithGradient::localBounds const): (WebCore::DisplayList::FillRectWithGradient::decode): (WebCore::DisplayList::FillCompositedRect::FillCompositedRect): (WebCore::DisplayList::FillCompositedRect::globalBounds const): (WebCore::DisplayList::FillCompositedRect::localBounds const): (WebCore::DisplayList::FillCompositedRect::decode): (WebCore::DisplayList::FillRoundedRect::FillRoundedRect): (WebCore::DisplayList::FillRoundedRect::globalBounds const): (WebCore::DisplayList::FillRoundedRect::localBounds const): (WebCore::DisplayList::FillRoundedRect::decode): (WebCore::DisplayList::FillRectWithRoundedHole::FillRectWithRoundedHole): (WebCore::DisplayList::FillRectWithRoundedHole::globalBounds const): (WebCore::DisplayList::FillRectWithRoundedHole::localBounds const): (WebCore::DisplayList::FillRectWithRoundedHole::decode): (WebCore::DisplayList::FillInlinePath::FillInlinePath): (WebCore::DisplayList::FillInlinePath::globalBounds const): (WebCore::DisplayList::FillInlinePath::localBounds const): (WebCore::DisplayList::FillPath::FillPath): (WebCore::DisplayList::FillPath::globalBounds const): (WebCore::DisplayList::FillPath::localBounds const): (WebCore::DisplayList::FillPath::decode): (WebCore::DisplayList::FillEllipse::FillEllipse): (WebCore::DisplayList::FillEllipse::globalBounds const): (WebCore::DisplayList::FillEllipse::localBounds const): (WebCore::DisplayList::PutImageData::imageData const): (WebCore::DisplayList::PutImageData::localBounds const): (WebCore::DisplayList::PutImageData::globalBounds const): (WebCore::DisplayList::PutImageData::encode const): (WebCore::DisplayList::PutImageData::decode): (WebCore::DisplayList::PaintFrameForMedia::localBounds const): (WebCore::DisplayList::PaintFrameForMedia::globalBounds const): (WebCore::DisplayList::StrokeRect::StrokeRect): (WebCore::DisplayList::StrokeRect::globalBounds const): (WebCore::DisplayList::StrokeInlinePath::StrokeInlinePath): (WebCore::DisplayList::StrokeInlinePath::globalBounds const): (WebCore::DisplayList::StrokePath::StrokePath): (WebCore::DisplayList::StrokePath::globalBounds const): (WebCore::DisplayList::StrokePath::decode): (WebCore::DisplayList::StrokeEllipse::StrokeEllipse): (WebCore::DisplayList::StrokeEllipse::rect const): (WebCore::DisplayList::StrokeEllipse::globalBounds const): (WebCore::DisplayList::ClearRect::ClearRect): (WebCore::DisplayList::ClearRect::rect const): (WebCore::DisplayList::ClearRect::globalBounds const): (WebCore::DisplayList::ClearRect::localBounds const): (WebCore::DisplayList::ApplyStrokePattern::localBounds const): (WebCore::DisplayList::ApplyStrokePattern::globalBounds const): (WebCore::DisplayList::ApplyFillPattern::localBounds const): (WebCore::DisplayList::ApplyFillPattern::globalBounds const): (WebCore::DisplayList::ApplyDeviceScaleFactor::ApplyDeviceScaleFactor): (WebCore::DisplayList::ApplyDeviceScaleFactor::localBounds const): (WebCore::DisplayList::ApplyDeviceScaleFactor::globalBounds const): (WebCore::DisplayList::DrawingItem::setExtent): Deleted. (WebCore::DisplayList::DrawingItem::extent const): Deleted. (WebCore::DisplayList::DrawingItem::extentKnown const): Deleted. (WebCore::DisplayList::DrawingItem::localBounds const): Deleted. (WebCore::DisplayList::DrawingItem::globalBounds const): Deleted. (WebCore::DisplayList::Save::create): Deleted. (WebCore::DisplayList::Save::encode const): Deleted. (WebCore::DisplayList::Save::decode): Deleted. (WebCore::DisplayList::Restore::create): Deleted. (WebCore::DisplayList::Restore::encode const): Deleted. (WebCore::DisplayList::Restore::decode): Deleted. (WebCore::DisplayList::Translate::create): Deleted. (WebCore::DisplayList::Translate::encode const): Deleted. (WebCore::DisplayList::Translate::decode): Deleted. (WebCore::DisplayList::Rotate::create): Deleted. (WebCore::DisplayList::Rotate::encode const): Deleted. (WebCore::DisplayList::Rotate::decode): Deleted. (WebCore::DisplayList::Scale::create): Deleted. (WebCore::DisplayList::Scale::encode const): Deleted. (WebCore::DisplayList::Scale::decode): Deleted. (WebCore::DisplayList::SetCTM::create): Deleted. (WebCore::DisplayList::SetCTM::encode const): Deleted. (WebCore::DisplayList::SetCTM::decode): Deleted. (WebCore::DisplayList::ConcatenateCTM::create): Deleted. (WebCore::DisplayList::ConcatenateCTM::encode const): Deleted. (WebCore::DisplayList::ConcatenateCTM::decode): Deleted. (WebCore::DisplayList::SetInlineFillGradient::create): Deleted. (WebCore::DisplayList::SetInlineFillGradient::encode const): Deleted. (WebCore::DisplayList::SetInlineFillGradient::decode): Deleted. (WebCore::DisplayList::SetInlineFillColor::encode const): Deleted. (WebCore::DisplayList::SetInlineFillColor::decode): Deleted. (WebCore::DisplayList::SetInlineStrokeColor::encode const): Deleted. (WebCore::DisplayList::SetInlineStrokeColor::decode): Deleted. (WebCore::DisplayList::SetStrokeThickness::encode const): Deleted. (WebCore::DisplayList::SetStrokeThickness::decode): Deleted. (WebCore::DisplayList::SetState::create): Deleted. (WebCore::DisplayList::SetLineCap::create): Deleted. (WebCore::DisplayList::SetLineCap::encode const): Deleted. (WebCore::DisplayList::SetLineCap::decode): Deleted. (WebCore::DisplayList::SetLineDash::create): Deleted. (WebCore::DisplayList::SetLineJoin::create): Deleted. (WebCore::DisplayList::SetLineJoin::encode const): Deleted. (WebCore::DisplayList::SetLineJoin::decode): Deleted. (WebCore::DisplayList::SetMiterLimit::create): Deleted. (WebCore::DisplayList::SetMiterLimit::encode const): Deleted. (WebCore::DisplayList::SetMiterLimit::decode): Deleted. (WebCore::DisplayList::ClearShadow::create): Deleted. (WebCore::DisplayList::ClearShadow::encode const): Deleted. (WebCore::DisplayList::ClearShadow::decode): Deleted. (WebCore::DisplayList::Clip::create): Deleted. (WebCore::DisplayList::Clip::encode const): Deleted. (WebCore::DisplayList::Clip::decode): Deleted. (WebCore::DisplayList::ClipOut::create): Deleted. (WebCore::DisplayList::ClipOut::encode const): Deleted. (WebCore::DisplayList::ClipOut::decode): Deleted. (WebCore::DisplayList::ClipOutToPath::create): Deleted. (WebCore::DisplayList::ClipPath::create): Deleted. (WebCore::DisplayList::ClipToDrawingCommands::create): Deleted. (WebCore::DisplayList::DrawGlyphs::create): Deleted. (WebCore::DisplayList::DrawImage::create): Deleted. (WebCore::DisplayList::DrawTiledImage::create): Deleted. (WebCore::DisplayList::DrawTiledScaledImage::create): Deleted. (WebCore::DisplayList::DrawImageBuffer::create): Deleted. (WebCore::DisplayList::DrawNativeImage::create): Deleted. (WebCore::DisplayList::DrawPattern::create): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::create): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::encode const): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::decode): Deleted. (WebCore::DisplayList::EndTransparencyLayer::create): Deleted. (WebCore::DisplayList::EndTransparencyLayer::encode const): Deleted. (WebCore::DisplayList::EndTransparencyLayer::decode): Deleted. (WebCore::DisplayList::DrawRect::create): Deleted. (WebCore::DisplayList::DrawRect::encode const): Deleted. (WebCore::DisplayList::DrawRect::decode): Deleted. (WebCore::DisplayList::DrawLine::create): Deleted. (WebCore::DisplayList::DrawLine::encode const): Deleted. (WebCore::DisplayList::DrawLine::decode): Deleted. (WebCore::DisplayList::DrawLinesForText::create): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::create): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::encode const): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::decode): Deleted. (WebCore::DisplayList::DrawEllipse::create): Deleted. (WebCore::DisplayList::DrawEllipse::encode const): Deleted. (WebCore::DisplayList::DrawEllipse::decode): Deleted. (WebCore::DisplayList::DrawPath::create): Deleted. (WebCore::DisplayList::DrawFocusRingPath::create): Deleted. (WebCore::DisplayList::DrawFocusRingRects::create): Deleted. (WebCore::DisplayList::FillRect::create): Deleted. (WebCore::DisplayList::FillRect::encode const): Deleted. (WebCore::DisplayList::FillRect::decode): Deleted. (WebCore::DisplayList::FillRectWithColor::create): Deleted. (WebCore::DisplayList::FillRectWithGradient::create): Deleted. (WebCore::DisplayList::FillCompositedRect::create): Deleted. (WebCore::DisplayList::FillRoundedRect::create): Deleted. (WebCore::DisplayList::FillRectWithRoundedHole::create): Deleted. (WebCore::DisplayList::FillInlinePath::create): Deleted. (WebCore::DisplayList::FillInlinePath::encode const): Deleted. (WebCore::DisplayList::FillInlinePath::decode): Deleted. (WebCore::DisplayList::FillPath::create): Deleted. (WebCore::DisplayList::FillEllipse::create): Deleted. (WebCore::DisplayList::FillEllipse::encode const): Deleted. (WebCore::DisplayList::FillEllipse::decode): Deleted. (WebCore::DisplayList::PutImageData::create): Deleted. (WebCore::DisplayList::PaintFrameForMedia::encode const): Deleted. (WebCore::DisplayList::PaintFrameForMedia::decode): Deleted. (WebCore::DisplayList::StrokeRect::create): Deleted. (WebCore::DisplayList::StrokeRect::encode const): Deleted. (WebCore::DisplayList::StrokeRect::decode): Deleted. (WebCore::DisplayList::StrokeInlinePath::create): Deleted. (WebCore::DisplayList::StrokeInlinePath::encode const): Deleted. (WebCore::DisplayList::StrokeInlinePath::decode): Deleted. (WebCore::DisplayList::StrokePath::create): Deleted. (WebCore::DisplayList::StrokeEllipse::create): Deleted. (WebCore::DisplayList::StrokeEllipse::encode const): Deleted. (WebCore::DisplayList::StrokeEllipse::decode): Deleted. (WebCore::DisplayList::ClearRect::create): Deleted. (WebCore::DisplayList::ClearRect::encode const): Deleted. (WebCore::DisplayList::ClearRect::decode): Deleted. (WebCore::DisplayList::ApplyStrokePattern::create): Deleted. (WebCore::DisplayList::ApplyStrokePattern::encode const): Deleted. (WebCore::DisplayList::ApplyStrokePattern::decode): Deleted. (WebCore::DisplayList::ApplyFillPattern::create): Deleted. (WebCore::DisplayList::ApplyFillPattern::encode const): Deleted. (WebCore::DisplayList::ApplyFillPattern::decode): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::create): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::encode const): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::decode): Deleted. (WebCore::DisplayList::Item::encode const): Deleted. (WebCore::DisplayList::Item::decode): Deleted. Delete the generic `Item::encode` and `Item::decode` methods, since only out-of-line display list items have encode and decode functions now. * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::putImageData): (WebCore::DisplayList::Recorder::appendStateChangeItem): (WebCore::DisplayList::Recorder::clearShadow): (WebCore::DisplayList::Recorder::setLineCap): (WebCore::DisplayList::Recorder::setLineDash): (WebCore::DisplayList::Recorder::setLineJoin): (WebCore::DisplayList::Recorder::setMiterLimit): (WebCore::DisplayList::Recorder::drawImage): (WebCore::DisplayList::Recorder::drawTiledImage): (WebCore::DisplayList::Recorder::drawImageBuffer): (WebCore::DisplayList::Recorder::drawNativeImage): (WebCore::DisplayList::Recorder::drawPattern): (WebCore::DisplayList::Recorder::save): (WebCore::DisplayList::Recorder::restore): (WebCore::DisplayList::Recorder::translate): (WebCore::DisplayList::Recorder::rotate): (WebCore::DisplayList::Recorder::scale): (WebCore::DisplayList::Recorder::concatCTM): (WebCore::DisplayList::Recorder::setCTM): (WebCore::DisplayList::Recorder::beginTransparencyLayer): (WebCore::DisplayList::Recorder::endTransparencyLayer): (WebCore::DisplayList::Recorder::drawRect): (WebCore::DisplayList::Recorder::drawLine): (WebCore::DisplayList::Recorder::drawLinesForText): (WebCore::DisplayList::Recorder::drawDotsForDocumentMarker): (WebCore::DisplayList::Recorder::drawEllipse): (WebCore::DisplayList::Recorder::drawPath): (WebCore::DisplayList::Recorder::drawFocusRing): (WebCore::DisplayList::Recorder::fillRect): (WebCore::DisplayList::Recorder::fillRoundedRect): (WebCore::DisplayList::Recorder::fillRectWithRoundedHole): (WebCore::DisplayList::Recorder::fillPath): (WebCore::DisplayList::Recorder::fillEllipse): (WebCore::DisplayList::Recorder::strokeRect): (WebCore::DisplayList::Recorder::strokePath): (WebCore::DisplayList::Recorder::strokeEllipse): (WebCore::DisplayList::Recorder::clearRect): (WebCore::DisplayList::Recorder::applyStrokePattern): (WebCore::DisplayList::Recorder::applyFillPattern): (WebCore::DisplayList::Recorder::clip): (WebCore::DisplayList::Recorder::clipOut): (WebCore::DisplayList::Recorder::clipPath): (WebCore::DisplayList::Recorder::clipToDrawingCommands): (WebCore::DisplayList::Recorder::paintFrameForMedia): (WebCore::DisplayList::Recorder::applyDeviceScaleFactor): Change these methods that append display list items en masse, such that they go from this: `m_displayList.append(Foo::create(arg1, arg2, arg3));` ...to this: `m_displayList.append<Foo>(arg1, arg2, arg3);` (WebCore::DisplayList::Recorder::extentFromLocalBounds const): (WebCore::DisplayList::Recorder::appendItemAndUpdateExtent): Deleted. (WebCore::DisplayList::Recorder::appendItem): Deleted. (WebCore::DisplayList::Recorder::updateItemExtent const): Deleted. Extents are now automatically updated (unless otherwise specified) for any drawing items that are appended. * platform/graphics/displaylists/DisplayListRecorder.h: (WebCore::DisplayList::Recorder::append): * platform/graphics/displaylists/DisplayListReplayer.cpp: (WebCore::DisplayList::Replayer::replay): * platform/graphics/displaylists/DisplayListReplayer.h: (WebCore::DisplayList::Replayer::Delegate::apply): Source/WebKit: Adjust for changes to display lists and display list items in WebCore (see Source/WebCore/ChangeLog for more information). In particular, we implement the reading and writing client hooks consulted by ItemBuffer, and we also add a temporary mechanism that allows RemoteRenderingBackendProxy (in the web process) to send display list item data through shared memory to the RemoteRenderingBackend (in the GPU process). This temporary mechanism does not attempt to make any reading or writing in shared memory concurrent between the GPU and web processes, and exists only to make sure that rendering with the GPU process still works using these new display list items. In the next patch, I will add a simple concurrent reader/writer model for display list processing between the web and GPU processes, and (in doing so) revert most of the changes in `RemoteRenderingBackend` and `RemoteRenderingBackendProxy` below. See comments below for more detail. * GPUProcess/graphics/RemoteImageBuffer.h: (WebKit::RemoteImageBuffer::decodeAndCreate): * GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::applyResourceItem): (WebKit::RemoteRenderingBackend::applyMediaItem): Refactor these to take `WebCore::DisplayList::ItemHandle`. (WebKit::RemoteRenderingBackend::applyDisplayList): (WebKit::RemoteRenderingBackend::flushDisplayList): (WebKit::RemoteRenderingBackend::flushDisplayListAndCommit): (WebKit::RemoteRenderingBackend::didCreateSharedItemData): * GPUProcess/graphics/RemoteRenderingBackend.h: * GPUProcess/graphics/RemoteRenderingBackend.messages.in: * Scripts/webkit/messages.py: * Shared/SharedDisplayListHandle.cpp: Added. (WebKit::SharedDisplayListHandle::SharedDisplayListHandle): (WebKit::SharedDisplayListHandle::createDisplayList const): * Shared/SharedDisplayListHandle.h: Added. Add a WebKit2 helper class that represents display list data in shared memory that is propagated from the web process to the GPU process. In the next patch, this class will be rewritten to support concurrent display list reading and writing, with specialized subclasses in service of both the reader (i.e. the GPU process) and the writer (i.e. the web process). (WebKit::SharedDisplayListHandle::SharedDisplayListHandle): (WebKit::SharedDisplayListHandle::encode const): (WebKit::SharedDisplayListHandle::decode): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::RemoteImageBufferProxy): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::flushDisplayList): (WebKit::RemoteRenderingBackendProxy::flushDisplayListAndCommit): (WebKit::RemoteRenderingBackendProxy::createItemBuffer): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in: * WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp: LayoutTests: Rebaseline several existing (non-GPU-process) display list tests to account for a slight tweak in the format in which display lists are dumped as text. More specifically, drawing item extents are now dumped after each drawing item, rather than before. * displaylists/canvas-display-list-expected.txt: * displaylists/extent-includes-shadow-expected.txt: * displaylists/extent-includes-transforms-expected.txt: * displaylists/layer-dispay-list-expected.txt: * displaylists/replay-skip-clipped-rect-expected.txt: Canonical link: https://commits.webkit.org/231320@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-06 18:54:52 +00:00
platform/graphics/displaylists/DisplayListItemBuffer.h
platform/graphics/displaylists/DisplayListItemBufferIdentifier.h
Replace DisplayList::Recorder::Delegate::(will|did)AppendItem with (will|did)AppendItemOfType https://bugs.webkit.org/show_bug.cgi?id=218518 Reviewed by Simon Fraser. Source/WebCore: In preparation for larger changes to display lists and display list items in <webkit.org/b/218406>, replace `DisplayList::Recorder::Delegate`'s `willAppendItem` and `didAppendItem` client hooks with `willAppendItemOfType` and `didAppendItemOfType` instead. Once all display list items are no longer ref-counted objects that inherit from `DisplayList::Item`, plumbing these items through virtual client hooks will introduce unnecessary complexity and runtime overhead. Instead, we can refactor these methods to only pass the type of the display list item being appended; this is because all extant clients that implement these hooks only require the item for its `ItemType`. * Headers.cmake: Pull `DisplayList::ItemType` out into a separate header: `DisplayListItemType.h`. This header additionally contains several helper functions (`sizeOfItemInBytes`, `isInlineItem`, and `isDrawingItem`) that operate only on `ItemType`s, rather than items themselves. We will use these helper functions as we work towards <webkit.org/b/218406>. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/displaylists/DisplayList.h: * platform/graphics/displaylists/DisplayListItemType.cpp: Added. (WebCore::DisplayList::sizeOfItemInBytes): (WebCore::DisplayList::isDrawingItem): (WebCore::DisplayList::isInlineItem): * platform/graphics/displaylists/DisplayListItemType.h: Added. * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::willAppendItemOfType): Use the new `DisplayList::isDrawingItem(ItemType)` function here, instead of checking whether the item is a subclass of `DrawingItem`. (WebCore::DisplayList::Recorder::didAppendItemOfType): (WebCore::DisplayList::Recorder::appendItem): (WebCore::DisplayList::Recorder::willAppendItem): Deleted. (WebCore::DisplayList::Recorder::didAppendItem): Deleted. * platform/graphics/displaylists/DisplayListRecorder.h: (WebCore::DisplayList::Recorder::Delegate::willAppendItemOfType): (WebCore::DisplayList::Recorder::Delegate::didAppendItemOfType): (WebCore::DisplayList::Recorder::Delegate::willAppendItem): Deleted. (WebCore::DisplayList::Recorder::Delegate::didAppendItem): Deleted. Source/WebKit: See WebCore ChangeLog for more information. * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: Canonical link: https://commits.webkit.org/231177@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-03 21:08:38 +00:00
platform/graphics/displaylists/DisplayListItemType.h
Implement encoding for DrawImage and DrawRoundedRect display list items https://bugs.webkit.org/show_bug.cgi?id=204881 Reviewed by Simon Fraser. Source/WebCore: Make InterpolationQuality an enum class. Make ImagePaintingOptions and all of its children encodable. Make DrawImage and DrawRoundedRect encodable. Add ImageHandle, which right now just wraps WebCore::Image, but later could carry identifiers. This allows us to implement image encoding in WebKit code, which can then use ShareableBitmap to A) decode the image in the Web Content process and B) use shared memory to transmit the decoded image data to the GPU process. * html/CanvasBase.cpp: * html/ImageBitmap.cpp: (WebCore::interpolationQualityForResizeQuality): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::smoothingToInterpolationQuality): (WebCore::CanvasRenderingContext2DBase::setImageSmoothingEnabled): * platform/graphics/DecodingOptions.h: * platform/graphics/GraphicsContext.h: (WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer): * platform/graphics/GraphicsTypes.h: * platform/graphics/ImageOrientation.h: * platform/graphics/ImagePaintingOptions.h: (WebCore::ImagePaintingOptions::ImagePaintingOptions): (WebCore::ImagePaintingOptions::encode const): (WebCore::ImagePaintingOptions::decode): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::paint): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator): * platform/graphics/cairo/CairoOperations.cpp: (WebCore::Cairo::drawSurface): * platform/graphics/cg/GraphicsContext3DCG.cpp: (WebCore::GraphicsContext3D::paintToCanvas): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::convertInterpolationQuality): (WebCore::GraphicsContext::setPlatformImageInterpolationQuality): * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::FillRoundedRect::FillRoundedRect): * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::DrawImage::encode const): (WebCore::DisplayList::DrawImage::decode): (WebCore::DisplayList::FillRoundedRect::create): (WebCore::DisplayList::FillRoundedRect::encode const): (WebCore::DisplayList::FillRoundedRect::decode): (WebCore::DisplayList::Item::encode const): (WebCore::DisplayList::Item::decode): (WebCore::DisplayList::FillRoundedRect::FillRoundedRect): Deleted. * platform/graphics/ios/IconIOS.mm: (WebCore::Icon::paint): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::setPlatformImageInterpolationQuality): * platform/ios/wak/WAKView.mm: (toCGInterpolationQuality): * platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::imageBuffer const): * rendering/ImageQualityController.cpp: (WebCore::ImageQualityController::interpolationQualityFromStyle): (WebCore::ImageQualityController::chooseInterpolationQuality): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintIntoRect): Source/WebKit: * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<DisplayList::ImageHandle>::encode): (IPC::ArgumentCoder<DisplayList::ImageHandle>::decode): * Shared/WebCoreArgumentCoders.h: Source/WebKitLegacy/mac: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): Canonical link: https://commits.webkit.org/218196@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-07 13:30:16 +00:00
platform/graphics/displaylists/DisplayListItems.h
[GPU Process] Simplify DisplayList::Iterator part 4: Move DisplayList::Iterator to its own .h/.cpp files https://bugs.webkit.org/show_bug.cgi?id=224146 Reviewed by Wenson Hsieh. Source/WebCore: This doesn't actually change any lines of code; it just moves code into different files. This patch isn't strictly necessary, but I think it helps, because the iterator contains a non-trivial amount of logic. No new tests because there is no behavior change. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/displaylists/DisplayList.cpp: (WebCore::DisplayList::DisplayList::begin const): (WebCore::DisplayList::DisplayList::end const): (WebCore::DisplayList::DisplayList::iterator::atEnd const): Deleted. (WebCore::DisplayList::DisplayList::iterator::updateCurrentDrawingItemExtent): Deleted. (WebCore::DisplayList::DisplayList::iterator::updateCurrentItem): Deleted. (WebCore::DisplayList::DisplayList::iterator::advance): Deleted. (WebCore::DisplayList::DisplayList::iterator::clearCurrentItem): Deleted. (WebCore::DisplayList::DisplayList::iterator::moveToEnd): Deleted. (WebCore::DisplayList::DisplayList::iterator::moveCursorToStartOfCurrentBuffer): Deleted. * platform/graphics/displaylists/DisplayList.h: (WebCore::DisplayList::DisplayList::iterator::iterator): Deleted. (WebCore::DisplayList::DisplayList::iterator::~iterator): Deleted. (WebCore::DisplayList::DisplayList::iterator::operator==): Deleted. (WebCore::DisplayList::DisplayList::iterator::operator!=): Deleted. (WebCore::DisplayList::DisplayList::iterator::operator++): Deleted. (WebCore::DisplayList::DisplayList::iterator::operator* const): Deleted. (WebCore::DisplayList::DisplayList::iterator::itemBuffer const): Deleted. (WebCore::DisplayList::DisplayList::begin const): Deleted. (WebCore::DisplayList::DisplayList::end const): Deleted. * platform/graphics/displaylists/DisplayListIterator.cpp: Added. (WebCore::DisplayList::DisplayList::Iterator::atEnd const): (WebCore::DisplayList::DisplayList::Iterator::updateCurrentDrawingItemExtent): (WebCore::DisplayList::DisplayList::Iterator::updateCurrentItem): (WebCore::DisplayList::DisplayList::Iterator::advance): (WebCore::DisplayList::DisplayList::Iterator::clearCurrentItem): (WebCore::DisplayList::DisplayList::Iterator::moveToEnd): (WebCore::DisplayList::DisplayList::Iterator::moveCursorToStartOfCurrentBuffer): * platform/graphics/displaylists/DisplayListIterator.h: Added. (WebCore::DisplayList::DisplayList::Iterator::Iterator): (WebCore::DisplayList::DisplayList::Iterator::~Iterator): (WebCore::DisplayList::DisplayList::Iterator::operator==): (WebCore::DisplayList::DisplayList::Iterator::operator!=): (WebCore::DisplayList::DisplayList::Iterator::operator++): (WebCore::DisplayList::DisplayList::Iterator::operator* const): (WebCore::DisplayList::DisplayList::Iterator::itemBuffer const): * platform/graphics/displaylists/DisplayListReplayer.cpp: Tools: * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: Canonical link: https://commits.webkit.org/236487@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-14 02:57:52 +00:00
platform/graphics/displaylists/DisplayListIterator.h
[GPU Process] Work towards compiling out on non-Cocoa ports https://bugs.webkit.org/show_bug.cgi?id=208899 Reviewed by Darin Adler. Source/WebCore: Add in additional headers required for GPU Process build. * Headers.cmake: Source/WebKit: Work through some compilation issues on non-Cocoa ports when attempting to build out the GPU Process. Fix platform guards for some methods. Fix compilation issues for non-unified builds. Add in CMake listing of messages.in and include directories required for building with ENABLE_GPU_PROCESS. * CMakeLists.txt: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::didClose): * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/GPUProcess.cpp: * GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h: * GPUProcess/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::create): * GPUProcess/graphics/RemoteRenderingBackendProxy.cpp: * GPUProcess/graphics/RemoteRenderingBackendProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::getConfiguration): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity): (WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode): (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged): (WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged): (WebKit::RemoteMediaPlayerProxy::notifyTrackModeChanged): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * UIProcess/GPU/GPUProcessProxy.h: * WebProcess/GPU/GPUProcessConnection.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h: * WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h: * WebProcess/GPU/graphics/RemoteRenderingBackend.cpp: * WebProcess/GPU/media/AudioTrackPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: * WebProcess/GPU/media/TextTrackPrivateRemote.h: Canonical link: https://commits.webkit.org/221833@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-11 05:44:47 +00:00
platform/graphics/displaylists/DisplayListRecorder.h
platform/graphics/displaylists/DisplayListReplayer.h
[GPU Process] Simplify DisplayList::Iterator part 1: Require encoding/decoding delegates for non-inline display list items https://bugs.webkit.org/show_bug.cgi?id=223849 Reviewed by Wenson Hsieh. Source/WebCore: Requiring delegates for non-inline display list items has these advantages: - DisplayList::Iterator::updateCurrentItem() only has 2 codepaths instead of 3. - ItemBuffer::m_itemsToDestroyInAllocatedBuffers can be deleted entirely. - The conditional inside ItemBuffer::append() can be simplified from !T::isInlineItem && m_writingClient to just !T::isInlineItem, which I think makes the function significantly more readable. There are a few places where we were using non-inline display list items without a delegate: This patch adds two new "null" delegates, and hooks them up to a subclass of DisplayList, called InMemoryDisplayList. Clients who want to use in-memory display lists (like the DrawGlyphs cache) can just use this class, and retain their calling pattern they were using before. Also, this patch adds InMemoryDisplayList without adding any virtual functions to DisplayList. No new tests because there is no behavior change. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLCanvasElement.cpp: * platform/graphics/FontCascade.cpp: (WebCore::FontCascade::displayListForTextRun const): * platform/graphics/FontCascade.h: (WebCore::FontCascade::displayListForTextRun): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): (WebCore::GraphicsLayerCA::platformCALayerPaintContents): * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/displaylists/DisplayList.cpp: (WebCore::DisplayList::DisplayList::iterator::updateCurrentItem): * platform/graphics/displaylists/DisplayListDrawingContext.h: (WebCore::DisplayList::DrawingContext::replayedDisplayList const): * platform/graphics/displaylists/DisplayListImageBuffer.h: (WebCore::DisplayList::ImageBuffer::ImageBuffer): * platform/graphics/displaylists/DisplayListItemBuffer.cpp: (WebCore::DisplayList::copyInto): (WebCore::DisplayList::ItemBuffer::ItemBuffer): (WebCore::DisplayList::ItemBuffer::operator=): (WebCore::DisplayList::ItemBuffer::clear): (WebCore::DisplayList::ItemBuffer::append): (WebCore::DisplayList::m_allocatedBuffers): Deleted. * platform/graphics/displaylists/DisplayListItemBuffer.h: (WebCore::DisplayList::ItemHandle::get const): (WebCore::DisplayList::ItemBufferWritingClient::~ItemBufferWritingClient): (WebCore::DisplayList::ItemBufferWritingClient::createItemBuffer): (WebCore::DisplayList::ItemBufferWritingClient::requiredSizeForItem const): (WebCore::DisplayList::ItemBufferWritingClient::encodeItemOutOfLine const): (WebCore::DisplayList::ItemBufferWritingClient::encodeItemInline const): (WebCore::DisplayList::ItemBufferWritingClient::didAppendData): (WebCore::DisplayList::ItemBuffer::append): * platform/graphics/displaylists/DisplayListReplayer.cpp: (WebCore::DisplayList::Replayer::replay): * platform/graphics/displaylists/DisplayListReplayer.h: * platform/graphics/displaylists/InMemoryDisplayList.cpp: Added. (WebCore::DisplayList::InMemoryDisplayList::WritingClient::requiredSizeForItem const): (WebCore::DisplayList::InMemoryDisplayList::WritingClient::encodeItemInline const): (WebCore::DisplayList::InMemoryDisplayList::ReadingClient::decodeItem): (WebCore::DisplayList::InMemoryDisplayList::InMemoryDisplayList): (WebCore::DisplayList::InMemoryDisplayList::~InMemoryDisplayList): * platform/graphics/displaylists/InMemoryDisplayList.h: Copied from Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.h. * rendering/GlyphDisplayListCache.h: Source/WebKit: * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: Tools: * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: Canonical link: https://commits.webkit.org/236119@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-06 00:22:02 +00:00
platform/graphics/displaylists/InMemoryDisplayList.h
Implement encoding for DrawImage and DrawRoundedRect display list items https://bugs.webkit.org/show_bug.cgi?id=204881 Reviewed by Simon Fraser. Source/WebCore: Make InterpolationQuality an enum class. Make ImagePaintingOptions and all of its children encodable. Make DrawImage and DrawRoundedRect encodable. Add ImageHandle, which right now just wraps WebCore::Image, but later could carry identifiers. This allows us to implement image encoding in WebKit code, which can then use ShareableBitmap to A) decode the image in the Web Content process and B) use shared memory to transmit the decoded image data to the GPU process. * html/CanvasBase.cpp: * html/ImageBitmap.cpp: (WebCore::interpolationQualityForResizeQuality): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::smoothingToInterpolationQuality): (WebCore::CanvasRenderingContext2DBase::setImageSmoothingEnabled): * platform/graphics/DecodingOptions.h: * platform/graphics/GraphicsContext.h: (WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer): * platform/graphics/GraphicsTypes.h: * platform/graphics/ImageOrientation.h: * platform/graphics/ImagePaintingOptions.h: (WebCore::ImagePaintingOptions::ImagePaintingOptions): (WebCore::ImagePaintingOptions::encode const): (WebCore::ImagePaintingOptions::decode): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::paint): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator): * platform/graphics/cairo/CairoOperations.cpp: (WebCore::Cairo::drawSurface): * platform/graphics/cg/GraphicsContext3DCG.cpp: (WebCore::GraphicsContext3D::paintToCanvas): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::convertInterpolationQuality): (WebCore::GraphicsContext::setPlatformImageInterpolationQuality): * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::FillRoundedRect::FillRoundedRect): * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::DrawImage::encode const): (WebCore::DisplayList::DrawImage::decode): (WebCore::DisplayList::FillRoundedRect::create): (WebCore::DisplayList::FillRoundedRect::encode const): (WebCore::DisplayList::FillRoundedRect::decode): (WebCore::DisplayList::Item::encode const): (WebCore::DisplayList::Item::decode): (WebCore::DisplayList::FillRoundedRect::FillRoundedRect): Deleted. * platform/graphics/ios/IconIOS.mm: (WebCore::Icon::paint): * platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::setPlatformImageInterpolationQuality): * platform/ios/wak/WAKView.mm: (toCGInterpolationQuality): * platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::imageBuffer const): * rendering/ImageQualityController.cpp: (WebCore::ImageQualityController::interpolationQualityFromStyle): (WebCore::ImageQualityController::chooseInterpolationQuality): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintIntoRect): Source/WebKit: * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<DisplayList::ImageHandle>::encode): (IPC::ArgumentCoder<DisplayList::ImageHandle>::decode): * Shared/WebCoreArgumentCoders.h: Source/WebKitLegacy/mac: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): Canonical link: https://commits.webkit.org/218196@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-07 13:30:16 +00:00
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/cv/ImageTransferSessionVT.h
platform/graphics/filters/FilterOperation.h
platform/graphics/filters/FilterOperations.h
platform/graphics/iso/ISOBox.h
platform/graphics/iso/ISOOriginalFormatBox.h
platform/graphics/iso/ISOProtectionSchemeInfoBox.h
platform/graphics/iso/ISOSchemeInformationBox.h
platform/graphics/iso/ISOSchemeTypeBox.h
platform/graphics/iso/ISOTrackEncryptionBox.h
[GPU Process] Work towards compiling out on non-Cocoa ports https://bugs.webkit.org/show_bug.cgi?id=208899 Reviewed by Darin Adler. Source/WebCore: Add in additional headers required for GPU Process build. * Headers.cmake: Source/WebKit: Work through some compilation issues on non-Cocoa ports when attempting to build out the GPU Process. Fix platform guards for some methods. Fix compilation issues for non-unified builds. Add in CMake listing of messages.in and include directories required for building with ENABLE_GPU_PROCESS. * CMakeLists.txt: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::didClose): * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/GPUProcess.cpp: * GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h: * GPUProcess/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::create): * GPUProcess/graphics/RemoteRenderingBackendProxy.cpp: * GPUProcess/graphics/RemoteRenderingBackendProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::getConfiguration): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity): (WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage): (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode): (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged): (WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged): (WebKit::RemoteMediaPlayerProxy::notifyTrackModeChanged): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * UIProcess/GPU/GPUProcessProxy.h: * WebProcess/GPU/GPUProcessConnection.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h: * WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h: * WebProcess/GPU/graphics/RemoteRenderingBackend.cpp: * WebProcess/GPU/media/AudioTrackPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: * WebProcess/GPU/media/TextTrackPrivateRemote.h: Canonical link: https://commits.webkit.org/221833@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-11 05:44:47 +00:00
platform/graphics/iso/ISOVTTCue.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/libwpe/PlatformDisplayLibWPE.h
Rename GraphicsContext3D to GraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=205778 <rdar://problem/58327597> Reviewed by Sam Weinig. Rename all the GraphicsContext3D things to GraphicsContextGL (includes Extensions3D and GRAPHICS_CONTEXT_3D). GraphicsContext3DBase now becomes GraphicsContextGL. GraphicsContext3D is now GraphicsContextGLOpenGL (since it represents the OpenGL implementation of the API). .: * Source/CMakeLists.txt: * Source/cmake/OptionsFTW.cmake: * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsMac.cmake: * Source/cmake/OptionsPlayStation.cmake: * Source/cmake/OptionsWPE.cmake: * Source/cmake/OptionsWinCairo.cmake: PerformanceTests: * StitchMarker/wtf/FeatureDefines.h: * StitchMarker/wtf/Platform.h: Source/WebCore: * CMakeLists.txt: * Headers.cmake: * PlatformAppleWin.cmake: * PlatformFTW.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * SourcesWPE.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLVideoElement.cpp: * html/HTMLVideoElement.h: * html/OffscreenCanvas.cpp: * html/canvas/ANGLEInstancedArrays.cpp: * html/canvas/OESVertexArrayObject.cpp: * html/canvas/WebGL2RenderingContext.cpp: * html/canvas/WebGL2RenderingContext.h: * html/canvas/WebGLActiveInfo.h: * html/canvas/WebGLBuffer.cpp: * html/canvas/WebGLBuffer.h: * html/canvas/WebGLCompressedTextureASTC.cpp: * html/canvas/WebGLCompressedTextureATC.cpp: * html/canvas/WebGLCompressedTextureETC.cpp: * html/canvas/WebGLCompressedTextureETC1.cpp: * html/canvas/WebGLCompressedTexturePVRTC.cpp: * html/canvas/WebGLCompressedTextureS3TC.cpp: * html/canvas/WebGLContextAttributes.h: * html/canvas/WebGLContextGroup.cpp: * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLContextObject.cpp: * html/canvas/WebGLContextObject.h: * html/canvas/WebGLDebugShaders.cpp: * html/canvas/WebGLDepthTexture.cpp: * html/canvas/WebGLDepthTexture.h: * html/canvas/WebGLDrawBuffers.cpp: * html/canvas/WebGLFramebuffer.cpp: * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLObject.cpp: * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: * html/canvas/WebGLProgram.h: * html/canvas/WebGLQuery.cpp: * html/canvas/WebGLQuery.h: * html/canvas/WebGLRenderbuffer.cpp: * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderingContext.cpp: * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContextBase.cpp: * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSampler.cpp: * html/canvas/WebGLSampler.h: * html/canvas/WebGLShader.cpp: * html/canvas/WebGLShader.h: * html/canvas/WebGLShaderPrecisionFormat.h: * html/canvas/WebGLSharedObject.cpp: * html/canvas/WebGLSharedObject.h: * html/canvas/WebGLSync.cpp: * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: * html/canvas/WebGLTexture.h: * html/canvas/WebGLTransformFeedback.cpp: * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLVertexArrayObject.cpp: * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObjectBase.cpp: * html/canvas/WebGLVertexArrayObjectBase.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: * html/canvas/WebGLVertexArrayObjectOES.h: * inspector/InspectorShaderProgram.cpp: * loader/FrameLoaderClient.h: * page/Chrome.cpp: * platform/SourcesCairo.txt: * platform/TextureMapper.cmake: * platform/WebGLStateTracker.cpp: * platform/WebGLStateTracker.h: * platform/graphics/ANGLEWebKitBridge.cpp: * platform/graphics/ExtensionsGL.h: Renamed from Source/WebCore/platform/graphics/Extensions3D.h. * platform/graphics/FormatConverter.cpp: * platform/graphics/FormatConverter.h: * platform/graphics/GLContext.cpp: * platform/graphics/GLContext.h: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContext3D.cpp: Removed. * platform/graphics/GraphicsContext3DBase.cpp: Removed. * platform/graphics/GraphicsContextGL.cpp: Added. * platform/graphics/GraphicsContextGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DBase.h. * platform/graphics/GraphicsContextGLAttributes.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h. * platform/graphics/ImageBuffer.cpp: * platform/graphics/ImageBuffer.h: * platform/graphics/MediaPlayer.cpp: * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/OpenGLShims.cpp: * platform/graphics/angle/ExtensionsGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.cpp. * platform/graphics/angle/ExtensionsGLANGLE.h: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.h. * platform/graphics/angle/GraphicsContextGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/GraphicsContext3DANGLE.cpp. * platform/graphics/angle/TemporaryANGLESetting.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: * platform/graphics/cairo/GraphicsContextGLCairo.cpp: Renamed from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp. * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/cg/GraphicsContextGLCG.cpp: Renamed from Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp. * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: Renamed from Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm. * platform/graphics/cocoa/IOSurface.mm: * platform/graphics/cocoa/WebGLLayer.h: * platform/graphics/cocoa/WebGLLayer.mm: * platform/graphics/cpu/arm/GraphicsContextGLNEON.h: Renamed from Source/WebCore/platform/graphics/cpu/arm/GraphicsContext3DNEON.h. * platform/graphics/cv/TextureCacheCV.h: * platform/graphics/cv/TextureCacheCV.mm: * platform/graphics/cv/VideoTextureCopierCV.cpp: * platform/graphics/cv/VideoTextureCopierCV.h: * platform/graphics/egl/GLContextEGL.cpp: * platform/graphics/egl/GLContextEGL.h: * platform/graphics/glx/GLContextGLX.cpp: * platform/graphics/glx/GLContextGLX.h: * platform/graphics/gpu/Texture.cpp: * platform/graphics/gpu/Texture.h: * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/ios/GraphicsContextGLOpenGLESIOS.h: Renamed from Source/WebCore/platform/graphics/ios/GraphicsContext3DIOS.h. * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp: * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h: * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp. * platform/graphics/opengl/ExtensionsGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp. * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.h. * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp. * platform/graphics/opengl/ExtensionsGLOpenGLES.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h. * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: Added. * platform/graphics/opengl/GraphicsContextGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3D.h. * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLManager.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.h. * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp. * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.h. * platform/graphics/opengl/TemporaryOpenGLSetting.cpp: * platform/graphics/opengl/TemporaryOpenGLSetting.h: * platform/graphics/texmap/BitmapTextureGL.cpp: * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp: Renamed from Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp. * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h: * platform/graphics/texmap/TextureMapperGL.cpp: * platform/graphics/win/GraphicsContextGLDirect2D.cpp: Renamed from Source/WebCore/platform/graphics/win/GraphicsContext3DDirect2D.cpp. * testing/Internals.cpp: Source/WebKit: * CMakeLists.txt: * UIProcess/gtk/WaylandCompositor.cpp: (WebKit::WaylandCompositor::initializeEGL): * UIProcess/mac/HighPerformanceGPUManager.cpp: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/mac/WebPageMac.mm: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::displayConfigurationChanged): Source/WTF: * wtf/FeatureDefines.h: * wtf/Platform.h: Tools: * Scripts/webkitpy/common/config/watchlist: Canonical link: https://commits.webkit.org/218939@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-06 18:52:42 +00:00
platform/graphics/opengl/ExtensionsGLOpenGL.h
platform/graphics/opengl/ExtensionsGLOpenGLCommon.h
platform/graphics/opengl/ExtensionsGLOpenGLES.h
platform/graphics/opengl/GraphicsContextGLOpenGL.h
platform/graphics/opengl/GraphicsContextGLOpenGLManager.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/opengl/TemporaryOpenGLSetting.h
platform/graphics/opentype/OpenTypeMathData.h
platform/graphics/opentype/OpenTypeVerticalData.h
platform/graphics/transforms/AffineTransform.h
Add non-animated support for the CSS rotate property https://bugs.webkit.org/show_bug.cgi?id=217320 <rdar://problem/69956248> Reviewed by Dean Jackson. LayoutTests/imported/w3c: WPT progressions showing the correct parsing and computed style output of a non-animated "rotate" property. * web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * web-platform-tests/css/css-transforms/animation/rotate-composition-expected.txt: * web-platform-tests/css/css-transforms/animation/rotate-interpolation-expected.txt: * web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid-expected.txt: * web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Source/WebCore: We add non-animated support for the CSS "rotate" property as specifed in by the CSS Transforms Level 2 specification (​​https://drafts.csswg.org/css-transforms-2/#propdef-rotate). Tests: transforms/2d/rotate-and-scale-and-translate-order.html transforms/2d/rotate-and-transform-attribute-in-svg-expected.svg transforms/2d/rotate-and-transform-attribute-in-svg.svg transforms/2d/rotate-and-transform-css-property-in-svg-expected.svg transforms/2d/rotate-and-transform-css-property-in-svg.svg transforms/2d/rotate-and-translate-in-svg-expected.svg transforms/2d/rotate-and-translate-in-svg.svg transforms/2d/rotate-and-translate-order.html transforms/2d/rotate-in-svg-expected.svg transforms/2d/rotate-in-svg.svg transforms/2d/rotate-transform-order.html transforms/2d/rotate-transform-origin-order.html * Headers.cmake: * css/CSSComputedStyleDeclaration.cpp: (WebCore::computedRotate): Create a CSSValueList to print out the computed value for the "rotate" property. (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): * css/CSSProperties.json: Define the "rotate" property with the condition that the runtime setting for individual CSS transform properties is set. * css/CSSValueKeywords.in: Define the "z" value for the "rotate" property and ensure the "x" and "y" values are defined as well since -webkit-scroll-snap-type may not be enabled. * css/TransformFunctions.cpp: (WebCore::rotateForValue): Convert a CSSValue to a RotateTransformOperation when parsing a "rotate" property value. * css/TransformFunctions.h: * css/parser/CSSPropertyParser.cpp: (WebCore::consumeRotate): Create a CSSValueList when parsing a "rotate" property value. (WebCore::CSSPropertyParser::parseSingleValue): * platform/graphics/transforms/RotateTransformOperation.h: * rendering/RenderObject.h: (WebCore::RenderObject::hasTransform const): Consider that having the "rotate" property is akin to having a "transform" property in the render tree. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setRotate): (WebCore::RenderStyle::applyTransform const): Account for the RenderStyle::rotate() value in the right order, after applying the transform origin and translate, but before applying the scale and main transform. * rendering/style/RenderStyle.h: (WebCore::RenderStyle::rotate const): (WebCore::RenderStyle::hasTransformRelatedProperty const): (WebCore::RenderStyle::initialRotate): * rendering/style/StyleRareNonInheritedData.h: * rendering/style/WillChangeData.cpp: (WebCore::WillChangeData::propertyCreatesStackingContext): * style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::convertRotate): * svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::animatedLocalTransform const): Account for the RenderStyle::rotate() value when rendering SVG, ensuring that it is applied before the transform specified by either the "transform" CSS property or SVG attribute. LayoutTests: Add tests checking that the "rotate" CSS property is applied in the correct order related to "transform-origin", "transform", "scale" and "translate". We also check that it is applied in SVG as well. * platform/ios-13/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: * transforms/2d/rotate-and-scale-and-translate-order-expected.html: Added. * transforms/2d/rotate-and-scale-and-translate-order.html: Added. * transforms/2d/rotate-and-transform-attribute-in-svg-expected.svg: Added. * transforms/2d/rotate-and-transform-attribute-in-svg.svg: Added. * transforms/2d/rotate-and-transform-css-property-in-svg-expected.svg: Added. * transforms/2d/rotate-and-transform-css-property-in-svg.svg: Added. * transforms/2d/rotate-and-translate-in-svg-expected.svg: Added. * transforms/2d/rotate-and-translate-in-svg.svg: Added. * transforms/2d/rotate-and-translate-order-expected.html: Added. * transforms/2d/rotate-and-translate-order.html: Added. * transforms/2d/rotate-in-svg-expected.svg: Added. * transforms/2d/rotate-in-svg.svg: Added. * transforms/2d/rotate-transform-order-expected.html: Added. * transforms/2d/rotate-transform-order.html: Added. * transforms/2d/rotate-transform-origin-order-expected.html: Added. * transforms/2d/rotate-transform-origin-order.html: Added. Canonical link: https://commits.webkit.org/230092@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-05 18:42:12 +00:00
platform/graphics/transforms/RotateTransformOperation.h
Add non-animated support for the CSS scale property https://bugs.webkit.org/show_bug.cgi?id=217291 <rdar://problem/69926254> Reviewed by Simon Fraser. LayoutTests/imported/w3c: WPT progressions showing the correct parsing and computed style output of a non-animated "scale" property. We are also adding some more tests to the invalid "scale" parsing to check that we bail once we get junk for optional values after valid values and move percentage values to invalid tests (also filed a WPT PR at https://github.com/web-platform-tests/wpt/pull/25960). * web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * web-platform-tests/css/css-transforms/animation/scale-composition-expected.txt: * web-platform-tests/css/css-transforms/animation/scale-interpolation-expected.txt: * web-platform-tests/css/css-transforms/parsing/scale-parsing-invalid-expected.txt: * web-platform-tests/css/css-transforms/parsing/scale-parsing-invalid.html: * web-platform-tests/css/css-transforms/parsing/scale-parsing-valid-expected.txt: * web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html: * web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Source/WebCore: We add non-animated support for the CSS "scale" property as specifed in by the CSS Transforms Level 2 specification (​https://drafts.csswg.org/css-transforms-2/#propdef-scale). Tests: transforms/2d/scale-and-transform-attribute-in-svg-expected.svg transforms/2d/scale-and-transform-attribute-in-svg.svg transforms/2d/scale-and-transform-css-property-in-svg-expected.svg transforms/2d/scale-and-transform-css-property-in-svg.svg transforms/2d/scale-and-translate-in-svg-expected.svg transforms/2d/scale-and-translate-in-svg.svg transforms/2d/scale-and-translate-order.html transforms/2d/scale-in-svg-expected.svg transforms/2d/scale-in-svg.svg transforms/2d/scale-transform-order.html transforms/2d/scale-transform-origin-order.html * Headers.cmake: * css/CSSComputedStyleDeclaration.cpp: (WebCore::computedTranslate): Remove the extraneous is<RenderInline> check which is already covered by rendererCanBeTransformed(). (WebCore::computedScale): Create a CSSValueList to print out the computed value for the "scale" property. (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): * css/CSSProperties.json: Define the "scale" property with the condition that the runtime setting for individual CSS transform properties is set. * css/TransformFunctions.cpp: (WebCore::scaleForValue): Convert a CSSValue to a TranslateTransformOperation when parsing a "scale" property value. * css/TransformFunctions.h: * css/parser/CSSPropertyParser.cpp: (WebCore::consumeScale): Create a CSSValueList when parsing a "scale" property value. (WebCore::CSSPropertyParser::parseSingleValue): * platform/graphics/transforms/ScaleTransformOperation.h: * rendering/RenderObject.h: (WebCore::RenderObject::hasTransform const): Consider that having the "scale" property is akin to having a "transform" property in the render tree. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setScale): (WebCore::RenderStyle::applyTransform const): Account for the RenderStyle::scale() value in the right order, after applying the transform origin and translate, but before applying the main transform. * rendering/style/RenderStyle.h: (WebCore::RenderStyle::scale const): (WebCore::RenderStyle::hasTransformRelatedProperty const): (WebCore::RenderStyle::initialScale): * rendering/style/StyleRareNonInheritedData.h: * rendering/style/WillChangeData.cpp: (WebCore::WillChangeData::propertyCreatesStackingContext): * style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::convertScale): * svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::animatedLocalTransform const): Account for the RenderStyle::scale() value when rendering SVG, ensuring that it is applied before the transform specified by either the "transform" CSS property or SVG attribute. LayoutTests: Add tests checking that the "scale" CSS property is applied in the correct order related to "transform-origin" and "transform" and that it is applied in SVG as well. * platform/ios-13/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: * transforms/2d/scale-and-transform-attribute-in-svg-expected.svg: Added. * transforms/2d/scale-and-transform-attribute-in-svg.svg: Added. * transforms/2d/scale-and-transform-css-property-in-svg-expected.svg: Added. * transforms/2d/scale-and-transform-css-property-in-svg.svg: Added. * transforms/2d/scale-and-translate-in-svg-expected.svg: Added. * transforms/2d/scale-and-translate-in-svg.svg: Added. * transforms/2d/scale-and-translate-order-expected.html: Added. * transforms/2d/scale-and-translate-order.html: Added. * transforms/2d/scale-in-svg-expected.svg: Added. * transforms/2d/scale-in-svg.svg: Added. * transforms/2d/scale-transform-order-expected.html: Added. * transforms/2d/scale-transform-order.html: Added. * transforms/2d/scale-transform-origin-order-expected.html: Added. * transforms/2d/scale-transform-origin-order.html: Added. Canonical link: https://commits.webkit.org/230067@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-05 09:46:39 +00:00
platform/graphics/transforms/ScaleTransformOperation.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/graphics/transforms/TransformOperation.h
platform/graphics/transforms/TransformOperations.h
platform/graphics/transforms/TransformationMatrix.h
Add non-animated support for the CSS translate property https://bugs.webkit.org/show_bug.cgi?id=216997 <rdar://problem/69597083> Reviewed by Simon Fraser. LayoutTests/imported/w3c: WPT progressions showing the correct parsing and computed style output of a non-animated "translate" property. We are also adding some more tests to the invalid "translate" parsing to check that we bail once we get junk for optional values after valid values. * web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt: * web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt: * web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid-expected.txt: * web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid.html: * web-platform-tests/css/css-transforms/parsing/translate-parsing-valid-expected.txt: * web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Source/WebCore: We add non-animated support for the CSS "translate" property as specifed in by the CSS Transforms Level 2 specification (​https://drafts.csswg.org/css-transforms-2/#propdef-translate). Tests: transforms/2d/translate-and-transform-attribute-in-svg-expected.svg transforms/2d/translate-and-transform-attribute-in-svg.svg transforms/2d/translate-and-transform-css-property-in-svg-expected.svg transforms/2d/translate-and-transform-css-property-in-svg.svg transforms/2d/translate-in-svg-expected.svg transforms/2d/translate-in-svg.svg transforms/2d/translate-transform-order.html transforms/2d/translate-transform-origin-order.html * Headers.cmake: * css/CSSComputedStyleDeclaration.cpp: (WebCore::rendererCanBeTransformed): (WebCore::computedTransform): (WebCore::computedTranslate): Create a CSSValueList to print out the computed value for the "translate" property. (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): * css/CSSProperties.json: Define the "translate" property with the condition that the runtime setting for individual CSS transform properties is set. * css/TransformFunctions.cpp: (WebCore::translateForValue): Convert a CSSValue to a TranslateTransformOperation when parsing a "translate" property value. * css/TransformFunctions.h: * css/parser/CSSParserContext.cpp: (WebCore::CSSParserContext::CSSParserContext): Add a new flag indicating whether the runtime setting for individual CSS transform properties is set. (WebCore::operator==): * css/parser/CSSParserContext.h: (WebCore::CSSParserContextHash::hash): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeTranslate): Create a CSSValueList when parsing a "translate" property value. (WebCore::CSSPropertyParser::parseSingleValue): * platform/graphics/transforms/TranslateTransformOperation.h: Promote the apply() method to be public so that it can be called from Style::ComputedStyleExtractor::valueForPropertyInStyle(). * rendering/RenderObject.h: (WebCore::RenderObject::hasTransform const): Consider that having the "translate" property is akin to having a "transform" property in the render tree. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setTranslate): (WebCore::RenderStyle::applyTransform const): Account for the RenderStyle::translate() value in the right order, after applying the transform origin, but before applying the main transform. * rendering/style/RenderStyle.h: (WebCore::RenderStyle::translate const): (WebCore::RenderStyle::hasTransformRelatedProperty const): (WebCore::RenderStyle::initialTranslate): * rendering/style/StyleRareNonInheritedData.h: * rendering/style/WillChangeData.cpp: (WebCore::WillChangeData::propertyCreatesStackingContext): * style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::convertTranslate): * svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::animatedLocalTransform const): Account for the RenderStyle::translate() value when rendering SVG, ensuring that it is applied before the transform specified by either the "transform" CSS property or SVG attribute. LayoutTests: Add tests checking that the "translate" CSS property is applied in the correct order related to "transform-origin" and "transform" and that it is applied in SVG as well. * platform/ios-13/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: * transforms/2d/translate-and-transform-attribute-in-svg-expected.svg: Added. * transforms/2d/translate-and-transform-attribute-in-svg.svg: Added. * transforms/2d/translate-and-transform-css-property-in-svg-expected.svg: Added. * transforms/2d/translate-and-transform-css-property-in-svg.svg: Added. * transforms/2d/translate-in-svg-expected.svg: Added. * transforms/2d/translate-in-svg.svg: Added. * transforms/2d/translate-transform-order-expected.html: Added. * transforms/2d/translate-transform-order.html: Added. * transforms/2d/translate-transform-origin-order-expected.html: Added. * transforms/2d/translate-transform-origin-order.html: Added. Canonical link: https://commits.webkit.org/230048@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-03 22:07:03 +00:00
platform/graphics/transforms/TranslateTransformOperation.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
[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
platform/mediacapabilities/AudioConfiguration.h
platform/mediacapabilities/ColorGamut.h
platform/mediacapabilities/HdrMetadataType.h
platform/mediacapabilities/MediaConfiguration.h
platform/mediacapabilities/MediaDecodingConfiguration.h
platform/mediacapabilities/MediaDecodingType.h
platform/mediacapabilities/MediaEncodingConfiguration.h
platform/mediacapabilities/MediaEncodingType.h
platform/mediacapabilities/MediaEngineConfigurationFactory.h
platform/mediacapabilities/TransferFunction.h
platform/mediacapabilities/VideoConfiguration.h
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
platform/mediarecorder/MediaRecorderPrivate.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/mediastream/CaptureDevice.h
platform/mediastream/CaptureDeviceManager.h
platform/mediastream/MediaConstraints.h
platform/mediastream/MediaStreamPrivate.h
platform/mediastream/MediaStreamRequest.h
platform/mediastream/MediaStreamTrackPrivate.h
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
platform/mediastream/RTCDataChannelHandler.h
platform/mediastream/RTCDataChannelHandlerClient.h
platform/mediastream/RTCDataChannelIdentifier.h
platform/mediastream/RTCDataChannelRemoteHandlerConnection.h
platform/mediastream/RTCDataChannelRemoteSourceConnection.h
platform/mediastream/RTCDataChannelState.h
platform/mediastream/RTCPriorityType.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/mediastream/RealtimeMediaSource.h
platform/mediastream/RealtimeMediaSourceCapabilities.h
platform/mediastream/RealtimeMediaSourceCenter.h
platform/mediastream/RealtimeMediaSourceFactory.h
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
platform/mediastream/RealtimeMediaSourceIdentifier.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/mediastream/RealtimeMediaSourceSettings.h
platform/mediastream/RealtimeMediaSourceSupportedConstraints.h
Changing settings of a MediaStreamTrack clone should not alter the settings of the original track https://bugs.webkit.org/show_bug.cgi?id=198840 Reviewed by Eric Carlson. Source/WebCore: Rename RealtimeVideoSource in RealtimeVideoCaptureSource. Introduce RealtimeVideoSource as a class wrapping RealtimeVideoCaptureSource. Its goal is to be able to have independent settings from its underlying RealtimeVideoCaptureSource. It can also adapt size based on its settings if different than its RealtimeVideoCaptureSource. Apply this wrapping for AV video sources as well as mock video sources. Test: fast/mediastream/mediastreamtrack-video-clone.html * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/mediastream/MediaStreamTrackPrivate.cpp: (WebCore::MediaStreamTrackPrivate::clone): * platform/mediastream/RealtimeMediaSource.h: * platform/mediastream/RealtimeVideoCaptureSource.cpp: Added. (WebCore::RealtimeVideoCaptureSource::RealtimeVideoCaptureSource): (WebCore::RealtimeVideoCaptureSource::~RealtimeVideoCaptureSource): (WebCore::RealtimeVideoCaptureSource::prepareToProduceData): (WebCore::RealtimeVideoCaptureSource::presets): (WebCore::RealtimeVideoCaptureSource::setSupportedPresets): (WebCore::RealtimeVideoCaptureSource::standardVideoSizes): (WebCore::updateMinMax): (WebCore::RealtimeVideoCaptureSource::updateCapabilities): (WebCore::RealtimeVideoCaptureSource::supportsSizeAndFrameRate): (WebCore::RealtimeVideoCaptureSource::frameRateRangeIncludesRate): (WebCore::RealtimeVideoCaptureSource::presetSupportsFrameRate): (WebCore::RealtimeVideoCaptureSource::supportsCaptureSize): (WebCore::RealtimeVideoCaptureSource::shouldUsePreset): (WebCore::RealtimeVideoCaptureSource::bestSupportedSizeAndFrameRate): (WebCore::RealtimeVideoCaptureSource::setSizeAndFrameRate): (WebCore::RealtimeVideoCaptureSource::adaptVideoSample): (WebCore::RealtimeVideoCaptureSource::dispatchMediaSampleToObservers): (WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate): (WebCore::SizeAndFrameRate::toJSONObject const): (WebCore::SizeAndFrameRate::toJSONString const): * platform/mediastream/RealtimeVideoCaptureSource.h: Added. (WebCore::RealtimeVideoCaptureSource::sampleRotation const): (WebCore::RealtimeVideoCaptureSource::prefersPreset): (WebCore::RealtimeVideoCaptureSource::setFrameRateWithPreset): (WebCore::RealtimeVideoCaptureSource::canResizeVideoFrames const): (WebCore::RealtimeVideoCaptureSource::setDefaultSize): (WebCore::RealtimeVideoCaptureSource::observedFrameRate const): (WTF::LogArgument<WebCore::SizeAndFrameRate>::toString): * platform/mediastream/RealtimeVideoSource.cpp: (WebCore::RealtimeVideoSource::RealtimeVideoSource): (WebCore::m_source): (WebCore::RealtimeVideoSource::~RealtimeVideoSource): (WebCore::RealtimeVideoSource::startProducingData): (WebCore::RealtimeVideoSource::stopProducingData): (WebCore::RealtimeVideoSource::supportsSizeAndFrameRate): (WebCore::RealtimeVideoSource::setSizeAndFrameRate): (WebCore::RealtimeVideoSource::sourceMutedChanged): (WebCore::RealtimeVideoSource::sourceSettingsChanged): (WebCore::RealtimeVideoSource::preventSourceFromStopping): (WebCore::RealtimeVideoSource::sourceStopped): (WebCore::RealtimeVideoSource::videoSampleAvailable): (WebCore::RealtimeVideoSource::clone): * platform/mediastream/RealtimeVideoSource.h: * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp: (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource): * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h: * platform/mediastream/mac/AVVideoCaptureSource.h: * platform/mediastream/mac/AVVideoCaptureSource.mm: (WebCore::AVVideoCaptureSource::create): (WebCore::AVVideoCaptureSource::AVVideoCaptureSource): * platform/mediastream/mac/MockRealtimeVideoSourceMac.h: * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm: (WebCore::MockRealtimeVideoSource::create): * platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::create): (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource): (WebCore::MockRealtimeVideoSource::supportsSizeAndFrameRate): (WebCore::MockRealtimeVideoSource::setSizeAndFrameRate): * platform/mock/MockRealtimeVideoSource.h: LayoutTests: * fast/mediastream/mediastreamtrack-video-clone-expected.txt: Added. * fast/mediastream/mediastreamtrack-video-clone.html: Added. Canonical link: https://commits.webkit.org/213034@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-06-20 18:55:32 +00:00
platform/mediastream/RealtimeVideoCaptureSource.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/mediastream/RealtimeVideoSource.h
platform/mediastream/VideoPreset.h
platform/mediastream/WebAudioSourceProvider.h
[IPC] Add WTF::EnumTraits<> for every enum type used in IPC <https://webkit.org/b/213093> Reviewed by Darin Adler. Summary: - Change underlying type of enum class to `bool` when there are only two values. In some cases, reorder the two values so the mapping to 0 and 1 makes more sense. Converting every enum to an enum class is not a goal of this patch, so some two-value enums stil have WTF::EnumTraits<> defined as noted below. - Add WTF::EnumTraits<> for the remaining enum types that are used by IPC::Encoder::encodeEnum() and IPC::Decoder::decodeEnum() so that WTF::isValidEnum<>() checks may be added next. - Add #include <WebCore/LibWebRTCEnumTraits.h> as needed. Source/WebCore: * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: - Add LibWebRTCEnumTraits.h to project. Keep these definitions separate from the libwebrtc project cut down on changes to re-merge after updating. * platform/mediastream/libwebrtc/LibWebRTCEnumTraits.h: Add. * Modules/applepay/ApplePaySessionPaymentRequest.h: * Modules/indexeddb/IDBTransactionMode.h: * Modules/indexeddb/IndexedDB.h: (WTF::EnumTraits<WebCore::IndexedDB::IndexRecordType>): - Remove after changing enum class to bool. * Modules/indexeddb/shared/IDBGetRecordData.h: * Modules/indexeddb/shared/IDBResultData.h: * WebCore.xcodeproj/project.pbxproj: * dom/ExceptionCode.h: * editing/CompositionUnderline.h: * html/Autofill.h: * html/DataListSuggestionInformation.h: * html/EnterKeyHint.h: * html/LinkIconType.h: * loader/FrameLoaderTypes.h: - Alphabetize WTF::EnumTraits<> definitions. * loader/ResourceLoaderOptions.h: * page/SecurityOrigin.h: * page/UserStyleSheetTypes.h: (WTF::EnumTraits<WebCore::UserStyleLevel>): - Define this since UserStyleLevel is not an enum class. * page/scrolling/ScrollingCoordinatorTypes.h: * platform/ContextMenuItem.h: * platform/Cursor.h: * platform/DragData.h: * platform/FileChooser.h: * platform/PopupMenuStyle.h: * platform/ScreenProperties.h: * platform/ScrollTypes.h: * platform/SerializedPlatformDataCueValue.h: (WebCore::SerializedPlatformDataCueValue::PlatformType): - Convert from enum to enum class. * platform/UserInterfaceLayoutDirection.h: * platform/animation/TimingFunction.h: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsLayer.h: * platform/graphics/GraphicsTypes.h: - Alphabetize WTF::EnumTraits<> definitions. * platform/graphics/Image.h: * platform/graphics/Path.h: * platform/graphics/ca/PlatformCAAnimation.h: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/filters/FilterOperation.h: * platform/mediastream/MediaConstraints.h: * platform/mediastream/MediaStreamRequest.h: (WTF::EnumTraits<WebCore::MediaStreamRequest::Type>): - Fix EnumTraits definition (missing "::Type"). * platform/mediastream/RealtimeMediaSourceCapabilities.h: * platform/mediastream/RealtimeMediaSourceSupportedConstraints.h: * platform/network/CredentialBase.h: * platform/network/ProtectionSpaceBase.h: * platform/network/ResourceErrorBase.h: * platform/network/soup/SoupNetworkProxySettings.h: * platform/text/TextChecking.h: (WTF::EnumTraits<WebCore::TextCheckingProcessType): - Define this since TextCheckingProcessType is not an enum class. * platform/text/WritingMode.h: * rendering/Pagination.h: * workers/service/ServiceWorkerJobType.h: Source/WebKit: * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUProcess.h: * NetworkProcess/NetworkLoadParameters.h: * Shared/API/APIObject.h: * Shared/ContextMenuContextData.h: * Shared/DrawingAreaInfo.h: * Shared/FocusedElementInformation.h: * Shared/PrintInfo.h: (WTF::EnumTraits<WebKit::PrintInfo::PrintMode>): - Define this since PrintMode is not an enum class. * Shared/RTCPacketOptions.cpp: * Shared/SessionState.h: * Shared/TouchBarMenuItemData.h: * Shared/WebEvent.h: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): - Fix reference to WebPopupItem::Type enum. * Shared/WebPopupItem.h: (WebKit::WebPopupItem::Type): - Convert from enum to enum class. * Shared/WebsiteData/WebsiteDataType.h: * Shared/glib/InputMethodState.h: * Shared/glib/UserMessage.h: * Shared/mac/ColorSpaceData.mm: * Shared/mac/SecItemRequestData.h: * UIProcess/mac/WebPopupMenuProxyMac.mm: (WebKit::WebPopupMenuProxyMac::populate): - Fix reference to WebPopupItem::Type enum. * WebProcess/Plugins/Plugin.cpp: * WebProcess/WebCoreSupport/WebPopupMenu.cpp: (WebKit::WebPopupMenu::populateItems): - Fix reference to WebPopupItem::Type enum. * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.h: Canonical link: https://commits.webkit.org/225887@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-12 06:02:42 +00:00
platform/mediastream/libwebrtc/LibWebRTCEnumTraits.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/mediastream/libwebrtc/LibWebRTCMacros.h
platform/mediastream/libwebrtc/LibWebRTCProvider.h
Use strongly typed identifiers for webrtc sockets https://bugs.webkit.org/show_bug.cgi?id=202400 Reviewed by Chris Dumez. Source/WebCore: No observable change of behavior. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/mediastream/libwebrtc/LibWebRTCSocketIdentifier.h: Copied from Source/WebKit/NetworkProcess/webrtc/NetworkRTCSocket.h. Source/WebKit: Refactoring to use LibWebRTCSocketIdentifier instead of uint64_t. * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp: (WebKit::LibWebRTCSocketClient::LibWebRTCSocketClient): * NetworkProcess/webrtc/LibWebRTCSocketClient.h: * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::createSocket): (WebKit::NetworkRTCProvider::createUDPSocket): (WebKit::NetworkRTCProvider::createServerTCPSocket): (WebKit::NetworkRTCProvider::createClientTCPSocket): (WebKit::NetworkRTCProvider::wrapNewTCPConnection): (WebKit::NetworkRTCProvider::addSocket): (WebKit::NetworkRTCProvider::takeSocket): (WebKit::NetworkRTCProvider::newConnection): (WebKit::NetworkRTCProvider::didReceiveNetworkRTCSocketMessage): (WebKit::NetworkRTCProvider::closeListeningSockets): (WebKit::NetworkRTCProvider::callSocket): * NetworkProcess/webrtc/NetworkRTCProvider.h: * NetworkProcess/webrtc/NetworkRTCProvider.messages.in: * NetworkProcess/webrtc/NetworkRTCSocket.cpp: (WebKit::NetworkRTCSocket::NetworkRTCSocket): * NetworkProcess/webrtc/NetworkRTCSocket.h: * Scripts/webkit/messages.py: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/Network/webrtc/LibWebRTCNetwork.h: (WebKit::LibWebRTCNetwork::socket): * WebProcess/Network/webrtc/LibWebRTCSocket.cpp: (WebKit::LibWebRTCSocket::LibWebRTCSocket): * WebProcess/Network/webrtc/LibWebRTCSocket.h: * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: (WebKit::LibWebRTCSocketFactory::createServerTcpSocket): (WebKit::LibWebRTCSocketFactory::createUdpSocket): (WebKit::LibWebRTCSocketFactory::createClientTcpSocket): (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket): * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h: (WebKit::LibWebRTCSocketFactory::socket): (WebKit::LibWebRTCSocketFactory::resolver): (WebKit::LibWebRTCSocketFactory::takeResolver): (WebKit::LibWebRTCSocketFactory::disableNonLocalhostConnections): * WebProcess/Network/webrtc/WebRTCSocket.cpp: (WebKit::WebRTCSocket::signalOnNetworkThread): (WebKit::WebRTCSocket::WebRTCSocket): (WebKit::WebRTCSocket::signalSentPacket): (WebKit::WebRTCSocket::signalConnect): (WebKit::WebRTCSocket::signalClose): (WebKit::WebRTCSocket::signalNewConnection): * WebProcess/Network/webrtc/WebRTCSocket.h: * WebProcess/Network/webrtc/WebRTCSocket.messages.in: Canonical link: https://commits.webkit.org/215967@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-02 09:41:59 +00:00
platform/mediastream/libwebrtc/LibWebRTCSocketIdentifier.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/mock/DeviceOrientationClientMock.h
platform/mock/MediaPlaybackTargetMock.h
platform/mock/MediaPlaybackTargetPickerMock.h
platform/mock/MockMediaDevice.h
platform/mock/MockRealtimeAudioSource.h
platform/mock/MockRealtimeMediaSourceCenter.h
platform/mock/MockRealtimeVideoSource.h
platform/network/AuthenticationChallengeBase.h
platform/network/AuthenticationClient.h
platform/network/BlobData.h
platform/network/BlobDataFileReference.h
platform/network/BlobPart.h
platform/network/BlobRegistry.h
platform/network/BlobRegistryImpl.h
WebSockets: add support for sending blob messages when using web sockets platform APIs https://bugs.webkit.org/show_bug.cgi?id=199189 Reviewed by Youenn Fablet. Source/WebCore: * Headers.cmake: Add missing headers. Source/WebKit: Add helper private class BlobLoader that uses FileReaderLoader to load the blobs. Since blob loads are asynchronous, the messages are queued using another helper internal class PendingMessage. * WebProcess/Network/WebSocketChannel.cpp: (WebKit::WebSocketChannel::increaseBufferedAmount): Increase the buffered amount checking we don't overlofw. (WebKit::WebSocketChannel::decreaseBufferedAmount): Decrease the buffered amount. (WebKit::WebSocketChannel::sendMessage): Helper class to send message to the network process and decrease the buffered amount when done. (WebKit::WebSocketChannel::send): Queue the message in pending queue if there are pending messages in the queue for text and binary messages. For blobs, always queue the message unless it's an empty blob that we can handle as empty binary data directly. (WebKit::PendingMessage::PendingMessage): Helper class to queue message requests. (WebKit::PendingMessage::type const): Type of message: Text, Binary, Blob. (WebKit::PendingMessage::textMessage const): The text message. (WebKit::PendingMessage::binaryData const): The binary data. (WebKit::PendingMessage::blobLoader const): The blob loader. (WebKit::WebSocketChannel::fail): Notify the client about the error to ensure onclose is emitted. (WebKit::WebSocketChannel::disconnect): Clear the pending messages queue. * WebProcess/Network/WebSocketChannel.h: Canonical link: https://commits.webkit.org/213290@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-01 08:09:46 +00:00
platform/network/BlobResourceHandle.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/network/CacheValidation.h
platform/network/CertificateSummary.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/network/CookieRequestHeaderFieldProxy.h
platform/network/CookieStorage.h
platform/network/Credential.h
platform/network/CredentialBase.h
platform/network/CredentialStorage.h
platform/network/DNS.h
platform/network/DNSResolveQueue.h
Load data URLs in the web process also for synchronous loads https://bugs.webkit.org/show_bug.cgi?id=220981 Reviewed by Adrian Perez de Castro. Source/WebCore: Add synchronous API for DataURLDecoder. It now uses a Vector<char> for the data instead of SharedBuffer. That way, ResourceLoader can create the SharedBuffer from the given data and loader strategy can simply move it. * Headers.cmake: Add DataURLDecoder.h. * WebCore.xcodeproj/project.pbxproj: Mark DataURLDecoder.h as private. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::loadDataURL): Adapt to the DataURLDecoder API changes. * platform/network/DataURLDecoder.cpp: (WebCore::DataURLDecoder::parseMediaType): Update the data initialization. (WebCore::DataURLDecoder::decodeBase64): Return bool to indicate success or error and move the resulting vector instead of creating a SharedBuffer. (WebCore::DataURLDecoder::decodeEscaped): Move the resulting vector instead of creating a SharedBuffer. (WebCore::DataURLDecoder::decodeSynchronously): Helper to do the actual decoding synchronously. (WebCore::DataURLDecoder::decode): Use decodeSynchronously. (WebCore::DataURLDecoder::decode): Synchronous implementation. * platform/network/DataURLDecoder.h: * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::dataURLResponse): Create a ResourceResponse for the given url and DataURLDecoder::Result. * platform/text/DecodeEscapeSequences.h: (WebCore::decodeURLEscapeSequencesAsData): Use Vector<char> so that we can avoid data copies. Source/WebKit: In r271879 I removed the support for data URLs in the network process for soup, assuming data URLs were always loaded from the web process, but that's not the case for synchronous loads. * NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::createRequest): Schedule an error if URL is not file or HTTP family. * WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::WebLoaderStrategy::loadDataURLSynchronously): Helper to load a Data URL synchronously. (WebKit::WebLoaderStrategy::loadResourceSynchronously): Call loadDataURLSynchronously for data URLs. * WebProcess/Network/WebLoaderStrategy.h: LayoutTests: Remove expectations for tests that are no longer crashing. * platform/glib/TestExpectations: Canonical link: https://commits.webkit.org/233434@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-28 12:40:45 +00:00
platform/network/DataURLDecoder.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/network/FormData.h
Frequent NetworkConnectionToWebProcess::CookiesEnabled sync IPC when browsing reddit.com https://bugs.webkit.org/show_bug.cgi?id=206450 Reviewed by Darin Adler. Source/WebCore: Move HTTPCookieAcceptPolicy.h header from WebKit to WebCore so that the HTTPCookieAcceptPolicy enum can be used in NetworkStorageSession. Replace NetworkStorageSession::cookiesEnabled() with a more detailed NetworkStorageSession::cookieAcceptPolicy() method. * WebCore.xcodeproj/project.pbxproj: * loader/CookieJar.cpp: (WebCore::CookieJar::cookiesEnabled const): * platform/network/HTTPCookieAcceptPolicy.h: Renamed from Source/WebKit/Shared/HTTPCookieAcceptPolicy.h. * platform/network/NetworkStorageSession.cpp: * platform/network/NetworkStorageSession.h: * platform/network/cf/NetworkStorageSessionCFNetWin.cpp: (WebCore::NetworkStorageSession::cookieAcceptPolicy const): * platform/network/cocoa/NetworkStorageSessionCocoa.mm: (WebCore::NetworkStorageSession::cookieAcceptPolicy const): * platform/network/curl/NetworkStorageSessionCurl.cpp: (WebCore::NetworkStorageSession::cookieAcceptPolicy const): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::cookieAcceptPolicy const): Source/WebKit: Frequent NetworkConnectionToWebProcess::CookiesEnabled sync IPC when browsing reddit.com. This happens every time the page script calls navigator.cookieEnabled. To address the issue, we now store the "cookie accept policy" on the WebContent process side. This allows us to know synchronously on the WebContent process if cookies are enabled or not and without any IPC to the network process. To achieve this, I added a new cookieAcceptPolicy member to NetworkProcessConnectionInfo so that the WebContent process is aware of the initial policy when it connects to the network process. The policy on the WebContent process side is then kept up to date via IPCs from the network process to the WebContent processes whenever the cookie accept policy changes. * NetworkProcess/Cookies/WebCookieManager.cpp: (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy): (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy): * NetworkProcess/Cookies/WebCookieManager.h: * NetworkProcess/Cookies/WebCookieManager.messages.in: * NetworkProcess/Cookies/curl/WebCookieManagerCurl.cpp: * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm: * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::cookieAcceptPolicyChanged): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::createNetworkConnectionToWebProcess): (WebKit::NetworkProcess::cookieAcceptPolicyChanged): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkProcessCreationParameters.h: * Shared/WebProcessCreationParameters.h: * UIProcess/API/APIHTTPCookieStore.cpp: (API::HTTPCookieStore::setHTTPCookieAcceptPolicy): (API::HTTPCookieStore::setHTTPCookieAcceptPolicyInDefaultUIProcessCookieStore): * UIProcess/API/APIHTTPCookieStore.h: * UIProcess/API/C/WKAPICast.h: (WebKit::toHTTPCookieAcceptPolicy): (WebKit::toAPI): * UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: (API::toNSHTTPCookieAcceptPolicy): (API::HTTPCookieStore::setHTTPCookieAcceptPolicyInDefaultUIProcessCookieStore): * UIProcess/API/Cocoa/WKHTTPCookieStore.mm: * UIProcess/API/Cocoa/WKProcessPool.mm: (toHTTPCookieAcceptPolicy): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::openNetworkProcessConnection): * UIProcess/WebCookieManagerProxy.h: * UIProcess/WebProcessPool.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::NetworkProcessConnection): (WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles): (WebKit::NetworkProcessConnection::cookiesEnabled): (WebKit::NetworkProcessConnection::cookieAcceptPolicyChanged): * WebProcess/Network/NetworkProcessConnection.h: (WebKit::NetworkProcessConnection::create): * WebProcess/Network/NetworkProcessConnection.messages.in: * WebProcess/Network/NetworkProcessConnectionInfo.h: (WebKit::NetworkProcessConnectionInfo::encode const): (WebKit::NetworkProcessConnectionInfo::decode): * WebProcess/WebPage/WebCookieJar.cpp: (WebKit::WebCookieJar::cookiesEnabled const): - Return false early if the document has no frame / page (cookie-averse as per spec) - Return false early if ITP is enabled and it is a third-party iframe without storage access. This bypasses the sync IPC call completely for such iframes. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::ensureNetworkProcessConnection): Canonical link: https://commits.webkit.org/219647@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-22 19:31:15 +00:00
platform/network/HTTPCookieAcceptPolicy.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/network/HTTPHeaderMap.h
PCM: Switch to JSON report format https://bugs.webkit.org/show_bug.cgi?id=218634 <rdar://problem/70469923> Reviewed by Brent Fulgham. The standards conversation has landed in attribution reports in a JSON format as opposed to the currently implemented URL format. Discussion here: https://github.com/privacycg/private-click-measurement/issues/30 Source/WebCore: No new tests. Existing layout and API tests were updated. * Headers.cmake: Added platform/network/HTTPHeaderValues.h to be able to expose it to WebKit. * WebCore.xcodeproj/project.pbxproj: Now exporting platform/network/HTTPHeaderValues.h. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::handleClick): Changed a function call from AdClickAttribution::url() to AdClickAttribution::reportURL(). * loader/AdClickAttribution.cpp: (WebCore::AdClickAttribution::reportURL const): The URL no longer carries the report values. Renamed from AdClickAttribution::url(). (WebCore::AdClickAttribution::json const): New function to generate and return the report JSON. (WebCore::AdClickAttribution::url const): Deleted. Renamed to AdClickAttribution::reportURL(). (WebCore::AdClickAttribution::referrer const): Deleted. The referrer is now part of the report JSON. (WebCore::AdClickAttribution::urlForTesting const): Deleted. This class no longer needs to help generate test URLs since report values are now in JSON. * loader/AdClickAttribution.h: * platform/network/FormData.h: Added export of create(const CString&). * platform/network/HTTPHeaderValues.cpp: (WebCore::HTTPHeaderValues::applicationJSONContentType): Used create the new JSON report request. * platform/network/HTTPHeaderValues.h: Added export of maxAge0(). Source/WebKit: * NetworkProcess/AdClickAttributionManager.cpp: (WebKit::AdClickAttributionManager::fireConversionRequest): Tools: * TestWebKitAPI/Tests/WebCore/AdClickAttribution.cpp: (TestWebKitAPI::TEST): LayoutTests: * http/tests/adClickAttribution/resources/conversionReport.php: * http/tests/adClickAttribution/send-attribution-conversion-request-expected.txt: Canonical link: https://commits.webkit.org/231294@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-06 00:16:56 +00:00
platform/network/HTTPHeaderValues.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/network/HTTPParsers.h
platform/network/NetworkLoadInformation.h
platform/network/NetworkLoadMetrics.h
platform/network/NetworkStateNotifier.h
platform/network/NetworkStorageSession.h
platform/network/NetworkingContext.h
platform/network/ParsedContentRange.h
platform/network/ParsedContentType.h
Synthesize range responses if needed in WebCoreNSURLSession https://bugs.webkit.org/show_bug.cgi?id=221072 Reviewed by Geoff Garen. Source/WebCore: When we make a media request with a Range HTTP header field and the server doesn't respond with a 206 with Content-Range header field, until now we would just fail to play the video. In order to successfully play these videos, I introduce the RangeResponseGenerator class, which will receive the data for a request for such a video and feed the data into WebCoreNSURLSession as the requested ranges are received. Seeking is problematic, but at least we will try our best to play the video. I added API tests that try to play a video that didn't play before using a server that doesn't support range requests. Manual verification is also necessary. * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/PlatformMediaResourceLoader.h: (WebCore::PlatformMediaResource::setClient): * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::PlatformResourceMediaLoader::create): * platform/network/ParsedRequestRange.cpp: Added. (WebCore::ParsedRequestRange::parse): * platform/network/ParsedRequestRange.h: Added. (WebCore::ParsedRequestRange::begin const): (WebCore::ParsedRequestRange::end const): (WebCore::ParsedRequestRange::ParsedRequestRange): * platform/network/cocoa/RangeResponseGenerator.h: Added. * platform/network/cocoa/RangeResponseGenerator.mm: Added. (WebCore::RangeResponseGenerator::Data::Data): (WebCore::RangeResponseGenerator::Data::TaskData::TaskData): (WebCore::synthesizedResponseForRange): (WebCore::RangeResponseGenerator::removeTask): (WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived): (WebCore::RangeResponseGenerator::expectedContentLengthFromData): (WebCore::RangeResponseGenerator::giveResponseToTasksWithFinishedRanges): (WebCore::RangeResponseGenerator::willHandleRequest): (WebCore::RangeResponseGenerator::willSynthesizeRangeResponses): * platform/network/cocoa/WebCoreNSURLSession.h: * platform/network/cocoa/WebCoreNSURLSession.mm: (-[WebCoreNSURLSession rangeResponseGenerator]): (-[WebCoreNSURLSession dataTaskWithURL:]): (WebCore::WebCoreNSURLSessionDataTaskClient::dataSent): (WebCore::WebCoreNSURLSessionDataTaskClient::responseReceived): (WebCore::WebCoreNSURLSessionDataTaskClient::shouldCacheResponse): (WebCore::WebCoreNSURLSessionDataTaskClient::dataReceived): (WebCore::WebCoreNSURLSessionDataTaskClient::redirectReceived): (WebCore::WebCoreNSURLSessionDataTaskClient::accessControlCheckFailed): (WebCore::WebCoreNSURLSessionDataTaskClient::loadFailed): (WebCore::WebCoreNSURLSessionDataTaskClient::loadFinished): (-[WebCoreNSURLSessionDataTask _restart]): (-[WebCoreNSURLSessionDataTask _finish]): (-[WebCoreNSURLSessionDataTask resource:sentBytes:totalBytesToBeSent:]): (-[WebCoreNSURLSessionDataTask resource:receivedResponse:completionHandler:]): (-[WebCoreNSURLSessionDataTask resource:shouldCacheResponse:]): (-[WebCoreNSURLSessionDataTask resource:receivedData:length:]): (-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]): (-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:metrics:]): (-[WebCoreNSURLSessionDataTask resource:accessControlCheckFailedWithError:]): (-[WebCoreNSURLSessionDataTask resource:loadFailedWithError:]): (-[WebCoreNSURLSessionDataTask resourceFinished:metrics:]): (-[WebCoreNSURLSessionDataTask initWithSession:identifier:URL:]): Deleted. Source/WebKit: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::requestResource): Tools: * TestWebKitAPI/Tests/WebCore/ParsedContentRange.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (TestWebKitAPI::clientCertServer): * TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm: (TestWebKitAPI::testVideoBytes): (TestWebKitAPI::runVideoTest): (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/HTTPServer.h: (TestWebKitAPI::HTTPResponse::HTTPResponse): (TestWebKitAPI::HTTPServer::HTTPResponse::HTTPResponse): Deleted. * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::RequestData::RequestData): (TestWebKitAPI::appendToVector): (TestWebKitAPI::HTTPServer::parsePath): (TestWebKitAPI::HTTPServer::respondToRequests): (TestWebKitAPI::HTTPResponse::bodyFromString): (TestWebKitAPI::HTTPResponse::serialize): Canonical link: https://commits.webkit.org/234141@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-16 16:59:26 +00:00
platform/network/ParsedRequestRange.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/network/ProtectionSpace.h
platform/network/ProtectionSpaceBase.h
platform/network/ProtectionSpaceHash.h
platform/network/ProxyServer.h
platform/network/ResourceErrorBase.h
platform/network/ResourceHandle.h
platform/network/ResourceHandleClient.h
platform/network/ResourceLoadPriority.h
platform/network/ResourceRequestBase.h
platform/network/ResourceResponseBase.h
platform/network/SameSiteInfo.h
Add SPI to unblock third party cookies from WKWebViews with ResourceLoadStatistics turned on https://bugs.webkit.org/show_bug.cgi?id=212058 <rdar://problem/60595539> Patch by Alex Christensen <achristensen@webkit.org> on 2020-05-22 Reviewed by John Wilander. Source/WebCore: * WebCore.xcodeproj/project.pbxproj: * loader/CookieJar.cpp: (WebCore::shouldRelaxThirdPartyCookieBlocking): (WebCore::CookieJar::cookies const): (WebCore::CookieJar::setCookies): (WebCore::CookieJar::cookieRequestHeaderFieldValue const): (WebCore::CookieJar::getRawCookies const): * page/Page.cpp: (WebCore::m_shouldRelaxThirdPartyCookieBlocking): * page/Page.h: (WebCore::Page::shouldRelaxThirdPartyCookieBlocking const): * page/PageConfiguration.h: * platform/network/CacheValidation.cpp: (WebCore::cookieRequestHeaderFieldValue): * platform/network/NetworkStorageSession.cpp: (WebCore::NetworkStorageSession::shouldBlockCookies const): (WebCore::NetworkStorageSession::maxAgeCacheCap): * platform/network/NetworkStorageSession.h: * platform/network/ShouldRelaxThirdPartyCookieBlocking.h: Added. * platform/network/cf/NetworkStorageSessionCFNetWin.cpp: (WebCore::NetworkStorageSession::setCookiesFromDOM const): (WebCore::NetworkStorageSession::cookiesForDOM const): (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): (WebCore::NetworkStorageSession::getRawCookies const): * platform/network/cocoa/NetworkStorageSessionCocoa.mm: (WebCore::NetworkStorageSession::cookiesForURL const): (WebCore::NetworkStorageSession::cookiesForSession const): (WebCore::NetworkStorageSession::cookiesForDOM const): (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): (WebCore::NetworkStorageSession::setCookiesFromDOM const): (WebCore::NetworkStorageSession::getRawCookies const): * platform/network/curl/NetworkStorageSessionCurl.cpp: (WebCore::NetworkStorageSession::setCookiesFromDOM const): (WebCore::NetworkStorageSession::cookiesForDOM const): (WebCore::NetworkStorageSession::getRawCookies const): (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandle::createCurlRequest): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::setCookiesFromDOM const): (WebCore::NetworkStorageSession::getRawCookies const): (WebCore::cookiesForSession): (WebCore::NetworkStorageSession::cookiesForDOM const): (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): Source/WebKit: This value makes NetworkDataTaskCocoa::blockCookies() not do anything for certain WKWebViews. * NetworkProcess/NetworkDataTask.cpp: (WebKit::NetworkDataTask::create): * NetworkProcess/NetworkLoadParameters.h: * NetworkProcess/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::encode const): (WebKit::NetworkResourceLoadParameters::decode): * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::blockCookies): (WebKit::NetworkDataTaskCocoa::unblockCookies): (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * UIProcess/API/APIPageConfiguration.cpp: (API::PageConfiguration::copy const): * UIProcess/API/APIPageConfiguration.h: (API::PageConfiguration::setAllowAllThirdPartyCookies): (API::PageConfiguration::allowAllThirdPartyCookies const): * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration _allowAllThirdPartyCookies]): (-[WKWebViewConfiguration _setAllowAllThirdPartyCookies:]): * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): * WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::addParametersShared): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): Tools: I also add _test_waitForAlert to make tests less verbose. * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/HTTPServer.h: (TestWebKitAPI::Connection::Connection): * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::HTTPServer): (TestWebKitAPI::dataFromString): (TestWebKitAPI::nullTerminatedRequest): (TestWebKitAPI::HTTPServer::request const): (TestWebKitAPI::Connection::receive const): (TestWebKitAPI::Connection::send const): * TestWebKitAPI/cocoa/TestUIDelegate.h: * TestWebKitAPI/cocoa/TestUIDelegate.mm: (-[WKWebView _test_waitForAlert]): Canonical link: https://commits.webkit.org/225134@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-22 18:27:14 +00:00
platform/network/ShouldRelaxThirdPartyCookieBlocking.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/network/SocketStreamError.h
platform/network/SocketStreamHandle.h
platform/network/SocketStreamHandleClient.h
platform/network/StorageSessionProvider.h
platform/network/StoredCredentialsPolicy.h
platform/network/SynchronousLoaderClient.h
Move Timing-Allow-Origin checks to the network process https://bugs.webkit.org/show_bug.cgi?id=226678 <rdar://problem/45227788> Reviewed by Chris Dumez. LayoutTests/imported/w3c: * web-platform-tests/resource-timing/CodingConventions.md: Added. * web-platform-tests/resource-timing/SO-XO-SO-redirect-chain-tao.https-expected.txt: Added. * web-platform-tests/resource-timing/SO-XO-SO-redirect-chain-tao.https.html: Added. * web-platform-tests/resource-timing/SyntheticResponse.py: (main): * web-platform-tests/resource-timing/TAO-match-expected.txt: Added. * web-platform-tests/resource-timing/TAO-match.html: Added. * web-platform-tests/resource-timing/TAO-null-opaque-origin-expected.txt: Added. * web-platform-tests/resource-timing/TAO-null-opaque-origin.html: Added. * web-platform-tests/resource-timing/TAO-port-mismatch-means-crossorigin-expected.txt: Added. * web-platform-tests/resource-timing/TAO-port-mismatch-means-crossorigin.html: Added. * web-platform-tests/resource-timing/__init__.py: Added. * web-platform-tests/resource-timing/buffer-full-add-after-full-event-expected.txt: * web-platform-tests/resource-timing/buffer-full-add-after-full-event.html: * web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-expected.txt: * web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-that-drop.html: * web-platform-tests/resource-timing/buffer-full-add-entries-during-callback.html: * web-platform-tests/resource-timing/buffer-full-add-then-clear-expected.txt: * web-platform-tests/resource-timing/buffer-full-add-then-clear.html: * web-platform-tests/resource-timing/buffer-full-decrease-buffer-during-callback.html: * web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback-expected.txt: * web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback.html: * web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback-expected.txt: * web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback.html: * web-platform-tests/resource-timing/buffer-full-set-to-current-buffer-expected.txt: * web-platform-tests/resource-timing/buffer-full-set-to-current-buffer.html: * web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback-expected.txt: * web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback.html: * web-platform-tests/resource-timing/buffer-full-then-increased-expected.txt: * web-platform-tests/resource-timing/buffer-full-then-increased.html: * web-platform-tests/resource-timing/buffer-full-when-populate-entries-expected.txt: * web-platform-tests/resource-timing/buffer-full-when-populate-entries.html: All these buffer-full tests start failing when I update them. That is an unrelated bug. Firefox has the same bug, and we had the same bug before and after this change. * web-platform-tests/resource-timing/connection-reuse-expected.txt: Added. * web-platform-tests/resource-timing/connection-reuse.html: Added. * web-platform-tests/resource-timing/connection-reuse.https-expected.txt: Added. * web-platform-tests/resource-timing/connection-reuse.https.html: Added. * web-platform-tests/resource-timing/cross-origin-start-end-time-with-redirects-expected.txt: Added. * web-platform-tests/resource-timing/cross-origin-start-end-time-with-redirects.html: Added. * web-platform-tests/resource-timing/cross-origin-status-codes.html: * web-platform-tests/resource-timing/document-domain-no-impact-opener-expected.txt: Added. * web-platform-tests/resource-timing/document-domain-no-impact-opener.html: Added. * web-platform-tests/resource-timing/entry-attributes-expected.txt: Added. * web-platform-tests/resource-timing/entry-attributes.html: Added. * web-platform-tests/resource-timing/fetch-cross-origin-redirect.https-expected.txt: Added. * web-platform-tests/resource-timing/fetch-cross-origin-redirect.https.html: Added. * web-platform-tests/resource-timing/font-timestamps-expected.txt: Added. * web-platform-tests/resource-timing/font-timestamps.html: Added. * web-platform-tests/resource-timing/iframe-failed-commit-expected.txt: Added. * web-platform-tests/resource-timing/iframe-failed-commit.html: Added. * web-platform-tests/resource-timing/initiator-type-for-script-expected.txt: Added. * web-platform-tests/resource-timing/initiator-type-for-script.html: Added. * web-platform-tests/resource-timing/nextHopProtocol-is-tao-protected.https-expected.txt: Added. * web-platform-tests/resource-timing/nextHopProtocol-is-tao-protected.https.html: Added. * web-platform-tests/resource-timing/object-not-found-after-TAO-cross-origin-redirect-expected.txt: Added. * web-platform-tests/resource-timing/object-not-found-after-TAO-cross-origin-redirect.html: Added. * web-platform-tests/resource-timing/object-not-found-after-cross-origin-redirect-expected.txt: Added. * web-platform-tests/resource-timing/object-not-found-after-cross-origin-redirect.html: Added. * web-platform-tests/resource-timing/redirects-expected.txt: Added. * web-platform-tests/resource-timing/redirects.html: Added. * web-platform-tests/resource-timing/resource-ignore-data-url-expected.txt: Added. * web-platform-tests/resource-timing/resource-ignore-data-url.html: Added. * web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain-expected.txt: This apparent regression is actually a progression. When this test is run from our test infrastructure, Chrome and Firefox fail the same tests that you see now failing here, indicating that something is wrong with our test infrastructure. When run on wpt.live, all browsers pass this test after this change. * web-platform-tests/resource-timing/resource_cached.html: Added. * web-platform-tests/resource-timing/resource_initiator_types.html: * web-platform-tests/resource-timing/resource_nested_dedicated_worker.worker.js: (async_test): (async_test.async const): Deleted. * web-platform-tests/resource-timing/resource_timing_content_length-expected.txt: Added. * web-platform-tests/resource-timing/resource_timing_content_length.html: Added. * web-platform-tests/resource-timing/resources/200_empty.asis: Added. * web-platform-tests/resource-timing/resources/TAOResponse.py: (main): * web-platform-tests/resource-timing/resources/all_resource_types.html: Added. * web-platform-tests/resource-timing/resources/buffer-full-utilities.js: (const.waitForNextTask): (const.forceBufferFullEvent.async clearBufferAndSetSize): (const.forceBufferFullEvent): (const.fillUpTheBufferWithTwoResources.async clearBufferAndSetSize): (async const.fillUpTheBufferWithSingleResource.async clearBufferAndSetSize): (async const): (let.appendScript): Deleted. (let.waitForNextTask): Deleted. (let.waitUntilConditionIsMet.cond.return.new.Promise.resolve.let.checkCondition): Deleted. (let.waitForEventToFire.return.new.Promise): Deleted. (let.waitForEventToFire): Deleted. (let.fillUpTheBufferWithTwoResources.async src): Deleted. * web-platform-tests/resource-timing/resources/cacheable-and-validated.py: Added. (main): * web-platform-tests/resource-timing/resources/connection-reuse-test.js: Added. (attribute_test.async client): (attribute_test): * web-platform-tests/resource-timing/resources/csp-default-none.html: Added. * web-platform-tests/resource-timing/resources/csp-default-none.html.headers: Added. * web-platform-tests/resource-timing/resources/document-domain-no-impact.html: Added. * web-platform-tests/resource-timing/resources/document-refreshed.html: Added. * web-platform-tests/resource-timing/resources/document-that-refreshes.html: Added. * web-platform-tests/resource-timing/resources/embed-refresh.html: Added. * web-platform-tests/resource-timing/resources/green-frame.html: Added. * web-platform-tests/resource-timing/resources/green.html: Added. * web-platform-tests/resource-timing/resources/green.html.headers: Added. * web-platform-tests/resource-timing/resources/gzip_xml.py: * web-platform-tests/resource-timing/resources/iframe-refresh.html: Added. * web-platform-tests/resource-timing/resources/iframe-reload-TAO.sub.html: * web-platform-tests/resource-timing/resources/multi_redirect.py: (main): * web-platform-tests/resource-timing/resources/object-refresh.html: Added. * web-platform-tests/resource-timing/resources/redirect-cors.py: Added. (main): * web-platform-tests/resource-timing/resources/resource-timing-content-length.py: Added. (main): * web-platform-tests/resource-timing/resources/resource_timing_test0.xml: * web-platform-tests/resource-timing/resources/sizes-helper.js: Added. (const.checkSizeFields): * web-platform-tests/resource-timing/resources/status-code.py: (main): * web-platform-tests/resource-timing/resources/webperftestharness.js: (test_namespace): (test_attribute_exists): (test_enum): * web-platform-tests/resource-timing/resources/webperftestharnessextension.js: (test_method_exists): * web-platform-tests/resource-timing/same-origin-from-cross-origin-redirect-expected.txt: Added. * web-platform-tests/resource-timing/same-origin-from-cross-origin-redirect.html: Added. * web-platform-tests/resource-timing/sizes-cache.any.js: Added. (const.accumulateEntries): (const.checkResourceSizes.list.let.entry.of.entries.else): (promise_test): * web-platform-tests/resource-timing/sizes-redirect-img-expected.txt: Added. * web-platform-tests/resource-timing/sizes-redirect-img.html: Added. * web-platform-tests/resource-timing/sizes-redirect.any.js: Added. (const.accumulateEntry): (const.checkResourceSizes): (const.redirectUrl): (promise_test): * web-platform-tests/resource-timing/status-codes-create-entry.html: * web-platform-tests/resource-timing/test_resource_timing-expected.txt: * web-platform-tests/resource-timing/test_resource_timing.https-expected.txt: * web-platform-tests/resource-timing/workerStart-tao-protected.https.html: Source/WebCore: We tried hard to do it in the web process by keeping track of whether the last redirect was cross-origin and checking the final response and original security origin. We got many tests to pass, but to get the rest and be correct, we need to check the Timing-Allow-Origin header field of each redirect against the original security origin. Tests: imported/w3c/web-platform-tests/resource-timing/SO-XO-SO-redirect-chain-tao.https.html imported/w3c/web-platform-tests/resource-timing/TAO-match.html imported/w3c/web-platform-tests/resource-timing/TAO-null-opaque-origin.html imported/w3c/web-platform-tests/resource-timing/TAO-port-mismatch-means-crossorigin.html imported/w3c/web-platform-tests/resource-timing/connection-reuse.html imported/w3c/web-platform-tests/resource-timing/connection-reuse.https.html imported/w3c/web-platform-tests/resource-timing/cross-origin-start-end-time-with-redirects.html imported/w3c/web-platform-tests/resource-timing/document-domain-no-impact-opener.html imported/w3c/web-platform-tests/resource-timing/entry-attributes.html imported/w3c/web-platform-tests/resource-timing/fetch-cross-origin-redirect.https.html imported/w3c/web-platform-tests/resource-timing/font-timestamps.html imported/w3c/web-platform-tests/resource-timing/iframe-failed-commit.html imported/w3c/web-platform-tests/resource-timing/initiator-type-for-script.html imported/w3c/web-platform-tests/resource-timing/nextHopProtocol-is-tao-protected.https.html imported/w3c/web-platform-tests/resource-timing/object-not-found-after-TAO-cross-origin-redirect.html imported/w3c/web-platform-tests/resource-timing/object-not-found-after-cross-origin-redirect.html imported/w3c/web-platform-tests/resource-timing/redirects.html imported/w3c/web-platform-tests/resource-timing/resource-ignore-data-url.html imported/w3c/web-platform-tests/resource-timing/resource_cached.html imported/w3c/web-platform-tests/resource-timing/resource_timing_content_length.html imported/w3c/web-platform-tests/resource-timing/same-origin-from-cross-origin-redirect.html imported/w3c/web-platform-tests/resource-timing/sizes-redirect-img.html * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::start): Get a SecurityOrigin for our WebKitLegacy ResourceHandle use like we do in WebLoaderStrategy::scheduleLoadFromNetworkProcess * loader/ResourceTiming.cpp: (WebCore::ResourceTiming::ResourceTiming): (WebCore::ResourceTiming::initServerTiming): (WebCore::ResourceTiming::isolatedCopy const): (WebCore::passesTimingAllowCheck): Deleted. * loader/ResourceTiming.h: (WebCore::ResourceTiming::networkLoadMetrics const): (WebCore::ResourceTiming::ResourceTiming): (WebCore::ResourceTiming::allowTimingDetails const): Deleted. (): Deleted. * page/PerformanceNavigation.cpp: (WebCore::PerformanceNavigation::redirectCount const): * page/PerformanceNavigationTiming.cpp: (WebCore::PerformanceNavigationTiming::sameOriginCheckFails const): (WebCore::PerformanceNavigationTiming::redirectCount const): * page/PerformanceResourceTiming.cpp: (WebCore::entryStartTime): (WebCore::entryEndTime): (WebCore::PerformanceResourceTiming::redirectStart const): (WebCore::PerformanceResourceTiming::redirectEnd const): (WebCore::PerformanceResourceTiming::domainLookupStart const): (WebCore::PerformanceResourceTiming::domainLookupEnd const): (WebCore::PerformanceResourceTiming::connectStart const): (WebCore::PerformanceResourceTiming::connectEnd const): (WebCore::PerformanceResourceTiming::secureConnectionStart const): (WebCore::PerformanceResourceTiming::requestStart const): (WebCore::PerformanceResourceTiming::responseStart const): (WebCore::PerformanceResourceTiming::transferSize const): (WebCore::PerformanceResourceTiming::encodedBodySize const): (WebCore::PerformanceResourceTiming::decodedBodySize const): * page/PerformanceTiming.cpp: (WebCore::PerformanceTiming::unloadEventStart const): (WebCore::PerformanceTiming::unloadEventEnd const): (WebCore::PerformanceTiming::redirectStart const): (WebCore::PerformanceTiming::redirectEnd const): * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::BlobResourceHandle): * platform/network/NetworkLoadMetrics.h: (WebCore::NetworkLoadMetrics::isolatedCopy const): (WebCore::NetworkLoadMetrics::operator== const): (WebCore::NetworkLoadMetrics::encode const): (WebCore::NetworkLoadMetrics::decode): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::ResourceHandle): (WebCore::ResourceHandle::create): (WebCore::ResourceHandle::loadResourceSynchronously): (WebCore::ResourceHandle::isCrossOriginWithoutTAO const): (WebCore::ResourceHandle::markAsCrossOriginWithoutTAO): (WebCore::ResourceHandle::sourceOrigin const): (WebCore::ResourceHandle::hasCrossOriginRedirect const): Deleted. (WebCore::ResourceHandle::setHasCrossOriginRedirect): Deleted. * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): * platform/network/TimingAllowOrigin.cpp: Added. (WebCore::passesTimingAllowOriginCheck): * platform/network/TimingAllowOrigin.h: Added. * platform/network/cocoa/NetworkLoadMetrics.mm: (WebCore::packageTimingData): (WebCore::copyTimingData): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::platformLoadResourceSynchronously): * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): Source/WebKit: * NetworkProcess/NetworkLoadParameters.h: * NetworkProcess/NetworkResourceLoadParameters.h: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::sendReplyToSynchronousRequest): Pass complete metrics with sync xhr responses. Many of the tests use sync xhr. (WebKit::NetworkResourceLoader::didFinishLoading): (WebKit::NetworkResourceLoader::didFailLoading): (WebKit::NetworkResourceLoader::didRetrieveCacheEntry): * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]): (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): Source/WebKitLegacy: * WebCoreSupport/PingHandle.h: * WebCoreSupport/WebResourceLoadScheduler.cpp: (WebResourceLoadScheduler::loadResourceSynchronously): LayoutTests: * TestExpectations: Canonical link: https://commits.webkit.org/238700@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-10 23:29:57 +00:00
platform/network/TimingAllowOrigin.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/sql/SQLValue.h
platform/sql/SQLiteDatabase.h
platform/sql/SQLiteDatabaseTracker.h
platform/sql/SQLiteDatabaseTrackerClient.h
platform/sql/SQLiteFileSystem.h
platform/sql/SQLiteStatement.h
IndexedDB WAL file keeps growing while app is in use https://bugs.webkit.org/show_bug.cgi?id=202137 Reviewed by Brady Eidson. Source/WebCore: It's easy to get into a situation where the WAL file associated with a SQLite-backed IndexedDB grows indefinitely while a site is in use for two reasons: 1. We don't promptly reset cached prepared statements in SQLiteIDBBackingStore. Many statements are left hanging in the SQLITE_ROW state without being reset or fully stepped to the SQLITE_DONE state. These hanging statements keep their associated transactions open and prevent the WAL checkpointer from progressing past those active transactions. To fix this, I added SQLiteStatementAutoResetScope. This is a scope guard that SQLiteIDBBackingStore uses to ensure that cached statements are reset in a timely manner. While going through the reset code I also noticed we aren't clearing bindings after resetting statements. We should be doing this because sqlite3_reset does not clear bindings (and their associated copies of blobs/strings); sqlite3_clear_bindings does that. 2. The default WAL hook for auto-checkpointing in upstream SQLite uses the SQLITE_CHECKPOINT_PASSIVE mode, which doesn't truncate the WAL until the next write transaction occurs. (It actually doesn't truncate at all when compiled with default settings, but macOS's SQLite sets SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT, which causes the truncation to occur on the next write.) We want the WAL to be truncated more promptly, because otherwise the quota check that happens on each mutation won't be as accurate. To do this, I installed a WAL hook that truncates the WAL with SQLITE_CHECKPOINT_TRUNCATE after the default threshold of 1000 WAL pages. I didn't enable this for all SQLiteDatabases because this checkpoint call can block on the busy handler. This isn't a problem for IDB since we don't use busy handlers in IDB. * Headers.cmake: * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords): (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey): (WebCore::IDBServer::SQLiteIDBBackingStore::getCount): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue): (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement): * Modules/indexeddb/server/SQLiteIDBBackingStore.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/sql/SQLiteDatabase.cpp: (WebCore::walAutomaticTruncationHook): (WebCore::SQLiteDatabase::enableAutomaticWALTruncation): * platform/sql/SQLiteDatabase.h: * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::reset): * platform/sql/SQLiteStatementAutoResetScope.cpp: Added. (WebCore::SQLiteStatementAutoResetScope::SQLiteStatementAutoResetScope): (WebCore::SQLiteStatementAutoResetScope::operator=): (WebCore::SQLiteStatementAutoResetScope::~SQLiteStatementAutoResetScope): * platform/sql/SQLiteStatementAutoResetScope.h: Added. (WebCore::SQLiteStatementAutoResetScope::operator bool const): (WebCore::SQLiteStatementAutoResetScope::operator! const): (WebCore::SQLiteStatementAutoResetScope::get): (WebCore::SQLiteStatementAutoResetScope::operator->): Tools: Add a test to make sure that WAL auto-checkpointing actually works. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/IDBCheckpointWAL.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/IDBCheckpointWAL.mm: Added. (-[IDBCheckpointWALMessageHandler userContentController:didReceiveScriptMessage:]): (fileSizeAtPath): (TEST): Canonical link: https://commits.webkit.org/224314@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-05 03:19:56 +00:00
platform/sql/SQLiteStatementAutoResetScope.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/sql/SQLiteTransaction.h
platform/text/BidiContext.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
platform/text/FontRenderingMode.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/text/StringWithDirection.h
platform/text/TextBoundaries.h
platform/text/TextCheckerClient.h
platform/text/TextChecking.h
platform/text/TextCodec.h
Source/WebCore: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Move each enum type used by Settings to its own header and make them all scoped enums in preparation for using them in the generated settings code. Also converted enums used in Settings that are used as flags to use OptionSet, adding the necessary EnumTraits to make it to work. In the change, Settings still generates with getters/setters that work on the raw enum, but in subsequent changes the generation will work directly with OptionSets. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: Add new headers, adjust for renames. * Scripts/GenerateSettings.rb: Add special case for HTML prefix to keep renamed HTMLParserScriptingFlagPolicy setting using WebCore consistent capitalization. * accessibility/ForcedAccessibilityValue.h: Added. * css/FontLoadTimingOverride.h: Added. * editing/EditableLinkBehavior.h: Added. * editing/cocoa/DataDetectorTypes.h: Added. * html/parser/HTMLParserScriptingFlagPolicy.h: Added. * page/FrameFlattening.h: Added. * page/PDFImageCachingPolicy.h: Added. * page/DebugOverlayRegions.h: Added. * page/StorageBlockingPolicy.h: Added. * page/TextDirectionSubmenuInclusionBehavior.h: Added. * page/UserInterfaceDirectionPolicy.h: Added. * platform/text/FontRenderingMode.h: Added. * platform/text/TextDirection.h: Added. Add new headers. * editing/EditingBehaviorType.h: Added. * editing/EditingBehaviorTypes.h: Removed. Renamed header to match enum name. * css/CSSFontFace.cpp: (WebCore::fontLoadTimingOverride): (WebCore::CSSFontFace::fontLoadTiming const): Update uses of FontLoadTimingOverride to remove Settings scoping. * css/MediaQueryEvaluator.cpp: (WebCore::monochromeEvaluate): (WebCore::invertedColorsEvaluate): (WebCore::dynamicRangeEvaluate): (WebCore::prefersReducedMotionEvaluate): Update uses of ForcedAccessibilityValue to remove Settings scoping. * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Update uses of StorageBlockingPolicy to remove SecurityOrigin scoping. * editing/EditingBehavior.h: Update use of EditingBehaviorType to use scoped syntax. * editing/Editor.cpp: (WebCore::Editor::behavior const): Remove unnecessary duplication of EditingBehavior construction. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): Update for renamed setter now called setHTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType const): Update use of EditableLinkBehavior to use scoped syntax. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): Update for renamed setting now called HTMLParserScriptingFlagPolicy to make it clear it is about the HTML parser and no longer scoped to Settings. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Switch to using OptionSet<DataDetectorTypes> rather than raw DataDetectorTypes. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update use of TextDirectionSubmenuInclusionBehavior to use scoped syntax. * page/DebugPageOverlays.cpp: (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/EventHandler.cpp: (WebCore::EventHandler::useHandCursor): Update use of EditableLinkBehavior to use scoped syntax. * page/FrameView.h: Switch to #including FrameFlattening.h since it is such a trivial include now. * page/Page.cpp: (WebCore::Page::shouldBuildEditableRegion const): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * page/SecurityOrigin.cpp: * page/SecurityOrigin.h: Update to now include StorageBlockingPolicy.h and switch to use scoped syntax. * page/Settings.yaml: Update setting defaults to use new scoped names where appropriate and rename ParserScriptingFlagPolicy to HTMLParserScriptingFlagPolicy to make it clear which parser it is for. * page/SettingsBase.h: Replace enum definitions with #includes for the new headers. In future changes, these will be automatically included in the generated code and this won't be necessary anymore. * platform/DragImage.h: * platform/graphics/FontDescription.h: Update #includes to keep things building. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): * platform/graphics/cg/PDFDocumentImage.h: Update use of PDFImageCachingPolicy to use scoped syntax. * platform/text/TextFlags.h: Extract FontRenderingMode into its own header. * platform/text/WritingMode.h: Extract TextDirection into its own header. Also replace some macros with constexprs while I was here. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintDebugOverlays): (WebCore::RenderLayerBacking::paintContents): Switch to using OptionSet<DebugOverlayRegions> rather than raw DebugOverlayRegions. * testing/InternalSettings.cpp: * testing/InternalSettings.h: * testing/InternalSettings.idl: Use new enums rather than redeclaring them. Updates EditingBehaviorType to use the value "windows" rather than "win" which requires test changes as does changes to capitalization of PDFImageCachingPolicy enum values. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::createPageForServiceWorker): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/context/ServiceWorkerThreadProxy.h: Update for extracted StorageBlockingPolicy enum. Source/WebKit: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toEditableLinkBehavior): (WebKit::toStorageBlockingPolicy): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetEditableLinkBehavior): (WKPreferencesSetStorageBlockingPolicy): (WKPreferencesGetStorageBlockingPolicy): * UIProcess/API/Cocoa/WKPreferences.mm: (toStorageBlockingPolicy): (toAPI): (-[WKPreferences _storageBlockingPolicy]): (-[WKPreferences _setStorageBlockingPolicy:]): (toEditableLinkBehavior): (-[WKPreferences _setEditableLinkBehavior:]): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::detectDataInAllFrames): Source/WebKitLegacy/mac: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses for renames and scoped syntax use. * WebView/WebFrame.mm: * WebView/WebView.mm: Source/WTF: Standardize enums that are used by Settings in preperation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update enum uses in default WebPreferences values for renames and scoped syntax use. * Scripts/Preferences/WebPreferences.yaml: LayoutTests: Standardize enums that are used by Settings in preparation for autogeneration https://bugs.webkit.org/show_bug.cgi?id=218960 Reviewed by Tim Horton. Update tests and results for change in EditingBahavior enum value "win" -> "windows". * editing/deleting/delete-ligature-003-expected.txt: * editing/deleting/delete-ligature-003.html: * editing/deleting/paragraph-in-preserveNewline-expected.txt: * editing/deleting/paragraph-in-preserveNewline.html: * editing/deleting/smart-editing-disabled-win.html: * editing/deleting/whitespace-pre-1-expected.txt: * editing/deleting/whitespace-pre-1.html: * editing/execCommand/query-command-state-expected.txt: * editing/execCommand/query-command-state.html: * editing/execCommand/query-text-alignment-expected.txt: * editing/execCommand/query-text-alignment.html: * editing/execCommand/remove-format-multiple-elements-win.html: * editing/execCommand/toggle-compound-styles-expected.txt: * editing/execCommand/toggle-compound-styles.html: * editing/execCommand/toggle-link-win.html: * editing/execCommand/toggle-unlink-win.html: * editing/selection/5195166-1.html: * editing/selection/5354455-1.html: * editing/selection/click-in-margins-inside-editable-div.html: * editing/selection/click-in-padding-with-multiple-line-boxes.html: * editing/selection/context-menu-text-selection-lookup.html: * editing/selection/context-menu-text-selection.html: * editing/selection/extend-after-mouse-selection.html: * editing/selection/extend-selection-after-double-click.html: * editing/selection/extend-selection-enclosing-block-win.html: * editing/selection/move-by-word-visually-crash-test-1.html: * editing/selection/move-by-word-visually-crash-test-2.html: * editing/selection/move-by-word-visually-crash-test-3.html: * editing/selection/move-by-word-visually-crash-test-4.html: * editing/selection/move-by-word-visually-crash-test-5.html: * editing/selection/move-by-word-visually-crash-test-css-generated-content.html: * editing/selection/move-by-word-visually-crash-test-textarea.html: * editing/selection/move-by-word-visually-inline-block-positioned-element.html: * editing/selection/move-by-word-visually-multi-line.html: * editing/selection/move-by-word-visually-multi-space.html: * editing/selection/move-by-word-visually-null-box.html: * editing/selection/move-by-word-visually-single-space-inline-element.html: * editing/selection/move-by-word-visually-single-space-one-element.html: * editing/selection/move-by-word-visually-textarea.html: * editing/selection/move-by-word-visually-wrong-left-right.html: * editing/selection/programmatic-selection-on-mac-is-directionless-expected.txt: * editing/selection/programmatic-selection-on-mac-is-directionless.html: * editing/selection/rtl-move-selection-right-left.html: * editing/selection/selection-extend-should-not-move-across-caret-on-mac-expected.txt: * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html: * editing/selection/shift-click.html: * editing/selection/user-select-all-with-shift-expected.txt: * editing/selection/user-select-all-with-shift.html: * editing/spelling/copy-paste-crash.html: * editing/style/iframe-onload-crash-win.html: * editing/style/make-text-writing-direction-inline-win.html: * editing/style/push-down-font-styles-win.html: * editing/style/push-down-implicit-styles-around-list-win.html: * editing/style/toggle-style-bold-italic-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: * editing/style/toggle-style-bold-italic-mixed-editability.html: * editing/style/toggle-style-bold-italic.html: * fast/events/backspace-navigates-back.html: * fast/forms/selection-direction-expected.txt: * fast/forms/selection-direction.html: Canonical link: https://commits.webkit.org/231641@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 01:34:46 +00:00
platform/text/TextDirection.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
platform/text/TextEncoding.h
platform/text/TextEncodingRegistry.h
platform/text/TextFlags.h
platform/text/UnicodeBidi.h
platform/text/WritingMode.h
platform/xr/PlatformXR.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
plugins/PluginData.h
plugins/PluginInfoProvider.h
plugins/PluginViewBase.h
plugins/npapi.h
plugins/npfunctions.h
plugins/npruntime.h
plugins/nptypes.h
rendering/BreakLines.h
rendering/ClipPathOperation.h
rendering/ClipRect.h
rendering/EventRegion.h
rendering/FloatingObjects.h
rendering/GapRects.h
Rename SelectionData classes and structures HighlightData, etc to be more inclusive for their new use cases https://bugs.webkit.org/show_bug.cgi?id=206340 Reviewed by Ryosuke Niwa. Rename only, no behaviour change. With the new Highlight API, we will be using these data structures to support Highlights as well as Selection, rename to Highlight, as a Selection is a type of Highlight. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/DragImage.cpp: (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState): (WebCore::createDragImageForRange): * rendering/ComplexLineLayout.cpp: (WebCore::ComplexLineLayout::constructLine): * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::paint): * rendering/EllipsisBox.h: * rendering/HighlightData.cpp: Renamed from Source/WebCore/rendering/SelectionRangeData.cpp. (WebCore::isValidRendererForSelection): (WebCore::collect): (WebCore::HighlightData::HighlightData): (WebCore::HighlightData::setRenderRange): (WebCore::HighlightData::selectionStateForRenderer): (WebCore::HighlightData::set): (WebCore::HighlightData::clear): (WebCore::HighlightData::repaint const): (WebCore::HighlightData::collectBounds const): (WebCore::HighlightData::apply): * rendering/HighlightData.h: Renamed from Source/WebCore/rendering/SelectionRangeData.h. (WebCore::HighlightData::RenderRange::RenderRange): (WebCore::HighlightData::RenderRange::operator== const): (WebCore::HighlightData::get const): (WebCore::HighlightData::start const): (WebCore::HighlightData::end const): (WebCore::HighlightData::startOffset const): (WebCore::HighlightData::endOffset const): * rendering/InlineBox.cpp: (WebCore::InlineBox::selectionState): * rendering/InlineBox.h: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::selectionState): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::selectionState): (WebCore::InlineTextBox::verifySelectionState const): (WebCore::InlineTextBox::paint): (WebCore::InlineTextBox::clampedStartEndForState const): (WebCore::InlineTextBox::highlightStartEnd const): (WebCore::InlineTextBox::collectMarkedTextsForHighlights const): * rendering/InlineTextBox.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::shouldPaintSelectionGaps const): (WebCore::RenderBlock::selectionGaps): (WebCore::RenderBlock::blockSelectionGaps): (WebCore::RenderBlock::getSelectionGapInfo): * rendering/RenderBlock.h: * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::setSelectionState): (WebCore::RenderBlockFlow::inlineSelectionGaps): * rendering/RenderBlockFlow.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::setSelectionState): * rendering/RenderBoxModelObject.h: * rendering/RenderLineBreak.cpp: (WebCore::RenderLineBreak::setSelectionState): * rendering/RenderLineBreak.h: * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::paint): (WebCore::RenderListMarker::setSelectionState): (WebCore::RenderListMarker::selectionRectForRepaint): * rendering/RenderListMarker.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::isSelectionBorder const): * rendering/RenderObject.h: (WebCore::RenderObject::selectionState const): (WebCore::RenderObject::setSelectionState): (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields): (WebCore::RenderObject::RenderObjectBitfields::selectionState const): (WebCore::RenderObject::RenderObjectBitfields::setSelectionState): (WebCore::RenderObject::setSelectionStateIfNeeded): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::shouldDrawSelectionTint const): (WebCore::RenderReplaced::paint): (WebCore::RenderReplaced::setSelectionState): (WebCore::RenderReplaced::isSelected const): * rendering/RenderReplaced.h: * rendering/RenderSelectionInfo.h: (WebCore::RenderSelectionInfoBase::state const): * rendering/RenderText.cpp: (WebCore::RenderText::setSelectionState): (WebCore::RenderText::collectSelectionRectsForLineBoxes): * rendering/RenderText.h: * rendering/RenderTextLineBoxes.cpp: (WebCore::RenderTextLineBoxes::setSelectionState): * rendering/RenderTextLineBoxes.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintAttachment): * rendering/RenderView.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::setSelectionState): * rendering/RenderWidget.h: * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::lineSelectionGap): (WebCore::RootInlineBox::selectionState): (WebCore::RootInlineBox::firstSelectedBox): (WebCore::RootInlineBox::lastSelectedBox): (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock const): * rendering/RootInlineBox.h: * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseForWithReason): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::paintSelectionBackground): (WebCore::SVGInlineTextBox::paint): * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::paint): Canonical link: https://commits.webkit.org/220478@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-10 19:32:19 +00:00
rendering/HighlightData.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
rendering/HitTestLocation.h
rendering/HitTestRequest.h
rendering/HitTestResult.h
[Async overflow scroll] Clipped composited layers inside overflow scroll jitter and get incorrectly clipped https://bugs.webkit.org/show_bug.cgi?id=199133 rdar://problem/43614439 Reviewed by Antti Koivisto. Source/WebCore: Currently a composited layer with an overflow:scroll ancestor (which is not a paint-order ancestor) gets a single "ancestor clip layer" that represents the intersection of all the clips provided by its containing-block ancestors with non-visible overflow (both scrolling and non-scrolling ones). To correctly update clips with async overflow scroll, this single clip layer needs to be broken up into multiple clipping ancestors. We need a separate layer, and scrolling tree node for each ancestor that is an overflow scroll, and layers that represent non-moving clips (i.e. overflow:hidden and 'clip') between them. This patch adds LayerAncestorClippingStack to represent this stack of clipping layers. For example with the following content: <div style="overflow:hidden"> <--- A <div style="overflow:scroll"> <--- B <div style="overflow:hidden"> <--- C <div style="overflow:hidden"> <--- D <div style="overflow:scroll"> <--- E <div style="overflow:hidden"> <--- F <div style="overflow:hidden"> <--- G <div></div> <--- H <div> <div> <div> <div> <div> <div> <div> the composited RenderLayer for H owns a LayerAncestorClippingStack with the following contents: [clip - A] [scroller - B] [clip - intersection of C and D] [scroller - E] [clip - intersection of F and G] Each stack entry has a 'masksToBounds' GraphicsLayer for clipping. Entries representing overflow:scroll clips have a ScrollingNodeID for their OverflowScrollProxy scrolling tree node (which references the actual OverflowScrollingNode). The non-scroller clips in this stack are computed unconstrained by the enclosing overflow:scroll. When the OverflowScrollingNode is scrolled, the boundsOrigin of related OverflowScrollProxy nodes is adjusted to move the descendant layers (other clipping layers, or composited layers). OverflowScrollProxy nodes thus take over the role that "Moves" ScrollingTreePositionedNode had. With this patch, ScrollingTreePositionedNode are purely for absolute position inside non-containing-block stacking context overflow scroll. LayoutConstraints is renamed to AbsolutePositionConstraints accordingly. Tests: compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll.html compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested.html compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow.html compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden.html compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible.html compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer.html compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped.html compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer.html compositing/scrolling/async-overflow-scrolling/layer-in-overflow.html scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested.html scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow.html * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::setPositionedNodeConstraints): (WebCore::AsyncScrollingCoordinator::setPositionedNodeGeometry): Deleted. * page/scrolling/AsyncScrollingCoordinator.h: * page/scrolling/ScrollingConstraints.cpp: (WebCore::operator<<): * page/scrolling/ScrollingConstraints.h: (WebCore::AbsolutePositionConstraints::operator== const): (WebCore::AbsolutePositionConstraints::operator!= const): (WebCore::LayoutConstraints::operator== const): Deleted. (WebCore::LayoutConstraints::operator!= const): Deleted. (WebCore::LayoutConstraints::alignmentOffset const): Deleted. (WebCore::LayoutConstraints::setAlignmentOffset): Deleted. (WebCore::LayoutConstraints::layerPositionAtLastLayout const): Deleted. (WebCore::LayoutConstraints::setLayerPositionAtLastLayout): Deleted. (WebCore::LayoutConstraints::scrollPositioningBehavior const): Deleted. (WebCore::LayoutConstraints::setScrollPositioningBehavior): Deleted. * page/scrolling/ScrollingCoordinator.h: (WebCore::ScrollingCoordinator::setPositionedNodeConstraints): (WebCore::ScrollingCoordinator::setPositionedNodeGeometry): Deleted. * page/scrolling/ScrollingStatePositionedNode.cpp: (WebCore::ScrollingStatePositionedNode::updateConstraints): * page/scrolling/ScrollingStatePositionedNode.h: * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::commitTreeState): * page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::nodesWithRelatedOverflow): (WebCore::ScrollingTree::positionedNodesWithRelatedOverflow): Deleted. * page/scrolling/cocoa/ScrollingTreeFixedNode.mm: (WebCore::ScrollingTreeFixedNode::applyLayerPositions): * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm: (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren): * page/scrolling/cocoa/ScrollingTreePositionedNode.h: (WebCore::ScrollingTreePositionedNode::scrollPositioningBehavior const): Deleted. * page/scrolling/cocoa/ScrollingTreePositionedNode.mm: (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren): (WebCore::ScrollingTreePositionedNode::scrollDeltaSinceLastCommit const): * page/scrolling/cocoa/ScrollingTreeStickyNode.mm: (WebCore::ScrollingTreeStickyNode::computeLayerPosition const): * rendering/LayerAncestorClippingStack.cpp: Added. (WebCore::LayerAncestorClippingStack::LayerAncestorClippingStack): (WebCore::LayerAncestorClippingStack::equalToClipData const): (WebCore::LayerAncestorClippingStack::hasAnyScrollingLayers const): (WebCore::LayerAncestorClippingStack::clear): (WebCore::LayerAncestorClippingStack::detachFromScrollingCoordinator): (WebCore::LayerAncestorClippingStack::firstClippingLayer const): (WebCore::LayerAncestorClippingStack::lastClippingLayer const): (WebCore::LayerAncestorClippingStack::lastOverflowScrollProxyNodeID const): (WebCore::LayerAncestorClippingStack::updateScrollingNodeLayers): (WebCore::LayerAncestorClippingStack::updateWithClipData): (WebCore::operator<<): * rendering/LayerAncestorClippingStack.h: Added. (WebCore::CompositedClipData::CompositedClipData): (WebCore::CompositedClipData::operator== const): (WebCore::CompositedClipData::operator!= const): (WebCore::LayerAncestorClippingStack::stack): (WebCore::LayerAncestorClippingStack::stack const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::~RenderLayerBacking): (WebCore::RenderLayerBacking::updateDebugIndicators): (WebCore::RenderLayerBacking::destroyGraphicsLayers): (WebCore::RenderLayerBacking::updateTransform): (WebCore::RenderLayerBacking::updateBlendMode): (WebCore::RenderLayerBacking::updateAfterLayout): (WebCore::RenderLayerBacking::updateConfiguration): (WebCore::computeOffsetFromAncestorGraphicsLayer): (WebCore::RenderLayerBacking::computePrimaryGraphicsLayerRect const): (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const): (WebCore::RenderLayerBacking::updateGeometry): (WebCore::RenderLayerBacking::updateInternalHierarchy): (WebCore::RenderLayerBacking::updateAncestorClippingStack): (WebCore::RenderLayerBacking::updateAncestorClipping): (WebCore::RenderLayerBacking::detachFromScrollingCoordinator): (WebCore::RenderLayerBacking::scrollingNodeIDForChildren const): (WebCore::RenderLayerBacking::childForSuperlayers const): (WebCore::RenderLayerBacking::backingStoreMemoryEstimate const): (WebCore::operator<<): (WebCore::RenderLayerBacking::updateAncestorClippingLayer): Deleted. (WebCore::RenderLayerBacking::coordinatedScrollingRoles const): Deleted. * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer): (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): (WebCore::RenderLayerCompositor::layerStyleChanged): We need to run the checks for changed clipping whether or not this layer has backing, because a non-composited layer with clipping can be represented in the clipping stack of some other layer. (WebCore::RenderLayerCompositor::clippedByAncestor const): (WebCore::RenderLayerCompositor::updateAncestorClippingStack const): (WebCore::RenderLayerCompositor::computeAncestorClippingStack const): The output of this function is a Vector<CompositedClipData> which represents the ancestor clipping stack, but without the proxy node and GraphicsLayer information. It's input to LayerAncestorClippingStack::updateWithClipData() which does the merging of old and new states. (WebCore::collectRelatedCoordinatedScrollingNodes): (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers): (WebCore::scrollCoordinationRoleForNodeType): (WebCore::RenderLayerCompositor::attachScrollingNode): (WebCore::RenderLayerCompositor::registerScrollingNodeID): (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerWithRole): (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): (WebCore::RenderLayerCompositor::coordinatedScrollingRolesForLayer const): Code moved from RenderLayerBacking. (WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer): (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole): (WebCore::RenderLayerCompositor::updateScrollingNodeForPositioningRole): * rendering/RenderLayerCompositor.h: (WebCore::allScrollCoordinationRoles): Source/WebKit: LayoutConstraints -> AbsolutePositionConstraints rename. * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: (ArgumentCoder<ScrollingStatePositionedNode>::decode): * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<AbsolutePositionConstraints>::encode): (IPC::ArgumentCoder<AbsolutePositionConstraints>::decode): (IPC::ArgumentCoder<LayoutConstraints>::encode): Deleted. (IPC::ArgumentCoder<LayoutConstraints>::decode): Deleted. * Shared/WebCoreArgumentCoders.h: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::WebRenderLayer): * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: (WebKit::RemoteScrollingCoordinatorProxy::establishLayerTreeScrollingRelations): ScrollingTreeOverflowScrollProxyNode have overflow scroll relations now too. LayoutTests: New baselines for: - clipping layers no longer have offsetFromRenderer(), which they didn't need. - positioned nodes don't print scrollBehavior (they are always "Stationary") - "Moves" positioned nodes are replaced with overflow scroll proxy nodes * compositing/backing/backing-store-attachment-empty-keyframe-expected.txt: * compositing/geometry/clip-expected.txt: * compositing/geometry/clip-inside-expected.txt: * compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: * compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt: * compositing/layer-creation/clipping-scope/nested-scroller-overlap.html: * compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller-expected.txt: * compositing/layer-creation/clipping-scope/scroller-with-negative-z-children-expected.txt: * compositing/overflow/clip-descendents-expected.txt: * compositing/overflow/scrolling-content-clip-to-viewport-expected.txt: * compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt: * compositing/rtl/rtl-scrolling-with-transformed-descendants.html: * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll-expected.txt: Added. * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll.html: Added. * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-expected.txt: Added. * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt: Added. * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested.html: Added. * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow.html: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden-expected.txt: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden.html: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible-expected.txt: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible.html: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-expected.txt: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer-expected.txt: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer.html: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped-expected.txt: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped.html: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer-expected.txt: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer.html: Added. * compositing/scrolling/async-overflow-scrolling/layer-in-overflow.html: Added. * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html: * platform/ios-wk2/compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt: * platform/ios-wk2/compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller-expected.txt: * platform/ios-wk2/compositing/layer-creation/clipping-scope/scroller-with-negative-z-children-expected.txt: * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll-expected.txt: Added. * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-expected.txt: Added. * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt: Added. * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden-expected.txt: Added. * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible-expected.txt: Added. * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-expected.txt: Added. * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer-expected.txt: Added. * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped-expected.txt: Added. * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer-expected.txt: Added. * platform/ios-wk2/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: * platform/ios-wk2/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: * platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-in-nested-sc-scrollers-expected.txt: * platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt: * platform/ios-wk2/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-expected.txt: Copied from LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt. * platform/ios-wk2/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested-expected.txt: Copied from LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-overflow-scroll-expected.txt. * platform/ios-wk2/scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt: * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt: * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt: * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt: * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-overflow-scroll-expected.txt: * platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt: * platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt: * platform/ios-wk2/scrollingcoordinator/scrolling-tree/sticky-in-overflow-expected.txt: * platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: * platform/ios/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt: * scrollingcoordinator/scrolling-tree/absolute-in-nested-sc-scrollers-expected.txt: * scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt: * scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-expected.txt: Copied from LayoutTests/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt. * scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested-expected.txt: Copied from LayoutTests/scrollingcoordinator/scrolling-tree/nested-overflow-scroll-expected.txt. * scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested.html: Added. * scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow.html: Added. * scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt: * scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt: * scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt: * scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt: * scrollingcoordinator/scrolling-tree/nested-overflow-scroll-expected.txt: * scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt: * scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt: * scrollingcoordinator/scrolling-tree/sticky-in-overflow-expected.txt: Canonical link: https://commits.webkit.org/213110@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-06-24 03:09:40 +00:00
rendering/LayerAncestorClippingStack.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
rendering/LayerFragment.h
Rename InlineBox to LegacyInlineBox https://bugs.webkit.org/show_bug.cgi?id=226501 Reviewed by Alan Bujtas. Source/WebCore: More legacy line layout path renaming. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Position.h: * layout/Verification.cpp: (WebCore::Layout::checkForMatchingNonTextRuns): (WebCore::Layout::collectFlowBoxSubtree): (WebCore::Layout::collectInlineBoxes): (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded): * layout/integration/LayoutIntegrationRunIterator.cpp: (WebCore::LayoutIntegration::firstTextRunInTextOrderFor): * layout/integration/LayoutIntegrationRunIterator.h: (WebCore::LayoutIntegration::PathRun::legacyInlineBox const): * layout/integration/LayoutIntegrationRunIteratorLegacyPath.h: (WebCore::LayoutIntegration::RunIteratorLegacyPath::RunIteratorLegacyPath): (WebCore::LayoutIntegration::RunIteratorLegacyPath::legacyInlineBox const): * layout/integration/LayoutIntegrationRunIteratorModernPath.h: (WebCore::LayoutIntegration::RunIteratorModernPath::legacyInlineBox const): * rendering/BidiRun.cpp: * rendering/BidiRun.h: (WebCore::BidiRun::box): (WebCore::BidiRun::setBox): * rendering/CaretRectComputation.cpp: (WebCore::computeCaretRectForInline): * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::EllipsisBox): (WebCore::EllipsisBox::markupBox const): (WebCore::EllipsisBox::paintMarkupBox): (WebCore::EllipsisBox::nodeAtPoint): * rendering/EllipsisBox.h: * rendering/InlineElementBox.h: (WebCore::InlineElementBox::InlineElementBox): (WebCore::InlineElementBox::renderer const): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::setHasBadChildList): (WebCore::InlineFlowBox::getFlowSpacingLogicalWidth): (WebCore::InlineFlowBox::addToLine): (WebCore::InlineFlowBox::removeChild): (WebCore::InlineFlowBox::deleteLine): (WebCore::InlineFlowBox::extractLine): (WebCore::InlineFlowBox::attachLine): (WebCore::InlineFlowBox::adjustPosition): (WebCore::InlineFlowBox::determineSpacingForFlowBoxes): (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection): (WebCore::InlineFlowBox::requiresIdeographicBaseline const): (WebCore::InlineFlowBox::adjustMaxAscentAndDescent): (WebCore::InlineFlowBox::computeLogicalBoxHeights): (WebCore::InlineFlowBox::placeBoxesInBlockDirection): (WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine const): (WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine const): (WebCore::InlineFlowBox::flipLinesInBlockDirection): (WebCore::InlineFlowBox::addReplacedChildOverflow): (WebCore::InlineFlowBox::computeOverflow): (WebCore::InlineFlowBox::nodeAtPoint): (WebCore::InlineFlowBox::paint): (WebCore::InlineFlowBox::firstLeafDescendant const): (WebCore::InlineFlowBox::lastLeafDescendant const): (WebCore::InlineFlowBox::canAccommodateEllipsis const): (WebCore::InlineFlowBox::placeEllipsisBox): (WebCore::InlineFlowBox::clearTruncation): (WebCore::InlineFlowBox::computeOverAnnotationAdjustment const): (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const): (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder const): (WebCore::InlineFlowBox::outputLineTreeAndMark const): (WebCore::InlineFlowBox::checkConsistency const): * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::InlineFlowBox): (WebCore::InlineFlowBox::renderer const): (WebCore::InlineFlowBox::firstChild const): (WebCore::InlineFlowBox::lastChild const): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::markDirty): * rendering/InlineTextBox.h: (WebCore::InlineTextBox::InlineTextBox): (WebCore::InlineTextBox::renderer const): * rendering/LegacyInlineBox.cpp: Renamed from Source/WebCore/rendering/InlineBox.cpp. (WebCore::LegacyInlineBox::assertNotDeleted const): (WebCore::LegacyInlineBox::~LegacyInlineBox): (WebCore::LegacyInlineBox::setHasBadParent): (WebCore::LegacyInlineBox::invalidateParentChildList): (WebCore::LegacyInlineBox::removeFromParent): (WebCore::LegacyInlineBox::boxName const): (WebCore::LegacyInlineBox::showNodeTreeForThis const): (WebCore::LegacyInlineBox::showLineTreeForThis const): (WebCore::LegacyInlineBox::outputLineTreeAndMark const): (WebCore::LegacyInlineBox::outputLineBox const): (WebCore::LegacyInlineBox::logicalHeight const): (WebCore::LegacyInlineBox::baselinePosition const): (WebCore::LegacyInlineBox::lineHeight const): (WebCore::LegacyInlineBox::caretMinOffset const): (WebCore::LegacyInlineBox::caretMaxOffset const): (WebCore::LegacyInlineBox::dirtyLineBoxes): (WebCore::LegacyInlineBox::adjustPosition): (WebCore::LegacyInlineBox::root const): (WebCore::LegacyInlineBox::root): (WebCore::LegacyInlineBox::nextOnLineExists const): (WebCore::LegacyInlineBox::previousOnLineExists const): (WebCore::LegacyInlineBox::nextLeafOnLine const): (WebCore::LegacyInlineBox::previousLeafOnLine const): (WebCore::LegacyInlineBox::selectionState): (WebCore::LegacyInlineBox::canAccommodateEllipsis const): (WebCore::LegacyInlineBox::placeEllipsisBox): (WebCore::LegacyInlineBox::clearKnownToHaveNoOverflow): (WebCore::LegacyInlineBox::locationIncludingFlipping const): (WebCore::LegacyInlineBox::flipForWritingMode const): (showNodeTree): (showLineTree): * rendering/LegacyInlineBox.h: Renamed from Source/WebCore/rendering/InlineBox.h. (WebCore::LegacyInlineBox::nextOnLine const): (WebCore::LegacyInlineBox::previousOnLine const): (WebCore::LegacyInlineBox::setNextOnLine): (WebCore::LegacyInlineBox::setPreviousOnLine): (WebCore::LegacyInlineBox::LegacyInlineBox): (WebCore::LegacyInlineBox::~LegacyInlineBox): (WebCore::LegacyInlineBox::assertNotDeleted const): * rendering/LegacyLineLayout.cpp: (WebCore::LegacyLineLayout::createInlineBoxForRenderer): (WebCore::LegacyLineLayout::createLineBoxes): (WebCore::LegacyLineLayout::constructLine): (WebCore::inlineAncestorHasStartBorderPaddingOrMargin): (WebCore::inlineAncestorHasEndBorderPaddingOrMargin): (WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment): (WebCore::LegacyLineLayout::layoutRunsAndFloats): * rendering/LegacyLineLayout.h: * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::outputLineTreeAndMark const): * rendering/RenderBlockFlow.h: * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): * rendering/RenderInline.cpp: (WebCore::RenderInline::offsetLeft const): (WebCore::RenderInline::offsetTop const): (WebCore::RenderInline::culledInlineFirstLineBox const): (WebCore::RenderInline::culledInlineLastLineBox const): * rendering/RenderInline.h: (WebCore::RenderInline::firstLineBoxIncludingCulling const): (WebCore::RenderInline::lastLineBoxIncludingCulling const): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::localSelectionRect): * rendering/RenderObject.h: * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::isHyphenated const): (WebCore::RootInlineBox::placeEllipsis): (WebCore::RootInlineBox::childRemoved): (WebCore::RootInlineBox::lineSelectionGap): (WebCore::RootInlineBox::selectionState): (WebCore::RootInlineBox::firstSelectedBox): (WebCore::RootInlineBox::lastSelectedBox): (WebCore::RootInlineBox::ascentAndDescentForBox const): (WebCore::RootInlineBox::verticalPositionForBox): (WebCore::RootInlineBox::includeLeadingForBox const): (WebCore::RootInlineBox::includeFontForBox const): (WebCore::RootInlineBox::includeGlyphsForBox const): (WebCore::RootInlineBox::includeInitialLetterForBox const): (WebCore::RootInlineBox::includeMarginForBox const): (WebCore::RootInlineBox::outputLineBox const): * rendering/RootInlineBox.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::positionForPoint): * rendering/svg/SVGInlineFlowBox.cpp: (WebCore::SVGInlineFlowBox::paintSelectionBackground): (WebCore::SVGInlineFlowBox::paint): * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::paint): (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes): (WebCore::SVGRootInlineBox::layoutChildBoxes): (WebCore::SVGRootInlineBox::layoutRootBox): (WebCore::SVGRootInlineBox::closestLeafChildForPosition): (WebCore::SVGRootInlineBox::nodeAtPoint): (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded): (WebCore::SVGRootInlineBox::reorderValueLists): * rendering/svg/SVGRootInlineBox.h: * rendering/svg/SVGTextQuery.cpp: (WebCore::SVGTextQuery::collectTextBoxesInFlowBox): Source/WebKitLegacy/mac: * DOM/DOMUIKitExtensions.mm: Canonical link: https://commits.webkit.org/238350@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-01 17:22:45 +00:00
rendering/LegacyInlineBox.h
Rename InlineElementBox to LegacyInlineElementBox https://bugs.webkit.org/show_bug.cgi?id=226695 Reviewed by Sam Weinig. Also EllipsisBox -> LegacyEllipsisBox. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * accessibility/AXObjectCache.cpp: * dom/Position.cpp: * layout/integration/LayoutIntegrationRunIterator.h: * rendering/LegacyEllipsisBox.cpp: Renamed from Source/WebCore/rendering/EllipsisBox.cpp. (WebCore::LegacyEllipsisBox::LegacyEllipsisBox): (WebCore::LegacyEllipsisBox::paint): (WebCore::LegacyEllipsisBox::markupBox const): (WebCore::LegacyEllipsisBox::paintMarkupBox): (WebCore::LegacyEllipsisBox::selectionRect): (WebCore::LegacyEllipsisBox::paintSelection): (WebCore::LegacyEllipsisBox::nodeAtPoint): * rendering/LegacyEllipsisBox.h: Renamed from Source/WebCore/rendering/EllipsisBox.h. * rendering/LegacyInlineElementBox.cpp: Renamed from Source/WebCore/rendering/InlineElementBox.cpp. (WebCore::LegacyInlineElementBox::deleteLine): (WebCore::LegacyInlineElementBox::extractLine): (WebCore::LegacyInlineElementBox::attachLine): (WebCore::LegacyInlineElementBox::paint): (WebCore::LegacyInlineElementBox::nodeAtPoint): * rendering/LegacyInlineElementBox.h: Renamed from Source/WebCore/rendering/InlineElementBox.h. (WebCore::LegacyInlineElementBox::LegacyInlineElementBox): * rendering/LegacyInlineFlowBox.cpp: (WebCore::LegacyInlineFlowBox::nodeAtPoint): * rendering/LegacyInlineTextBox.cpp: (WebCore::LegacyInlineTextBox::selectionState): * rendering/LegacyLineLayout.cpp: (WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine): * rendering/LegacyRootInlineBox.cpp: (WebCore::LegacyRootInlineBox::placeEllipsis): (WebCore::LegacyRootInlineBox::ellipsisBox const): * rendering/LegacyRootInlineBox.h: * rendering/RenderBlock.cpp: * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::createInlineBox): (WebCore::RenderBox::positionLineBox): * rendering/RenderBox.h: (WebCore::RenderBox::inlineBoxWrapper const): (WebCore::RenderBox::setInlineBoxWrapper): * rendering/RenderFragmentedFlow.cpp: (WebCore::RenderFragmentedFlow::computedFragmentRangeForBox const): * rendering/RenderImage.cpp: * rendering/RenderInline.cpp: * rendering/RenderLineBoxList.cpp: * rendering/RenderLineBreak.cpp: (WebCore::RenderLineBreak::createInlineBox): (WebCore::RenderLineBreak::setInlineBoxWrapper): (WebCore::RenderLineBreak::replaceInlineBoxWrapper): * rendering/RenderLineBreak.h: * rendering/RenderListItem.cpp: * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::createInlineBox): * rendering/RenderListMarker.h: * rendering/RenderReplaced.cpp: * rendering/RenderText.cpp: * rendering/RenderTextLineBoxes.cpp: Canonical link: https://commits.webkit.org/238532@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-06 14:41:05 +00:00
rendering/LegacyInlineElementBox.h
Rename InlineFlowBox to LegacyInlineFlowBox https://bugs.webkit.org/show_bug.cgi?id=226569 Reviewed by Alan Bujtas. More legacy line layout naming. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * layout/Verification.cpp: (WebCore::Layout::collectFlowBoxSubtree): (WebCore::Layout::collectInlineBoxes): * layout/formattingContexts/inline/InlineFormattingQuirks.cpp: (WebCore::Layout::InlineFormattingQuirks::inlineLevelBoxAffectsLineBox const): * layout/integration/LayoutIntegrationInlineContentBuilder.cpp: (WebCore::LayoutIntegration::InlineContentBuilder::computeLineLevelVisualAdjustmentsForRuns const): (WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const): * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::EllipsisBox): * rendering/EllipsisBox.h: * rendering/InlineElementBox.cpp: * rendering/InlineElementBox.h: (WebCore::InlineElementBox::InlineElementBox): * rendering/LegacyInlineBox.cpp: (WebCore::LegacyInlineBox::dirtyLineBoxes): (WebCore::LegacyInlineBox::nextLeafOnLine const): (WebCore::LegacyInlineBox::previousLeafOnLine const): * rendering/LegacyInlineBox.h: (WebCore::LegacyInlineBox::parent const): (WebCore::LegacyInlineBox::setParent): (WebCore::LegacyInlineBox::LegacyInlineBox): * rendering/LegacyInlineFlowBox.cpp: Renamed from Source/WebCore/rendering/InlineFlowBox.cpp. (WebCore::LegacyInlineFlowBox::~LegacyInlineFlowBox): (WebCore::LegacyInlineFlowBox::setHasBadChildList): (WebCore::LegacyInlineFlowBox::getFlowSpacingLogicalWidth): (WebCore::setHasTextDescendantsOnAncestors): (WebCore::LegacyInlineFlowBox::addToLine): (WebCore::LegacyInlineFlowBox::removeChild): (WebCore::LegacyInlineFlowBox::deleteLine): (WebCore::LegacyInlineFlowBox::removeLineBoxFromRenderObject): (WebCore::LegacyInlineFlowBox::extractLine): (WebCore::LegacyInlineFlowBox::extractLineBoxFromRenderObject): (WebCore::LegacyInlineFlowBox::attachLine): (WebCore::LegacyInlineFlowBox::attachLineBoxToRenderObject): (WebCore::LegacyInlineFlowBox::adjustPosition): (WebCore::isLastChildForRenderer): (WebCore::isAncestorAndWithinBlock): (WebCore::LegacyInlineFlowBox::determineSpacingForFlowBoxes): (WebCore::LegacyInlineFlowBox::placeBoxesInInlineDirection): (WebCore::LegacyInlineFlowBox::placeBoxRangeInInlineDirection): (WebCore::LegacyInlineFlowBox::requiresIdeographicBaseline const): (WebCore::verticalAlignApplies): (WebCore::LegacyInlineFlowBox::adjustMaxAscentAndDescent): (WebCore::LegacyInlineFlowBox::computeLogicalBoxHeights): (WebCore::LegacyInlineFlowBox::placeBoxesInBlockDirection): (WebCore::LegacyInlineFlowBox::maxLogicalBottomForTextDecorationLine const): (WebCore::LegacyInlineFlowBox::minLogicalTopForTextDecorationLine const): (WebCore::LegacyInlineFlowBox::flipLinesInBlockDirection): (WebCore::LegacyInlineFlowBox::addBoxShadowVisualOverflow): (WebCore::LegacyInlineFlowBox::addBorderOutsetVisualOverflow): (WebCore::LegacyInlineFlowBox::addTextBoxVisualOverflow): (WebCore::LegacyInlineFlowBox::addOutlineVisualOverflow): (WebCore::LegacyInlineFlowBox::addReplacedChildOverflow): (WebCore::LegacyInlineFlowBox::computeOverflow): (WebCore::LegacyInlineFlowBox::setLayoutOverflow): (WebCore::LegacyInlineFlowBox::setVisualOverflow): (WebCore::LegacyInlineFlowBox::setOverflowFromLogicalRects): (WebCore::LegacyInlineFlowBox::nodeAtPoint): (WebCore::LegacyInlineFlowBox::paint): (WebCore::LegacyInlineFlowBox::paintFillLayers): (WebCore::LegacyInlineFlowBox::boxShadowCanBeAppliedToBackground const): (WebCore::LegacyInlineFlowBox::paintFillLayer): (WebCore::LegacyInlineFlowBox::paintBoxShadow): (WebCore::LegacyInlineFlowBox::constrainToLineTopAndBottomIfNeeded const): (WebCore::clipRectForNinePieceImageStrip): (WebCore::LegacyInlineFlowBox::paintBoxDecorations): (WebCore::LegacyInlineFlowBox::paintMask): (WebCore::LegacyInlineFlowBox::firstLeafDescendant const): (WebCore::LegacyInlineFlowBox::lastLeafDescendant const): (WebCore::LegacyInlineFlowBox::selectionState): (WebCore::LegacyInlineFlowBox::canAccommodateEllipsis const): (WebCore::LegacyInlineFlowBox::placeEllipsisBox): (WebCore::LegacyInlineFlowBox::clearTruncation): (WebCore::LegacyInlineFlowBox::computeOverAnnotationAdjustment const): (WebCore::LegacyInlineFlowBox::computeUnderAnnotationAdjustment const): (WebCore::LegacyInlineFlowBox::collectLeafBoxesInLogicalOrder const): (WebCore::LegacyInlineFlowBox::computeReplacedAndTextLineTopAndBottom const): (WebCore::LegacyInlineFlowBox::boxName const): (WebCore::LegacyInlineFlowBox::outputLineTreeAndMark const): (WebCore::LegacyInlineFlowBox::checkConsistency const): * rendering/LegacyInlineFlowBox.h: Renamed from Source/WebCore/rendering/InlineFlowBox.h. (WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox): (WebCore::LegacyInlineFlowBox::renderer const): (WebCore::LegacyInlineFlowBox::lineStyle const): (WebCore::LegacyInlineFlowBox::prevLineBox const): (WebCore::LegacyInlineFlowBox::nextLineBox const): (WebCore::LegacyInlineFlowBox::setNextLineBox): (WebCore::LegacyInlineFlowBox::setPreviousLineBox): (WebCore::LegacyInlineFlowBox::firstChild const): (WebCore::LegacyInlineFlowBox::lastChild const): (WebCore::LegacyInlineFlowBox::marginBorderPaddingLogicalLeft const): (WebCore::LegacyInlineFlowBox::marginBorderPaddingLogicalRight const): (WebCore::LegacyInlineFlowBox::marginLogicalLeft const): (WebCore::LegacyInlineFlowBox::marginLogicalRight const): (WebCore::LegacyInlineFlowBox::borderLogicalLeft const): (WebCore::LegacyInlineFlowBox::borderLogicalRight const): (WebCore::LegacyInlineFlowBox::paddingLogicalLeft const): (WebCore::LegacyInlineFlowBox::paddingLogicalRight const): (WebCore::LegacyInlineFlowBox::includeLogicalLeftEdge const): (WebCore::LegacyInlineFlowBox::includeLogicalRightEdge const): (WebCore::LegacyInlineFlowBox::setEdges): (WebCore::LegacyInlineFlowBox::beginPlacingBoxRangesInInlineDirection): (WebCore::LegacyInlineFlowBox::endPlacingBoxRangesInInlineDirection): (WebCore::LegacyInlineFlowBox::hasTextChildren const): (WebCore::LegacyInlineFlowBox::hasTextDescendants const): (WebCore::LegacyInlineFlowBox::hasHardLinebreak const): (WebCore::LegacyInlineFlowBox::setHasTextChildren): (WebCore::LegacyInlineFlowBox::setHasTextDescendants): (WebCore::LegacyInlineFlowBox::layoutOverflowRect const): (WebCore::LegacyInlineFlowBox::logicalTopLayoutOverflow const): (WebCore::LegacyInlineFlowBox::logicalBottomLayoutOverflow const): (WebCore::LegacyInlineFlowBox::logicalLayoutOverflowRect const): (WebCore::LegacyInlineFlowBox::visualOverflowRect const): (WebCore::LegacyInlineFlowBox::logicalLeftVisualOverflow const): (WebCore::LegacyInlineFlowBox::logicalRightVisualOverflow const): (WebCore::LegacyInlineFlowBox::logicalTopVisualOverflow const): (WebCore::LegacyInlineFlowBox::logicalBottomVisualOverflow const): (WebCore::LegacyInlineFlowBox::logicalVisualOverflowRect const): (WebCore::LegacyInlineFlowBox::frameRectIncludingLineHeight const): (WebCore::LegacyInlineFlowBox::logicalFrameRectIncludingLineHeight const): (WebCore::LegacyInlineFlowBox::descendantsHaveSameLineHeightAndBaseline const): (WebCore::LegacyInlineFlowBox::clearDescendantsHaveSameLineHeightAndBaseline): (WebCore::LegacyInlineFlowBox::checkConsistency const): (WebCore::LegacyInlineFlowBox::setHasBadChildList): * rendering/LegacyLineLayout.cpp: (WebCore::parentIsConstructedOrHaveNext): (WebCore::LegacyLineLayout::createLineBoxes): (WebCore::LegacyLineLayout::constructLine): (WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment): * rendering/LegacyLineLayout.h: * rendering/LegacyRootInlineBox.cpp: (WebCore::LegacyRootInlineBox::LegacyRootInlineBox): (WebCore::LegacyRootInlineBox::clearTruncation): (WebCore::LegacyRootInlineBox::lineCanAccommodateEllipsis): (WebCore::LegacyRootInlineBox::placeEllipsisBox): (WebCore::LegacyRootInlineBox::paint): (WebCore::LegacyRootInlineBox::nodeAtPoint): (WebCore::LegacyRootInlineBox::adjustPosition): (WebCore::LegacyRootInlineBox::includeFontForBox const): (WebCore::LegacyRootInlineBox::includeGlyphsForBox const): (WebCore::LegacyRootInlineBox::includeInitialLetterForBox const): * rendering/LegacyRootInlineBox.h: (WebCore::LegacyRootInlineBox::logicalTopVisualOverflow const): (WebCore::LegacyRootInlineBox::logicalBottomVisualOverflow const): (WebCore::LegacyRootInlineBox::logicalTopLayoutOverflow const): (WebCore::LegacyRootInlineBox::logicalBottomLayoutOverflow const): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::inlineBlockBaseline const): * rendering/RenderBox.cpp: (WebCore::RenderBox::containingBlockLogicalWidthForPositioned const): (WebCore::RenderBox::containingBlockLogicalHeightForPositioned const): (WebCore::RenderBox::computePositionedLogicalWidthUsing const): (WebCore::RenderBox::computePositionedLogicalWidthReplaced const): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::getBackgroundRoundedRect const): (WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance const): (WebCore::RenderBoxModelObject::paintMaskForTextFillBox): (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const): * rendering/RenderBoxModelObject.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::boxShadowShouldBeAppliedToBackground const): * rendering/RenderImage.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::generateLineBoxRects const): (WebCore::RenderInline::generateCulledLineBoxRects const): (WebCore::RenderInline::linesBoundingBox const): (WebCore::RenderInline::linesVisualOverflowBoundingBox const): (WebCore::RenderInline::linesVisualOverflowBoundingBoxInFragment const): (WebCore::RenderInline::dirtyLineBoxes): (WebCore::RenderInline::createInlineFlowBox): (WebCore::RenderInline::createAndAppendInlineFlowBox): (WebCore::RenderInline::paintOutline): * rendering/RenderInline.h: (WebCore::RenderInline::firstLineBox const): (WebCore::RenderInline::lastLineBox const): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::appendLineBox): (WebCore::RenderLineBoxList::deleteLineBoxTree): (WebCore::RenderLineBoxList::extractLineBox): (WebCore::RenderLineBoxList::attachLineBox): (WebCore::RenderLineBoxList::removeLineBox): (WebCore::RenderLineBoxList::deleteLineBoxes): (WebCore::RenderLineBoxList::dirtyLineBoxes): (WebCore::RenderLineBoxList::lineIntersectsDirtyRect const): (WebCore::RenderLineBoxList::paint const): (WebCore::RenderLineBoxList::hitTest const): (WebCore::RenderLineBoxList::checkConsistency const): * rendering/RenderLineBoxList.h: (WebCore::RenderLineBoxList::firstLineBox const): (WebCore::RenderLineBoxList::lastLineBox const): * rendering/RenderOverflow.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::boxShadowShouldBeAppliedToBackground const): * rendering/RenderTableCell.h: * rendering/RenderVTTCue.cpp: (WebCore::RenderVTTCue::initializeLayoutParameters): (WebCore::RenderVTTCue::shouldSwitchDirection const): (WebCore::RenderVTTCue::repositionCueSnapToLinesSet): (WebCore::RenderVTTCue::repositionGenericCue): * rendering/RenderVTTCue.h: * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::createInlineFlowBox): (WebCore::RenderSVGInline::absoluteQuads const): * rendering/svg/RenderSVGInline.h: * rendering/svg/SVGInlineFlowBox.h: * rendering/svg/SVGInlineTextBox.cpp: (WebCore::findRendererDefininingTextDecoration): * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes): (WebCore::SVGRootInlineBox::layoutChildBoxes): * rendering/svg/SVGRootInlineBox.h: * rendering/svg/SVGTextQuery.cpp: (WebCore::flowBoxForRenderer): (WebCore::SVGTextQuery::collectTextBoxesInFlowBox): * rendering/svg/SVGTextQuery.h: Canonical link: https://commits.webkit.org/238430@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-03 13:39:56 +00:00
rendering/LegacyInlineFlowBox.h
Rename InlineTextBox to LegacyInlineTextBox https://bugs.webkit.org/show_bug.cgi?id=226633 Rubber-stamped by Sam Weinig. More legacy line layout naming. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/ContainerNode.cpp: * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::addMarker): * dom/Position.cpp: * editing/CompositeEditCommand.cpp: * editing/Editor.h: * editing/FrameSelection.cpp: (WebCore::FrameSelection::debugRenderer const): * editing/RenderedPosition.cpp: * editing/TextIterator.cpp: * editing/VisiblePosition.cpp: * layout/Verification.cpp: (WebCore::Layout::checkForMatchingTextRuns): (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded): * layout/formattingContexts/inline/text/TextUtil.h: * layout/integration/LayoutIntegrationRunIterator.cpp: (WebCore::LayoutIntegration::firstTextRunInTextOrderFor): * layout/integration/LayoutIntegrationRunIterator.h: (WebCore::LayoutIntegration::PathTextRun::legacyInlineBox const): * layout/integration/LayoutIntegrationRunIteratorLegacyPath.h: (WebCore::LayoutIntegration::RunIteratorLegacyPath::traverseNextTextRunInTextOrder): (WebCore::LayoutIntegration::RunIteratorLegacyPath::inlineTextBox const): * layout/layouttree/LayoutBox.h: (WebCore::Layout::Box::isInlineTextBox const): * layout/layouttree/LayoutInlineTextBox.cpp: (WebCore::Layout::InlineTextBox::InlineTextBox): * rendering/CaretRectComputation.cpp: (WebCore::computeCaretRectForSVGInlineText): * rendering/EllipsisBox.cpp: * rendering/LegacyInlineBox.h: * rendering/LegacyInlineFlowBox.cpp: (WebCore::LegacyInlineFlowBox::addToLine): (WebCore::LegacyInlineFlowBox::placeBoxRangeInInlineDirection): (WebCore::LegacyInlineFlowBox::requiresIdeographicBaseline const): (WebCore::LegacyInlineFlowBox::placeBoxesInBlockDirection): (WebCore::LegacyInlineFlowBox::addTextBoxVisualOverflow): (WebCore::LegacyInlineFlowBox::computeOverflow): (WebCore::LegacyInlineFlowBox::computeOverAnnotationAdjustment const): (WebCore::LegacyInlineFlowBox::computeUnderAnnotationAdjustment const): * rendering/LegacyInlineFlowBox.h: * rendering/LegacyInlineTextBox.cpp: Renamed from Source/WebCore/rendering/InlineTextBox.cpp. (WebCore::LegacyInlineTextBox::~LegacyInlineTextBox): (WebCore::LegacyInlineTextBox::hasTextContent const): (WebCore::LegacyInlineTextBox::markDirty): (WebCore::LegacyInlineTextBox::logicalOverflowRect const): (WebCore::LegacyInlineTextBox::setLogicalOverflowRect): (WebCore::LegacyInlineTextBox::baselinePosition const): (WebCore::LegacyInlineTextBox::lineHeight const): (WebCore::LegacyInlineTextBox::selectionTop const): (WebCore::LegacyInlineTextBox::selectionBottom const): (WebCore::LegacyInlineTextBox::selectionHeight const): (WebCore::LegacyInlineTextBox::isSelected const): (WebCore::LegacyInlineTextBox::selectionState): (WebCore::LegacyInlineTextBox::verifySelectionState const): (WebCore::LegacyInlineTextBox::lineFont const): (WebCore::snappedSelectionRect): (WebCore::LegacyInlineTextBox::localSelectionRect const): (WebCore::LegacyInlineTextBox::deleteLine): (WebCore::LegacyInlineTextBox::extractLine): (WebCore::LegacyInlineTextBox::attachLine): (WebCore::LegacyInlineTextBox::placeEllipsisBox): (WebCore::LegacyInlineTextBox::isLineBreak const): (WebCore::LegacyInlineTextBox::nodeAtPoint): (WebCore::LegacyInlineTextBox::emphasisMarkExistsAndIsAbove const): (WebCore::createMarkedTextFromSelectionInBox): (WebCore::LegacyInlineTextBox::paint): (WebCore::LegacyInlineTextBox::clampedOffset const): (WebCore::LegacyInlineTextBox::clampedStartEndForState const): (WebCore::LegacyInlineTextBox::selectionStartEnd const): (WebCore::LegacyInlineTextBox::highlightStartEnd const): (WebCore::LegacyInlineTextBox::hasMarkers const): (WebCore::LegacyInlineTextBox::paintPlatformDocumentMarkers): (WebCore::LegacyInlineTextBox::calculateUnionOfAllDocumentMarkerBounds const): (WebCore::LegacyInlineTextBox::calculateDocumentMarkerBounds const): (WebCore::LegacyInlineTextBox::paintPlatformDocumentMarker): (WebCore::LegacyInlineTextBox::collectMarkedTextsForDraggedContent): (WebCore::LegacyInlineTextBox::collectMarkedTextsForDocumentMarkers const): (WebCore::LegacyInlineTextBox::collectMarkedTextsForHighlights const): (WebCore::LegacyInlineTextBox::textOriginFromBoxRect const): (WebCore::LegacyInlineTextBox::paintMarkedTexts): (WebCore::LegacyInlineTextBox::paintMarkedTextBackground): (WebCore::LegacyInlineTextBox::paintMarkedTextForeground): (WebCore::LegacyInlineTextBox::paintMarkedTextDecoration): (WebCore::LegacyInlineTextBox::paintCompositionBackground): (WebCore::LegacyInlineTextBox::paintCompositionUnderlines const): (WebCore::mirrorRTLSegment): (WebCore::LegacyInlineTextBox::paintCompositionUnderline const): (WebCore::LegacyInlineTextBox::caretMinOffset const): (WebCore::LegacyInlineTextBox::caretMaxOffset const): (WebCore::LegacyInlineTextBox::textPos const): (WebCore::LegacyInlineTextBox::offsetForPosition const): (WebCore::LegacyInlineTextBox::positionForOffset const): (WebCore::LegacyInlineTextBox::createTextRun const): (WebCore::LegacyInlineTextBox::text const): (WebCore::LegacyInlineTextBox::combinedText const): (WebCore::LegacyInlineTextBox::debugTextShadow): (WebCore::LegacyInlineTextBox::expansionBehavior const): (WebCore::LegacyInlineTextBox::boxName const): (WebCore::LegacyInlineTextBox::outputLineBox const): * rendering/LegacyInlineTextBox.h: Renamed from Source/WebCore/rendering/InlineTextBox.h. (WebCore::LegacyInlineTextBox::LegacyInlineTextBox): (WebCore::LegacyInlineTextBox::renderer const): (WebCore::LegacyInlineTextBox::lineStyle const): (WebCore::LegacyInlineTextBox::prevTextBox const): (WebCore::LegacyInlineTextBox::nextTextBox const): (WebCore::LegacyInlineTextBox::setNextTextBox): (WebCore::LegacyInlineTextBox::setPreviousTextBox): (WebCore::LegacyInlineTextBox::start const): (WebCore::LegacyInlineTextBox::end const): (WebCore::LegacyInlineTextBox::len const): (WebCore::LegacyInlineTextBox::setStart): (WebCore::LegacyInlineTextBox::setLen): (WebCore::LegacyInlineTextBox::offsetRun): (WebCore::LegacyInlineTextBox::truncation const): (WebCore::LegacyInlineTextBox::compareByStart): (WebCore::LegacyInlineTextBox::logicalTopVisualOverflow const): (WebCore::LegacyInlineTextBox::logicalBottomVisualOverflow const): (WebCore::LegacyInlineTextBox::logicalLeftVisualOverflow const): (WebCore::LegacyInlineTextBox::logicalRightVisualOverflow const): (WebCore::LegacyInlineTextBox::dirtyOwnLineBoxes): (WebCore::LegacyInlineTextBox::paintMarkedTexts): * rendering/LegacyLineLayout.cpp: (WebCore::LegacyLineLayout::constructLine): (WebCore::setLogicalWidthForTextRun): (WebCore::LegacyLineLayout::computeExpansionForJustifiedText): (WebCore::expansionBehaviorForInlineTextBox): (WebCore::applyExpansionBehavior): (WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment): (WebCore::LegacyLineLayout::removeInlineBox const): (WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine): (WebCore::LegacyLineLayout::createLineBoxesFromBidiRuns): * rendering/LegacyRootInlineBox.cpp: (WebCore::LegacyRootInlineBox::isHyphenated const): (WebCore::LegacyRootInlineBox::ascentAndDescentForBox const): * rendering/RenderBlock.cpp: * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::inlineSelectionGaps): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintMaskForTextFillBox): * rendering/RenderInline.cpp: (WebCore::RenderInline::generateCulledLineBoxRects const): (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox const): (WebCore::RenderInline::dirtyLineBoxes): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): * rendering/RenderText.cpp: (WebCore::RenderText::absoluteQuadsForRange const): (WebCore::RenderText::createTextBox): (WebCore::RenderText::positionLineBox): * rendering/RenderText.h: (WebCore::RenderText::extractTextBox): (WebCore::RenderText::attachTextBox): (WebCore::RenderText::removeTextBox): (WebCore::RenderText::createInlineTextBox): (WebCore::RenderText::firstTextBox const): (WebCore::RenderText::lastTextBox const): (WebCore::RenderText::findNextInlineTextBox const): * rendering/RenderTextLineBoxes.cpp: (WebCore::RenderTextLineBoxes::createAndAppendLineBox): (WebCore::RenderTextLineBoxes::extract): (WebCore::RenderTextLineBoxes::attach): (WebCore::RenderTextLineBoxes::remove): (WebCore::RenderTextLineBoxes::deleteAll): (WebCore::RenderTextLineBoxes::findNext const): (WebCore::RenderTextLineBoxes::checkConsistency const): * rendering/RenderTextLineBoxes.h: (WebCore::RenderTextLineBoxes::first const): (WebCore::RenderTextLineBoxes::last const): * rendering/RenderTreeAsText.cpp: * rendering/TextDecorationPainter.h: (WebCore::TextDecorationPainter::setInlineTextBox): * rendering/TextPainter.cpp: (WebCore::TextPainter::clearGlyphDisplayLists): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::createTextBox): * rendering/svg/RenderSVGInlineText.h: * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::SVGInlineTextBox): (WebCore::SVGInlineTextBox::dirtyOwnLineBoxes): (WebCore::SVGInlineTextBox::dirtyLineBoxes): (WebCore::SVGInlineTextBox::offsetForPositionInFragment const): (WebCore::SVGInlineTextBox::paint): (WebCore::SVGInlineTextBox::nodeAtPoint): * rendering/svg/SVGInlineTextBox.h: * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writeSVGInlineTextBoxes): * style/InlineTextBoxStyle.cpp: (WebCore::computeUnderlineOffset): (WebCore::visualOverflowForDecorations): * style/InlineTextBoxStyle.h: Canonical link: https://commits.webkit.org/238524@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-05 12:19:10 +00:00
rendering/LegacyInlineTextBox.h
Rename ComplexLineLayout to LegacyLineLayout https://bugs.webkit.org/show_bug.cgi?id=226482 Reviewed by Alan Bujtas. Since we now handle most inline content with LFC, rename the legacy path as "legacy". * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * layout/integration/LayoutIntegrationInlineContentBuilder.cpp: (WebCore::LayoutIntegration::lineOverflowWidth): * rendering/InlineIterator.h: (WebCore::IsolateTracker::addFakeRunIfNecessary): (WebCore::InlineBidiResolver::appendRunInternal): * rendering/LegacyLineLayout.cpp: Renamed from Source/WebCore/rendering/ComplexLineLayout.cpp. (WebCore::LegacyLineLayout::LegacyLineLayout): (WebCore::LegacyLineLayout::~LegacyLineLayout): (WebCore::determineDirectionality): (WebCore::createRun): (WebCore::LegacyLineLayout::appendRunsForObject): (WebCore::LegacyLineLayout::createRootInlineBox): (WebCore::LegacyLineLayout::createAndAppendRootInlineBox): (WebCore::LegacyLineLayout::createInlineBoxForRenderer): (WebCore::dirtyLineBoxesForRenderer): (WebCore::parentIsConstructedOrHaveNext): (WebCore::LegacyLineLayout::createLineBoxes): (WebCore::endsWithHTMLSpaces): (WebCore::reachedEndOfTextRenderer): (WebCore::LegacyLineLayout::constructLine): (WebCore::LegacyLineLayout::textAlignmentForLine const): (WebCore::updateLogicalWidthForLeftAlignedBlock): (WebCore::updateLogicalWidthForRightAlignedBlock): (WebCore::updateLogicalWidthForCenterAlignedBlock): (WebCore::LegacyLineLayout::setMarginsForRubyRun): (WebCore::setLogicalWidthForTextRun): (WebCore::LegacyLineLayout::updateRubyForJustifiedText): (WebCore::LegacyLineLayout::computeExpansionForJustifiedText): (WebCore::LegacyLineLayout::updateLogicalWidthForAlignment): (WebCore::updateLogicalInlinePositions): (WebCore::LegacyLineLayout::computeInlineDirectionPositionsForLine): (WebCore::expansionBehaviorForInlineTextBox): (WebCore::applyExpansionBehavior): (WebCore::inlineAncestorHasStartBorderPaddingOrMargin): (WebCore::inlineAncestorHasEndBorderPaddingOrMargin): (WebCore::isLastInFlowRun): (WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment): (WebCore::LegacyLineLayout::removeInlineBox const): (WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine): (WebCore::isCollapsibleSpace): (WebCore::findFirstTrailingSpace): (WebCore::LegacyLineLayout::handleTrailingSpaces): (WebCore::LegacyLineLayout::appendFloatingObjectToLastLine): (WebCore::notifyResolverToResumeInIsolate): (WebCore::setUpResolverToResumeInIsolate): (WebCore::constructBidiRunsForSegment): (WebCore::LegacyLineLayout::createLineBoxesFromBidiRuns): (WebCore::deleteLineRange): (WebCore::repaintDirtyFloats): (WebCore::LegacyLineLayout::layoutRunsAndFloats): (WebCore::LegacyLineLayout::restartLayoutRunsAndFloatsInRange): (WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange): (WebCore::LegacyLineLayout::reattachCleanLineFloats): (WebCore::LegacyLineLayout::linkToEndLineIfNeeded): (WebCore::LegacyLineLayout::layoutLineBoxes): (WebCore::LegacyLineLayout::checkFloatInCleanLine): (WebCore::LegacyLineLayout::determineStartPosition): (WebCore::LegacyLineLayout::determineEndPosition): (WebCore::LegacyLineLayout::checkPaginationAndFloatsAtEndLine): (WebCore::LegacyLineLayout::lineWidthForPaginatedLineChanged const): (WebCore::LegacyLineLayout::matchedEndLine): (WebCore::LegacyLineLayout::addOverflowFromInlineChildren): (WebCore::LegacyLineLayout::lineCount const): (WebCore::LegacyLineLayout::lineCountUntil const): (WebCore::LegacyLineLayout::deleteEllipsisLineBoxes): (WebCore::LegacyLineLayout::checkLinesForTextOverflow): (WebCore::LegacyLineLayout::positionNewFloatOnLine): (WebCore::LegacyLineLayout::updateFragmentForLine const): (WebCore::LegacyLineLayout::style const): (WebCore::LegacyLineLayout::layoutContext const): * rendering/LegacyLineLayout.h: Renamed from Source/WebCore/rendering/ComplexLineLayout.h. (WebCore::LegacyLineLayout::lineBoxes): (WebCore::LegacyLineLayout::lineBoxes const): (WebCore::LegacyLineLayout::firstRootBox const): (WebCore::LegacyLineLayout::lastRootBox const): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::willBeDestroyed): (WebCore::RenderBlockFlow::layoutInlineChildren): (WebCore::RenderBlockFlow::startAlignedOffsetForLine): (WebCore::RenderBlockFlow::adjustLinePositionForPagination): (WebCore::RenderBlockFlow::styleDidChange): (WebCore::RenderBlockFlow::hitTestInlineChildren): (WebCore::RenderBlockFlow::addOverflowFromInlineChildren): (WebCore::RenderBlockFlow::inlineBlockBaseline const): (WebCore::RenderBlockFlow::lineCount const): (WebCore::RenderBlockFlow::paintInlineChildren): (WebCore::RenderBlockFlow::hasLines const): (WebCore::RenderBlockFlow::ensureLineBoxes): * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::firstRootBox const): (WebCore::RenderBlockFlow::lastRootBox const): (WebCore::RenderBlockFlow::hasLegacyLineLayout const): (WebCore::RenderBlockFlow::legacyLineLayout const): (WebCore::RenderBlockFlow::legacyLineLayout): (WebCore::RenderBlockFlow::hasComplexLineLayout const): Deleted. (WebCore::RenderBlockFlow::complexLineLayout const): Deleted. (WebCore::RenderBlockFlow::complexLineLayout): Deleted. * rendering/RenderText.cpp: (WebCore::RenderText::usesLegacyLineLayoutPath const): (WebCore::RenderText::usesComplexLineLayoutPath const): Deleted. * rendering/RenderText.h: * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::removeLineBoxFromRenderObject): (WebCore::RootInlineBox::extractLineBoxFromRenderObject): (WebCore::RootInlineBox::attachLineBoxToRenderObject): * rendering/line/LineBreaker.cpp: (WebCore::LineBreaker::skipLeadingWhitespace): * rendering/line/LineBreaker.h: (WebCore::LineBreaker::positionNewFloatOnLine): Canonical link: https://commits.webkit.org/238342@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-01 13:58:23 +00:00
rendering/LegacyLineLayout.h
Rename RootInlineBox to LegacyRootInlineBox https://bugs.webkit.org/show_bug.cgi?id=226533 Reviewed by Sam Weinig. More legacy line layout path renaming. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/ContainerNode.cpp: * html/HTMLTextFormControlElement.cpp: (WebCore::getNextSoftBreak): (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const): * layout/integration/LayoutIntegrationLineIterator.h: (WebCore::LayoutIntegration::LineIterator::LineIterator): (WebCore::LayoutIntegration::PathLine::legacyRootInlineBox const): * layout/integration/LayoutIntegrationLineIteratorLegacyPath.h: (WebCore::LayoutIntegration::LineIteratorLegacyPath::LineIteratorLegacyPath): (WebCore::LayoutIntegration::LineIteratorLegacyPath::selectionTopForHitTesting const): (WebCore::LayoutIntegration::LineIteratorLegacyPath::legacyRootInlineBox const): * layout/integration/LayoutIntegrationLineIteratorModernPath.h: (WebCore::LayoutIntegration::LineIteratorModernPath::legacyRootInlineBox const): * layout/integration/LayoutIntegrationRunIteratorLegacyPath.h: (WebCore::LayoutIntegration::RunIteratorLegacyPath::RunIteratorLegacyPath): (WebCore::LayoutIntegration::RunIteratorLegacyPath::rootInlineBox const): * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::markupBox const): (WebCore::EllipsisBox::selectionRect): (WebCore::EllipsisBox::paintSelection): * rendering/FloatingObjects.cpp: * rendering/FloatingObjects.h: (WebCore::FloatingObject::originatingLine const): (WebCore::FloatingObject::setOriginatingLine): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::innerTextIfTruncated const): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::computeLogicalBoxHeights): (WebCore::InlineFlowBox::nodeAtPoint): (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded const): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintMarkedTextBackground): * rendering/LegacyInlineBox.cpp: (WebCore::LegacyInlineBox::root const): (WebCore::LegacyInlineBox::root): * rendering/LegacyInlineBox.h: * rendering/LegacyLineLayout.cpp: (WebCore::LegacyLineLayout::createRootInlineBox): (WebCore::LegacyLineLayout::createAndAppendRootInlineBox): (WebCore::LegacyLineLayout::constructLine): (WebCore::setLogicalWidthForTextRun): (WebCore::LegacyLineLayout::updateRubyForJustifiedText): (WebCore::LegacyLineLayout::updateLogicalWidthForAlignment): (WebCore::LegacyLineLayout::computeInlineDirectionPositionsForLine): (WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment): (WebCore::LegacyLineLayout::removeInlineBox const): (WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine): (WebCore::LegacyLineLayout::createLineBoxesFromBidiRuns): (WebCore::deleteLineRange): (WebCore::LegacyLineLayout::layoutRunsAndFloats): (WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange): (WebCore::LegacyLineLayout::reattachCleanLineFloats): (WebCore::LegacyLineLayout::checkFloatInCleanLine): (WebCore::LegacyLineLayout::determineStartPosition): (WebCore::LegacyLineLayout::determineEndPosition): (WebCore::LegacyLineLayout::checkPaginationAndFloatsAtEndLine): (WebCore::LegacyLineLayout::lineWidthForPaginatedLineChanged const): (WebCore::LegacyLineLayout::matchedEndLine): (WebCore::LegacyLineLayout::addOverflowFromInlineChildren): (WebCore::LegacyLineLayout::lineCountUntil const): (WebCore::LegacyLineLayout::deleteEllipsisLineBoxes): (WebCore::LegacyLineLayout::checkLinesForTextOverflow): (WebCore::LegacyLineLayout::updateFragmentForLine const): * rendering/LegacyLineLayout.h: (WebCore::LegacyLineLayout::firstRootBox const): (WebCore::LegacyLineLayout::lastRootBox const): * rendering/LegacyRootInlineBox.cpp: Renamed from Source/WebCore/rendering/RootInlineBox.cpp. (WebCore::containingFragmentMap): (WebCore::LegacyRootInlineBox::LegacyRootInlineBox): (WebCore::LegacyRootInlineBox::~LegacyRootInlineBox): (WebCore::LegacyRootInlineBox::detachEllipsisBox): (WebCore::LegacyRootInlineBox::clearTruncation): (WebCore::LegacyRootInlineBox::isHyphenated const): (WebCore::LegacyRootInlineBox::baselinePosition const): (WebCore::LegacyRootInlineBox::lineHeight const): (WebCore::LegacyRootInlineBox::lineCanAccommodateEllipsis): (WebCore::LegacyRootInlineBox::placeEllipsis): (WebCore::LegacyRootInlineBox::placeEllipsisBox): (WebCore::LegacyRootInlineBox::paintEllipsisBox const): (WebCore::LegacyRootInlineBox::paint): (WebCore::LegacyRootInlineBox::nodeAtPoint): (WebCore::LegacyRootInlineBox::adjustPosition): (WebCore::LegacyRootInlineBox::childRemoved): (WebCore::LegacyRootInlineBox::containingFragment const): (WebCore::LegacyRootInlineBox::clearContainingFragment): (WebCore::LegacyRootInlineBox::setContainingFragment): (WebCore::LegacyRootInlineBox::alignBoxesInBlockDirection): (WebCore::LegacyRootInlineBox::beforeAnnotationsAdjustment const): (WebCore::LegacyRootInlineBox::lineSnapAdjustment const): (WebCore::LegacyRootInlineBox::lineSelectionGap): (WebCore::LegacyRootInlineBox::selectionState): (WebCore::LegacyRootInlineBox::firstSelectedBox): (WebCore::LegacyRootInlineBox::lastSelectedBox): (WebCore::LegacyRootInlineBox::selectionTop const): (WebCore::blockBeforeWithinSelectionRoot): (WebCore::LegacyRootInlineBox::selectionTopAdjustedForPrecedingBlock const): (WebCore::LegacyRootInlineBox::selectionBottom const): (WebCore::LegacyRootInlineBox::blockFlow const): (WebCore::LegacyRootInlineBox::lineBreakBidiStatus const): (WebCore::LegacyRootInlineBox::setLineBreakInfo): (WebCore::LegacyRootInlineBox::ellipsisBox const): (WebCore::LegacyRootInlineBox::removeLineBoxFromRenderObject): (WebCore::LegacyRootInlineBox::extractLineBoxFromRenderObject): (WebCore::LegacyRootInlineBox::attachLineBoxToRenderObject): (WebCore::LegacyRootInlineBox::paddedLayoutOverflowRect const): (WebCore::setAscentAndDescent): (WebCore::LegacyRootInlineBox::ascentAndDescentForBox const): (WebCore::LegacyRootInlineBox::verticalPositionForBox): (WebCore::LegacyRootInlineBox::includeLeadingForBox const): (WebCore::LegacyRootInlineBox::includeFontForBox const): (WebCore::LegacyRootInlineBox::includeGlyphsForBox const): (WebCore::LegacyRootInlineBox::includeInitialLetterForBox const): (WebCore::LegacyRootInlineBox::includeMarginForBox const): (WebCore::LegacyRootInlineBox::fitsToGlyphs const): (WebCore::LegacyRootInlineBox::includesRootLineBoxFontOrLeading const): (WebCore::LegacyRootInlineBox::outputLineBox const): (WebCore::LegacyRootInlineBox::boxName const): * rendering/LegacyRootInlineBox.h: Renamed from Source/WebCore/rendering/RootInlineBox.h. (WebCore::LegacyRootInlineBox::lineTop const): (WebCore::LegacyRootInlineBox::lineBottom const): (WebCore::LegacyRootInlineBox::lineBoxTop const): (WebCore::LegacyRootInlineBox::lineBoxBottom const): (WebCore::LegacyRootInlineBox::lineBoxHeight const): (WebCore::LegacyRootInlineBox::paginationStrut const): (WebCore::LegacyRootInlineBox::setPaginationStrut): (WebCore::LegacyRootInlineBox::isFirstAfterPageBreak const): (WebCore::LegacyRootInlineBox::setIsFirstAfterPageBreak): (WebCore::LegacyRootInlineBox::paginatedLineWidth const): (WebCore::LegacyRootInlineBox::setPaginatedLineWidth): (WebCore::LegacyRootInlineBox::selectionHeight const): (WebCore::LegacyRootInlineBox::selectionHeightAdjustedForPrecedingBlock const): (WebCore::LegacyRootInlineBox::setLineTopBottomPositions): (WebCore::LegacyRootInlineBox::lineBreakObj const): (WebCore::LegacyRootInlineBox::lineBreakPos const): (WebCore::LegacyRootInlineBox::setLineBreakPos): (WebCore::LegacyRootInlineBox::appendFloat): (WebCore::LegacyRootInlineBox::removeFloat): (WebCore::LegacyRootInlineBox::floatsPtr): (WebCore::LegacyRootInlineBox::baselineType const): (WebCore::LegacyRootInlineBox::hasAnnotationsBefore const): (WebCore::LegacyRootInlineBox::hasAnnotationsAfter const): (WebCore::LegacyRootInlineBox::logicalTopVisualOverflow const): (WebCore::LegacyRootInlineBox::logicalBottomVisualOverflow const): (WebCore::LegacyRootInlineBox::logicalTopLayoutOverflow const): (WebCore::LegacyRootInlineBox::logicalBottomLayoutOverflow const): (WebCore::LegacyRootInlineBox::isTrailingFloatsRootInlineBox const): (WebCore::LegacyRootInlineBox::nextRootBox const): (WebCore::LegacyRootInlineBox::prevRootBox const): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::simplifiedNormalFlowLayout): * rendering/RenderBlockFlow.cpp: (WebCore::calculateMinimumPageHeight): (WebCore::needsAppleMailPaginationQuirk): (WebCore::RenderBlockFlow::adjustLinePositionForPagination): (WebCore::RenderBlockFlow::layoutLineGridBox): (WebCore::RenderBlockFlow::markLinesDirtyInBlockRange): (WebCore::RenderBlockFlow::inlineSelectionGaps): (WebCore::shouldIncludeLinesForParentLineCount): (WebCore::RenderBlockFlow::lineCount const): (WebCore::RenderBlockFlow::clearTruncation): (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren): (WebCore::RenderBlockFlow::outputLineTreeAndMark const): (WebCore::shouldCheckLines): Deleted. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::lineGridBox const): (WebCore::RenderBlockFlow::setLineGridBox): (WebCore::RenderBlockFlow::firstRootBox const): (WebCore::RenderBlockFlow::lastRootBox const): * rendering/RenderBox.cpp: (WebCore::RenderBox::positionLineBox): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintMaskForTextFillBox): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::lineAtIndex): (WebCore::getHeightForLineCount): (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): (WebCore::shouldCheckLines): Deleted. * rendering/RenderFragmentedFlow.cpp: (WebCore::RenderFragmentedFlow::checkLinesConsistency const): * rendering/RenderFragmentedFlow.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::generateCulledLineBoxRects const): (WebCore::RenderInline::linesVisualOverflowBoundingBox const): (WebCore::RenderInline::linesVisualOverflowBoundingBoxInFragment const): (WebCore::RenderInline::paintOutline): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::anyLineIntersectsRect const): (WebCore::RenderLineBoxList::lineIntersectsDirtyRect const): (WebCore::RenderLineBoxList::paint const): (WebCore::RenderLineBoxList::hitTest const): (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): * rendering/RenderLineBreak.cpp: * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::localSelectionRect): (WebCore::RenderListMarker::addOverflowFromListMarker): (WebCore::RenderListMarker::selectionRectForRepaint): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::shouldPaint): (WebCore::RenderReplaced::localSelectionRect const): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::layoutBlock): (WebCore::RenderRubyRun::getOverhang const): * rendering/RenderTextLineBoxes.cpp: (WebCore::RenderTextLineBoxes::dirtyRange): * rendering/TrailingFloatsRootInlineBox.h: * rendering/line/LineLayoutState.h: (WebCore::LineLayoutState::endLine const): (WebCore::LineLayoutState::setEndLine): (WebCore::LineLayoutState::updateRepaintRangeFromBox): * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::baselinePosition const): * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::positionForPoint): * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::SVGRootInlineBox): * rendering/svg/SVGRootInlineBox.h: * style/InlineTextBoxStyle.cpp: (WebCore::computeUnderlineOffset): Canonical link: https://commits.webkit.org/238386@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-02 16:20:15 +00:00
rendering/LegacyRootInlineBox.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
rendering/MarkedText.h
rendering/OrderIterator.h
rendering/OverlapTestRequestClient.h
rendering/Pagination.h
rendering/PaintFrequencyTracker.h
rendering/PaintInfo.h
rendering/PaintPhase.h
rendering/RenderAttachment.h
rendering/RenderBlock.h
rendering/RenderBlockFlow.h
rendering/RenderBox.h
rendering/RenderBoxModelObject.h
rendering/RenderElement.h
rendering/RenderEmbeddedObject.h
rendering/RenderFlexibleBox.h
rendering/RenderFrame.h
rendering/RenderFrameBase.h
rendering/RenderImage.h
rendering/RenderImageResource.h
rendering/RenderInline.h
rendering/RenderLayer.h
rendering/RenderLayerBacking.h
rendering/RenderLayerCompositor.h
rendering/RenderLayerModelObject.h
rendering/RenderLayerScrollableArea.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
rendering/RenderLineBoxList.h
rendering/RenderMedia.h
HTMLModelElement needs a renderer https://bugs.webkit.org/show_bug.cgi?id=222114 Reviewed by Simon Fraser. Source/WebCore: Tests: model-element/model-element-ready-load-aborted.html model-element/model-element-ready-load-failed.html model-element/model-element-ready.html model-element/model-element-renderer-no-source.html model-element/model-element-renderer.html * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Add RenderModel.h/cpp * Modules/model-element/HTMLModelElement.cpp: (WebCore::HTMLModelElement::HTMLModelElement): (WebCore::HTMLModelElement::~HTMLModelElement): (WebCore::HTMLModelElement::modelData const): (WebCore::HTMLModelElement::sourcesChanged): (WebCore::HTMLModelElement::setSourceURL): (WebCore::HTMLModelElement::readyPromiseResolve): (WebCore::HTMLModelElement::createElementRenderer): (WebCore::HTMLModelElement::responseReceived): (WebCore::HTMLModelElement::dataReceived): (WebCore::HTMLModelElement::redirectReceived): (WebCore::HTMLModelElement::notifyFinished): * Modules/model-element/HTMLModelElement.h: * Modules/model-element/HTMLModelElement.idl: Add basic loading of model data as a CachedRawResource. In the future, we may want a more specialized loader, but for now this gets the data into a data buffer and that's a good start. Also adds a "ready" promise that resolves when the load completes. This may mutate to an event in the future as the spec moves forward. * rendering/RenderModel.cpp: Added. (WebCore::RenderModel::RenderModel): (WebCore::RenderModel::modelElement const): (WebCore::RenderModel::updateFromElement): * rendering/RenderModel.h: Added. * rendering/RenderObject.h: (WebCore::RenderObject::isRenderModel const): Add a simple RenderReplaced subclass as the starting point of a renderer for <model>. It's enough that it shows up in a render tree dump, but not really anything else. LayoutTests: Add basic tests for loading HTMLModelElement elements and rendering RenderModel elements. * model-element/model-element-ready-expected.txt: Added. * model-element/model-element-ready-load-aborted-expected.txt: Added. * model-element/model-element-ready-load-aborted.html: Added. * model-element/model-element-ready-load-failed-expected.txt: Added. * model-element/model-element-ready-load-failed.html: Added. * model-element/model-element-ready.html: Added. * model-element/model-element-renderer-expected.txt: Added. * model-element/model-element-renderer-no-source-expected.txt: Added. * model-element/model-element-renderer-no-source.html: Added. * model-element/model-element-renderer.html: Added. * model-element/resources: Added. * model-element/resources/heart.usdz: Added. Canonical link: https://commits.webkit.org/234452@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-23 01:43:27 +00:00
rendering/RenderModel.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
rendering/RenderObject.h
rendering/RenderObjectEnums.h
rendering/RenderOverflow.h
rendering/RenderPtr.h
rendering/RenderReplaced.h
rendering/RenderSelectionInfo.h
rendering/RenderText.h
rendering/RenderTextControl.h
rendering/RenderTextLineBoxes.h
rendering/RenderTheme.h
rendering/RenderThemeCocoa.h
rendering/RenderThemeIOS.h
rendering/RenderThemeWin.h
rendering/RenderTreeAsText.h
rendering/RenderVideo.h
rendering/RenderView.h
rendering/RenderWidget.h
rendering/ScrollAlignment.h
Refactor HighlightData https://bugs.webkit.org/show_bug.cgi?id=217711 Reviewed by Darin Adler. HighlightData was renamed when it was used for more that selections, but more than half the file was only supposed to be used to deal with the current selection, so I've split it back out into a more reasonable set of files. Also made offsets no longer optional, as there doesn't seem to be a need. Extended the HighlightData setRenderRange into InlineTextBox, as it's a better way to calculate that does not use deprecated functions. No behavior change. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * editing/FrameSelection.cpp: (WebCore::FrameSelection::setNeedsSelectionUpdate): (WebCore::DragCaretController::nodeWillBeRemoved): (WebCore::FrameSelection::respondToNodeModification): (WebCore::FrameSelection::willBeRemovedFromFrame): (WebCore::FrameSelection::focusedOrActiveStateChanged): (WebCore::FrameSelection::updateAppearance): * page/FrameView.cpp: (WebCore::FrameView::paintContentsForSnapshot): * platform/DragImage.cpp: (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState): (WebCore::createDragImageForRange): * rendering/HighlightData.cpp: (WebCore::RenderRangeIterator::RenderRangeIterator): (WebCore::RenderRangeIterator::current const): (WebCore::RenderRangeIterator::next): (WebCore::RenderRangeIterator::checkForSpanner): (WebCore::rendererAfterOffset): (WebCore::HighlightData::highlightStateForRenderer): (): Deleted. (WebCore::isValidRendererForSelection): Deleted. (WebCore::containingBlockBelowView): Deleted. (WebCore::collectSelectionData): Deleted. (WebCore::HighlightData::HighlightData): Deleted. (WebCore::HighlightData::setSelection): Deleted. (WebCore::HighlightData::clearSelection): Deleted. (WebCore::HighlightData::repaintSelection const): Deleted. (WebCore::HighlightData::collectBounds const): Deleted. (WebCore::HighlightData::applySelection): Deleted. * rendering/HighlightData.h: (WebCore::RenderRange::RenderRange): (WebCore::RenderRange::start const): (WebCore::RenderRange::end const): (WebCore::RenderRange::startOffset const): (WebCore::RenderRange::endOffset const): (WebCore::RenderRange::operator== const): (WebCore::HighlightData::startOffset const): (WebCore::HighlightData::endOffset const): (WebCore::HighlightData::RenderRange::RenderRange): Deleted. (WebCore::HighlightData::RenderRange::start const): Deleted. (WebCore::HighlightData::RenderRange::end const): Deleted. (WebCore::HighlightData::RenderRange::startOffset const): Deleted. (WebCore::HighlightData::RenderRange::endOffset const): Deleted. (WebCore::HighlightData::RenderRange::operator== const): Deleted. (WebCore::HighlightData::bounds const): Deleted. (WebCore::HighlightData::boundsClippedToVisibleContent const): Deleted. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::collectMarkedTextsForHighlights const): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::calculateHighlightColor const): * rendering/RenderView.h: * rendering/SelectionRangeData.cpp: Copied from Source/WebCore/rendering/HighlightData.cpp. (WebCore::rendererAfterOffset): (WebCore::isValidRendererForSelection): (WebCore::containingBlockBelowView): (WebCore::collectSelectionData): (WebCore::SelectionRangeData::SelectionData): (WebCore::SelectionRangeData::set): (WebCore::SelectionRangeData::clear): (WebCore::SelectionRangeData::repaint const): (WebCore::SelectionRangeData::collectBounds const): (WebCore::SelectionRangeData::apply): * rendering/SelectionRangeData.h: Added. (WebCore::SelectionRangeData::bounds const): (WebCore::SelectionRangeData::boundsClippedToVisibleContent const): Canonical link: https://commits.webkit.org/230463@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-14 20:42:23 +00:00
rendering/SelectionRangeData.h
Factor selection clamping into a type https://bugs.webkit.org/show_bug.cgi?id=226697 Reviewed by Sam Weinig. TextBoxSelectableRange will be helpful for moving selection code out of the legacy inline boxes. It also allows some code sharing already in this patch. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * layout/integration/LayoutIntegrationRunIteratorLegacyPath.h: (WebCore::LayoutIntegration::RunIteratorLegacyPath::isSelectable const): * layout/integration/LayoutIntegrationRunIteratorModernPath.h: (WebCore::LayoutIntegration::RunIteratorModernPath::positionForOffset const): (WebCore::LayoutIntegration::RunIteratorModernPath::isSelectable const): (WebCore::LayoutIntegration::RunIteratorModernPath::selectionRect const): (WebCore::LayoutIntegration::RunIteratorModernPath::selectableRange const): (WebCore::LayoutIntegration::RunIteratorModernPath::clampedOffset const): Deleted. * rendering/LegacyInlineTextBox.cpp: (WebCore::LegacyInlineTextBox::isSelectable const): (WebCore::LegacyInlineTextBox::localSelectionRect const): (WebCore::LegacyInlineTextBox::paint): (WebCore::LegacyInlineTextBox::selectableRange const): (WebCore::LegacyInlineTextBox::clampedStartEndForState const): (WebCore::LegacyInlineTextBox::calculateDocumentMarkerBounds const): (WebCore::LegacyInlineTextBox::collectMarkedTextsForDraggedContent): (WebCore::LegacyInlineTextBox::collectMarkedTextsForDocumentMarkers const): (WebCore::LegacyInlineTextBox::paintCompositionBackground): (WebCore::LegacyInlineTextBox::positionForOffset const): (WebCore::LegacyInlineTextBox::isSelected const): Deleted. (WebCore::LegacyInlineTextBox::clampedOffset const): Deleted. * rendering/LegacyInlineTextBox.h: * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::inlineSelectionGaps): * rendering/TextBoxSelectableRange.h: Added. (WebCore::TextBoxSelectableRange::clamp const): (WebCore::TextBoxSelectableRange::intersects const): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::localSelectionRect const): Canonical link: https://commits.webkit.org/238543@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-07 06:19:03 +00:00
rendering/TextBoxSelectableRange.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
rendering/line/LineWidth.h
rendering/line/TrailingObjects.h
rendering/shapes/Shape.h
rendering/shapes/ShapeOutsideInfo.h
rendering/style/BasicShapes.h
rendering/style/BorderData.h
rendering/style/BorderValue.h
rendering/style/CounterDirectives.h
rendering/style/FillLayer.h
rendering/style/GapLength.h
rendering/style/GridArea.h
rendering/style/GridLength.h
rendering/style/GridPosition.h
rendering/style/GridTrackSize.h
rendering/style/LineClampValue.h
rendering/style/NinePieceImage.h
rendering/style/OutlineValue.h
rendering/style/RenderStyle.h
rendering/style/RenderStyleConstants.h
rendering/style/SVGRenderStyle.h
rendering/style/SVGRenderStyleDefs.h
rendering/style/ShadowData.h
rendering/style/ShapeValue.h
rendering/style/StyleBackgroundData.h
rendering/style/StyleBoxData.h
rendering/style/StyleColorScheme.h
rendering/style/StyleContentAlignmentData.h
rendering/style/StyleCustomPropertyData.h
rendering/style/StyleDeprecatedFlexibleBoxData.h
rendering/style/StyleFilterData.h
rendering/style/StyleFlexibleBoxData.h
rendering/style/StyleGridData.h
rendering/style/StyleGridItemData.h
rendering/style/StyleImage.h
rendering/style/StyleInheritedData.h
rendering/style/StyleMarqueeData.h
rendering/style/StyleMultiColData.h
rendering/style/StyleRareInheritedData.h
rendering/style/StyleRareNonInheritedData.h
rendering/style/StyleReflection.h
[GTK][WPE] Implement support for CSS Scroll Snap https://bugs.webkit.org/show_bug.cgi?id=203684 Patch by Martin Robinson <mrobinson@igalia.com> on 2021-02-18 Reviewed by Carlos Garcia Campos. .: Add initial support for css-scroll-snap on WebKitGTK+ and WebKitWPE. This adds support for all types of scroll snapping that WebKit supports apart from mouse wheel snapping. Support for that will be added in a followup change. * Source/cmake/OptionsGTK.cmake: Enable scroll snapping when experimental features are enabled. * Source/cmake/OptionsWPE.cmake: Ditto. Source/WebCore: No new tests. This change unskips all cross-platform scroll-snap tests on both platforms. * Headers.cmake: Add headers to header list. * page/scrolling/ScrollSnapOffsetsInfo.cpp: (WebCore::findFirstSnapStopOffsetBetweenOriginAndDestination): Fix a compilation warning that now shows up on my system. * platform/generic/ScrollAnimatorGeneric.cpp: (WebCore::ScrollAnimatorGeneric::scroll): Pass the 'behavior' parameter to the superclass call. (WebCore::ScrollAnimatorGeneric::scrollToOffsetWithoutAnimation): Call into the super class to update the position instead of using the special method in the subclass. (WebCore::ScrollAnimatorGeneric::updatePosition): Also update the current snap index. This is necessary so that changes to the scroll position also modify the currently target snap index. LayoutTests: * css3/scroll-snap/scroll-padding-mainframe-paging.html: Since the GTK+ port has animated scrolling, we need to modify this test to support a scroll operation that does not happen immediately. * platform/gtk/TestExpectations: Unskip scroll snap tests. * platform/wpe/TestExpectations: Ditto. * resources/ui-helper.js: (window.UIHelper.waitForTargetScrollAnimationToSettle): Added a new helper that uses rAF to detect when an animated scroll operation has finished. This is the same strategy that the WPT tests use to detect this. Canonical link: https://commits.webkit.org/234268@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-18 08:49:40 +00:00
rendering/style/StyleScrollSnapPoints.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
rendering/style/StyleSelfAlignmentData.h
rendering/style/StyleSurroundData.h
rendering/style/StyleTransformData.h
rendering/style/StyleVisualData.h
rendering/style/TextDecorationThickness.h
rendering/style/TextSizeAdjustment.h
rendering/style/TextUnderlineOffset.h
rendering/style/WillChangeData.h
replay/UserInputBridge.h
storage/Storage.h
storage/StorageArea.h
storage/StorageEventDispatcher.h
storage/StorageMap.h
storage/StorageNamespace.h
storage/StorageNamespaceProvider.h
storage/StorageQuotaManager.h
storage/StorageType.h
style/StyleChange.h
style/StyleScope.h
style/StyleScopeOrdinal.h
style/StyleUpdate.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
style/StyleValidity.h
Reduce the reliance on PseudoElement in the animation code https://bugs.webkit.org/show_bug.cgi?id=216931 LayoutTests/imported/w3c: Reviewed by Antti Koivisto. Mark a WPT test progression. * web-platform-tests/css/css-transitions/non-rendered-element-002-expected.txt: Source/WebCore: <rdar://problem/69511682> Reviewed by Antti Koivisto. We have so far relied on PseudoElement as a foundation for supporting animations of pseudo-elements. This is not a great choice since PseudoElement is currently limited to ::before and ::after pseudo-elements only. This patch refactors animation-related code to rely on PseudoElement as little as possible without making changes outside of the animation code, as a first step towards supporting animation of more pseudo-elements. This patch introduces a new struct Styleable which combines an Element& and PseudoId. We use this struct instead of Element objects wherever necessary in the animation code. On top of that, we add a PseudoId parameter to all the Element methods wrapping access to ElementAnimationRareData and use a HashMap<PseudoId, std::unique_ptr<ElementAnimationRareData>> to be able to separate animation data per pseudo-element. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * animation/AnimationTimeline.cpp: (WebCore::AnimationTimeline::removeAnimation): (WebCore::AnimationTimeline::animationWasAddedToStyleable): (WebCore::AnimationTimeline::animationWasRemovedFromStyleable): (WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement): (WebCore::AnimationTimeline::removeCSSAnimationCreatedByMarkup): (WebCore::AnimationTimeline::elementWasRemoved): (WebCore::AnimationTimeline::willChangeRendererForStyleable): (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForStyleable): (WebCore::shouldConsiderAnimation): (WebCore::AnimationTimeline::updateCSSAnimationsForStyleable): (WebCore::keyframeEffectForElementAndProperty): (WebCore::AnimationTimeline::updateCSSTransitionsForStyleableAndProperty): (WebCore::AnimationTimeline::updateCSSTransitionsForStyleable): (WebCore::AnimationTimeline::animationWasAddedToElement): Deleted. (WebCore::AnimationTimeline::animationWasRemovedFromElement): Deleted. (WebCore::AnimationTimeline::willChangeRendererForElement): Deleted. (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement): Deleted. (WebCore::AnimationTimeline::updateCSSAnimationsForElement): Deleted. (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty): Deleted. (WebCore::AnimationTimeline::updateCSSTransitionsForElement): Deleted. * animation/AnimationTimeline.h: * animation/CSSAnimation.cpp: (WebCore::CSSAnimation::create): (WebCore::CSSAnimation::CSSAnimation): * animation/CSSAnimation.h: * animation/CSSTransition.cpp: (WebCore::CSSTransition::create): (WebCore::CSSTransition::CSSTransition): * animation/CSSTransition.h: * animation/DeclarativeAnimation.cpp: (WebCore::DeclarativeAnimation::DeclarativeAnimation): (WebCore::DeclarativeAnimation::owningElement const): (WebCore::DeclarativeAnimation::disassociateFromOwningElement): (WebCore::DeclarativeAnimation::initialize): (WebCore::DeclarativeAnimation::enqueueDOMEvent): * animation/DeclarativeAnimation.h: * animation/DocumentTimeline.cpp: (WebCore::DocumentTimeline::animationCanBeRemoved): (WebCore::DocumentTimeline::transitionDidComplete): (WebCore::DocumentTimeline::computeExtentOfAnimation const): (WebCore::DocumentTimeline::isRunningAnimationOnRenderer const): (WebCore::DocumentTimeline::isRunningAcceleratedAnimationOnRenderer const): (WebCore::DocumentTimeline::animatedStyleForRenderer): (WebCore::DocumentTimeline::runningAnimationsForRendererAreAllAccelerated const): (WebCore::DocumentTimeline::runningAnimationsForElementAreAllAccelerated const): Deleted. * animation/DocumentTimeline.h: * animation/ElementAnimationRareData.cpp: (WebCore::ElementAnimationRareData::ElementAnimationRareData): * animation/ElementAnimationRareData.h: (WebCore::ElementAnimationRareData::pseudoId const): * animation/KeyframeEffect.cpp: (WebCore::elementOrPseudoElementForStyleable): (WebCore::invalidateElement): (WebCore::KeyframeEffect::animationTimelineDidChange): (WebCore::KeyframeEffect::updateEffectStackMembership): (WebCore::KeyframeEffect::targetStyleable const): (WebCore::KeyframeEffect::setTarget): (WebCore::KeyframeEffect::setPseudoElement): (WebCore::KeyframeEffect::didChangeTargetStyleable): (WebCore::KeyframeEffect::invalidate): (WebCore::KeyframeEffect::applyPendingAcceleratedActions): (WebCore::KeyframeEffect::didChangeTargetElementOrPseudoElement): Deleted. * animation/KeyframeEffect.h: * animation/KeyframeEffectStack.cpp: (WebCore::KeyframeEffectStack::addEffect): * animation/WebAnimation.cpp: (WebCore::WebAnimation::setEffectInternal): (WebCore::WebAnimation::setTimeline): (WebCore::WebAnimation::effectTargetDidChange): (WebCore::WebAnimation::persist): (WebCore::WebAnimation::commitStyles): * animation/WebAnimation.h: * animation/WebAnimationUtilities.cpp: (WebCore::compareDeclarativeAnimationOwningElementPositionsInDocumentTreeOrder): (WebCore::compareCSSTransitions): (WebCore::compareCSSAnimations): * dom/Element.cpp: (WebCore::Element::removedFromAncestor): (WebCore::Element::animationRareData const): (WebCore::Element::ensureAnimationRareData): (WebCore::Element::keyframeEffectStack const): (WebCore::Element::ensureKeyframeEffectStack): (WebCore::Element::hasKeyframeEffects const): (WebCore::Element::applyKeyframeEffects): (WebCore::Element::animations const): (WebCore::Element::hasCompletedTransitionsForProperty const): (WebCore::Element::hasRunningTransitionsForProperty const): (WebCore::Element::hasRunningTransitions const): (WebCore::Element::ensureAnimations): (WebCore::Element::animationsCreatedByMarkup): (WebCore::Element::setAnimationsCreatedByMarkup): (WebCore::Element::ensureCompletedTransitionsByProperty): (WebCore::Element::ensureRunningTransitionsByProperty): (WebCore::Element::lastStyleChangeEventStyle const): (WebCore::Element::setLastStyleChangeEventStyle): (WebCore::Element::getAnimations): * dom/Element.h: * dom/ElementRareData.cpp: * dom/ElementRareData.h: (WebCore::ElementRareData::useTypes const): (WebCore::ElementRareData::animationRareData const): (WebCore::ElementRareData::ensureAnimationRareData): (WebCore::ElementRareData::elementAnimationRareData): Deleted. * dom/PseudoElement.cpp: (WebCore::PseudoElement::clearHostElement): (WebCore::PseudoElement::isTargetedByKeyframeEffectRequiringPseudoElement): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::hasRunningAcceleratedAnimations const): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const): (WebCore::RenderLayerCompositor::isRunningTransformAnimation const): * rendering/style/RenderStyleConstants.cpp: (WebCore::operator<<): * rendering/updating/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::tearDownRenderers): * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolveElement): (WebCore::Style::TreeResolver::resolvePseudoStyle): (WebCore::Style::TreeResolver::createAnimatedElementUpdate): * style/StyleTreeResolver.h: * style/Styleable.h: Added. (WebCore::Styleable::Styleable): (WebCore::Styleable::fromElement): (WebCore::Styleable::fromRenderer): (WebCore::Styleable::operator== const): (WebCore::Styleable::operator!= const): (WebCore::Styleable::keyframeEffectStack const): (WebCore::Styleable::ensureKeyframeEffectStack const): (WebCore::Styleable::hasKeyframeEffects const): (WebCore::Styleable::applyKeyframeEffects const): (WebCore::Styleable::animations const): (WebCore::Styleable::hasCompletedTransitionsForProperty const): (WebCore::Styleable::hasRunningTransitionsForProperty const): (WebCore::Styleable::hasRunningTransitions const): (WebCore::Styleable::ensureAnimations const): (WebCore::Styleable::ensureCompletedTransitionsByProperty const): (WebCore::Styleable::ensureRunningTransitionsByProperty const): (WebCore::Styleable::animationsCreatedByMarkup const): (WebCore::Styleable::setAnimationsCreatedByMarkup const): (WebCore::Styleable::lastStyleChangeEventStyle const): (WebCore::Styleable::setLastStyleChangeEventStyle const): LayoutTests: <rdar://problem/69511682> Reviewed by Antti Koivisto. Update a couple of tests which relied on an internals method to get a pseudo element and instead use the Web Animations API to determine whether a given animation targets a pseudo-element. This has the added benefit of having the same code run in a testing environment as in a regular browser. * fast/css-generated-content/pseudo-animation.html: * fast/css-generated-content/pseudo-transition.html: Canonical link: https://commits.webkit.org/229750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-25 15:22:00 +00:00
style/Styleable.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
svg/SVGLengthContext.h
svg/SVGLengthValue.h
svg/SVGParserUtilities.h
svg/SVGParsingError.h
svg/SVGStringList.h
svg/SVGTests.h
svg/SVGUnitTypes.h
svg/graphics/SVGImageCache.h
svg/properties/SVGList.h
svg/properties/SVGPrimitiveList.h
svg/properties/SVGProperty.h
svg/properties/SVGPropertyOwner.h
svg/properties/SVGPropertyTraits.h
testing/MockGamepad.h
testing/MockGamepadProvider.h
Introduce ScriptBuffer class to wrap SharedBuffer containing a script https://bugs.webkit.org/show_bug.cgi?id=224092 Reviewed by Yusuke Suzuki and Geoff Garen. Introduce ScriptBuffer class to wrap SharedBuffer containing a script. We started using SharedBuffer to represent worker scripts instead of String, so that they can hold file mapped data and be shared across processes. This patch introduces a new ScriptBuffer to wrap those SharedBuffers. The type makes it clearer what type of data we're dealing with. The helper functions used to convert between String and SharedBuffer can now simply be member functions on ScriptBuffer. This also simplifies IPC code. Source/WebCore: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Add new ScriptBuffer class to project files. * inspector/agents/worker/ServiceWorkerAgent.cpp: (WebCore::ServiceWorkerAgent::getInitializationInfo): Use ScriptBuffer::toString() instead of scriptBufferToString(). * workers/ScriptBuffer.cpp: Added. (WebCore::ScriptBuffer::ScriptBuffer): (WebCore::ScriptBuffer::toString const): (WebCore::ScriptBuffer::containsSingleFileMappedSegment const): (WebCore::operator==): * workers/ScriptBuffer.h: Added. (WebCore::ScriptBuffer::ScriptBuffer): (WebCore::ScriptBuffer::buffer const): (WebCore::ScriptBuffer::isolatedCopy const): (WebCore::ScriptBuffer::operator bool const): New ScriptBuffer class that wraps a SharedBuffer representation of a script. This class helps make it clear what data we're dealing with. It also facilitates conversion to and from a String when needed. The class also has its own IPC coder at WebKit layer to encode the script as a ShareableResource when file mapped. * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::loadSynchronously): Use ScriptBuffer::toString() instead of scriptBufferToString(). And use StringBuffer constructor that takes a String instead of stringToScriptBuffer(). * workers/service/SWClientConnection.h: * workers/service/ServiceWorkerContextData.cpp: (WebCore::ServiceWorkerContextData::isolatedCopy const): * workers/service/ServiceWorkerContextData.h: (WebCore::ServiceWorkerContextData::ImportedScript::encode const): (WebCore::ServiceWorkerContextData::ImportedScript::decode): (WebCore::ServiceWorkerContextData::ImportedScript::isolatedCopy const): (WebCore::ServiceWorkerContextData::encode const): (WebCore::ServiceWorkerContextData::decode): - Use ScriptBuffer instead of RefPtr<SharedBuffer> for scripts. - Drop scriptBufferToString() & stringToScriptBuffer() as they are no longer needed. - Move IPC coders for ServiceWorkerContextData back from WebCoreArgumentCoders back to the WebCore class, now that the coders no longer need to deal with ShareableResource directly. We now encode / decode ScriptBuffer objects and its coder takes care of using a ShareableResource whenever possible. * workers/service/ServiceWorkerGlobalScope.cpp: (WebCore::ServiceWorkerGlobalScope::didSaveScriptsToDisk): * workers/service/ServiceWorkerGlobalScope.h: * workers/service/context/SWContextManager.cpp: (WebCore::SWContextManager::didSaveScriptsToDisk): * workers/service/context/SWContextManager.h: * workers/service/context/ServiceWorkerThread.cpp: (WebCore::ServiceWorkerThread::ServiceWorkerThread): * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::ServiceWorkerThreadProxy::didSaveScriptsToDisk): * workers/service/context/ServiceWorkerThreadProxy.h: * workers/service/server/RegistrationDatabase.cpp: (WebCore::RegistrationDatabase::doPushChanges): (WebCore::RegistrationDatabase::importRecords): * workers/service/server/RegistrationStore.cpp: (WebCore::RegistrationStore::didSaveWorkerScriptsToDisk): * workers/service/server/RegistrationStore.h: * workers/service/server/SWScriptStorage.cpp: (WebCore::SWScriptStorage::store): (WebCore::SWScriptStorage::retrieve): * workers/service/server/SWScriptStorage.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::didSaveWorkerScriptsToDisk): (WebCore::SWServer::updateWorker): * workers/service/server/SWServer.h: * workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::scriptFetchFinished): * workers/service/server/SWServerToContextConnection.h: * workers/service/server/SWServerWorker.cpp: (WebCore::SWServerWorker::SWServerWorker): (WebCore::SWServerWorker::didSaveScriptsToDisk): * workers/service/server/SWServerWorker.h: (WebCore::SWServerWorker::script const): Use ScriptBuffer instead of SharedBuffer. Source/WebKit: * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp: (WebKit::WebSWServerToContextConnection::didSaveScriptsToDisk): * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h: Use ScriptBuffer instead SharedBuffer. * Shared/WebCoreArgumentCoders.cpp: (IPC::tryConvertToShareableResourceHandle): (IPC::decodeScriptBufferAsShareableResourceHandle): (IPC::ArgumentCoder<WebCore::ScriptBuffer>::encode): (IPC::ArgumentCoder<WebCore::ScriptBuffer>::decode): * Shared/WebCoreArgumentCoders.h: - Add IPC encoder / decoder for ScriptBuffer which tries to encode / decode as a ShareableResource whenever possible (single segment that is file mapped). This logic used to be in the ServiceWorkerContextData coders. Now that the logic is in the ScriptBuffer coder, the ServiceWorkerContextData encoding / decoding becomes much simpler. - Moved ServiceWorkerContextData coders from WebCoreArgumentCoders back to its class in WebCore, now that they no longer need to deal with ShareableResource directly. * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::didSaveScriptsToDisk): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/Storage/WebSWContextManagerConnection.messages.in: Send scripts over IPC as ScriptBuffer instead of using ShareableResource directly. The new IPC encoder / decoder for ScriptBuffer takes care of using ShareableResource for us. Canonical link: https://commits.webkit.org/236104@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-02 21:53:30 +00:00
workers/ScriptBuffer.h
requestAnimationFrame and cancelAnimationFrame should be present on DedicatedWorkerGlobalScope https://bugs.webkit.org/show_bug.cgi?id=202525 Reviewed by Simon Fraser. Source/WebCore: Implement AnimationFrameProvider on DedicatedWorkerGlobalScope, This allows use of requestAnimationFrame and cancelAnimationFrame inside a dedicated worker thread. This is useful to control animation when using OffscreenCanvas, and this implementation is only enabled with the OffscreenCanvas build flag and runtime setting. Specification: https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames No new tests. Covered by existing tests. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * dom/RequestAnimationFrameCallback.h: * workers/DedicatedWorkerGlobalScope.cpp: (WebCore::DedicatedWorkerGlobalScope::requestAnimationFrame): (WebCore::DedicatedWorkerGlobalScope::cancelAnimationFrame): * workers/DedicatedWorkerGlobalScope.h: * workers/DedicatedWorkerGlobalScope.idl: * workers/WorkerAnimationController.cpp: Added. * workers/WorkerAnimationController.h: Added. * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): * workers/WorkerGlobalScope.h: (WebCore::WorkerGlobalScope::requestAnimationFrameEnabled const): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerGlobalScope): * workers/WorkerThread.cpp: (WebCore::WorkerParameters::isolatedCopy const): * workers/WorkerThread.h: * workers/service/context/ServiceWorkerThread.cpp: (WebCore::ServiceWorkerThread::ServiceWorkerThread): LayoutTests: Add PASS expectations for DedicatedWorkerGlobalScope.AnimationFrameProvider on platforms where OffscreenCanvas is enabled. * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt: Added. * platform/gtk/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker-expected.txt: Added. * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt: Added. * platform/wpe/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker-expected.txt: Added. Canonical link: https://commits.webkit.org/222733@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-31 17:35:30 +00:00
workers/WorkerAnimationController.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
workers/WorkerDebuggerProxy.h
Implement FontFace in Workers for OffscreenCanvas https://bugs.webkit.org/show_bug.cgi?id=224178 <rdar://problem/76529024> Reviewed by Darin Adler. LayoutTests/imported/w3c: FontFace is now available for Workers, rebaseline related tests. * web-platform-tests/css/css-font-loading/fontfaceset-load-css-wide-keywords-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.measure.advances.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker-expected.txt: Source/WebCore: To comply with spec and complete the OffscreenCanvas implementation, FontFace needs to be made available on WorkerGlobalScope. This patch makes it available and fixes crashes using it due to accessing main-thread only singletons. No new tests, rebaselined existing tests. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Add new files WorkerFontLoadRequest.cpp, WorkerFontLoadRequest.h * css/CSSFontFace.cpp: (WebCore::CSSFontFace::fontCacheFallingBackToSingleton): (WebCore::CSSFontFace::font): * css/CSSFontFace.h: Use the ScriptExecutionContext's FontCache if possible when loading fonts. * css/CSSFontFaceSet.cpp: (WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered): (WebCore::CSSFontFaceSet::matchingFacesExcludingPreinstalledFonts): Use the correct CSSValuePool and FontCache in ensureLocalFontFacesForFamilyRegistered. Also clarify a vaguely-named variable. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::CSSFontFaceSource): Use FontLoadRequest::isPending instead of making assumptions about the request state on construction. * css/FontFace.cpp: (WebCore::FontFace::create): (WebCore::FontFace::display const): * css/FontFace.h: * css/FontFace.idl: Construct with a ScriptExecutionContext instead of a Document and make available for Workers. * css/FontFaceSet.idl: Expose to Workers. * loader/FontLoadRequest.h: (WebCore::FontLoadRequest::isWorkerFontLoadRequest const): Add isPending function and new type WorkerFontLoadRequest. * loader/cache/CachedFont.cpp: (WebCore::CachedFont::createCustomFontData): Use convertWOFFToSfntIfNecessary(). * loader/cache/CachedFontLoadRequest.h: Implement FontLoadRequest::isPending. * platform/graphics/Font.cpp: (WebCore::Font::create): (WebCore::Font::Font): (WebCore::Font::systemFallbackFontForCharacter const): * platform/graphics/Font.h: Add an optional FontCache parameter for use with vertical font data retrieval and add a FontCache parameter to systemFallbackFontForCharacter instead of using the singleton. * platform/graphics/FontCache.cpp: (WebCore::FontCache::fontForPlatformData): Pass FontCache parameter when creating fonts. * platform/graphics/FontCache.h: (WebCore::FontCache::fontCacheFallingBackToSingleton): * platform/graphics/FontCascade.cpp: (WebCore::FontCascade::update const): * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp: (WebCore::FontCascade::fontForCombiningCharacterSequence const): Rename fontCacheFallbackToSingleton -> fontCacheFallingBackToSingleton * platform/graphics/FontCascadeFonts.cpp: (WebCore::FontCascadeFonts::realizeFallbackRangesAt): (WebCore::FontCascadeFonts::glyphDataForSystemFallback): Use familyNamesData instead of familyNames and pass the FontCache parameter when calling glyphDataForSystemFallback to make this safe to use in a Worker. * platform/graphics/FontTaggedSettings.h: Add missing wtf/Hasher.h include. * platform/graphics/WOFFFileFormat.cpp: (WebCore::convertWOFFToSfntIfNecessary): * platform/graphics/WOFFFileFormat.h: Add utility function to convert WOFF fonts on non-Cocoa platforms. * workers/WorkerFontLoadRequest.cpp: Added. (WebCore::WorkerFontLoadRequest::WorkerFontLoadRequest): (WebCore::WorkerFontLoadRequest::load): (WebCore::WorkerFontLoadRequest::ensureCustomFontData): (WebCore::WorkerFontLoadRequest::createFont): (WebCore::WorkerFontLoadRequest::setClient): (WebCore::WorkerFontLoadRequest::didReceiveResponse): (WebCore::WorkerFontLoadRequest::didReceiveData): (WebCore::WorkerFontLoadRequest::didFinishLoading): (WebCore::WorkerFontLoadRequest::didFail): * workers/WorkerFontLoadRequest.h: Added. Implement FontLoadRequest for Workers. * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::fonts): (WebCore::WorkerGlobalScope::fontLoadRequest): (WebCore::WorkerGlobalScope::beginLoadingFontSoon): * workers/WorkerGlobalScope.h: Implement ScriptExecutionContext font-loading related functions. * workers/WorkerGlobalScope.idl: Include FontFaceSource. Canonical link: https://commits.webkit.org/236910@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-22 18:44:49 +00:00
workers/WorkerFontLoadRequest.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
workers/WorkerLoaderProxy.h
Source/WebCore: Update Worklet.addModule() to actually fetch and evaluate the module script https://bugs.webkit.org/show_bug.cgi?id=217242 Reviewed by Geoffrey Garen. Update Worklet.addModule() to actually fetch and evaluate the module script as per: - https://www.w3.org/TR/worklets-1/#dom-worklet-addmodule The WorkletGlobalScope maintains a queue of fetch requests (basically a URL and a completion handler) and uses the existing WorkerScriptLoader to process the requests serially. Based on the result on the load, we call the CompletionHandler which will cause the Worklet.addModule() promise to get resolved or rejected. Test: webaudio/audioworklet-addModule-failure.html * Modules/webaudio/AudioWorkletGlobalScope.cpp: * Modules/webaudio/AudioWorkletGlobalScope.h: Provide workerOrWorkletThread() override for WorkerOrWorkletGlobalScope(), which is a replacement for underlyingThread(). * Modules/webaudio/AudioWorkletMessagingProxy.cpp: (WebCore::AudioWorkletMessagingProxy::AudioWorkletMessagingProxy): (WebCore::AudioWorkletMessagingProxy::createCacheStorageConnection): (WebCore::AudioWorkletMessagingProxy::postTaskToLoader): (WebCore::AudioWorkletMessagingProxy::postTaskForModeToWorkerOrWorkletGlobalScope): * Modules/webaudio/AudioWorkletMessagingProxy.h: Update AudioWorkletMessagingProxy to subclass WorkerLoaderProxy so that AudioWorklet can reuse WorkerScriptLoader. WorkerScriptLoader relies on WorkerLoaderProxy to do thread hopping. * Modules/webaudio/AudioWorkletThread.cpp: (WebCore::AudioWorkletThread::AudioWorkletThread): (WebCore::AudioWorkletThread::workerLoaderProxy): * Modules/webaudio/AudioWorkletThread.h: (WebCore::AudioWorkletThread::create): Subclass the new WorkerOrWorkletThread interface. WorkerOrWorkletThread is a new interface that was adding so that WorkerScriptLoader can be reused by AudioWorklets. * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Peer::send): (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount): (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect): (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage): (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData): (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount): (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake): (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError): (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpgradeURL): (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize): Simple renaming. * WebCore.xcodeproj/project.pbxproj: * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoader::create): * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::WorkerThreadableLoader): (WebCore::WorkerThreadableLoader::loadResourceSynchronously): (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): (WebCore::WorkerThreadableLoader::MainThreadBridge::notifyIsDone): (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData): (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading): (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail): (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishTiming): * loader/WorkerThreadableLoader.h: (WebCore::WorkerThreadableLoader::create): Update WorkerThreadableLoader so that it can be reused by AudioWorklets. * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::wrapCryptoKey): (WebCore::WorkerGlobalScope::unwrapCryptoKey): * workers/WorkerGlobalScope.h: Minor changes to keep building after updates to WorkerOrWorkletGlobalScope. * workers/WorkerLoaderProxy.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::createCacheStorageConnection): (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerOrWorkletGlobalScope): * workers/WorkerMessagingProxy.h: Simple renames. * workers/WorkerOrWorkletGlobalScope.h: (WebCore::WorkerOrWorkletGlobalScope::createUniqueIdentifier): Update WorkerOrWorkletGlobalScope to add a few things WorkerScriptLoader needed to work with both Workers and Worklets. * workers/WorkerOrWorkletThread.h: Added. Added new parent interface for WorkerThread and AudioWorkletThread so that WorkerScriptLoader can work for both Workers and Worklets. * workers/WorkerRunLoop.cpp: (WebCore::WorkerRunLoop::runInMode): (WebCore::WorkerRunLoop::runCleanupTasks): Minor changes to keep building after changes to WorkerOrWorkletGlobalScope. * workers/WorkerThread.h: Subclass the new WorkerOrWorkletThread interface. * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::ServiceWorkerThreadProxy::postTaskForModeToWorkerOrWorkletGlobalScope): (WebCore::ServiceWorkerThreadProxy::createCacheStorageConnection): (WebCore::ServiceWorkerThreadProxy::notifyNetworkStateChange): (WebCore::ServiceWorkerThreadProxy::startFetch): (WebCore::ServiceWorkerThreadProxy::cancelFetch): (WebCore::ServiceWorkerThreadProxy::continueDidReceiveFetchResponse): * workers/service/context/ServiceWorkerThreadProxy.h: Simple renames. * worklets/WorkletGlobalScope.cpp: (WebCore::WorkletGlobalScope::WorkletGlobalScope): Make sure we correctly initialize the security origin for the WorkletGlobalScope. Previously, we were using a unique origin so all script loads would have failed with a cross-origin error. (WebCore::WorkletGlobalScope::fetchAndInvokeScript): (WebCore::WorkletGlobalScope::processNextScriptFetchJobIfNeeded): (WebCore::WorkletGlobalScope::didReceiveResponse): (WebCore::WorkletGlobalScope::notifyFinished): (WebCore::WorkletGlobalScope::didCompleteScriptFetchJob): * worklets/WorkletGlobalScope.h: (WebCore::WorkletGlobalScope::responsibleDocument): (WebCore::WorkletGlobalScope::responsibleDocument const): Add implementation for module script fetching using WorkerScriptLoader. This gets called when Worklet.addModule() is called on the main thread. LayoutTests: Update Worklet.addModule() to actually fetch the module script https://bugs.webkit.org/show_bug.cgi?id=217242 Reviewed by Geoffrey Garen. Add layout test coverage. * webaudio/audioworklet-addModule-failure-expected.txt: Added. * webaudio/audioworklet-addModule-failure.html: Added. Canonical link: https://commits.webkit.org/230154@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-06 17:18:28 +00:00
workers/WorkerOrWorkletThread.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
workers/WorkerRunLoop.h
workers/WorkerScriptLoader.h
workers/WorkerScriptLoaderClient.h
workers/WorkerThread.h
Unreviewed, relanding r269940 https://bugs.webkit.org/show_bug.cgi?id=219076 JSTests: * wasm/function-tests/trap-load-shared.js: Added. (wasmFrameCountFromError): * wasm/function-tests/trap-store-shared.js: Added. * wasm/js-api/test_memory.js: (binaryShouldNotParse): * wasm/stress/shared-memory-errors.js: Added. (assert.throws): * wasm/stress/shared-wasm-memory-buffer.js: Added. LayoutTests/imported/w3c: * web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-success.any.worker-expected.txt: * web-platform-tests/wasm/jsapi/memory/constructor-shared.tentative.any-expected.txt: * web-platform-tests/wasm/jsapi/memory/constructor-shared.tentative.any.worker-expected.txt: * web-platform-tests/wasm/jsapi/memory/constructor.any-expected.txt: * web-platform-tests/wasm/jsapi/memory/constructor.any.worker-expected.txt: * web-platform-tests/wasm/jsapi/memory/grow.any-expected.txt: * web-platform-tests/wasm/jsapi/memory/grow.any.worker-expected.txt: * web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel-expected.txt: Source/JavaScriptCore: ARM64E clang optimizer is broken and optimizing forever if Wasm::MemoryHandle::memory() is inlined. Putting NEVER_INLINE onto this function for now (unfortunate). * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * llint/LLIntPCRanges.h: (JSC::LLInt::isWasmLLIntPC): * llint/LowLevelInterpreter.asm: * llint/WebAssembly.asm: * runtime/JSArrayBuffer.h: (JSC::JSArrayBuffer::toWrappedAllowShared): * runtime/JSArrayBufferView.h: * runtime/JSArrayBufferViewInlines.h: (JSC::JSArrayBufferView::toWrappedAllowShared): * runtime/JSGenericTypedArrayView.h: (JSC::JSGenericTypedArrayView<Adaptor>::toWrappedAllowShared): * runtime/Options.cpp: (JSC::overrideDefaults): (JSC::Options::initialize): * wasm/WasmAirIRGenerator.cpp: (JSC::Wasm::AirIRGenerator::AirIRGenerator): (JSC::Wasm::AirIRGenerator::restoreWebAssemblyGlobalState): (JSC::Wasm::AirIRGenerator::addCurrentMemory): (JSC::Wasm::AirIRGenerator::emitCheckAndPreparePointer): (JSC::Wasm::AirIRGenerator::addCall): (JSC::Wasm::AirIRGenerator::addCallIndirect): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::B3IRGenerator::B3IRGenerator): (JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState): (JSC::Wasm::B3IRGenerator::addCurrentMemory): (JSC::Wasm::B3IRGenerator::emitCheckAndPreparePointer): (JSC::Wasm::B3IRGenerator::addCall): (JSC::Wasm::B3IRGenerator::addCallIndirect): * wasm/WasmBinding.cpp: (JSC::Wasm::wasmToWasm): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): (JSC::Wasm::enableFastMemory): (JSC::Wasm::prepareFastMemory): * wasm/WasmInstance.h: (JSC::Wasm::Instance::cachedMemory const): (JSC::Wasm::Instance::cachedBoundsCheckingSize const): (JSC::Wasm::Instance::updateCachedMemory): (JSC::Wasm::Instance::offsetOfCachedBoundsCheckingSize): (JSC::Wasm::Instance::cachedMemorySize const): Deleted. (JSC::Wasm::Instance::offsetOfCachedMemorySize): Deleted. * wasm/WasmMemory.cpp: (JSC::Wasm::MemoryHandle::MemoryHandle): (JSC::Wasm::MemoryHandle::~MemoryHandle): (JSC::Wasm::MemoryHandle::memory const): (JSC::Wasm::Memory::Memory): (JSC::Wasm::Memory::create): (JSC::Wasm::Memory::tryCreate): (JSC::Wasm::Memory::addressIsInGrowableOrFastMemory): (JSC::Wasm::Memory::growShared): (JSC::Wasm::Memory::grow): (JSC::Wasm::Memory::dump const): (JSC::Wasm::Memory::~Memory): Deleted. (JSC::Wasm::Memory::addressIsInActiveFastMemory): Deleted. * wasm/WasmMemory.h: (JSC::Wasm::Memory::addressIsInGrowableOrFastMemory): (JSC::Wasm::Memory::operator bool const): Deleted. (JSC::Wasm::Memory::memory const): Deleted. (JSC::Wasm::Memory::size const): Deleted. (JSC::Wasm::Memory::sizeInPages const): Deleted. (JSC::Wasm::Memory::initial const): Deleted. (JSC::Wasm::Memory::maximum const): Deleted. (JSC::Wasm::Memory::mode const): Deleted. (JSC::Wasm::Memory::check): Deleted. (JSC::Wasm::Memory::offsetOfMemory): Deleted. (JSC::Wasm::Memory::offsetOfSize): Deleted. (JSC::Wasm::Memory::addressIsInActiveFastMemory): Deleted. * wasm/WasmMemoryInformation.cpp: (JSC::Wasm::PinnedRegisterInfo::get): (JSC::Wasm::PinnedRegisterInfo::PinnedRegisterInfo): * wasm/WasmMemoryInformation.h: (JSC::Wasm::PinnedRegisterInfo::toSave const): * wasm/WasmMemoryMode.cpp: (JSC::Wasm::makeString): * wasm/WasmMemoryMode.h: * wasm/js/JSToWasm.cpp: (JSC::Wasm::createJSToWasmWrapper): * wasm/js/JSWebAssemblyInstance.cpp: (JSC::JSWebAssemblyInstance::tryCreate): * wasm/js/JSWebAssemblyMemory.cpp: (JSC::JSWebAssemblyMemory::buffer): (JSC::JSWebAssemblyMemory::growSuccessCallback): * wasm/js/JSWebAssemblyMemory.h: * wasm/js/WebAssemblyFunction.cpp: (JSC::WebAssemblyFunction::jsCallEntrypointSlow): * wasm/js/WebAssemblyMemoryConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * wasm/js/WebAssemblyMemoryPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * wasm/js/WebAssemblyModuleRecord.cpp: (JSC::WebAssemblyModuleRecord::evaluate): Source/WebCore: Tests: js/dom/webassembly-memory-normal-fail.html js/dom/webassembly-memory-shared-basic.html js/dom/webassembly-memory-shared-fail.html storage/indexeddb/shared-memory-structured-clone.html * Headers.cmake: * Modules/indexeddb/server/IDBSerializationContext.cpp: (WebCore::IDBServer::IDBSerializationContext::initializeVM): * WebCore.xcodeproj/project.pbxproj: * bindings/IDLTypes.h: * bindings/js/CommonVM.cpp: (WebCore::commonVMSlow): * bindings/js/JSDOMConvertBufferSource.h: (WebCore::Detail::BufferSourceConverter::convert): (WebCore::Converter<IDLArrayBuffer>::convert): (WebCore::Converter<IDLDataView>::convert): (WebCore::Converter<IDLInt8Array>::convert): (WebCore::Converter<IDLInt16Array>::convert): (WebCore::Converter<IDLInt32Array>::convert): (WebCore::Converter<IDLUint8Array>::convert): (WebCore::Converter<IDLUint16Array>::convert): (WebCore::Converter<IDLUint32Array>::convert): (WebCore::Converter<IDLUint8ClampedArray>::convert): (WebCore::Converter<IDLFloat32Array>::convert): (WebCore::Converter<IDLFloat64Array>::convert): (WebCore::Converter<IDLArrayBufferView>::convert): (WebCore::Converter<IDLAllowSharedAdaptor<T>>::convert): * bindings/js/JSDOMConvertUnion.h: * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::serialize): (WebCore::CloneSerializer::CloneSerializer): (WebCore::CloneSerializer::dumpIfTerminal): (WebCore::CloneDeserializer::deserialize): (WebCore::CloneDeserializer::CloneDeserializer): (WebCore::CloneDeserializer::readTerminal): (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::computeMemoryCost const): (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::deserialize): * bindings/js/SerializedScriptValue.h: * bindings/js/WebCoreJSClientData.cpp: (WebCore::JSVMClientData::initNormalWorld): * bindings/js/WebCoreJSClientData.h: * bindings/js/WebCoreTypedArrayController.cpp: (WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController): (WebCore::WebCoreTypedArrayController::isAtomicsWaitAllowedOnCurrentThread): * bindings/js/WebCoreTypedArrayController.h: * bindings/scripts/CodeGeneratorJS.pm: (IsAnnotatedType): (GetAnnotatedIDLType): * bindings/scripts/IDLAttributes.json: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjDOMConstructor::construct): (WebCore::jsTestObjPrototypeFunction_encodeIntoBody): (WebCore::JSC_DEFINE_HOST_FUNCTION): * bindings/scripts/test/TestObj.idl: * dom/TextDecoder.idl: * dom/TextDecoderStreamDecoder.idl: * dom/TextEncoder.idl: * workers/DedicatedWorkerGlobalScope.cpp: (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): * workers/WorkerGlobalScope.h: * workers/WorkerOrWorkletGlobalScope.cpp: (WebCore::WorkerOrWorkletGlobalScope::WorkerOrWorkletGlobalScope): * workers/WorkerOrWorkletGlobalScope.h: * workers/WorkerOrWorkletScriptController.cpp: (WebCore::WorkerOrWorkletScriptController::WorkerOrWorkletScriptController): * workers/WorkerOrWorkletScriptController.h: * workers/WorkerThreadType.h: Added. * workers/service/ServiceWorkerGlobalScope.cpp: (WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope): * worklets/WorkletGlobalScope.cpp: (WebCore::WorkletGlobalScope::WorkletGlobalScope): Source/WTF: * wtf/PlatformEnable.h: LayoutTests: * js/dom/resources/webassembly-memory-normal-fail-worker.js: Added. * js/dom/resources/webassembly-memory-shared-worker.js: Added. (onmessage): * js/dom/webassembly-memory-normal-fail-expected.txt: Added. * js/dom/webassembly-memory-normal-fail.html: Added. * js/dom/webassembly-memory-shared-basic-expected.txt: Added. * js/dom/webassembly-memory-shared-basic.html: Added. * js/dom/webassembly-memory-shared-fail-expected.txt: Added. * js/dom/webassembly-memory-shared-fail.html: Added. * platform/win/TestExpectations: * storage/indexeddb/resources/shared-memory-structured-clone.js: Added. (prepareDatabase): (async startTests): (testSharedWebAssemblyMemory): * storage/indexeddb/shared-memory-structured-clone-expected.txt: Added. * storage/indexeddb/shared-memory-structured-clone.html: Added. Canonical link: https://commits.webkit.org/231721@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-18 20:22:16 +00:00
workers/WorkerThreadType.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
workers/WorkerType.h
workers/service/SWClientConnection.h
workers/service/ServiceWorkerClientData.h
workers/service/ServiceWorkerClientIdentifier.h
workers/service/ServiceWorkerClientQueryOptions.h
workers/service/ServiceWorkerClientType.h
workers/service/ServiceWorkerContextData.h
workers/service/ServiceWorkerData.h
workers/service/ServiceWorkerFetchResult.h
workers/service/ServiceWorkerIdentifier.h
workers/service/ServiceWorkerJob.h
workers/service/ServiceWorkerJobClient.h
workers/service/ServiceWorkerJobData.h
workers/service/ServiceWorkerJobDataIdentifier.h
workers/service/ServiceWorkerJobType.h
workers/service/ServiceWorkerProvider.h
workers/service/ServiceWorkerRegistrationData.h
workers/service/ServiceWorkerRegistrationKey.h
workers/service/ServiceWorkerRegistrationOptions.h
workers/service/ServiceWorkerTypes.h
workers/service/ServiceWorkerUpdateViaCache.h
workers/service/context/SWContextManager.h
workers/service/context/ServiceWorkerDebuggable.h
workers/service/context/ServiceWorkerFetch.h
workers/service/context/ServiceWorkerInspectorProxy.h
workers/service/context/ServiceWorkerThread.h
workers/service/context/ServiceWorkerThreadProxy.h
workers/service/server/RegistrationDatabase.h
workers/service/server/SWOriginStore.h
workers/service/server/SWServer.h
workers/service/server/SWServerRegistration.h
workers/service/server/SWServerToContextConnection.h
workers/service/server/SWServerWorker.h
Reduce the amount of custom binding code for JSXPathNSResolver https://bugs.webkit.org/show_bug.cgi?id=161030 Reviewed by Darin Adler. LayoutTests/imported/w3c: * web-platform-tests/dom/idlharness.window-expected.txt: * web-platform-tests/domxpath/callback-interface-expected.txt: Source/WebCore: This patch introduces CustomXPathNSResolver callback interface, cleaning up CodeGeneratorJS.pm and removing custom binding code. XPathNSResolver is kept as a wrapper for NativeXPathNSResolver, preserving common case performance via IDL interface converter, and because a callback interface can't be returned from a function without substantial code generator change. Also, improves non-callable method error message and fixes 2 spec incompatibilities: a) no "lookupNamespaceURI" method lookup on functions [1]; b) resolver's "prefix" parameter is required [2]. Since C++ methods can't be overload based on return type, this patch adds [ImplementedAs] IDL attribute support for callback interface methods. Because XPathNSResolver wrappers are always temporary (no reference is kept), [IsWeakCallback] IDL attribute isn't added, preserving strong reference. [1]: https://heycam.github.io/webidl/#call-a-user-objects-operation (step 10.1) [2]: https://dom.spec.whatwg.org/#dom-xpathnsresolver-lookupnamespaceuri Tests: imported/w3c/web-platform-tests/dom/idlharness.window.js imported/w3c/web-platform-tests/domxpath/callback-interface.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/IDLTypes.h: * bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback): * bindings/js/JSCustomXPathNSResolver.cpp: Removed. * bindings/js/JSCustomXPathNSResolver.h: Removed. * bindings/js/JSDOMConvertXPathNSResolver.h: (WebCore::Converter<IDLInterface<XPathNSResolver>>::convert): (WebCore::Converter<IDLXPathNSResolver<T>>::convert): Deleted. (WebCore::JSConverter<IDLXPathNSResolver<T>>::convert): Deleted. (WebCore::JSConverter<IDLXPathNSResolver<T>>::convertNewlyCreated): Deleted. * bindings/scripts/CodeGenerator.pm: (IsBuiltinType): (IsWrapperType): * bindings/scripts/CodeGeneratorJS.pm: (AddToIncludesForIDLType): (GenerateHeader): (GenerateCallbackHeaderContent): (GenerateCallbackImplementationContent): (GetBaseIDLType): (NativeToJSValueDOMConvertNeedsState): (NativeToJSValueDOMConvertNeedsGlobalObject): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterBody): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverBody): * xml/CustomXPathNSResolver.cpp: Copied from Source/WebCore/bindings/js/JSXPathNSResolverCustom.cpp. (WebCore::CustomXPathNSResolver::lookupNamespaceURI): * xml/CustomXPathNSResolver.h: Copied from Source/WebCore/bindings/js/JSXPathNSResolverCustom.cpp. * xml/CustomXPathNSResolver.idl: Renamed from Source/WebCore/bindings/js/JSXPathNSResolverCustom.cpp. * xml/XPathNSResolver.idl: LayoutTests: * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * fast/xpath/nsresolver-bad-object-expected.txt: Canonical link: https://commits.webkit.org/228065@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-07 19:27:56 +00:00
xml/CustomXPathNSResolver.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
xml/XPathExpression.h
xml/XPathNSResolver.h
xml/XPathNodeSet.h
xml/XPathResult.h
xml/XPathValue.h
${WebCore_DERIVED_SOURCES_DIR}/CSSPropertyNames.h
${WebCore_DERIVED_SOURCES_DIR}/CSSValueKeywords.h
${WebCore_DERIVED_SOURCES_DIR}/EventInterfaces.h
${WebCore_DERIVED_SOURCES_DIR}/EventTargetInterfaces.h
${WebCore_DERIVED_SOURCES_DIR}/HTMLElementTypeHelpers.h
${WebCore_DERIVED_SOURCES_DIR}/HTMLNames.h
${WebCore_DERIVED_SOURCES_DIR}/HTTPHeaderNames.h
Add AbstractRange https://bugs.webkit.org/show_bug.cgi?id=217846 Reviewed by Ryosuke Niwa. LayoutTests/imported/w3c: * web-platform-tests/dom/idlharness.window-expected.txt: Updated test result for progression. Source/WebCore: This makes us more accurately match the DOM specification, makes Range and StaticRange objects slightly bigger since they now have a virtual table pointer, and makes the AbstractRange methods a bit slower to call from JavaScript since they are backed by C++ virtual functions. * CMakeLists.txt: Added AbstractRange files. * DerivedSources-input.xcfilelist: Ditto. * DerivedSources-output.xcfilelist: Ditto. * DerivedSources.make: Ditto. * Headers.cmake: Ditto. * Sources.txt: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. Also removed reference to non-existent JSAudioNodeCustom.cpp and moved JSStaticRange file from the Events group into the Ranges group. * bindings/js/JSAbstractRangeCustom.cpp: Added. (WebCore::toJS): Added. Just the default implementation. Would be nice if we did not have to write this. (WebCore::toJSNewlyCreated): Make either a StaticRange or Range wrapper depending on whether this is a live range or not. * bindings/js/JSEventCustom.cpp: Removed lots of unneeded includes. (WebCore::toJS): Stopped using "using namespace JSC". * bindings/js/WebCoreBuiltinNames.h: Added AbstractRange. * dom/AbstractRange.cpp: Added. (WebCore::makeSimpleRange): Added. * dom/AbstractRange.h: Added. * dom/AbstractRange.idl: Added. * dom/Range.h: Changed to derive from AbstractRange instead of from RefCounted. Also marked this final since it's now polymorphic. Marked all the functions that override final as well, to check that they correctly override the virtual functions in the base class. Added private isLiveRange function override that returns true. Added SPECIALIZE_TYPE_TRAITS_BEGIN/END so we can do is<Range>. * dom/Range.idl: Removed ImplementationLacksVTable. Added JSGenerateToNativeObject. Inherit from AbstractRange. Removed the 5 attribute getters that are now inherited from AbstractRange. * dom/StaticRange.h: Changed to derive from AbstractRange instead of from RefCounted. Also marked this final since it's now polymorphic. Added functions to override the ones from StaticRange, calling through to the ones from SimpleRange (I thought there was a way to do this with using, but I couldn't figure that out). Added private isLiveRange function override that returns false. Added SPECIALIZE_TYPE_TRAITS_BEGIN/END so we can do is<StaticRange>. * dom/StaticRange.idl: Removed EnabledBySetting=InputEvents since this should now always be included. I think we should probably remove the InputEvents setting now entirely. Removed ImplementationLacksVTable. Added JSGenerateToNativeObject. Inherit from AbstractRange. Removed all 5 attribute getters, which are now inherited from AbstractRange. Canonical link: https://commits.webkit.org/230606@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-17 20:33:53 +00:00
${WebCore_DERIVED_SOURCES_DIR}/JSAbstractRange.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
${WebCore_DERIVED_SOURCES_DIR}/JSBlob.h
${WebCore_DERIVED_SOURCES_DIR}/JSCSSRule.h
${WebCore_DERIVED_SOURCES_DIR}/JSCSSRuleList.h
${WebCore_DERIVED_SOURCES_DIR}/JSCSSStyleDeclaration.h
${WebCore_DERIVED_SOURCES_DIR}/JSDOMBindingInternalsBuiltins.h
${WebCore_DERIVED_SOURCES_DIR}/JSDOMImplementation.h
${WebCore_DERIVED_SOURCES_DIR}/JSDOMWindow.h
${WebCore_DERIVED_SOURCES_DIR}/JSDeprecatedCSSOMCounter.h
${WebCore_DERIVED_SOURCES_DIR}/JSDeprecatedCSSOMRGBColor.h
${WebCore_DERIVED_SOURCES_DIR}/JSDeprecatedCSSOMRect.h
${WebCore_DERIVED_SOURCES_DIR}/JSDeprecatedCSSOMValue.h
${WebCore_DERIVED_SOURCES_DIR}/JSDocument.h
${WebCore_DERIVED_SOURCES_DIR}/JSElement.h
${WebCore_DERIVED_SOURCES_DIR}/JSEvent.h
${WebCore_DERIVED_SOURCES_DIR}/JSEventTarget.h
${WebCore_DERIVED_SOURCES_DIR}/JSFile.h
${WebCore_DERIVED_SOURCES_DIR}/JSHTMLCollection.h
${WebCore_DERIVED_SOURCES_DIR}/JSHTMLElement.h
${WebCore_DERIVED_SOURCES_DIR}/JSHTMLOptionsCollection.h
${WebCore_DERIVED_SOURCES_DIR}/JSMediaList.h
${WebCore_DERIVED_SOURCES_DIR}/JSNamedNodeMap.h
${WebCore_DERIVED_SOURCES_DIR}/JSNode.h
${WebCore_DERIVED_SOURCES_DIR}/JSNodeIterator.h
${WebCore_DERIVED_SOURCES_DIR}/JSNodeList.h
${WebCore_DERIVED_SOURCES_DIR}/JSNotification.h
${WebCore_DERIVED_SOURCES_DIR}/JSRange.h
${WebCore_DERIVED_SOURCES_DIR}/JSReadableStreamDefaultController.h
${WebCore_DERIVED_SOURCES_DIR}/JSStyleSheet.h
${WebCore_DERIVED_SOURCES_DIR}/JSStyleSheetList.h
${WebCore_DERIVED_SOURCES_DIR}/JSTreeWalker.h
${WebCore_DERIVED_SOURCES_DIR}/JSXPathExpression.h
${WebCore_DERIVED_SOURCES_DIR}/JSXPathResult.h
${WebCore_DERIVED_SOURCES_DIR}/ReadableByteStreamInternalsBuiltins.h
${WebCore_DERIVED_SOURCES_DIR}/ReadableStreamInternalsBuiltins.h
${WebCore_DERIVED_SOURCES_DIR}/Settings.h
${WebCore_DERIVED_SOURCES_DIR}/StreamInternalsBuiltins.h
Add support for TransformStream https://bugs.webkit.org/show_bug.cgi?id=215607 Reviewed by Alex Christensen. LayoutTests/imported/w3c: * web-platform-tests/streams/idlharness.any-expected.txt: * web-platform-tests/streams/idlharness.any.worker-expected.txt: * web-platform-tests/streams/transform-streams/backpressure.any-expected.txt: * web-platform-tests/streams/transform-streams/backpressure.any.worker-expected.txt: * web-platform-tests/streams/transform-streams/errors.any-expected.txt: * web-platform-tests/streams/transform-streams/errors.any.worker-expected.txt: * web-platform-tests/streams/transform-streams/flush.any-expected.txt: * web-platform-tests/streams/transform-streams/flush.any.worker-expected.txt: * web-platform-tests/streams/transform-streams/general.any-expected.txt: * web-platform-tests/streams/transform-streams/general.any.worker-expected.txt: * web-platform-tests/streams/transform-streams/lipfuzz.any-expected.txt: * web-platform-tests/streams/transform-streams/lipfuzz.any.worker-expected.txt: * web-platform-tests/streams/transform-streams/patched-global.any-expected.txt: * web-platform-tests/streams/transform-streams/patched-global.any.worker-expected.txt: * web-platform-tests/streams/transform-streams/properties.any-expected.txt: * web-platform-tests/streams/transform-streams/properties.any.worker-expected.txt: * web-platform-tests/streams/transform-streams/reentrant-strategies.any-expected.txt: * web-platform-tests/streams/transform-streams/reentrant-strategies.any.js: * web-platform-tests/streams/transform-streams/reentrant-strategies.any.worker-expected.txt: * web-platform-tests/streams/transform-streams/strategies.any-expected.txt: * web-platform-tests/streams/transform-streams/strategies.any.worker-expected.txt: * web-platform-tests/streams/transform-streams/terminate.any-expected.txt: * web-platform-tests/streams/transform-streams/terminate.any.worker-expected.txt: Source/WebCore: Add initial implementation as JS built-ins as per spec. Covered by rebased tests. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Modules/streams/ReadableStreamInternals.js: (readableStreamDefaultControllerShouldCallPull): (readableStreamDefaultControllerCallPullIfNeeded): * Modules/streams/TransformStream.idl: Added. * Modules/streams/TransformStream.js: Added. (initializeTransformStream): (getter.readable): (writable): * Modules/streams/TransformStreamDefaultController.idl: Added. * Modules/streams/TransformStreamDefaultController.js: Added. (initializeTransformStreamDefaultController): (getter.desiredSize): (enqueue): (error): (terminate): * Modules/streams/TransformStreamInternals.js: Added. (isTransformStream): (isTransformStreamDefaultController): (initializeTransformStream): (transformStreamError): (transformStreamErrorWritableAndUnblockWrite): (transformStreamSetBackpressure): (setUpTransformStreamDefaultController): (setUpTransformStreamDefaultControllerFromTransformer): (transformStreamDefaultControllerClearAlgorithms): (transformStreamDefaultControllerEnqueue): (transformStreamDefaultControllerError): (transformStreamDefaultControllerPerformTransform): (transformStreamDefaultSinkWriteAlgorithm): (transformStreamDefaultSinkAbortAlgorithm): (transformStreamDefaultSinkCloseAlgorithm): (transformStreamDefaultSourcePullAlgorithm): * Modules/streams/WritableStream.js: (initializeWritableStream): * Modules/streams/WritableStreamInternals.js: (createWritableStream): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setTransformStreamAPIEnabled): (WebCore::RuntimeEnabledFeatures::transformStreamAPIEnabled const): Source/WebKit: Add a runtime flag for TransformStream, off by default. * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences transformStreamAPIEnabled]): (-[WebPreferences setTransformStreamAPIEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setWritableStreamAPIEnabled): (WTR::TestRunner::setTransformStreamAPIEnabled): * WebKitTestRunner/InjectedBundle/TestRunner.h: LayoutTests: Rebased tests now that TransformStream is defined. * streams/reference-implementation/pipe-through-expected.txt: * streams/reference-implementation/pipe-to-expected.txt: * streams/reference-implementation/transform-stream-errors-expected.txt: * streams/reference-implementation/transform-stream-expected.txt: Canonical link: https://commits.webkit.org/228682@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-27 10:00:20 +00:00
${WebCore_DERIVED_SOURCES_DIR}/TransformStreamInternalsBuiltins.h
[CMake] Make WebCore headers copies https://bugs.webkit.org/show_bug.cgi?id=182512 <rdar://problem/37510435> Reviewed by Alex Christensen. Source/WebCore: The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was originally Windows only but now this is enabled for all CMake based ports. Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and tests. Shared headers are within Headers.cmake while port and platform specific headers are in their respective CMake files. Listing out all headers is preferred because globbing will break the build whenever a file is added. All include directories within the WebCore source tree are now PRIVATE. They were modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets which will prevent erroneous includes in targets dependent on WebCore. * CMakeLists.txt: * Headers.cmake: Added. * PlatformAppleWin.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformPlayStation.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: * PlatformWinCairo.cmake: * platform/Cairo.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/GStreamer.cmake: * platform/HolePunch.cmake: * platform/ImageDecoders.cmake: * platform/Soup.cmake: Added. * platform/TextureMapper.cmake: Source/WebKit: WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> Removed generation of forwarding headers for WebCore using the perl script. * CMakeLists.txt: * NetworkProcess/curl/NetworkDataTaskCurl.h: * PlatformWPE.cmake: * PlatformWin.cmake: * Scripts/generate-forwarding-headers.pl: * UIProcess/API/glib/WebKitUserContentFilterStore.cpp: * UIProcess/API/wpe/WebKitColorPrivate.h: * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: * UIProcess/win/PageClientImpl.cpp: Source/WebKitLegacy: Added WebCorePrivateFrameworkHeaders as a dependency of WebKitLegacy for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. This revealed problems with WebKit's usage of WebCore headers. All include directories directly referencing the WebCore source tree we're removed from the CMake files. * CMakeLists.txt: * PlatformWin.cmake: Tools: Added WebCorePrivateFrameworkHeaders as a dependency of TestWebKitAPI for all ports. WebCore now uses WebCore_PRIVATE_INCLUDE_DIRECTORIES for all ports. Any includes of WebCore headers using "*.h" were modified to <WebCore/*.h> * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: * WebKitTestRunner/win/PlatformWebViewWin.cpp: Canonical link: https://commits.webkit.org/211325@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-18 23:20:26 +00:00
${WebCore_DERIVED_SOURCES_DIR}/WebCoreJSBuiltinInternals.h
${WebCore_DERIVED_SOURCES_DIR}/WebKitFontFamilyNames.h
${WebCore_DERIVED_SOURCES_DIR}/WritableStreamInternalsBuiltins.h
)
[GStreamer][EME][OpenCDM] Implement OpenCDM support https://bugs.webkit.org/show_bug.cgi?id=213550 Reviewed by Philippe Normand. .: Added support to enable OpenCDM and find it it needed. * Source/cmake/FindOpenCDM.cmake: Added. * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: * Source/cmake/WebKitFeatures.cmake: Source/WebCore: Implemented the OpenCDM support in the CDMOpenCDM and CDMProxyOpenCDM related classes. CDMOpenCDM classes check for Widevine support in OpenCDM and glues the JavaScript API to the OpenCDM/Thunder framework. Building this is optional and --opencdm parameter needs to be passed to build-webkit to get it. CDMProxy related needed changes because of several reasons. First is that Key was considering only a Vector<uint8_t> as a type and OpenCDM has session objects. Key is also renamed to KeyHandle as this name reflects in a better way the purpose of the class. This bleeds out to all CDMProxy related classes. CDMInstanceSessionProxy gets support to remove itself from the CDMSessionProxy. Regarding ClearKey, we adapt the changes to the CDMProxy classes and de-cable protection system from the decryptors as the OpenCDM decryptor could handle more than one system. No new tests. YouTube TV 2019 tests are green. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/GStreamer.cmake: * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::dataAsUInt8Ptr const): * platform/SharedBuffer.h: * platform/encryptedmedia/CDMInstance.h: * platform/encryptedmedia/CDMOpenCDMTypes.h: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp. * platform/encryptedmedia/CDMProxy.cpp: (WebCore::KeyHandle::idAsString const): (WebCore::KeyHandle::takeValueIfDifferent): (WebCore::KeyStore::containsKeyID const): (WebCore::KeyStore::merge): (WebCore::KeyStore::allKeysAs const): (WebCore::KeyStore::addKeys): (WebCore::KeyStore::add): (WebCore::KeyStore::remove): (WebCore::KeyStore::keyHandle const): (WebCore::CDMProxy::keyHandle const): (WebCore::CDMProxy::tryWaitForKeyHandle const): (WebCore::CDMProxy::keyAvailableUnlocked const): (WebCore::CDMProxy::keyAvailable const): (WebCore::CDMProxy::getOrWaitForKeyHandle const): (WebCore::CDMProxy::getOrWaitForKeyValue const): (WebCore::CDMInstanceSessionProxy::CDMInstanceSessionProxy): (WebCore::CDMInstanceSessionProxy::removeFromInstanceProxy): * platform/encryptedmedia/CDMProxy.h: (WebCore::KeyHandle::create): (WebCore::KeyHandle::id const): (WebCore::KeyHandle::value const): (WebCore::KeyHandle::value): (WebCore::KeyHandle::isStatusCurrentlyValid): (WebCore::KeyHandle::operator==): (WebCore::KeyHandle::operator<): (WebCore::KeyHandle::KeyHandle): (WebCore::KeyStore::isEmpty const): (WebCore::CDMProxy::instance const): (WebCore::CDMInstanceSessionProxy::releaseDecryptionResources): (WebCore::CDMInstanceSessionProxy::cdmInstanceProxy const): (WebCore::CDMInstanceProxy::proxy const): (WebCore::CDMInstanceProxy::removeSession): * platform/encryptedmedia/CDMUtilities.cpp: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp. (WebCore::CDMUtilities::parseJSONObject): * platform/encryptedmedia/CDMUtilities.h: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp. * platform/encryptedmedia/clearkey/CDMClearKey.cpp: (WebCore::parseLicenseFormat): (WebCore::CDMPrivateClearKey::supportsInitData const): (WebCore::CDMPrivateClearKey::sanitizeResponse const): (WebCore::CDMInstanceSessionClearKey::updateLicense): (WebCore::CDMInstanceSessionClearKey::removeSessionData): (WebCore::CDMInstanceSessionClearKey::parentInstance const): * platform/encryptedmedia/clearkey/CDMClearKey.h: * platform/graphics/gstreamer/GStreamerCommon.cpp: (WebCore::isOpenCDMRanked): (WebCore::initializeGStreamerAndRegisterWebKitElements): (WebCore::GstMappedBuffer::createVector): * platform/graphics/gstreamer/GStreamerCommon.h: (WebCore::GstMappedBuffer::create): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::waitForCDMAttachment): * platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp: (WebCore::CDMFactory::platformRegisterFactories): * platform/graphics/gstreamer/eme/CDMOpenCDM.cpp: Added. (openCDMLicenseType): (WebCore::initDataMD5): (WebCore::sessionLoadFailureFromOpenCDM): (WebCore::OpenCDM::destructOpenCDMSession): (WebCore::OpenCDM::createSharedOpenCDMSession): (WebCore::CDMFactoryOpenCDM::singleton): (WebCore::CDMFactoryOpenCDM::createCDM): (WebCore::CDMFactoryOpenCDM::createCDMProxy): (WebCore::CDMFactoryOpenCDM::supportedKeySystems const): (WebCore::CDMFactoryOpenCDM::supportsKeySystem): (WebCore::CDMPrivateOpenCDM::supportedInitDataTypes const): (WebCore::CDMPrivateOpenCDM::supportsConfiguration const): (WebCore::CDMPrivateOpenCDM::supportedRobustnesses const): (WebCore::CDMPrivateOpenCDM::distinctiveIdentifiersRequirement const): (WebCore::CDMPrivateOpenCDM::persistentStateRequirement const): (WebCore::CDMPrivateOpenCDM::distinctiveIdentifiersAreUniquePerOriginAndClearable const): (WebCore::CDMPrivateOpenCDM::createInstance): (WebCore::CDMPrivateOpenCDM::loadAndInitialize): (WebCore::CDMPrivateOpenCDM::supportsServerCertificates const): (WebCore::CDMPrivateOpenCDM::supportsSessions const): (WebCore::CDMPrivateOpenCDM::supportsInitData const): (WebCore::CDMPrivateOpenCDM::sanitizeResponse const): (WebCore::CDMPrivateOpenCDM::sanitizeSessionId const): (WebCore::CDMInstanceOpenCDM::CDMInstanceOpenCDM): (WebCore::CDMInstanceOpenCDM::initializeWithConfiguration): (WebCore::CDMInstanceOpenCDM::setServerCertificate): (WebCore::CDMInstanceOpenCDM::setStorageDirectory): (WebCore::CDMInstanceSessionOpenCDM::CDMInstanceSessionOpenCDM): (WebCore::CDMInstanceOpenCDM::createSession): (WebCore::ParsedResponseMessage::ParsedResponseMessage): (WebCore::ParsedResponseMessage::hasPayload const): (WebCore::ParsedResponseMessage::payload const): (WebCore::ParsedResponseMessage::payload): (WebCore::ParsedResponseMessage::hasType const): (WebCore::ParsedResponseMessage::type const): (WebCore::ParsedResponseMessage::typeOr const): (WebCore::CDMInstanceSessionOpenCDM::challengeGeneratedCallback): (WebCore::toString): (WebCore::CDMInstanceSessionOpenCDM::status const): (WebCore::CDMInstanceSessionOpenCDM::keyUpdatedCallback): (WebCore::CDMInstanceSessionOpenCDM::keysUpdateDoneCallback): (WebCore::CDMInstanceSessionOpenCDM::errorCallback): (WebCore::CDMInstanceSessionOpenCDM::requestLicense): (WebCore::CDMInstanceSessionOpenCDM::sessionFailure): (WebCore::CDMInstanceSessionOpenCDM::updateLicense): (WebCore::CDMInstanceSessionOpenCDM::loadSession): (WebCore::CDMInstanceSessionOpenCDM::closeSession): (WebCore::CDMInstanceSessionOpenCDM::removeSessionData): (WebCore::CDMInstanceSessionOpenCDM::storeRecordOfKeyUsage): (WebCore:: const): * platform/graphics/gstreamer/eme/CDMOpenCDM.h: Added. (WebCore::OpenCDM::OpenCDMSystemDeleter::operator() const): (WebCore::OpenCDM::OpenCDMSessionDeleter::operator() const): * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: (WebCore::CDMProxyClearKey::cencSetDecryptionKey): * platform/graphics/gstreamer/eme/CDMProxyOpenCDM.cpp: Added. (WebCore::CDMProxyOpenCDM::getDecryptionSession const): (WebCore::CDMProxyOpenCDM::decrypt): * platform/graphics/gstreamer/eme/CDMProxyOpenCDM.h: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp. * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h: (WebCore::InitData::InitData): (WebCore::InitData::payload const): (WebCore::GStreamerEMEUtilities::isWidevineKeySystem): (WebCore::GStreamerEMEUtilities::keySystemToUuid): * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp: (webkit_media_clear_key_decrypt_class_init): (protectionSystemId): * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: (transformCaps): (transformInPlace): * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h: * platform/graphics/gstreamer/eme/WebKitOpenCDMDecryptorGStreamer.cpp: Added. (webkit_media_opencdm_decrypt_class_init): (webkit_media_opencdm_decrypt_init): (finalize): (protectionSystemId): (cdmProxyAttached): (decrypt): * platform/graphics/gstreamer/eme/WebKitOpenCDMDecryptorGStreamer.h: Added. Source/WTF: * wtf/PlatformEnable.h: Disable OPENCDM by default. Tools: Added support to build OpenCDM and its dependencies. There is an opt in env var to get JHBuild building Thunder its Widevine dependencies. We also include a couple of GStreamer patches needed to get key IDs in the decryptors. Widevine is obviously proprietary and as you need to be licensed to access it, you need credentials to build it. * Scripts/webkitperl/FeatureList.pm: * gstreamer/jhbuild.modules: * gstreamer/patches/gst-plugins-bad-0006-mssdemux-parse-protection-data.patch: Added. * gstreamer/patches/gst-plugins-good-0002-Check-if-an-upstream-demuxer-provided-a-default-kid.patch: Added. * gtk/install-dependencies: * jhbuild/jhbuildrc_common.py: (init): * wpe/install-dependencies: Canonical link: https://commits.webkit.org/226987@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-10 14:57:57 +00:00
if (ENABLE_OPENCDM)
list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS platform/encryptedmedia/CDMOpenCDMTypes.h)
endif ()