2020-07-04 02:33:58 +00:00
|
|
|
// Copyright (C) 2017-2020 Apple Inc. All rights reserved.
|
2017-10-18 19:14:51 +00:00
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without
|
|
|
|
// modification, are permitted provided that the following conditions
|
|
|
|
// are met:
|
|
|
|
// 1. Redistributions of source code must retain the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer.
|
|
|
|
// 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer in the
|
|
|
|
// documentation and/or other materials provided with the distribution.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
|
|
|
|
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
|
|
|
|
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
|
|
// THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp
|
2017-12-05 00:57:33 +00:00
|
|
|
Modules/applicationmanifest/ApplicationManifestParser.cpp
|
2019-10-08 14:50:27 +00:00
|
|
|
Modules/async-clipboard/Clipboard.cpp
|
[Clipboard API] Support reading "image/png" on ClipboardItem
https://bugs.webkit.org/show_bug.cgi?id=212339
<rdar://problem/63588957>
Reviewed by Tim Horton.
Source/WebCore:
Adds support for reading "image/png" data via ClipboardItem.getType(). See below for more details.
Tests: ClipboardTests.ConvertTIFFToPNGWhenPasting
editing/async-clipboard/clipboard-read-write-images.html
* Modules/async-clipboard/Clipboard.cpp:
(WebCore::Clipboard::getType):
(WebCore::Clipboard::updateSessionValidity):
Factor out logic for invalidating the `Clipboard`'s active `Pasteboard` object into a helper method. This is
invoked after reading data from the clipboard, and verifies that the changeCount of the pasteboard is still the
same as it was upon initially reading the contents of the clipboard. If the clipboard contents changed, we
invalidate the session, and `Clipboard` is subsequently denied pasteboard access (until the next time the user
explicitly grants programmatic pasteboard access).
Note that this step is here for correctness rather than security. While it is true that a compromised web
process could fake the changeCount at any given moment, other fairly recent changes around WebPasteboardProxy in
the UI process makes it impossible to take advantage of this fact to arbitrarily read content from the system
pasteboard. Instead of simply reading the empty string, this invalidation ensures that we actually reject the
promise returned by the async clipboard API.
* Modules/async-clipboard/Clipboard.h:
* Modules/async-clipboard/ClipboardImageReader.cpp: Added.
Add a PasteboardFileReader subclass that is responsible for sanitizing image data from the pasteboard into
data that may be exposed to the page via clipboard API. On both macOS and iOS, this ensures that potentially
sensitive EXIF data is stripped via conversion to the platform image type and back. On macOS, this additionally
allows us to handle transcoding TIFF data on the pasteboard to PNG (this is covered by the new API test).
(WebCore::ClipboardImageReader::readBuffer):
Add a stub implementation for non-Cocoa platforms for now, which don't implement this part of the API.
(WebCore::ClipboardImageReader::shouldReadBuffer const):
Add a new hook to skip over certain types when reading pasteboard data into Files. In particular,
`ClipboardImageReader` skips over any MIME type that does not match the MIME type specified (for now, this is
limited to "image/png", but may be extended to include more image types in the future after we implement more
transcoding logic).
* Modules/async-clipboard/ClipboardImageReader.h: Added.
(WebCore::ClipboardImageReader::ClipboardImageReader):
(WebCore::ClipboardImageReader::takeResult):
* Modules/async-clipboard/ios/ClipboardImageReaderIOS.mm: Added.
(WebCore::ClipboardImageReader::readBuffer):
Add iOS-specific `(PNG) => PNG` transcoding logic.
* Modules/async-clipboard/mac/ClipboardImageReaderMac.mm: Added.
(WebCore::ClipboardImageReader::readBuffer):
Add macOS-specific `(PNG, TIFF) => PNG` transcoding logic.
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/Pasteboard.h:
(WebCore::PasteboardFileReader::shouldReadBuffer const):
* platform/cocoa/PasteboardCocoa.mm:
(WebCore::Pasteboard::read):
Add support for targeting a given pasteboard item index when reading files on Cocoa platforms.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::read):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
(WebCore::webSafeTypes):
(WebCore::PlatformPasteboard::informationForItemAtIndex):
Expose "image/png" as one of the readable pasteboard types on iOS when using the async clipboard API. For some
reason, this adjustment was made on macOS, but wasn't done on iOS, which led to a missing "image/png" type when
asking for `ClipboardItem.types`.
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
Add support for writing "image/png "data to the system pasteboard (note that this data has been sanitized
already, as it has been processed through `ClipboardItemTypeLoader::sanitizeDataIfNeeded()`). We simply needed
to use `forEachPlatformStringOrBuffer` instead of just `forEachPlatformString` when writing the custom
pasteboard data.
(WebCore::createItemProviderRegistrationList):
* platform/libwpe/PasteboardLibWPE.cpp:
(WebCore::Pasteboard::read):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::read):
Source/WebCore/PAL:
Soft link `UIImagePNGRepresentation`.
* pal/ios/UIKitSoftLink.h:
* pal/ios/UIKitSoftLink.mm:
Tools:
Add a new API test to verify that TIFF images on the system pasteboard on macOS are automatically converted to
PNG data, and is accessible through `ClipboardItem` through the "image/png" type.
* TestWebKitAPI/Tests/WebKitCocoa/ClipboardTests.mm:
LayoutTests:
Add a new layout test to verify that `Clipboard.write` and `Clipboard.read` can be used to copy and then read
back PNG image data.
* editing/async-clipboard/clipboard-read-write-images-expected.txt: Added.
* editing/async-clipboard/clipboard-read-write-images.html: Added.
* editing/async-clipboard/resources/async-clipboard-helpers.js:
(sampleBase64PNGImageData1):
(sampleBase64PNGImageData2):
(imageBlob):
(sampleBase64PNGImageData): Deleted.
* platform/win/TestExpectations:
Canonical link: https://commits.webkit.org/225268@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 19:50:42 +00:00
|
|
|
Modules/async-clipboard/ClipboardImageReader.cpp
|
2019-10-08 14:50:27 +00:00
|
|
|
Modules/async-clipboard/ClipboardItem.cpp
|
[Clipboard API] Implement getType() for ClipboardItems created from bindings
https://bugs.webkit.org/show_bug.cgi?id=202943
Reviewed by Tim Horton.
Source/WebCore:
Adds basic support for ClipboardItem.getType(), in the case where the ClipboardItems are created by the page. To
achieve this, we introduce ClipboardItemDataSource, which represents the data source backing a given clipboard
item. This backing may either consist of a list of types and their corresponding DOMPromises (for ClipboardItems
that come from the page), or may consist of a list of items that will ask the platformr pasteboard for their
data (to be supported in a future patch).
See below for more details.
Test: editing/async-clipboard/clipboard-item-basic.html
* Modules/async-clipboard/Clipboard.h:
* Modules/async-clipboard/ClipboardItem.cpp:
(WebCore::clipboardItemPresentationStyle):
(WebCore::ClipboardItem::ClipboardItem):
Pass in the parent Clipboard object for ClipboardItems that are backed by the platform pasteboard (which are
returned by Clipboard.read()). (Note that this doesn't make any difference until this codepath is actually
exercised when we add support for Clipboard.read()).
(WebCore::ClipboardItem::create):
(WebCore::ClipboardItem::types const):
(WebCore::ClipboardItem::getType):
Plumb types() and getType() to the clipboard item's datasource.
(WebCore::ClipboardItem::navigator):
Make navigator() return the parent Clipboard object's navigator.
* Modules/async-clipboard/ClipboardItem.h:
* Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: Added.
(WebCore::blobFromString):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemBindingsDataSource):
Store the given list of types and DOM promises.
(WebCore::ClipboardItemBindingsDataSource::types const):
(WebCore::ClipboardItemBindingsDataSource::getType):
Implement getType() by finding the matching promised type in the item's array of types, and waiting for the
promise to either resolve or reject. If the promise resolves to either a string or blob, we deliver the result
back to the page by resolving the promise returned by getType(). Otherwise, we reject it.
* Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
* Modules/async-clipboard/ClipboardItemDataSource.h:
(WebCore::ClipboardItemDataSource::ClipboardItemDataSource):
* Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp:
Add a stub implementation of a clipboard item data source that is backed by data in the platform pasteboard. In
a future patch, this will implement getType() by calling out to the platform pasteboard.
(WebCore::ClipboardItemPasteboardDataSource::ClipboardItemPasteboardDataSource):
(WebCore::ClipboardItemPasteboardDataSource::types const):
(WebCore::ClipboardItemPasteboardDataSource::getType):
* Modules/async-clipboard/ClipboardItemPasteboardDataSource.h:
* Modules/mediastream/RTCRtpReceiver.cpp:
* Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
Unrelated build fixes, due to changes in unified source groupings.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/network/mac/UTIUtilities.mm:
More build fixes, due to changes in unified source groupings.
LayoutTests:
Add a new layout test to verify that we can create and ask ClipboardItems for data. Exercises the following
corner cases:
- Promise rejection when returning item data.
- Resolving promises to incorrect data types.
- Setting types to custom strings (including emojis and non-ASCII characters).
- Returning values with emojis and non-ASCII characters.
- Resolving promises using both Blobs and DOMStrings.
- Delayed promise rejection/resolution (using setTimeout).
* editing/async-clipboard/clipboard-item-basic-expected.txt: Added.
* editing/async-clipboard/clipboard-item-basic.html: Added.
* editing/async-clipboard/resources/async-clipboard-helpers.js: Added.
Add a resource file with some helper functions for creating blobs, and loading images and text from blobs.
* platform/win/TestExpectations:
Temporarily mark a test as failing; I'll fix this and some other failing tests in a followup. See
<https://webkit.org/b/202940>.
Canonical link: https://commits.webkit.org/216414@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-15 14:30:16 +00:00
|
|
|
Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp
|
|
|
|
Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp
|
2019-10-08 14:50:27 +00:00
|
|
|
Modules/async-clipboard/NavigatorClipboard.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/beacon/NavigatorBeacon.cpp
|
|
|
|
Modules/cache/CacheStorageConnection.cpp
|
|
|
|
Modules/cache/DOMCache.cpp
|
|
|
|
Modules/cache/DOMCacheEngine.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
Modules/cache/DOMCacheStorage.cpp
|
2021-05-27 13:26:22 +00:00
|
|
|
Modules/cache/WindowOrWorkerGlobalScopeCaches.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/cache/WorkerCacheStorageConnection.cpp
|
2020-10-05 18:56:12 +00:00
|
|
|
Modules/contact-picker/ContactsManager.cpp
|
|
|
|
Modules/contact-picker/NavigatorContacts.cpp
|
2017-12-21 22:56:11 +00:00
|
|
|
Modules/credentialmanagement/BasicCredential.cpp
|
|
|
|
Modules/credentialmanagement/CredentialsContainer.cpp
|
|
|
|
Modules/credentialmanagement/NavigatorCredentials.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/entriesapi/DOMFileSystem.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
Modules/entriesapi/ErrorCallback.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/entriesapi/FileSystemDirectoryEntry.cpp
|
|
|
|
Modules/entriesapi/FileSystemDirectoryReader.cpp
|
|
|
|
Modules/entriesapi/FileSystemEntriesCallback.cpp
|
|
|
|
Modules/entriesapi/FileSystemEntry.cpp
|
|
|
|
Modules/entriesapi/FileSystemFileEntry.cpp
|
|
|
|
Modules/entriesapi/HTMLInputElementEntriesAPI.cpp
|
|
|
|
Modules/fetch/FetchBody.cpp
|
|
|
|
Modules/fetch/FetchBodyConsumer.cpp
|
|
|
|
Modules/fetch/FetchBodyOwner.cpp
|
|
|
|
Modules/fetch/FetchBodySource.cpp
|
|
|
|
Modules/fetch/FetchHeaders.cpp
|
|
|
|
Modules/fetch/FetchLoader.cpp
|
|
|
|
Modules/fetch/FetchRequest.cpp
|
|
|
|
Modules/fetch/FetchResponse.cpp
|
2020-09-15 17:04:05 +00:00
|
|
|
Modules/fetch/WindowOrWorkerGlobalScopeFetch.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/geolocation/GeoNotifier.cpp
|
|
|
|
Modules/geolocation/Geolocation.cpp
|
|
|
|
Modules/geolocation/GeolocationController.cpp
|
2019-08-23 20:58:49 +00:00
|
|
|
Modules/geolocation/GeolocationCoordinates.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/geolocation/NavigatorGeolocation.cpp
|
2021-02-16 21:44:30 +00:00
|
|
|
Modules/highlight/AppHighlightRangeData.cpp
|
2020-12-12 03:19:41 +00:00
|
|
|
Modules/highlight/AppHighlightStorage.cpp
|
2020-10-20 23:58:03 +00:00
|
|
|
Modules/highlight/HighlightRegister.cpp
|
|
|
|
Modules/highlight/Highlight.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/indexeddb/IDBCursor.cpp
|
|
|
|
Modules/indexeddb/IDBCursorWithValue.cpp
|
|
|
|
Modules/indexeddb/IDBDatabase.cpp
|
|
|
|
Modules/indexeddb/IDBDatabaseIdentifier.cpp
|
2020-06-17 16:51:42 +00:00
|
|
|
Modules/indexeddb/IDBDatabaseNameAndVersionRequest.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/indexeddb/IDBFactory.cpp
|
|
|
|
Modules/indexeddb/IDBGetAllResult.cpp
|
|
|
|
Modules/indexeddb/IDBGetResult.cpp
|
|
|
|
Modules/indexeddb/IDBIndex.cpp
|
|
|
|
Modules/indexeddb/IDBKey.cpp
|
|
|
|
Modules/indexeddb/IDBKeyData.cpp
|
|
|
|
Modules/indexeddb/IDBKeyPath.cpp
|
|
|
|
Modules/indexeddb/IDBKeyRange.cpp
|
|
|
|
Modules/indexeddb/IDBKeyRangeData.cpp
|
|
|
|
Modules/indexeddb/IDBObjectStore.cpp
|
|
|
|
Modules/indexeddb/IDBOpenDBRequest.cpp
|
|
|
|
Modules/indexeddb/IDBRequest.cpp
|
|
|
|
Modules/indexeddb/IDBRequestCompletionEvent.cpp
|
|
|
|
Modules/indexeddb/IDBTransaction.cpp
|
|
|
|
Modules/indexeddb/IDBValue.cpp
|
|
|
|
Modules/indexeddb/IDBVersionChangeEvent.cpp
|
2021-03-31 20:15:07 +00:00
|
|
|
Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/indexeddb/client/IDBConnectionProxy.cpp
|
|
|
|
Modules/indexeddb/client/IDBConnectionToServer.cpp
|
|
|
|
Modules/indexeddb/client/TransactionOperation.cpp
|
|
|
|
Modules/indexeddb/server/IDBConnectionToClient.cpp
|
|
|
|
Modules/indexeddb/server/IDBSerialization.cpp
|
|
|
|
Modules/indexeddb/server/IDBServer.cpp
|
|
|
|
Modules/indexeddb/server/IndexValueEntry.cpp
|
|
|
|
Modules/indexeddb/server/IndexValueStore.cpp
|
|
|
|
Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp
|
|
|
|
Modules/indexeddb/server/MemoryCursor.cpp
|
|
|
|
Modules/indexeddb/server/MemoryIDBBackingStore.cpp
|
|
|
|
Modules/indexeddb/server/MemoryIndex.cpp
|
|
|
|
Modules/indexeddb/server/MemoryIndexCursor.cpp
|
|
|
|
Modules/indexeddb/server/MemoryObjectStore.cpp
|
|
|
|
Modules/indexeddb/server/MemoryObjectStoreCursor.cpp
|
|
|
|
Modules/indexeddb/server/SQLiteIDBBackingStore.cpp
|
|
|
|
Modules/indexeddb/server/SQLiteIDBCursor.cpp
|
|
|
|
Modules/indexeddb/server/SQLiteIDBTransaction.cpp
|
|
|
|
Modules/indexeddb/server/ServerOpenDBRequest.cpp
|
|
|
|
Modules/indexeddb/server/UniqueIDBDatabase.cpp
|
|
|
|
Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp
|
|
|
|
Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp
|
|
|
|
Modules/indexeddb/shared/IDBCursorInfo.cpp
|
|
|
|
Modules/indexeddb/shared/IDBDatabaseInfo.cpp
|
|
|
|
Modules/indexeddb/shared/IDBError.cpp
|
|
|
|
Modules/indexeddb/shared/IDBGetAllRecordsData.cpp
|
|
|
|
Modules/indexeddb/shared/IDBGetRecordData.cpp
|
|
|
|
Modules/indexeddb/shared/IDBIndexInfo.cpp
|
|
|
|
Modules/indexeddb/shared/IDBIterateCursorData.cpp
|
|
|
|
Modules/indexeddb/shared/IDBObjectStoreInfo.cpp
|
|
|
|
Modules/indexeddb/shared/IDBRequestData.cpp
|
|
|
|
Modules/indexeddb/shared/IDBResourceIdentifier.cpp
|
|
|
|
Modules/indexeddb/shared/IDBResultData.cpp
|
|
|
|
Modules/indexeddb/shared/IDBTransactionInfo.cpp
|
|
|
|
Modules/indexeddb/shared/IndexKey.cpp
|
2017-12-21 18:28:21 +00:00
|
|
|
Modules/mediacapabilities/MediaCapabilities.cpp
|
|
|
|
Modules/mediacapabilities/NavigatorMediaCapabilities.cpp
|
2020-10-20 16:20:16 +00:00
|
|
|
Modules/mediasession/MediaMetadata.cpp
|
|
|
|
Modules/mediasession/MediaSession.cpp
|
2021-03-24 23:14:51 +00:00
|
|
|
Modules/mediasession/MediaSessionCoordinator.cpp
|
2021-03-29 20:20:38 +00:00
|
|
|
Modules/mediasession/MediaSessionCoordinatorPrivate.cpp
|
2020-10-20 16:20:16 +00:00
|
|
|
Modules/mediasession/NavigatorMediaSession.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/mediacontrols/MediaControlsHost.cpp
|
2018-10-31 17:19:27 +00:00
|
|
|
Modules/mediarecorder/BlobEvent.cpp
|
2018-10-04 19:27:10 +00:00
|
|
|
Modules/mediarecorder/MediaRecorder.cpp
|
2018-10-15 14:56:03 +00:00
|
|
|
Modules/mediarecorder/MediaRecorderErrorEvent.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
Modules/mediarecorder/MediaRecorderProvider.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/mediasource/DOMURLMediaSource.cpp
|
|
|
|
Modules/mediasource/MediaSource.cpp
|
|
|
|
Modules/mediasource/MediaSourceRegistry.cpp
|
|
|
|
Modules/mediasource/SampleMap.cpp
|
|
|
|
Modules/mediasource/SourceBuffer.cpp
|
|
|
|
Modules/mediasource/SourceBufferList.cpp
|
|
|
|
Modules/mediasource/VideoPlaybackQuality.cpp
|
|
|
|
Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp
|
|
|
|
Modules/mediastream/MediaDeviceInfo.cpp
|
|
|
|
Modules/mediastream/MediaDevices.cpp
|
|
|
|
Modules/mediastream/MediaStream.cpp
|
|
|
|
Modules/mediastream/MediaStreamTrack.cpp
|
|
|
|
Modules/mediastream/MediaStreamTrackEvent.cpp
|
|
|
|
Modules/mediastream/MediaTrackConstraints.cpp
|
|
|
|
Modules/mediastream/NavigatorMediaDevices.cpp
|
2019-09-18 22:10:00 +00:00
|
|
|
Modules/mediastream/OverconstrainedErrorEvent.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/mediastream/PeerConnectionBackend.cpp
|
2018-10-15 20:52:15 +00:00
|
|
|
Modules/mediastream/RTCCertificate.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/mediastream/RTCController.cpp
|
|
|
|
Modules/mediastream/RTCDTMFSender.cpp
|
|
|
|
Modules/mediastream/RTCDTMFToneChangeEvent.cpp
|
|
|
|
Modules/mediastream/RTCDataChannel.cpp
|
|
|
|
Modules/mediastream/RTCDataChannelEvent.cpp
|
2021-03-22 18:29:36 +00:00
|
|
|
Modules/mediastream/RTCDataChannelRemoteHandler.cpp
|
|
|
|
Modules/mediastream/RTCDataChannelRemoteSource.cpp
|
2021-08-19 07:36:49 +00:00
|
|
|
Modules/mediastream/RTCDtlsTransport.cpp
|
2020-11-20 12:25:32 +00:00
|
|
|
Modules/mediastream/RTCEncodedAudioFrame.cpp
|
|
|
|
Modules/mediastream/RTCEncodedFrame.cpp
|
|
|
|
Modules/mediastream/RTCEncodedVideoFrame.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/mediastream/RTCIceCandidate.cpp
|
2019-04-04 19:07:53 +00:00
|
|
|
Modules/mediastream/RTCIceTransport.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/mediastream/RTCPeerConnection.cpp
|
|
|
|
Modules/mediastream/RTCPeerConnectionIceEvent.cpp
|
2020-11-20 11:05:32 +00:00
|
|
|
Modules/mediastream/RTCPeerConnectionIceErrorEvent.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/mediastream/RTCRtpReceiver.cpp
|
2020-11-15 17:59:54 +00:00
|
|
|
Modules/mediastream/RTCRtpSFrameTransform.cpp
|
2021-08-12 09:37:05 +00:00
|
|
|
Modules/mediastream/RTCRtpSFrameTransformErrorEvent.cpp
|
2020-11-15 17:59:54 +00:00
|
|
|
Modules/mediastream/RTCRtpSFrameTransformer.cpp
|
2020-11-20 12:25:32 +00:00
|
|
|
Modules/mediastream/RTCRtpScriptTransform.cpp
|
|
|
|
Modules/mediastream/RTCRtpScriptTransformer.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/mediastream/RTCRtpSender.cpp
|
2020-11-13 07:20:19 +00:00
|
|
|
Modules/mediastream/RTCRtpTransform.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/mediastream/RTCRtpTransceiver.cpp
|
|
|
|
Modules/mediastream/RTCSessionDescription.cpp
|
|
|
|
Modules/mediastream/RTCTrackEvent.cpp
|
2021-03-13 11:11:28 +00:00
|
|
|
Modules/mediastream/RTCTransformEvent.cpp
|
2020-12-10 19:48:38 +00:00
|
|
|
Modules/mediastream/SFrameUtils.cpp
|
2021-02-08 19:47:30 +00:00
|
|
|
Modules/mediastream/STUNMessageParsing.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/mediastream/UserMediaController.cpp
|
|
|
|
Modules/mediastream/UserMediaRequest.cpp
|
2018-10-15 20:52:15 +00:00
|
|
|
Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp
|
2021-08-19 07:36:49 +00:00
|
|
|
Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.cpp
|
2020-11-13 07:20:19 +00:00
|
|
|
Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverTransformBackend.cpp
|
|
|
|
Modules/mediastream/libwebrtc/LibWebRTCRtpSenderTransformBackend.cpp
|
|
|
|
Modules/mediastream/libwebrtc/LibWebRTCRtpTransformBackend.cpp
|
2020-12-01 09:43:00 +00:00
|
|
|
Modules/mediastream/libwebrtc/LibWebRTCRtpTransformableFrame.cpp
|
2020-11-18 22:04:09 +00:00
|
|
|
Modules/model-element/HTMLModelElement.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/notifications/Notification.cpp
|
|
|
|
Modules/notifications/NotificationController.cpp
|
2018-02-15 19:47:46 +00:00
|
|
|
Modules/paymentrequest/MerchantValidationEvent.cpp
|
|
|
|
Modules/paymentrequest/PaymentAddress.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/paymentrequest/PaymentHandler.cpp
|
2018-08-30 19:57:19 +00:00
|
|
|
Modules/paymentrequest/PaymentMethodChangeEvent.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/paymentrequest/PaymentRequest.cpp
|
|
|
|
Modules/paymentrequest/PaymentRequestUpdateEvent.cpp
|
2021-03-04 23:06:39 +00:00
|
|
|
Modules/paymentrequest/PaymentRequestUtilities.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/paymentrequest/PaymentResponse.cpp
|
2019-10-15 22:06:23 +00:00
|
|
|
Modules/pictureinpicture/DocumentPictureInPicture.cpp
|
|
|
|
Modules/pictureinpicture/EnterPictureInPictureEvent.cpp
|
|
|
|
Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp
|
|
|
|
Modules/pictureinpicture/PictureInPictureWindow.cpp
|
2019-10-29 21:54:07 +00:00
|
|
|
Modules/remoteplayback/RemotePlayback.cpp
|
2020-10-20 21:54:36 +00:00
|
|
|
Modules/speech/SpeechRecognition.cpp
|
|
|
|
Modules/speech/SpeechRecognitionAlternative.cpp
|
|
|
|
Modules/speech/SpeechRecognitionErrorEvent.cpp
|
|
|
|
Modules/speech/SpeechRecognitionEvent.cpp
|
2020-11-04 01:44:02 +00:00
|
|
|
Modules/speech/SpeechRecognitionRequest.cpp
|
2020-10-20 21:54:36 +00:00
|
|
|
Modules/speech/SpeechRecognitionResult.cpp
|
|
|
|
Modules/speech/SpeechRecognitionResultList.cpp
|
2020-11-04 01:44:02 +00:00
|
|
|
Modules/speech/SpeechRecognitionUpdate.cpp
|
2020-11-22 05:51:10 +00:00
|
|
|
Modules/speech/SpeechRecognitionCaptureSource.cpp
|
|
|
|
Modules/speech/SpeechRecognitionCaptureSourceImpl.cpp
|
|
|
|
Modules/speech/SpeechRecognizer.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/speech/DOMWindowSpeechSynthesis.cpp
|
|
|
|
Modules/speech/SpeechSynthesis.cpp
|
|
|
|
Modules/speech/SpeechSynthesisEvent.cpp
|
|
|
|
Modules/speech/SpeechSynthesisUtterance.cpp
|
|
|
|
Modules/speech/SpeechSynthesisVoice.cpp
|
|
|
|
Modules/streams/ReadableStreamSink.cpp
|
2019-10-04 19:07:22 +00:00
|
|
|
Modules/streams/ReadableStreamSource.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/webaudio/AnalyserNode.cpp
|
|
|
|
Modules/webaudio/AsyncAudioDecoder.cpp
|
|
|
|
Modules/webaudio/AudioBasicInspectorNode.cpp
|
|
|
|
Modules/webaudio/AudioBasicProcessorNode.cpp
|
|
|
|
Modules/webaudio/AudioBuffer.cpp
|
|
|
|
Modules/webaudio/AudioBufferSourceNode.cpp
|
|
|
|
Modules/webaudio/AudioContext.cpp
|
|
|
|
Modules/webaudio/AudioDestinationNode.cpp
|
|
|
|
Modules/webaudio/AudioListener.cpp
|
|
|
|
Modules/webaudio/AudioNode.cpp
|
|
|
|
Modules/webaudio/AudioNodeInput.cpp
|
|
|
|
Modules/webaudio/AudioNodeOutput.cpp
|
|
|
|
Modules/webaudio/AudioParam.cpp
|
2020-09-29 16:47:37 +00:00
|
|
|
Modules/webaudio/AudioParamMap.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/webaudio/AudioParamTimeline.cpp
|
|
|
|
Modules/webaudio/AudioProcessingEvent.cpp
|
|
|
|
Modules/webaudio/AudioScheduledSourceNode.cpp
|
|
|
|
Modules/webaudio/AudioSummingJunction.cpp
|
2020-09-29 16:47:37 +00:00
|
|
|
Modules/webaudio/AudioWorklet.cpp
|
Add basic infrastructure for AudioWorklet
https://bugs.webkit.org/show_bug.cgi?id=217153
Reviewed by Sam Weinig.
Source/WebCore:
Add basic infrastructure for AudioWorklet:
- https://www.w3.org/TR/webaudio/#audioworklet
In particular, this adds a partial but spec-compliant implementation of
Worklet.addModule(), as per:
- https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule
When Worklet.addModule() is called, we create a AudioWorket thread and
a AudioWorkletGlobalScope with its VM. We then ask the AudioWorkletGlobalScope
to fetch and invoke the worklet script. Note that AudioWorkletGlobalScope
does NOT fetch or invoke the worklet script yet to reduce patch size.
Calling Worklet.addModule() activates the AudioWorklet and causes audio rendering
to occur on the AudioWorkletThread.
A few important things that are still missing in this patch:
- Fetching & invoking worklet scripts
- Pretty much all API exposed to AudioWorkletGlobalScopes
- AudioWorkletProcessor support
No new tests, no Web-facing behavior change yet.
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new files to projets.
* Modules/webaudio/AudioWorklet.cpp:
(WebCore::AudioWorklet::create):
(WebCore::AudioWorklet::AudioWorklet):
(WebCore::AudioWorklet::createGlobalScopes):
(WebCore::AudioWorklet::proxy const):
* Modules/webaudio/AudioWorklet.h:
When the Worklet needs to create a GlobalScope, AudioWorklet takes care of creating a AudioWorkletMessagingProxy.
The AudioWorkletMessagingProxy starts the AudioWorkletThread, which creates the AudioWorkletGlobalScope.
AudioWorkletMessagingProxy takes care of posting tasks from the main thread to the AudioWorkletThread as well.
* Modules/webaudio/AudioWorkletGlobalScope.cpp: Added.
* Modules/webaudio/AudioWorkletGlobalScope.h: Added.
* Modules/webaudio/AudioWorkletGlobalScope.idl: Added.
Add basic implementation for AudioWorkletGlobalScope:
- https://www.w3.org/TR/webaudio/#audioworkletglobalscope
None of the Web API is exposed on the AudioWorkletGlobalScope yet.
* Modules/webaudio/AudioWorkletMessagingProxy.cpp: Added.
* Modules/webaudio/AudioWorkletMessagingProxy.h: Added.
Add new AudioWorkletMessagingProxy class (Similar to WorkerMessagingProxy) which starts to AudioWorkletThread
(which constructs the AudioWorkletGlobalScope on that thread) and takes care of posting tasks from the main
thread to the AudioWorkletThread.
* Modules/webaudio/AudioWorkletThread.cpp: Added.
* Modules/webaudio/AudioWorkletThread.h: Added.
Add new class which wraps the AudioThread used by AudioWorkets.
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::BaseAudioContext):
Pass document when constructing the AudioWorklet since it is now an ActiveDOMObject.
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::enableInput):
(WebCore::Function<void):
(WebCore::DefaultAudioDestinationNode::startRendering):
(WebCore::DefaultAudioDestinationNode::resume):
(WebCore::DefaultAudioDestinationNode::setChannelCount):
* Modules/webaudio/DefaultAudioDestinationNode.h:
If AudioWorklet is active, pass a function to AudioDestination::start() that dispatches to the
AudioWorkletThread, so that the AudioDestination can do rendering on the AudioWorkletThead instead
of the device's rendering thread.
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::startRendering):
If AudioWorklet is active, use the AudioWorklet's AudioWorkletThread instead of a new audio thread
to do the offline rendering.
* bindings/js/WebCoreBuiltinNames.h:
Add AudioWorkletGlobalScope since it is exposed conditionally at runtime to AudioWorkets.
* bindings/js/WebCoreJSClientData.cpp:
(WebCore::JSVMClientData::JSVMClientData):
* bindings/js/WebCoreJSClientData.h:
Add code to support AudioWorkletGlobalScope as a GlobalScope in our JS bindings.
* bindings/js/WorkerScriptController.h:
We now subclass WorkerOrWorkletScriptController interface. This allows WorkletScriptController
to reuse WorkerRunLoop.
* bindings/scripts/CodeGeneratorJS.pm:
(ShouldUseGlobalObjectPrototype):
* bindings/scripts/preprocess-idls.pl:
Add support for AudioWorkletGlobalScope as global scope in our JS bindings.
* css/DOMCSSPaintWorklet.cpp:
(WebCore::PaintWorklet::addModule):
(WebCore::PaintWorklet::createGlobalScopes):
* css/DOMCSSPaintWorklet.h:
* dom/Document.cpp:
(WebCore::Document::ensurePaintWorklet):
Update PaintWorklet code so that it keeps building.
* platform/MediaStrategy.h:
* platform/audio/AudioDestination.h:
Make AudioDestination ThreadSafeRefCounted so that it can keep itself alive
when dispatching to the AudioWorkletThread for rendering.
* platform/audio/cocoa/AudioDestinationCocoa.cpp:
(WebCore::AudioDestination::create):
(WebCore::AudioDestinationCocoa::start):
(WebCore::AudioDestinationCocoa::stop):
(WebCore::AudioDestinationCocoa::setIsPlaying):
(WebCore::AudioDestinationCocoa::render):
(WebCore::AudioDestinationCocoa::renderOnRenderingThead):
* platform/audio/cocoa/AudioDestinationCocoa.h:
When we get a request to render audio, we now use the function provided by
the DefaultAudioDestinationNode to dispatch to the AudioWorkletThread when
needed (AudioWorklet is active) before doing the rendering.
* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::start):
* platform/audio/gstreamer/AudioDestinationGStreamer.h:
* platform/mock/MockAudioDestinationCocoa.cpp:
(WebCore::MockAudioDestinationCocoa::start):
* platform/mock/MockAudioDestinationCocoa.h:
Update code so that it keeps building.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::underlyingThread const):
* workers/WorkerGlobalScope.h:
* workers/WorkerOrWorkletGlobalScope.h: Added.
* workers/WorkerOrWorkletScriptController.h: Added.
Add new interfaces that are subclassed by Worker and Worklet implementation
classes in order to promote code sharing.
* workers/WorkerRunLoop.cpp:
* workers/WorkerRunLoop.h:
Update WorkerRunLoop to use WorkerOrWorkletGlobalScope so that it can be
reused by AudioWorkletThread.
* worklets/Worklet.cpp:
(WebCore::Worklet::Worklet):
(WebCore::Worklet::document):
(WebCore::Worklet::addModule):
(WebCore::Worklet::finishPendingTasks):
(WebCore::Worklet::activeDOMObjectName const):
* worklets/Worklet.h:
(WebCore::Worklet::proxies const):
* worklets/Worklet.idl:
Add initial implementation for addModule():
- https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule
Make Worklet an ActiveDOMObject since it needs to resolve a JS promise asynchronously.
* worklets/WorkletGlobalScope.cpp:
(WebCore::WorkletGlobalScope::WorkletGlobalScope):
(WebCore::WorkletGlobalScope::evaluate):
(WebCore::WorkletGlobalScope::completeURL const):
(WebCore::WorkletGlobalScope::fetchAndInvokeScript):
* worklets/WorkletGlobalScope.h:
(WebCore::WorkletGlobalScope::isAudioWorkletGlobalScope const):
* worklets/WorkletGlobalScope.idl:
Update WorkletGlobalScope so that it can be subclassed by AudioWorkletGlobalScope and not
be PaintWorklet-specific.
* worklets/WorkletGlobalScopeProxy.h: Added.
Add WorkletGlobalScopeProxy interface to interact with the WorkletGlobalScope interface.
The purpose of this class is to post tasks to the WorkletGlobalScope, abstracting away
potential threading complexity. Note that AudioWorkets use threading while PaintWorklets
do not.
* worklets/WorkletPendingTasks.cpp: Added.
(WebCore::WorkletPendingTasks::WorkletPendingTasks):
(WebCore::WorkletPendingTasks::abort):
(WebCore::WorkletPendingTasks::decrementCounter):
* worklets/WorkletPendingTasks.h: Added.
(WebCore::WorkletPendingTasks::create):
Add implementation for:
- https://drafts.css-houdini.org/worklets/#pending-tasks-struct
While it is not strictly needed right for AudioWorklet (because there is always a single
WorkletGlobalScope), it will be needed once we have proper support for PaintWorklets.
PaintWorklets can have several WorkletGlobalScopes. In the mean time, it allows us to
have code that matches the specification text more closely.
* worklets/WorkletScriptController.cpp:
(WebCore::WorkletScriptController::WorkletScriptController):
(WebCore::WorkletScriptController::initScript):
(WebCore::WorkletScriptController::releaseHeapAccess):
(WebCore::WorkletScriptController::acquireHeapAccess):
(WebCore::WorkletScriptController::addTimerSetNotification):
(WebCore::WorkletScriptController::removeTimerSetNotification):
(WebCore::WorkletScriptController::scheduleExecutionTermination):
(WebCore::WorkletScriptController::isTerminatingExecution const):
* worklets/WorkletScriptController.h:
Update WorkletScriptController so that it can be used by AudioWorklets and not just
PaintWorklets.
Source/WebKit:
Update RemoteAudioDestinationProxy to match what was done in AudioDestinationCocoa.
RemoteAudioDestinationProxy is used when the GPU process is enabled.
* GPUProcess/media/RemoteAudioDestinationManager.cpp:
(WebKit::RemoteAudioDestination::start):
* WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::create):
(WebKit::RemoteAudioDestinationProxy::start):
(WebKit::RemoteAudioDestinationProxy::stop):
(WebKit::RemoteAudioDestinationProxy::renderBuffer):
* WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
* WebProcess/GPU/media/WebMediaStrategy.cpp:
(WebKit::WebMediaStrategy::createAudioDestination):
* WebProcess/GPU/media/WebMediaStrategy.h:
Source/WebKitLegacy/mac:
* WebCoreSupport/WebPlatformStrategies.mm:
Source/WebKitLegacy/win:
* WebCoreSupport/WebPlatformStrategies.cpp:
Canonical link: https://commits.webkit.org/229978@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-01 23:21:07 +00:00
|
|
|
Modules/webaudio/AudioWorkletGlobalScope.cpp
|
|
|
|
Modules/webaudio/AudioWorkletMessagingProxy.cpp
|
2020-09-29 16:47:37 +00:00
|
|
|
Modules/webaudio/AudioWorkletNode.cpp
|
2020-10-02 19:21:03 +00:00
|
|
|
Modules/webaudio/AudioWorkletProcessor.cpp
|
Add basic infrastructure for AudioWorklet
https://bugs.webkit.org/show_bug.cgi?id=217153
Reviewed by Sam Weinig.
Source/WebCore:
Add basic infrastructure for AudioWorklet:
- https://www.w3.org/TR/webaudio/#audioworklet
In particular, this adds a partial but spec-compliant implementation of
Worklet.addModule(), as per:
- https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule
When Worklet.addModule() is called, we create a AudioWorket thread and
a AudioWorkletGlobalScope with its VM. We then ask the AudioWorkletGlobalScope
to fetch and invoke the worklet script. Note that AudioWorkletGlobalScope
does NOT fetch or invoke the worklet script yet to reduce patch size.
Calling Worklet.addModule() activates the AudioWorklet and causes audio rendering
to occur on the AudioWorkletThread.
A few important things that are still missing in this patch:
- Fetching & invoking worklet scripts
- Pretty much all API exposed to AudioWorkletGlobalScopes
- AudioWorkletProcessor support
No new tests, no Web-facing behavior change yet.
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new files to projets.
* Modules/webaudio/AudioWorklet.cpp:
(WebCore::AudioWorklet::create):
(WebCore::AudioWorklet::AudioWorklet):
(WebCore::AudioWorklet::createGlobalScopes):
(WebCore::AudioWorklet::proxy const):
* Modules/webaudio/AudioWorklet.h:
When the Worklet needs to create a GlobalScope, AudioWorklet takes care of creating a AudioWorkletMessagingProxy.
The AudioWorkletMessagingProxy starts the AudioWorkletThread, which creates the AudioWorkletGlobalScope.
AudioWorkletMessagingProxy takes care of posting tasks from the main thread to the AudioWorkletThread as well.
* Modules/webaudio/AudioWorkletGlobalScope.cpp: Added.
* Modules/webaudio/AudioWorkletGlobalScope.h: Added.
* Modules/webaudio/AudioWorkletGlobalScope.idl: Added.
Add basic implementation for AudioWorkletGlobalScope:
- https://www.w3.org/TR/webaudio/#audioworkletglobalscope
None of the Web API is exposed on the AudioWorkletGlobalScope yet.
* Modules/webaudio/AudioWorkletMessagingProxy.cpp: Added.
* Modules/webaudio/AudioWorkletMessagingProxy.h: Added.
Add new AudioWorkletMessagingProxy class (Similar to WorkerMessagingProxy) which starts to AudioWorkletThread
(which constructs the AudioWorkletGlobalScope on that thread) and takes care of posting tasks from the main
thread to the AudioWorkletThread.
* Modules/webaudio/AudioWorkletThread.cpp: Added.
* Modules/webaudio/AudioWorkletThread.h: Added.
Add new class which wraps the AudioThread used by AudioWorkets.
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::BaseAudioContext):
Pass document when constructing the AudioWorklet since it is now an ActiveDOMObject.
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::enableInput):
(WebCore::Function<void):
(WebCore::DefaultAudioDestinationNode::startRendering):
(WebCore::DefaultAudioDestinationNode::resume):
(WebCore::DefaultAudioDestinationNode::setChannelCount):
* Modules/webaudio/DefaultAudioDestinationNode.h:
If AudioWorklet is active, pass a function to AudioDestination::start() that dispatches to the
AudioWorkletThread, so that the AudioDestination can do rendering on the AudioWorkletThead instead
of the device's rendering thread.
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::startRendering):
If AudioWorklet is active, use the AudioWorklet's AudioWorkletThread instead of a new audio thread
to do the offline rendering.
* bindings/js/WebCoreBuiltinNames.h:
Add AudioWorkletGlobalScope since it is exposed conditionally at runtime to AudioWorkets.
* bindings/js/WebCoreJSClientData.cpp:
(WebCore::JSVMClientData::JSVMClientData):
* bindings/js/WebCoreJSClientData.h:
Add code to support AudioWorkletGlobalScope as a GlobalScope in our JS bindings.
* bindings/js/WorkerScriptController.h:
We now subclass WorkerOrWorkletScriptController interface. This allows WorkletScriptController
to reuse WorkerRunLoop.
* bindings/scripts/CodeGeneratorJS.pm:
(ShouldUseGlobalObjectPrototype):
* bindings/scripts/preprocess-idls.pl:
Add support for AudioWorkletGlobalScope as global scope in our JS bindings.
* css/DOMCSSPaintWorklet.cpp:
(WebCore::PaintWorklet::addModule):
(WebCore::PaintWorklet::createGlobalScopes):
* css/DOMCSSPaintWorklet.h:
* dom/Document.cpp:
(WebCore::Document::ensurePaintWorklet):
Update PaintWorklet code so that it keeps building.
* platform/MediaStrategy.h:
* platform/audio/AudioDestination.h:
Make AudioDestination ThreadSafeRefCounted so that it can keep itself alive
when dispatching to the AudioWorkletThread for rendering.
* platform/audio/cocoa/AudioDestinationCocoa.cpp:
(WebCore::AudioDestination::create):
(WebCore::AudioDestinationCocoa::start):
(WebCore::AudioDestinationCocoa::stop):
(WebCore::AudioDestinationCocoa::setIsPlaying):
(WebCore::AudioDestinationCocoa::render):
(WebCore::AudioDestinationCocoa::renderOnRenderingThead):
* platform/audio/cocoa/AudioDestinationCocoa.h:
When we get a request to render audio, we now use the function provided by
the DefaultAudioDestinationNode to dispatch to the AudioWorkletThread when
needed (AudioWorklet is active) before doing the rendering.
* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::start):
* platform/audio/gstreamer/AudioDestinationGStreamer.h:
* platform/mock/MockAudioDestinationCocoa.cpp:
(WebCore::MockAudioDestinationCocoa::start):
* platform/mock/MockAudioDestinationCocoa.h:
Update code so that it keeps building.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::underlyingThread const):
* workers/WorkerGlobalScope.h:
* workers/WorkerOrWorkletGlobalScope.h: Added.
* workers/WorkerOrWorkletScriptController.h: Added.
Add new interfaces that are subclassed by Worker and Worklet implementation
classes in order to promote code sharing.
* workers/WorkerRunLoop.cpp:
* workers/WorkerRunLoop.h:
Update WorkerRunLoop to use WorkerOrWorkletGlobalScope so that it can be
reused by AudioWorkletThread.
* worklets/Worklet.cpp:
(WebCore::Worklet::Worklet):
(WebCore::Worklet::document):
(WebCore::Worklet::addModule):
(WebCore::Worklet::finishPendingTasks):
(WebCore::Worklet::activeDOMObjectName const):
* worklets/Worklet.h:
(WebCore::Worklet::proxies const):
* worklets/Worklet.idl:
Add initial implementation for addModule():
- https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule
Make Worklet an ActiveDOMObject since it needs to resolve a JS promise asynchronously.
* worklets/WorkletGlobalScope.cpp:
(WebCore::WorkletGlobalScope::WorkletGlobalScope):
(WebCore::WorkletGlobalScope::evaluate):
(WebCore::WorkletGlobalScope::completeURL const):
(WebCore::WorkletGlobalScope::fetchAndInvokeScript):
* worklets/WorkletGlobalScope.h:
(WebCore::WorkletGlobalScope::isAudioWorkletGlobalScope const):
* worklets/WorkletGlobalScope.idl:
Update WorkletGlobalScope so that it can be subclassed by AudioWorkletGlobalScope and not
be PaintWorklet-specific.
* worklets/WorkletGlobalScopeProxy.h: Added.
Add WorkletGlobalScopeProxy interface to interact with the WorkletGlobalScope interface.
The purpose of this class is to post tasks to the WorkletGlobalScope, abstracting away
potential threading complexity. Note that AudioWorkets use threading while PaintWorklets
do not.
* worklets/WorkletPendingTasks.cpp: Added.
(WebCore::WorkletPendingTasks::WorkletPendingTasks):
(WebCore::WorkletPendingTasks::abort):
(WebCore::WorkletPendingTasks::decrementCounter):
* worklets/WorkletPendingTasks.h: Added.
(WebCore::WorkletPendingTasks::create):
Add implementation for:
- https://drafts.css-houdini.org/worklets/#pending-tasks-struct
While it is not strictly needed right for AudioWorklet (because there is always a single
WorkletGlobalScope), it will be needed once we have proper support for PaintWorklets.
PaintWorklets can have several WorkletGlobalScopes. In the mean time, it allows us to
have code that matches the specification text more closely.
* worklets/WorkletScriptController.cpp:
(WebCore::WorkletScriptController::WorkletScriptController):
(WebCore::WorkletScriptController::initScript):
(WebCore::WorkletScriptController::releaseHeapAccess):
(WebCore::WorkletScriptController::acquireHeapAccess):
(WebCore::WorkletScriptController::addTimerSetNotification):
(WebCore::WorkletScriptController::removeTimerSetNotification):
(WebCore::WorkletScriptController::scheduleExecutionTermination):
(WebCore::WorkletScriptController::isTerminatingExecution const):
* worklets/WorkletScriptController.h:
Update WorkletScriptController so that it can be used by AudioWorklets and not just
PaintWorklets.
Source/WebKit:
Update RemoteAudioDestinationProxy to match what was done in AudioDestinationCocoa.
RemoteAudioDestinationProxy is used when the GPU process is enabled.
* GPUProcess/media/RemoteAudioDestinationManager.cpp:
(WebKit::RemoteAudioDestination::start):
* WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::create):
(WebKit::RemoteAudioDestinationProxy::start):
(WebKit::RemoteAudioDestinationProxy::stop):
(WebKit::RemoteAudioDestinationProxy::renderBuffer):
* WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
* WebProcess/GPU/media/WebMediaStrategy.cpp:
(WebKit::WebMediaStrategy::createAudioDestination):
* WebProcess/GPU/media/WebMediaStrategy.h:
Source/WebKitLegacy/mac:
* WebCoreSupport/WebPlatformStrategies.mm:
Source/WebKitLegacy/win:
* WebCoreSupport/WebPlatformStrategies.cpp:
Canonical link: https://commits.webkit.org/229978@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-01 23:21:07 +00:00
|
|
|
Modules/webaudio/AudioWorkletThread.cpp
|
2020-06-23 03:25:56 +00:00
|
|
|
Modules/webaudio/BaseAudioContext.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/webaudio/BiquadDSPKernel.cpp
|
|
|
|
Modules/webaudio/BiquadFilterNode.cpp
|
|
|
|
Modules/webaudio/BiquadProcessor.cpp
|
|
|
|
Modules/webaudio/ChannelMergerNode.cpp
|
|
|
|
Modules/webaudio/ChannelSplitterNode.cpp
|
2020-08-14 18:56:54 +00:00
|
|
|
Modules/webaudio/ConstantSourceNode.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/webaudio/ConvolverNode.cpp
|
|
|
|
Modules/webaudio/DefaultAudioDestinationNode.cpp
|
|
|
|
Modules/webaudio/DelayDSPKernel.cpp
|
|
|
|
Modules/webaudio/DelayNode.cpp
|
|
|
|
Modules/webaudio/DelayProcessor.cpp
|
|
|
|
Modules/webaudio/DynamicsCompressorNode.cpp
|
|
|
|
Modules/webaudio/GainNode.cpp
|
2020-08-26 20:09:39 +00:00
|
|
|
Modules/webaudio/IIRDSPKernel.cpp
|
|
|
|
Modules/webaudio/IIRFilterNode.cpp
|
|
|
|
Modules/webaudio/IIRProcessor.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/webaudio/MediaElementAudioSourceNode.cpp
|
|
|
|
Modules/webaudio/MediaStreamAudioDestinationNode.cpp
|
|
|
|
Modules/webaudio/MediaStreamAudioSource.cpp
|
|
|
|
Modules/webaudio/MediaStreamAudioSourceNode.cpp
|
|
|
|
Modules/webaudio/OfflineAudioCompletionEvent.cpp
|
|
|
|
Modules/webaudio/OfflineAudioContext.cpp
|
|
|
|
Modules/webaudio/OfflineAudioDestinationNode.cpp
|
|
|
|
Modules/webaudio/OscillatorNode.cpp
|
|
|
|
Modules/webaudio/PannerNode.cpp
|
|
|
|
Modules/webaudio/PeriodicWave.cpp
|
|
|
|
Modules/webaudio/RealtimeAnalyser.cpp
|
|
|
|
Modules/webaudio/ScriptProcessorNode.cpp
|
2020-08-20 20:44:25 +00:00
|
|
|
Modules/webaudio/StereoPannerNode.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/webaudio/WaveShaperDSPKernel.cpp
|
|
|
|
Modules/webaudio/WaveShaperNode.cpp
|
|
|
|
Modules/webaudio/WaveShaperProcessor.cpp
|
[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/AuthenticatorAssertionResponse.cpp
|
|
|
|
Modules/webauthn/AuthenticatorAttestationResponse.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
Modules/webauthn/AuthenticatorCoordinator.cpp
|
[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/AuthenticatorResponse.cpp
|
2018-01-02 20:28:31 +00:00
|
|
|
Modules/webauthn/PublicKeyCredential.cpp
|
2019-01-07 02:08:20 +00:00
|
|
|
Modules/webauthn/WebAuthenticationUtils.cpp
|
2018-12-21 23:06:54 +00:00
|
|
|
Modules/webauthn/apdu/ApduCommand.cpp
|
|
|
|
Modules/webauthn/apdu/ApduResponse.cpp
|
[WebAuthN] Import a CBOR coder from Chromium
https://bugs.webkit.org/show_bug.cgi?id=181522
<rdar://problem/36055729>
Reviewed by Brent Fulgham.
Source/WebCore:
This patch imports a CBOR coder including encoder and decoder from Chromium. CBOR encoder
is needed for WebAuthN to encode attestation object into binaries. When supporting extensions
in the future, CBOR encoder/decoder will be needed as well. Implementating and maintaining
a fully-fledged CBOR coder doesn't seem to align with WebKit's best interests. Therefore,
importing a most suitable third party implementation will be wise.
In this patch, it fully integrate the whole coder into our codebase. Those changes includes:
1. Substitute data structures that enjoy a better WTF version.
2. Replacing marcos.
3. Implementating workarounds for some functionalities that we lack fundamental types' support.
4. Changing the coding style to match ours.
This patch doesn't intend to improve the logic of the original codebase. Hence some of the
coding logic might not match what WebKit ususally has.
Here is a full list of Chromium changes that constructed this CBOR coder in chronological order:
6efcf495521d18d060027762f48bb292d6979136,
9eb43fd347890b4c6cf54c4bd7ec1bbb88e381e1,
31c85e74fd567772f18e0a41be468d04af721f21,
68672fdcad280a8ff69b91927d38d0eabf2c87f2,
0ca8667c0584fb21c0748ebd7468d32889759a07,
df763d790d7e45d70116bdefacbfd4f9faa8995e,
6d30c4a621c65314db63eb56e87c19ab75627b26,
50fe92953f4739f17a62303fedbf8db9234317c8,
47be22c3603424d1832d046a348ff3f982500288,
98a59e46948b2c71608926004fac8192b0ff2208,
07540c6d850ed6e0fa508d63c20a8ce96d751de6,
06ae32d640c8e4b86ea8914a80ee419ea16e56d8.
Covered by API tests.
* Modules/webauthn/cbor/CBORBinary.h: Added.
* Modules/webauthn/cbor/CBORReader.cpp: Added.
(cbor::CBORReader::CBORReader):
(cbor::CBORReader::~CBORReader):
(cbor::CBORReader::read):
(cbor::CBORReader::decodeCBOR):
(cbor::CBORReader::readVariadicLengthInteger):
(cbor::CBORReader::decodeValueToNegative):
(cbor::CBORReader::decodeValueToUnsigned):
(cbor::CBORReader::readSimpleValue):
(cbor::CBORReader::readString):
Workarounds applied.
(cbor::CBORReader::readBytes):
(cbor::CBORReader::readCBORArray):
(cbor::CBORReader::readCBORMap):
(cbor::CBORReader::canConsume):
(cbor::CBORReader::checkMinimalEncoding):
(cbor::CBORReader::checkExtraneousData):
(cbor::CBORReader::checkDuplicateKey):
(cbor::CBORReader::hasValidUTF8Format):
Workarounds applied.
(cbor::CBORReader::checkOutOfOrderKey):
(cbor::CBORReader::getErrorCode):
(cbor::CBORReader::errorCodeToString):
* Modules/webauthn/cbor/CBORReader.h: Added.
* Modules/webauthn/cbor/CBORValue.cpp: Added.
(cbor::CBORValue::CBORValue):
(cbor::CBORValue::operator=):
(cbor::CBORValue::~CBORValue):
(cbor::CBORValue::clone const):
(cbor::CBORValue::getInteger const):
(cbor::CBORValue::getUnsigned const):
(cbor::CBORValue::getNegative const):
(cbor::CBORValue::getString const):
(cbor::CBORValue::getByteString const):
(cbor::CBORValue::getArray const):
(cbor::CBORValue::getMap const):
(cbor::CBORValue::getSimpleValue const):
(cbor::CBORValue::internalMoveConstructFrom):
(cbor::CBORValue::internalCleanup):
* Modules/webauthn/cbor/CBORValue.h: Added.
* Modules/webauthn/cbor/CBORWriter.cpp: Added.
(cbor::CBORWriter::~CBORWriter):
(cbor::CBORWriter::write):
(cbor::CBORWriter::CBORWriter):
(cbor::CBORWriter::encodeCBOR):
Workarounds applied.
(cbor::CBORWriter::startItem):
(cbor::CBORWriter::setAdditionalInformation):
(cbor::CBORWriter::setUint):
(cbor::CBORWriter::getNumUintBytes):
* Modules/webauthn/cbor/CBORWriter.h: Added.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Tools:
This patch also imports all unit tests into our API tests to ensure all
workarounds and modification against the original codebase doesn't change
any original functionalities.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/CBORReaderTest.cpp: Added.
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/CBORValueTest.cpp: Added.
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/CBORWriterTest.cpp: Added.
(TestWebKitAPI::eq):
Workarounds applied.
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/197447@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-12 05:29:01 +00:00
|
|
|
Modules/webauthn/cbor/CBORReader.cpp
|
|
|
|
Modules/webauthn/cbor/CBORValue.cpp
|
|
|
|
Modules/webauthn/cbor/CBORWriter.cpp
|
2018-11-08 10:29:58 +00:00
|
|
|
Modules/webauthn/fido/AuthenticatorGetInfoResponse.cpp
|
|
|
|
Modules/webauthn/fido/AuthenticatorSupportedOptions.cpp
|
|
|
|
Modules/webauthn/fido/DeviceRequestConverter.cpp
|
|
|
|
Modules/webauthn/fido/DeviceResponseConverter.cpp
|
2018-10-09 19:32:41 +00:00
|
|
|
Modules/webauthn/fido/FidoConstants.cpp
|
|
|
|
Modules/webauthn/fido/FidoHidMessage.cpp
|
|
|
|
Modules/webauthn/fido/FidoHidPacket.cpp
|
|
|
|
Modules/webauthn/fido/FidoParsingUtils.cpp
|
2019-12-20 10:31:03 +00:00
|
|
|
Modules/webauthn/fido/Pin.cpp
|
2019-01-07 02:08:20 +00:00
|
|
|
Modules/webauthn/fido/U2fCommandConstructor.cpp
|
|
|
|
Modules/webauthn/fido/U2fResponseConverter.cpp
|
2017-10-23 18:57:50 +00:00
|
|
|
Modules/webdatabase/ChangeVersionWrapper.cpp
|
|
|
|
Modules/webdatabase/DOMWindowWebDatabase.cpp
|
|
|
|
Modules/webdatabase/Database.cpp
|
|
|
|
Modules/webdatabase/DatabaseAuthorizer.cpp
|
|
|
|
Modules/webdatabase/DatabaseContext.cpp
|
|
|
|
Modules/webdatabase/DatabaseManager.cpp
|
|
|
|
Modules/webdatabase/DatabaseTask.cpp
|
|
|
|
Modules/webdatabase/DatabaseThread.cpp
|
|
|
|
Modules/webdatabase/DatabaseTracker.cpp
|
|
|
|
Modules/webdatabase/OriginLock.cpp
|
|
|
|
Modules/webdatabase/SQLResultSet.cpp
|
|
|
|
Modules/webdatabase/SQLResultSetRowList.cpp
|
|
|
|
Modules/webdatabase/SQLStatement.cpp
|
|
|
|
Modules/webdatabase/SQLTransaction.cpp
|
|
|
|
Modules/webdatabase/SQLTransactionBackend.cpp
|
|
|
|
Modules/webdatabase/SQLTransactionCoordinator.cpp
|
|
|
|
Modules/webdatabase/SQLTransactionStateMachine.cpp
|
|
|
|
Modules/webdriver/NavigatorWebDriver.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
Modules/websockets/CloseEvent.cpp
|
|
|
|
Modules/websockets/ThreadableWebSocketChannel.cpp
|
|
|
|
Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp
|
2021-08-05 02:52:00 +00:00
|
|
|
Modules/websockets/WebSocket.cpp @no-unify
|
2020-07-04 02:33:58 +00:00
|
|
|
Modules/websockets/WebSocketChannel.cpp
|
|
|
|
Modules/websockets/WebSocketChannelInspector.cpp
|
|
|
|
Modules/websockets/WebSocketDeflateFramer.cpp
|
|
|
|
Modules/websockets/WebSocketDeflater.cpp
|
|
|
|
Modules/websockets/WebSocketExtensionDispatcher.cpp
|
|
|
|
Modules/websockets/WebSocketExtensionParser.cpp
|
|
|
|
Modules/websockets/WebSocketFrame.cpp
|
|
|
|
Modules/websockets/WebSocketHandshake.cpp
|
|
|
|
Modules/websockets/WorkerThreadableWebSocketChannel.cpp
|
2020-03-16 15:49:47 +00:00
|
|
|
Modules/webxr/NavigatorWebXR.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRBoundedReferenceSpace.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRFrame.cpp @no-unify
|
2021-04-22 14:06:06 +00:00
|
|
|
Modules/webxr/WebXRGamepad.cpp @no-unify
|
2020-03-16 15:49:47 +00:00
|
|
|
Modules/webxr/WebXRInputSource.cpp @no-unify
|
2020-07-04 02:33:58 +00:00
|
|
|
Modules/webxr/WebXRInputSourceArray.cpp @no-unify
|
2021-04-22 14:06:06 +00:00
|
|
|
Modules/webxr/WebXRInputSpace.cpp @no-unify
|
2020-06-23 16:36:02 +00:00
|
|
|
Modules/webxr/WebXRLayer.cpp @no-unify
|
2021-05-04 17:02:18 +00:00
|
|
|
Modules/webxr/WebXROpaqueFramebuffer.cpp @no-unify
|
2020-03-16 15:49:47 +00:00
|
|
|
Modules/webxr/WebXRPose.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRReferenceSpace.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRRenderState.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRRigidTransform.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRSession.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRSpace.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRSystem.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRView.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRViewerPose.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRViewport.cpp @no-unify
|
|
|
|
Modules/webxr/WebXRWebGLLayer.cpp @no-unify
|
|
|
|
Modules/webxr/XRInputSourceEvent.cpp @no-unify
|
|
|
|
Modules/webxr/XRInputSourcesChangeEvent.cpp @no-unify
|
|
|
|
Modules/webxr/XRReferenceSpaceEvent.cpp @no-unify
|
|
|
|
Modules/webxr/XRSessionEvent.cpp @no-unify
|
2021-06-23 16:59:34 +00:00
|
|
|
accessibility/AXImage.cpp
|
2020-04-16 02:19:13 +00:00
|
|
|
accessibility/AXLogger.cpp
|
2017-10-23 20:23:06 +00:00
|
|
|
accessibility/AXObjectCache.cpp
|
|
|
|
accessibility/AccessibilityARIAGrid.cpp
|
|
|
|
accessibility/AccessibilityARIAGridCell.cpp
|
|
|
|
accessibility/AccessibilityARIAGridRow.cpp
|
|
|
|
accessibility/AccessibilityAttachment.cpp
|
|
|
|
accessibility/AccessibilityImageMapLink.cpp
|
|
|
|
accessibility/AccessibilityLabel.cpp
|
|
|
|
accessibility/AccessibilityList.cpp
|
|
|
|
accessibility/AccessibilityListBox.cpp
|
|
|
|
accessibility/AccessibilityListBoxOption.cpp
|
|
|
|
accessibility/AccessibilityMathMLElement.cpp
|
|
|
|
accessibility/AccessibilityMenuList.cpp
|
|
|
|
accessibility/AccessibilityMenuListOption.cpp
|
|
|
|
accessibility/AccessibilityMenuListPopup.cpp
|
|
|
|
accessibility/AccessibilityMockObject.cpp
|
|
|
|
accessibility/AccessibilityNodeObject.cpp
|
|
|
|
accessibility/AccessibilityObject.cpp
|
|
|
|
accessibility/AccessibilityProgressIndicator.cpp
|
|
|
|
accessibility/AccessibilityRenderObject.cpp
|
|
|
|
accessibility/AccessibilitySVGElement.cpp
|
|
|
|
accessibility/AccessibilitySVGRoot.cpp
|
|
|
|
accessibility/AccessibilityScrollView.cpp
|
|
|
|
accessibility/AccessibilityScrollbar.cpp
|
|
|
|
accessibility/AccessibilitySlider.cpp
|
|
|
|
accessibility/AccessibilitySpinButton.cpp
|
|
|
|
accessibility/AccessibilityTable.cpp
|
|
|
|
accessibility/AccessibilityTableCell.cpp
|
|
|
|
accessibility/AccessibilityTableColumn.cpp
|
|
|
|
accessibility/AccessibilityTableHeaderContainer.cpp
|
|
|
|
accessibility/AccessibilityTableRow.cpp
|
|
|
|
accessibility/AccessibilityTree.cpp
|
|
|
|
accessibility/AccessibilityTreeItem.cpp
|
2020-01-17 22:07:15 +00:00
|
|
|
accessibility/isolatedtree/AXIsolatedObject.cpp
|
2019-01-27 08:49:29 +00:00
|
|
|
accessibility/isolatedtree/AXIsolatedTree.cpp
|
2018-11-06 11:15:15 +00:00
|
|
|
animation/AnimationEffect.cpp
|
2020-02-14 16:34:52 +00:00
|
|
|
animation/AnimationEventBase.cpp
|
2017-12-11 18:02:37 +00:00
|
|
|
animation/AnimationPlaybackEvent.cpp
|
2017-10-23 20:23:06 +00:00
|
|
|
animation/AnimationTimeline.cpp
|
2018-03-06 18:34:22 +00:00
|
|
|
animation/CSSAnimation.cpp
|
2020-09-17 12:39:28 +00:00
|
|
|
animation/CSSPropertyAnimation.cpp
|
2018-03-06 21:27:03 +00:00
|
|
|
animation/CSSTransition.cpp
|
[Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
https://bugs.webkit.org/show_bug.cgi?id=183504
<rdar://problem/38372965>
LayoutTests/imported/w3c:
Reviewed by Dean Jackson and Jon Lee.
Since we've improved our implementation of getAnimations() we updated the expectations to mark
the progressions. Both tests for getAnimations() now pass 100%. Another test now fails at a later
stage and needed its expectation updated.
* web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
* web-platform-tests/web-animations/interfaces/Animatable/getAnimations-expected.txt:
* web-platform-tests/web-animations/interfaces/Document/getAnimations-expected.txt:
Source/WebCore:
Reviewed by Dean Jackson and Jon Lee.
Tests: webanimations/css-animations.html
webanimations/css-transitions.html
This patch implements CSS Animations and CSS Transitions as Web Animations. The main changes are:
* StyleTreeResolver: StyleTreeResolver now has a code path to add CSSAnimation and CSSTransition objects onto the DocumentTimeline
to be picked up by the Web Animations engine. The previous CSSAnimationController code path is preserved if the runtime flag is disabled.
* AnimationTimeline: we add two new methods, updateCSSAnimationsForElement() and updateCSSTransitionsForElement() which are called from
TreeResolver::createAnimatedElementUpdate(). These look at the AnimationList for the old and new RenderStyle objects and create, update
and remove matching CSSAnimation and CSSTransition instances.
* DeclarativeAnimation: a new superclass to both CSSAnimation and CSSTransition which introduces the concept of a backingAnimation(),
which is an Animation held by the RenderStyle objects, and two virtual methods with base implementations, initialize() which is called
upon creating by create() methods in subclasses, and syncPropertiesWithBackingAnimation() which ensures that properties on the
DeclarativeAnimation objects (Web Animations side) match the backing animation (CSS side).
* KeyframeEffectReadOnly: two new important methods to create blending keyframes (KeyframeList) based on backing Animation objects,
computeCSSAnimationBlendingKeyframes() and computeCSSTransitionBlendingKeyframes().
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* animation/AnimationEffectReadOnly.h:
(WebCore::AnimationEffectReadOnly::isKeyframeEffectReadOnly const): We fix this method such that calling it on a KeyframeEffect, which
is a subclass of KeyframeEffectReadOnly, returns true.
* animation/AnimationEffectTimingReadOnly.cpp: In order for DeclarativeAnimation::syncPropertiesWithBackingAnimation() to set the timing
function for a declarative animation's effect, we need a public method to set an effect's timing function outside of just the "easing"
property setter exposed via the JS API. So we introduce a setTimingFunction() method and call it from setEasing().
(WebCore::AnimationEffectTimingReadOnly::setEasing):
(WebCore::AnimationEffectTimingReadOnly::setTimingFunction):
* animation/AnimationEffectTimingReadOnly.h:
* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::~AnimationTimeline): Clear all maps and sets containing WebAnimation references to ensure these get destructed
when the AnimationTimeline is being destructed and should no longer hold a reference to them.
(WebCore::AnimationTimeline::relevantMapForAnimation): We store various subclasses of WebAnimation in dedicated maps so we can composite
animations in the correct order when animating. This function returns the correct map for a given animation such that animationWasAddedToElement()
and animationWasRemovedFromElement() mutate the right map.
(WebCore::AnimationTimeline::animationWasAddedToElement):
(WebCore::AnimationTimeline::animationWasRemovedFromElement):
(WebCore::AnimationTimeline::animationsForElement): Make sure to look for animations in the lists of CSS Animations and CSS Transitions as well
as Web Animations.
(WebCore::AnimationTimeline::updateCSSAnimationsForElement): This method is called by TreeResolver::createAnimatedElementUpdate() during style
resolution. It compares the AnimationList of the previous style and the new style for a given element, checks that animations with a given name
that were not present in the old AnimationList have a new matching CSSAnimation object for them added to the AnimationTimeline, that animations
with a given name that are no longer present in the new AnimationList have their matching CSSAnimation object removed from the AnimationTimeline,
and that animations with a given name that are present in both the old and new AnimationList have their matching CSSAnimation updated to match
the current state of the animation in the AnimationList.
(WebCore::AnimationTimeline::updateCSSTransitionsForElement): Similarly to updateCSSAnimationsForElement(), this method is called during style
resolution by TreeResolver::createAnimatedElementUpdate(). Its role is to create or remove CSSTransition objects based on the AnimationList found
in the old and new styles for a given element. It follows a slightly different logic than updateCSSAnimationsForElement() since for CSS Transitions,
there is no need to update CSSTransition objects for a CSS property existing in both the old and new AnimationList, since when a CSS transitions
property is changed, a whole new transition is initiated. However, it's important to check that different Animation objects and styles would actually
result in different timing properties and blending keyframes, so check for this as well before creating new CSSTransition objects.
* animation/AnimationTimeline.h:
(WebCore::AnimationTimeline::animations const): Change the m_animations type from HashSet to ListHashSet to guarantee we preserve the insertion order which is
required by getAnimations().
(WebCore::AnimationTimeline::hasElementAnimations const): Indicates to DocumentTimeline::updateAnimations() that there are animations targeting the provided element.
(WebCore::AnimationTimeline::elementToAnimationsMap):
(WebCore::AnimationTimeline::elementToCSSAnimationsMap):
(WebCore::AnimationTimeline::elementToCSSTransitionsMap):
* animation/CSSAnimation.cpp: CSSAnimation is now a subclass of DeclarativeAnimation and subclasses initialize() and syncPropertiesWithBackingAnimation()
to perform work specific to CSS Animations.
(WebCore::CSSAnimation::create): Set the animationName property based on the provided backing animation.
(WebCore::CSSAnimation::CSSAnimation):
(WebCore::CSSAnimation::initialize): Create the blending keyframes for this CSSAnimation.
(WebCore::CSSAnimation::syncPropertiesWithBackingAnimation): Reflect the animation-fill-mode, animation-direction, animation-iteration-count and
animation-play-state CSS properties on the AnimationEffectTimingReadOnly object associated with this CSSAnimation.
* animation/CSSAnimation.h:
* animation/CSSTransition.cpp: CSSTransition is now a subclass of DeclarativeAnimation.
(WebCore::CSSTransition::create): Set the transitionProperty property based on the provided backing animation.
(WebCore::CSSTransition::CSSTransition):
(WebCore::CSSTransition::matchesBackingAnimationAndStyles const):
(WebCore::CSSTransition::canBeListed const): Subclass this method such that we also check that we have blending keyframes for a CSSTransition to be
listed by calls to getAnimations().
* animation/CSSTransition.h:
* animation/DeclarativeAnimation.cpp: Added. This new WebAnimation subclass now is the common base class for both CSSAnimation and CSSTransition.
It establishes a relationship with a "backing animation", which is an Animation obtained from a style's AnimationList while resolving styles.
These backing animations contain all of the parsed CSS styles related to CSS Animations and CSS Transitions and we use those to set matching properties
of the Web Animations timing model in the new syncPropertiesWithBackingAnimation() virtual method, which subclasses can override to perform further
work that is specific to a given declarative animation type. The initialize() method is called during create() methods to perform common animation
setup work. Note that while both initialize() and syncPropertiesWithBackingAnimation() are called, we suspend invalidation to that animation's effect
since these methods are meant to be called during style invalidation and we would hit an assertion if we followed the usual route of calling
updateStyleIfNeeded() on the target's document during invalidation.
(WebCore::DeclarativeAnimation::DeclarativeAnimation):
(WebCore::DeclarativeAnimation::setBackingAnimation):
(WebCore::DeclarativeAnimation::initialize): Create a KeyframeEffectReadOnly for this animation and set the provided element as its target, set that
element's document's timeline and play the animation if the backing animation's play state is playing.
(WebCore::DeclarativeAnimation::syncPropertiesWithBackingAnimation): Reflect the {animation|transition}-delay, {animation|transition}-duration and
{animation|transition}-timing-function properties as set on the backing animation.
* animation/DeclarativeAnimation.h: Added.
(WebCore::DeclarativeAnimation::backingAnimation const):
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::updateAnimations): Trigger style invalidation for elements targeted not just by WebAnimation instances, but also by any
of the DeclarativeAnimation subclasses. We also remove the call to updateFinishedState() which should have been removed when we implemented correct
support for asynchronous WebAnimation operations.
(WebCore::DocumentTimeline::animatedStyleForRenderer): Declarative animations are backed by KeyframeEffectReadOnly effects, so make sure we check
for KeyframeEffectReadOnly or one of its subclasses and not just KeyframeEffect since there now are animation types that use the ReadOnly variant.
(WebCore::DocumentTimeline::runningAnimationsForElementAreAllAccelerated): Same as for animatedStyleForRenderer, check for KeyframeEffectReadOnly
and not simply KeyframeEffect.
* animation/KeyframeEffectReadOnly.cpp:
(WebCore::invalidateElement): Stop forcing a style resolution as we invalidate element, marking them as dirty is sufficient. Calls to getAnimations()
already force a style resolution as needed.
(WebCore::KeyframeEffectReadOnly::create): Add a new create() method that only provides a target and which is used by DeclarativeAnimation::initialize().
(WebCore::KeyframeEffectReadOnly::getKeyframes): The previous implementation of getKeyframes() used the ParsedKeyframe list held as m_parsedKeyframes
to compute keyframes. In the case of declarative animations, there are no ParsedKeyframe since the JS API was not involved, so we use the blending keyframes
to look for keyframe data.
(WebCore::KeyframeEffectReadOnly::computeCSSAnimationBlendingKeyframes): Called by CSSAnimation::initialize(), this function creates blending keyframes by
looking up the keyframes date obtained from the @keyframes rule with this backing animation's name.
(WebCore::KeyframeEffectReadOnly::computeCSSTransitionBlendingKeyframes): Called by CSSTransition::create(), this function creates blending keyframes by
creating a 0-offset keyframe with the old style and a 1-offset keyframe with the new style as provided during TreeResolver::createAnimatedElementUpdate().
(WebCore::KeyframeEffectReadOnly::stylesWouldYieldNewCSSTransitionsBlendingKeyframes const): Called by AnimationTimeline::updateCSSTransitionsForElement()
to check that a provided backing Animation and a pair of old and new RenderStyles that may be different objects actually would yield different timing
properties and keyframe CSS values for a given CSS transition to avoid the deletion and creation of CSSTransition objects.
(WebCore::KeyframeEffectReadOnly::shouldRunAccelerated): We mistakenly assumed we always had blending keyframes, which is not always the case with a
CSSTransition where the transition style itself might be set first, but the target value after. So we should only run accelerated provided there are blending
keyframes at least, the function already returning false if it finds a blending keyframe animating a non-accelerated CSS property.
(WebCore::KeyframeEffectReadOnly::setAnimatedPropertiesInStyle): Check that there actually is a matching ParsedKeyframe to read the timing function from.
* animation/KeyframeEffectReadOnly.h:
(WebCore::KeyframeEffectReadOnly::hasBlendingKeyframes const):
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::~WebAnimation): We used to do something very wrong when a WebAnimation was destroyed which uncovered crashes when dealing with
declarative animations. In AnimationTimeline's updateCSSAnimationsForElement() and updateCSSTransitionsForElement(), when we identify that a DeclarativeAnimation
no longer matches an Animation from the current style's AnimationList, we set that DeclarativeAnimation's effect to null and call removeAnimation() on
the timeline. This removes all references from AnimationTimeline to this DeclarativeAnimation and leads to ~WebAnimation being called. Calling removeAnimation()
again in the destructor means that we'd hit ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun) in ref(). It was also meaningless to perform this work in
the WebAnimation destructor since an animation could never be destroyed if it were still registered on a timeline.
(WebCore::WebAnimation::suspendEffectInvalidation): DeclarativeAnimation instances have their timing model properties set during style invalidation, so we need
a mechanism to allow the usual effect invalidation to be suspended in this case. We now maintain a simple m_suspendCount count that increases and decreases with
calls to this method and unsuspendEffectInvalidation() and a isEffectInvalidationSuspended() method returning true whenever that count is positive.
(WebCore::WebAnimation::unsuspendEffectInvalidation):
(WebCore::WebAnimation::timingModelDidChange): Check that effect invalidation is not suspended before proceeding with invalidating the effect.
(WebCore::WebAnimation::setEffect): Check for KeyframeEffectReadOnly and not just KeyframeEffect since declarative animations have ReadOnly effects.
(WebCore::WebAnimation::setTimeline): Check for KeyframeEffectReadOnly and not just KeyframeEffect since declarative animations have ReadOnly effects.
(WebCore::WebAnimation::scheduleMicrotaskIfNeeded): Ensure that the WebAnimation's lifecycle is extended at least to the completion of the scheduled microtask.
This would otherwise cause crashes after declarative animations were destroyed when they were no longer applied.
(WebCore::WebAnimation::runPendingPlayTask): Only fulfill the "ready" promise if it hasn't already been, which might have been the case if multiple calls to play()
are made as a result of updating the animation play state in CSSAnimation::syncPropertiesWithBackingAnimation().
(WebCore::WebAnimation::runPendingPauseTask): Same as above but with multiple pause() calls.
(WebCore::WebAnimation::startOrStopAccelerated): Check for KeyframeEffectReadOnly and not just KeyframeEffect since declarative animations have ReadOnly effects.
(WebCore::WebAnimation::canBeListed const): This new method is called by {Document|Element}::getAnimations() to check that an animation is in the correct state to
be listed. The Web Animations spec explains that only animations "that have an associated target effect which is current or in effect" can be listed. We implement
this behavior as specified.
* animation/WebAnimation.h:
(WebCore::WebAnimation::isDeclarativeAnimation const):
(WebCore::WebAnimation::isEffectInvalidationSuspended):
* dom/Document.cpp:
(WebCore::Document::getAnimations): Ensure that the document's pending styles are resolved before returning animations to ensure that any pending declarative
animations are created. Additionally, we ensure that we only list qualifying animations that have effects targeting elements that are children of thi document.
* dom/Element.cpp:
(WebCore::Element::getAnimations): Same as Document::getAnimations().
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate): When resolving styles, call into the AnimationTimeline if the runtime flag to enable CSS Animations and
CSS Transitions as Web Animations is on. Otherwise, use CSSAnimationController.
Source/WebKitLegacy/mac:
Reviewed by Dean Jackson and Jon Lee.
Add the missing WebKitLegacy support the cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled flag
which is required for the matching <!-- webkit-test-runner --> flag to work in DumpRenderTree.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences setModernMediaControlsEnabled:]):
(-[WebPreferences cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled]):
(-[WebPreferences setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Source/WebKitLegacy/win:
Reviewed by Dean Jackson and Jon Lee.
Add the missing WebKitLegacy support the cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled flag
which is required for the matching <!-- webkit-test-runner --> flag to work in DumpRenderTree.
* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferences.cpp:
(WebPreferences::cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
(WebPreferences::setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
* WebPreferenceKeysPrivate.h
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):
Tools:
Reviewed by Jon Lee.
Add a new <!-- webkit-test-runner --> flag to enable the CSS Animations and CSS Transitions
as Web Animations runtime flag in the new tests we've created for this feature.
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions):
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
LayoutTests:
Reviewed by Dean Jackson and Jon Lee.
Add a series of new tests to check CSSAnimation and CSSTransition objects are correctly created
as CSS animation-* and CSS transition-* properties are used. We also update some existing tests
to use a more concise API since we've implement Element.animate() since their creation.
* webanimations/animation-opacity-animation-crash.html:
* webanimations/css-animations-expected.txt: Added.
* webanimations/css-animations.html: Added.
* webanimations/css-transitions-expected.txt: Added.
* webanimations/css-transitions.html: Added.
* webanimations/opacity-animation-no-longer-composited-upon-completion.html:
* webanimations/opacity-animation-yields-compositing.html:
Canonical link: https://commits.webkit.org/199224@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-03-12 12:56:14 +00:00
|
|
|
animation/DeclarativeAnimation.cpp
|
2017-10-23 20:23:06 +00:00
|
|
|
animation/DocumentTimeline.cpp
|
2020-04-22 07:16:51 +00:00
|
|
|
animation/DocumentTimelinesController.cpp
|
2020-03-12 07:48:06 +00:00
|
|
|
animation/ElementAnimationRareData.cpp
|
2017-10-24 07:51:59 +00:00
|
|
|
animation/KeyframeEffect.cpp
|
2020-02-14 16:34:52 +00:00
|
|
|
animation/KeyframeEffectStack.cpp
|
2017-10-23 20:23:06 +00:00
|
|
|
animation/WebAnimation.cpp
|
2019-12-01 09:22:48 +00:00
|
|
|
animation/WebAnimationUtilities.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/CachedModuleScriptLoader.cpp
|
|
|
|
bindings/js/CachedScriptFetcher.cpp
|
|
|
|
bindings/js/CommonVM.cpp
|
GC constraint solving should be parallel
https://bugs.webkit.org/show_bug.cgi?id=179934
Reviewed by JF Bastien.
PerformanceTests:
Added a version of splay that measures latency in a way that run-jsc-benchmarks groks.
* Octane/splay.js: Added.
(this.Setup.setup.setup):
(this.TearDown.tearDown.tearDown):
(Benchmark):
(BenchmarkResult):
(BenchmarkResult.prototype.valueOf):
(BenchmarkSuite):
(alert):
(Math.random):
(BenchmarkSuite.ResetRNG):
(RunStep):
(BenchmarkSuite.RunSuites):
(BenchmarkSuite.CountBenchmarks):
(BenchmarkSuite.GeometricMean):
(BenchmarkSuite.GeometricMeanTime):
(BenchmarkSuite.AverageAbovePercentile):
(BenchmarkSuite.GeometricMeanLatency):
(BenchmarkSuite.FormatScore):
(BenchmarkSuite.prototype.NotifyStep):
(BenchmarkSuite.prototype.NotifyResult):
(BenchmarkSuite.prototype.NotifyError):
(BenchmarkSuite.prototype.RunSingleBenchmark):
(RunNextSetup):
(RunNextBenchmark):
(RunNextTearDown):
(BenchmarkSuite.prototype.RunStep):
(GeneratePayloadTree):
(GenerateKey):
(SplayUpdateStats):
(InsertNewNode):
(SplaySetup):
(SplayTearDown):
(SplayRun):
(SplayTree):
(SplayTree.prototype.isEmpty):
(SplayTree.prototype.insert):
(SplayTree.prototype.remove):
(SplayTree.prototype.find):
(SplayTree.prototype.findMax):
(SplayTree.prototype.findGreatestLessThan):
(SplayTree.prototype.exportKeys):
(SplayTree.prototype.splay_):
(SplayTree.Node):
(SplayTree.Node.prototype.traverse_):
(report):
(start):
Source/JavaScriptCore:
This makes it possible to do constraint solving in parallel. This looks like a 1% Speedometer
speed-up. It's more than 1% on trunk-Speedometer.
The constraint solver supports running constraints in parallel in two different ways:
- Run multiple constraints in parallel to each other. This only works for constraints that can
tolerate other constraints running concurrently to them (constraint.concurrency() ==
ConstraintConcurrency::Concurrent). This is the most basic kind of parallelism that the
constraint solver supports. All constraints except the JSC SPI constraints are concurrent. We
could probably make them concurrent, but I'm playing it safe for now.
- A constraint can create parallel work for itself, which the constraint solver will interleave
with other stuff. A constraint can report that it has parallel work by returning
ConstraintParallelism::Parallel from its executeImpl() function. Then the solver will allow that
constraint's doParallelWorkImpl() function to run on as many GC marker threads as are available,
for as long as that function wants to run.
It's not possible to have a non-concurrent constraint that creates parallel work.
The parallelism is implemented in terms of the existing GC marker threads. This turns out to be
most natural for two reasons:
- No need to start any other threads.
- The constraints all want to be passed a SlotVisitor. Running on the marker threads means having
access to those threads' SlotVisitors. Also, it means less load balancing. The solver will
create work on each marking thread's SlotVisitor. When the solver is done "stealing" a marker
thread, that thread will have work it can start doing immediately. Before this change, we had to
contribute the work found by the constraint solver to the global worklist so that it could be
distributed to the marker threads by load balancing. This change probably helps to avoid that
load balancing step.
A lot of this change is about making it easy to iterate GC data structures in parallel. This
change makes almost all constraints parallel-enabled, but only the DOM's output constraint uses
the parallel work API. That constraint iterates the marked cells in two subspaces. This change
makes it very easy to compose parallel iterators over subspaces, allocators, blocks, and cells.
The marked cell parallel iterator is composed out of parallel iterators for the others. A parallel
iterator is just an iterator that can do an atomic next() very quickly. We abstract them using
RefPtr<SharedTask<...()>>, where ... is the type returned from the iterator. We know it's done
when it returns a falsish version of ... (in the current code, that's always a pointer type, so
done is indicated by null).
* API/JSMarkingConstraintPrivate.cpp:
(JSContextGroupAddMarkingConstraint):
* API/JSVirtualMachine.mm:
(scanExternalObjectGraph):
(scanExternalRememberedSet):
* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* bytecode/AccessCase.cpp:
(JSC::AccessCase::propagateTransitions const):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::visitWeakly):
(JSC::CodeBlock::shouldJettisonDueToOldAge):
(JSC::shouldMarkTransition):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::determineLiveness):
* dfg/DFGWorklist.cpp:
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* heap/ConstraintParallelism.h: Added.
(WTF::printInternal):
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::addToRememberedSet):
(JSC::Heap::runFixpointPhase):
(JSC::Heap::stopThePeriphery):
(JSC::Heap::resumeThePeriphery):
(JSC::Heap::addCoreConstraints):
(JSC::Heap::setBonusVisitorTask):
(JSC::Heap::runTaskInParallel):
(JSC::Heap::forEachSlotVisitor): Deleted.
* heap/Heap.h:
(JSC::Heap::worldIsRunning const):
(JSC::Heap::runFunctionInParallel):
* heap/HeapInlines.h:
(JSC::Heap::worldIsStopped const):
(JSC::Heap::isMarked):
(JSC::Heap::incrementDeferralDepth):
(JSC::Heap::decrementDeferralDepth):
(JSC::Heap::decrementDeferralDepthAndGCIfNeeded):
(JSC::Heap::forEachSlotVisitor):
(JSC::Heap::collectorBelievesThatTheWorldIsStopped const): Deleted.
(JSC::Heap::isMarkedConcurrently): Deleted.
* heap/HeapSnapshotBuilder.cpp:
(JSC::HeapSnapshotBuilder::appendNode):
* heap/LargeAllocation.h:
(JSC::LargeAllocation::isMarked):
(JSC::LargeAllocation::isMarkedConcurrently): Deleted.
* heap/LockDuringMarking.h:
(JSC::lockDuringMarking):
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::parallelNotEmptyBlockSource):
* heap/MarkedAllocator.h:
* heap/MarkedBlock.h:
(JSC::MarkedBlock::aboutToMark):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::areMarksStaleWithDependency): Deleted.
(JSC::MarkedBlock::isMarkedConcurrently): Deleted.
* heap/MarkedSpace.h:
(JSC::MarkedSpace::activeWeakSetsBegin):
(JSC::MarkedSpace::activeWeakSetsEnd):
(JSC::MarkedSpace::newActiveWeakSetsBegin):
(JSC::MarkedSpace::newActiveWeakSetsEnd):
* heap/MarkingConstraint.cpp:
(JSC::MarkingConstraint::MarkingConstraint):
(JSC::MarkingConstraint::execute):
(JSC::MarkingConstraint::quickWorkEstimate):
(JSC::MarkingConstraint::workEstimate):
(JSC::MarkingConstraint::doParallelWork):
(JSC::MarkingConstraint::finishParallelWork):
(JSC::MarkingConstraint::doParallelWorkImpl):
(JSC::MarkingConstraint::finishParallelWorkImpl):
* heap/MarkingConstraint.h:
(JSC::MarkingConstraint::lastExecuteParallelism const):
(JSC::MarkingConstraint::parallelism const):
(JSC::MarkingConstraint::quickWorkEstimate): Deleted.
(JSC::MarkingConstraint::workEstimate): Deleted.
* heap/MarkingConstraintSet.cpp:
(JSC::MarkingConstraintSet::MarkingConstraintSet):
(JSC::MarkingConstraintSet::add):
(JSC::MarkingConstraintSet::executeConvergence):
(JSC::MarkingConstraintSet::executeConvergenceImpl):
(JSC::MarkingConstraintSet::executeAll):
(JSC::MarkingConstraintSet::ExecutionContext::ExecutionContext): Deleted.
(JSC::MarkingConstraintSet::ExecutionContext::didVisitSomething const): Deleted.
(JSC::MarkingConstraintSet::ExecutionContext::shouldTimeOut const): Deleted.
(JSC::MarkingConstraintSet::ExecutionContext::drain): Deleted.
(JSC::MarkingConstraintSet::ExecutionContext::didExecute const): Deleted.
(JSC::MarkingConstraintSet::ExecutionContext::execute): Deleted.
(): Deleted.
* heap/MarkingConstraintSet.h:
* heap/MarkingConstraintSolver.cpp: Added.
(JSC::MarkingConstraintSolver::MarkingConstraintSolver):
(JSC::MarkingConstraintSolver::~MarkingConstraintSolver):
(JSC::MarkingConstraintSolver::didVisitSomething const):
(JSC::MarkingConstraintSolver::execute):
(JSC::MarkingConstraintSolver::drain):
(JSC::MarkingConstraintSolver::converge):
(JSC::MarkingConstraintSolver::runExecutionThread):
(JSC::MarkingConstraintSolver::didExecute):
* heap/MarkingConstraintSolver.h: Added.
* heap/OpaqueRootSet.h: Removed.
* heap/ParallelSourceAdapter.h: Added.
(JSC::ParallelSourceAdapter::ParallelSourceAdapter):
(JSC::createParallelSourceAdapter):
* heap/SimpleMarkingConstraint.cpp: Added.
(JSC::SimpleMarkingConstraint::SimpleMarkingConstraint):
(JSC::SimpleMarkingConstraint::~SimpleMarkingConstraint):
(JSC::SimpleMarkingConstraint::quickWorkEstimate):
(JSC::SimpleMarkingConstraint::executeImpl):
* heap/SimpleMarkingConstraint.h: Added.
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::didStartMarking):
(JSC::SlotVisitor::reset):
(JSC::SlotVisitor::appendToMarkStack):
(JSC::SlotVisitor::visitChildren):
(JSC::SlotVisitor::updateMutatorIsStopped):
(JSC::SlotVisitor::mutatorIsStoppedIsUpToDate const):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::performIncrementOfDraining):
(JSC::SlotVisitor::didReachTermination):
(JSC::SlotVisitor::hasWork):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::drainInParallelPassively):
(JSC::SlotVisitor::waitForTermination):
(JSC::SlotVisitor::addOpaqueRoot): Deleted.
(JSC::SlotVisitor::containsOpaqueRoot const): Deleted.
(JSC::SlotVisitor::containsOpaqueRootTriState const): Deleted.
(JSC::SlotVisitor::mergeIfNecessary): Deleted.
(JSC::SlotVisitor::mergeOpaqueRootsIfProfitable): Deleted.
(JSC::SlotVisitor::mergeOpaqueRoots): Deleted.
* heap/SlotVisitor.h:
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::addOpaqueRoot):
(JSC::SlotVisitor::containsOpaqueRoot const):
(JSC::SlotVisitor::vm):
(JSC::SlotVisitor::vm const):
* heap/Subspace.cpp:
(JSC::Subspace::parallelAllocatorSource):
(JSC::Subspace::parallelNotEmptyMarkedBlockSource):
* heap/Subspace.h:
* heap/SubspaceInlines.h:
(JSC::Subspace::forEachMarkedCellInParallel):
* heap/VisitCounter.h: Added.
(JSC::VisitCounter::VisitCounter):
(JSC::VisitCounter::visitCount const):
* heap/VisitingTimeout.h: Removed.
* heap/WeakBlock.cpp:
(JSC::WeakBlock::specializedVisit):
* runtime/Structure.cpp:
(JSC::Structure::isCheapDuringGC):
(JSC::Structure::markIfCheap):
Source/WebCore:
No new tests because no change in behavior. This change is best tested using DOM-GC-intensive
benchmarks like Speedometer and Dromaeo.
This parallelizes the DOM's output constraint, and makes some small changes to make this more
scalable.
* ForwardingHeaders/heap/SimpleMarkingConstraint.h: Added.
* ForwardingHeaders/heap/VisitingTimeout.h: Removed.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMGCOutputConstraint.cpp: Added.
(WebCore::DOMGCOutputConstraint::DOMGCOutputConstraint):
(WebCore::DOMGCOutputConstraint::~DOMGCOutputConstraint):
(WebCore::DOMGCOutputConstraint::executeImpl):
(WebCore::DOMGCOutputConstraint::doParallelWorkImpl):
(WebCore::DOMGCOutputConstraint::finishParallelWorkImpl):
* bindings/js/DOMGCOutputConstraint.h: Added.
* bindings/js/WebCoreJSClientData.cpp:
(WebCore::JSVMClientData::initNormalWorld):
* dom/Node.cpp:
(WebCore::Node::eventTargetDataConcurrently):
(WebCore::Node::ensureEventTargetData):
(WebCore::Node::clearEventTargetData):
Source/WTF:
This does some changes to make it easier to do parallel constraint solving:
- I finally removed dependencyWith. This was a silly construct whose only purpose is to confuse
people about what it means to have a dependency chain. I took that as an opportunity to grealy
simplify the GC's use of dependency chaining.
- Added more logic to Deque<>, since I use it for part of the load balancer.
- Made it possible to profile lock contention. See
https://bugs.webkit.org/show_bug.cgi?id=180250#c0 for some preliminary measurements.
- Introduced holdLockIf, which makes it easy to perform predicated lock acquisition. We use that
to pick a lock in WebCore.
- Introduced CountingLock. It's like WTF::Lock except it also enables optimistic read transactions
sorta like Java's StampedLock.
* WTF.xcodeproj/project.pbxproj:
* wtf/Atomics.h:
(WTF::dependency):
(WTF::DependencyWith::DependencyWith): Deleted.
(WTF::dependencyWith): Deleted.
* wtf/BitVector.h:
(WTF::BitVector::iterator::operator++):
* wtf/CMakeLists.txt:
* wtf/ConcurrentPtrHashSet.cpp: Added.
(WTF::ConcurrentPtrHashSet::ConcurrentPtrHashSet):
(WTF::ConcurrentPtrHashSet::~ConcurrentPtrHashSet):
(WTF::ConcurrentPtrHashSet::deleteOldTables):
(WTF::ConcurrentPtrHashSet::clear):
(WTF::ConcurrentPtrHashSet::initialize):
(WTF::ConcurrentPtrHashSet::addSlow):
(WTF::ConcurrentPtrHashSet::resizeIfNecessary):
(WTF::ConcurrentPtrHashSet::resizeAndAdd):
(WTF::ConcurrentPtrHashSet::Table::create):
* wtf/ConcurrentPtrHashSet.h: Added.
(WTF::ConcurrentPtrHashSet::contains):
(WTF::ConcurrentPtrHashSet::add):
(WTF::ConcurrentPtrHashSet::size const):
(WTF::ConcurrentPtrHashSet::Table::maxLoad const):
(WTF::ConcurrentPtrHashSet::hash):
(WTF::ConcurrentPtrHashSet::cast):
(WTF::ConcurrentPtrHashSet::containsImpl const):
(WTF::ConcurrentPtrHashSet::addImpl):
* wtf/Deque.h:
(WTF::inlineCapacity>::takeFirst):
* wtf/FastMalloc.h:
* wtf/Lock.cpp:
(WTF::LockBase::lockSlow):
* wtf/Locker.h:
(WTF::holdLockIf):
* wtf/ScopedLambda.h:
* wtf/SharedTask.h:
(WTF::SharedTask<PassedResultType):
(WTF::SharedTask<ResultType): Deleted.
* wtf/StackShot.h: Added.
(WTF::StackShot::StackShot):
(WTF::StackShot::operator=):
(WTF::StackShot::array const):
(WTF::StackShot::size const):
(WTF::StackShot::operator bool const):
(WTF::StackShot::operator== const):
(WTF::StackShot::hash const):
(WTF::StackShot::isHashTableDeletedValue const):
(WTF::StackShot::operator> const):
(WTF::StackShot::deletedValueArray):
(WTF::StackShotHash::hash):
(WTF::StackShotHash::equal):
* wtf/StackShotProfiler.h: Added.
(WTF::StackShotProfiler::StackShotProfiler):
(WTF::StackShotProfiler::profile):
(WTF::StackShotProfiler::run):
Tools:
* Scripts/run-jsc-benchmarks: Add splay-latency test, since this change needed to be carefully validated with that benchmark.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/ConcurrentPtrHashSet.cpp: Added. This has unit tests of the new concurrent data structure. The tests focus on correctness under serial execution, which appears to be enough for now (it's so easy to catch a concurrency bug by just running the GC).
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/196360@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-05 17:53:57 +00:00
|
|
|
bindings/js/DOMGCOutputConstraint.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/DOMWrapperWorld.cpp
|
|
|
|
bindings/js/GCController.cpp
|
|
|
|
bindings/js/IDBBindingUtilities.cpp
|
2019-10-04 16:31:21 +00:00
|
|
|
bindings/js/JSAbortSignalCustom.cpp
|
2020-10-17 20:33:53 +00:00
|
|
|
bindings/js/JSAbstractRangeCustom.cpp
|
2018-11-06 11:15:15 +00:00
|
|
|
bindings/js/JSAnimationEffectCustom.cpp
|
2017-10-21 14:11:44 +00:00
|
|
|
bindings/js/JSAnimationTimelineCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSAttrCustom.cpp
|
2020-10-28 00:06:03 +00:00
|
|
|
bindings/js/JSAudioBufferCustom.cpp
|
2021-05-13 00:09:38 +00:00
|
|
|
bindings/js/JSAudioNodeCustom.cpp
|
2020-10-15 23:41:51 +00:00
|
|
|
bindings/js/JSAudioWorkletProcessorCustom.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
bindings/js/JSAuthenticatorResponseCustom.cpp
|
2021-02-05 00:15:30 +00:00
|
|
|
bindings/js/JSBaseAudioContextCustom.cpp
|
2018-01-23 03:00:59 +00:00
|
|
|
bindings/js/JSBasicCredentialCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSBlobCustom.cpp
|
|
|
|
bindings/js/JSCSSRuleCustom.cpp
|
|
|
|
bindings/js/JSCSSRuleListCustom.cpp
|
|
|
|
bindings/js/JSCSSStyleDeclarationCustom.cpp
|
|
|
|
bindings/js/JSCallbackData.cpp
|
|
|
|
bindings/js/JSCanvasRenderingContext2DCustom.cpp
|
|
|
|
bindings/js/JSCustomElementInterface.cpp
|
|
|
|
bindings/js/JSCustomElementRegistryCustom.cpp
|
|
|
|
bindings/js/JSCustomEventCustom.cpp
|
|
|
|
bindings/js/JSDOMBindingSecurity.cpp
|
|
|
|
bindings/js/JSDOMBuiltinConstructorBase.cpp
|
|
|
|
bindings/js/JSDOMConstructorBase.cpp
|
|
|
|
bindings/js/JSDOMConstructorWithDocument.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
bindings/js/JSDOMConvertDate.cpp
|
|
|
|
bindings/js/JSDOMConvertNumbers.cpp
|
|
|
|
bindings/js/JSDOMConvertStrings.cpp
|
|
|
|
bindings/js/JSDOMConvertWebGL.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSDOMExceptionHandling.cpp
|
|
|
|
bindings/js/JSDOMGlobalObject.cpp
|
|
|
|
bindings/js/JSDOMGlobalObjectTask.cpp
|
|
|
|
bindings/js/JSDOMGuardedObject.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
bindings/js/JSDOMIterator.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSDOMMapLike.cpp
|
2017-10-25 07:17:21 +00:00
|
|
|
bindings/js/JSDOMPromise.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSDOMPromiseDeferred.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
bindings/js/JSDOMQuadCustom.cpp
|
2019-12-04 12:06:54 +00:00
|
|
|
bindings/js/JSDOMSetLike.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSDOMWindowBase.cpp
|
|
|
|
bindings/js/JSDOMWindowCustom.cpp
|
|
|
|
bindings/js/JSDOMWindowProperties.cpp
|
|
|
|
bindings/js/JSDOMWrapper.cpp
|
|
|
|
bindings/js/JSDOMWrapperCache.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
bindings/js/JSDeprecatedCSSOMValueCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSDocumentCustom.cpp
|
|
|
|
bindings/js/JSDocumentFragmentCustom.cpp
|
|
|
|
bindings/js/JSElementCustom.cpp
|
2018-08-13 00:02:19 +00:00
|
|
|
bindings/js/JSErrorEventCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSErrorHandler.cpp
|
|
|
|
bindings/js/JSEventCustom.cpp
|
|
|
|
bindings/js/JSEventListener.cpp
|
|
|
|
bindings/js/JSEventTargetCustom.cpp
|
Add support for microtasks in workers
https://bugs.webkit.org/show_bug.cgi?id=188246
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
This test is wrong[1,2]. It starts failing since our worker starts using correct microtask queues.
[1]: https://github.com/web-platform-tests/wpt/pull/8936
[2]: https://github.com/w3c/ServiceWorker/issues/1213#issuecomment-342640579
* web-platform-tests/service-workers/service-worker/extendable-event-async-waituntil.https-expected.txt:
Source/WebCore:
This patch adds the microtask mechanism to workers. To adopt the existing microtask mechanism from the main thread,
we extend JSMainThreadExecState for non-main-threads. We rename it to JSExecState, and store stacked
ExecState* data in thread local storage in ThreadGlobalData instead of a static variable s_mainThreadState.
We add MicrotaskQueue to WorkerGlobalScope since each worker has its own thread and it should have its
own microtask queue.
* Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSCustomElementInterface.cpp:
(WebCore::constructCustomElementSynchronously):
(WebCore::JSCustomElementInterface::upgradeElement):
(WebCore::JSCustomElementInterface::invokeCallback):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/js/JSDOMGlobalObjectTask.cpp:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
Queue a microtask to MicrotaskQueue instead of posting a macrotask.
(WebCore::JSDOMWindowMicrotaskCallback::create): Deleted.
(WebCore::JSDOMWindowMicrotaskCallback::call): Deleted.
(WebCore::JSDOMWindowMicrotaskCallback::JSDOMWindowMicrotaskCallback): Deleted.
(): Deleted.
Extract JSDOMWindowMicrotaskCallback as JSMicrotaskCallback and create a new file for it.
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSExecState.cpp: Renamed from Source/WebCore/bindings/js/JSMainThreadExecState.cpp.
(WebCore::JSExecState::didLeaveScriptContext):
If we are in a main thread, we consume main thread microtask queue. If we are in worker thread,
we consume a microtask queue per worker.
(WebCore::functionCallHandlerFromAnyThread):
(WebCore::evaluateHandlerFromAnyThread):
* bindings/js/JSExecState.h: Renamed from Source/WebCore/bindings/js/JSMainThreadExecState.h.
(WebCore::JSExecState::currentState):
(WebCore::JSExecState::call):
(WebCore::JSExecState::evaluate):
(WebCore::JSExecState::profiledCall):
(WebCore::JSExecState::profiledEvaluate):
(WebCore::JSExecState::runTask):
(WebCore::JSExecState::loadModule):
(WebCore::JSExecState::linkAndEvaluateModule):
(WebCore::JSExecState::JSExecState):
(WebCore::JSExecState::~JSExecState):
(WebCore::JSExecState::setCurrentState):
Store and load ExecState in thread local storage, ThreadGlobalData. This allows us to use it for workers.
(WebCore::JSMainThreadNullState::JSMainThreadNullState):
(WebCore::JSMainThreadNullState::~JSMainThreadNullState):
We keep this name "JSMainThreadNullState" since CustomElementReactionStack should be stick to the main thread.
And this class is only used in the main thread.
* bindings/js/JSExecStateInstrumentation.h: Renamed from Source/WebCore/bindings/js/JSMainThreadExecStateInstrumentation.h.
(WebCore::JSExecState::instrumentFunctionInternal):
(WebCore::JSExecState::instrumentFunctionCall):
(WebCore::JSExecState::instrumentFunctionConstruct):
* bindings/js/JSMicrotaskCallback.h: Copied from Source/WebKitLegacy/mac/DOM/DOMHTMLBaseElement.mm.
(WebCore::JSMicrotaskCallback::create):
(WebCore::JSMicrotaskCallback::call):
(WebCore::JSMicrotaskCallback::JSMicrotaskCallback):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::loadModuleScriptInWorld):
(WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
(WebCore::ScriptController::canAccessFromCurrentOrigin):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* bridge/objc/WebScriptObject.mm:
(-[WebScriptObject callWebScriptMethod:withArguments:]):
(-[WebScriptObject evaluateWebScript:]):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::compileShader):
(WebCore::WebGLRenderingContextBase::printToConsole):
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::buildObjectForCanvas):
(WebCore::InspectorCanvas::buildAction):
* inspector/InspectorController.cpp:
* inspector/InspectorFrontendHost.cpp:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
* inspector/WorkerInspectorController.cpp:
* inspector/agents/InspectorCanvasAgent.cpp:
* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::buildInitiatorObject):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::addMessage):
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation const):
* platform/ThreadGlobalData.h:
(WebCore::ThreadGlobalData::ThreadGlobalData::currentState const):
(WebCore::ThreadGlobalData::ThreadGlobalData::setCurrentState):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::removeMicrotaskQueue):
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::microtaskQueue const):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::stop):
* workers/service/ExtendableEvent.cpp:
(WebCore::ExtendableEvent::addExtendLifetimePromise):
When dispatching an "install" event from service worker, we first create an event,
dispatch it, and set a handler which is called when a pending promise count becomes zero.
However, the old code checked pending promise count in a queued microtask. It worked
previously because microtask is actually a macrotask in the service worker. So this check
is done after a handler is set. But this patch introduces real microtask, and this check
happens before a handler is set because dispatching an event can exhaust microtask queue.
According to the spec, this check should not be done in microtask[1]. We make this checking
part as a macrotask. We note that algorithm noted as FIXMEs should be done in this
microtask while the checking part should not be done.
[1]: https://w3c.github.io/ServiceWorker/#installation-algorithm
Source/WebKit:
Rename JSMainThreadExecState.h to JSExecState.h.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeGtk.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
Source/WebKitLegacy/mac:
Rename JSMainThreadExecState.h to JSExecState.h.
* DOM/DOMAttr.mm:
* DOM/DOMBlob.mm:
* DOM/DOMCDATASection.mm:
* DOM/DOMCSSCharsetRule.mm:
* DOM/DOMCSSFontFaceRule.mm:
* DOM/DOMCSSImportRule.mm:
* DOM/DOMCSSMediaRule.mm:
* DOM/DOMCSSPageRule.mm:
* DOM/DOMCSSPrimitiveValue.mm:
* DOM/DOMCSSRule.mm:
* DOM/DOMCSSRuleList.mm:
* DOM/DOMCSSStyleDeclaration.mm:
* DOM/DOMCSSStyleRule.mm:
* DOM/DOMCSSStyleSheet.mm:
* DOM/DOMCSSUnknownRule.mm:
* DOM/DOMCSSValue.mm:
* DOM/DOMCSSValueList.mm:
* DOM/DOMCharacterData.mm:
* DOM/DOMComment.mm:
* DOM/DOMCounter.mm:
* DOM/DOMDocument.mm:
* DOM/DOMDocumentFragment.mm:
* DOM/DOMDocumentType.mm:
* DOM/DOMElement.mm:
* DOM/DOMEvent.mm:
* DOM/DOMFile.mm:
* DOM/DOMFileList.mm:
* DOM/DOMHTML.mm:
* DOM/DOMHTMLAnchorElement.mm:
* DOM/DOMHTMLAppletElement.mm:
* DOM/DOMHTMLAreaElement.mm:
* DOM/DOMHTMLBRElement.mm:
* DOM/DOMHTMLBaseElement.mm:
* DOM/DOMHTMLBaseFontElement.mm:
* DOM/DOMHTMLBodyElement.mm:
* DOM/DOMHTMLButtonElement.mm:
* DOM/DOMHTMLCanvasElement.mm:
* DOM/DOMHTMLCollection.mm:
* DOM/DOMHTMLDListElement.mm:
* DOM/DOMHTMLDirectoryElement.mm:
* DOM/DOMHTMLDivElement.mm:
* DOM/DOMHTMLDocument.mm:
* DOM/DOMHTMLElement.mm:
* DOM/DOMHTMLEmbedElement.mm:
* DOM/DOMHTMLFieldSetElement.mm:
* DOM/DOMHTMLFontElement.mm:
* DOM/DOMHTMLFormElement.mm:
* DOM/DOMHTMLFrameElement.mm:
* DOM/DOMHTMLFrameSetElement.mm:
* DOM/DOMHTMLHRElement.mm:
* DOM/DOMHTMLHeadElement.mm:
* DOM/DOMHTMLHeadingElement.mm:
* DOM/DOMHTMLHtmlElement.mm:
* DOM/DOMHTMLIFrameElement.mm:
* DOM/DOMHTMLImageElement.mm:
* DOM/DOMHTMLInputElement.mm:
* DOM/DOMHTMLLIElement.mm:
* DOM/DOMHTMLLabelElement.mm:
* DOM/DOMHTMLLegendElement.mm:
* DOM/DOMHTMLLinkElement.mm:
* DOM/DOMHTMLMapElement.mm:
* DOM/DOMHTMLMarqueeElement.mm:
* DOM/DOMHTMLMediaElement.mm:
* DOM/DOMHTMLMenuElement.mm:
* DOM/DOMHTMLMetaElement.mm:
* DOM/DOMHTMLModElement.mm:
* DOM/DOMHTMLOListElement.mm:
* DOM/DOMHTMLObjectElement.mm:
* DOM/DOMHTMLOptGroupElement.mm:
* DOM/DOMHTMLOptionElement.mm:
* DOM/DOMHTMLOptionsCollection.mm:
* DOM/DOMHTMLParagraphElement.mm:
* DOM/DOMHTMLParamElement.mm:
* DOM/DOMHTMLPreElement.mm:
* DOM/DOMHTMLQuoteElement.mm:
* DOM/DOMHTMLScriptElement.mm:
* DOM/DOMHTMLSelectElement.mm:
* DOM/DOMHTMLStyleElement.mm:
* DOM/DOMHTMLTableCaptionElement.mm:
* DOM/DOMHTMLTableCellElement.mm:
* DOM/DOMHTMLTableColElement.mm:
* DOM/DOMHTMLTableElement.mm:
* DOM/DOMHTMLTableRowElement.mm:
* DOM/DOMHTMLTableSectionElement.mm:
* DOM/DOMHTMLTextAreaElement.mm:
* DOM/DOMHTMLTitleElement.mm:
* DOM/DOMHTMLUListElement.mm:
* DOM/DOMHTMLVideoElement.mm:
* DOM/DOMImplementation.mm:
* DOM/DOMKeyboardEvent.mm:
* DOM/DOMMediaError.mm:
* DOM/DOMMediaList.mm:
* DOM/DOMMouseEvent.mm:
* DOM/DOMMutationEvent.mm:
* DOM/DOMNamedNodeMap.mm:
* DOM/DOMNode.mm:
* DOM/DOMNodeIterator.mm:
* DOM/DOMNodeList.mm:
* DOM/DOMOverflowEvent.mm:
* DOM/DOMProcessingInstruction.mm:
* DOM/DOMProgressEvent.mm:
* DOM/DOMRGBColor.mm:
* DOM/DOMRange.mm:
* DOM/DOMRect.mm:
* DOM/DOMStyleSheet.mm:
* DOM/DOMStyleSheetList.mm:
* DOM/DOMText.mm:
* DOM/DOMTextEvent.mm:
* DOM/DOMTimeRanges.mm:
* DOM/DOMTokenList.mm:
* DOM/DOMTreeWalker.mm:
* DOM/DOMUIEvent.mm:
* DOM/DOMWheelEvent.mm:
* DOM/DOMXPathExpression.mm:
* DOM/DOMXPathResult.mm:
* DOM/ObjCEventListener.mm:
LayoutTests:
* http/wpt/workers/microtasks.any-expected.txt: Added.
* http/wpt/workers/microtasks.any.html: Added.
* http/wpt/workers/microtasks.any.js: Added.
(promise_test):
* http/wpt/workers/microtasks.any.worker-expected.txt: Added.
* http/wpt/workers/microtasks.any.worker.html: Added.
Canonical link: https://commits.webkit.org/203435@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-06 04:37:10 +00:00
|
|
|
bindings/js/JSExecState.cpp
|
2017-10-24 21:22:54 +00:00
|
|
|
bindings/js/JSExtendableMessageEventCustom.cpp
|
2017-10-25 07:17:21 +00:00
|
|
|
bindings/js/JSFetchEventCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSFileSystemEntryCustom.cpp
|
2021-01-04 20:01:40 +00:00
|
|
|
bindings/js/JSHTMLAllCollectionCustom.cpp
|
2020-08-18 21:24:51 +00:00
|
|
|
bindings/js/JSHTMLCanvasElementCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSHTMLCollectionCustom.cpp
|
|
|
|
bindings/js/JSHTMLDocumentCustom.cpp
|
|
|
|
bindings/js/JSHTMLElementCustom.cpp
|
|
|
|
bindings/js/JSHTMLTemplateElementCustom.cpp
|
|
|
|
bindings/js/JSHistoryCustom.cpp
|
|
|
|
bindings/js/JSIDBCursorCustom.cpp
|
|
|
|
bindings/js/JSIDBCursorWithValueCustom.cpp
|
|
|
|
bindings/js/JSIDBIndexCustom.cpp
|
|
|
|
bindings/js/JSIDBObjectStoreCustom.cpp
|
2019-02-08 17:05:53 +00:00
|
|
|
bindings/js/JSIDBRequestCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSIDBTransactionCustom.cpp
|
IDB serialization of some DOM object types crashes the Networking process due to incorrect global object type (WPT IndexedDB/structured-clone.any tests fail)
https://bugs.webkit.org/show_bug.cgi?id=210735
<rdar://problem/62045703>
Patch by Sihui Liu <sihui_liu@appe.com> on 2020-07-16
Reviewed by Yusuke Suzuki.
Source/WebCore:
In r239746, IDB went back to use JSGlobalObject for serialization and deserialization. However, in our current
implementation, there is a strong assumption that DOM JS objects are tied to JSDOMGlobalObject, which is
derived from JSGlobalObject. For example, in SerializedScriptValue.cpp, we cast the global object to
JSDOMGlobalObject in many places.
We recently notice this issue when we enable some wpt test, which has been disabled since it was imported as
some types were not supported. The test fails as DOMMatrix object requires its global object to be
JSDOMGlobalObject. To fix this, introduce a new Class JSIDBSerializationGlobalObject, derived from
JSDOMGlobalObject, and use it for IDB serialization.
Tests: LayoutTests/storage/indexeddb/structured-clone.html
LayoutTests/storage/indexeddb/structured-clone-private.html
* Modules/indexeddb/server/IDBSerializationContext.cpp:
(WebCore::IDBServer::IDBSerializationContext::initializeVM):
* Modules/indexeddb/server/IDBSerializationContext.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::scriptExecutionContext const):
* bindings/js/JSIDBSerializationGlobalObject.cpp: Added.
(WebCore::JSIDBSerializationGlobalObject::JSIDBSerializationGlobalObject):
(WebCore::JSIDBSerializationGlobalObject::create):
(WebCore::JSIDBSerializationGlobalObject::finishCreation):
(WebCore::JSIDBSerializationGlobalObject::subspaceForImpl):
(WebCore::JSIDBSerializationGlobalObject::destroy):
* bindings/js/JSIDBSerializationGlobalObject.h: Added.
* bindings/js/WebCoreJSClientData.cpp:
(WebCore::JSVMClientData::JSVMClientData):
* bindings/js/WebCoreJSClientData.h:
(WebCore::JSVMClientData::idbSerializationSpace):
* dom/EmptyScriptExecutionContext.h: Added.
* worklets/WorkletScriptController.h:
LayoutTests:
* platform/ios/TestExpectations:
* platform/wk2/TestExpectations:
* storage/indexeddb/resources/structured-clone.js:
(testPrimitiveValue):
(testBoolean):
(testBooleanObject):
(testString):
(testStringObject):
(testNumber):
(testNumberObject):
(testBigInt):
(testBigIntObject.testOneBigIntObject):
(testBigIntObject):
(testDateObject):
(testTypedArray.testTypedArrayValue):
(testArrays):
(testGeometryTypes.testOneGeometryType):
(testRTCCertificate.promise.then):
(testRTCCertificate):
(testCryptoKey.promise.then):
(testBadTypes): Deleted.
* storage/indexeddb/structured-clone-expected.txt:
* storage/indexeddb/structured-clone-private-expected.txt:
Canonical link: https://commits.webkit.org/227234@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-16 23:56:35 +00:00
|
|
|
bindings/js/JSIDBSerializationGlobalObject.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSImageDataCustom.cpp
|
2020-10-29 08:15:18 +00:00
|
|
|
bindings/js/JSIntersectionObserverCustom.cpp
|
2018-11-06 20:52:51 +00:00
|
|
|
bindings/js/JSIntersectionObserverEntryCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSLazyEventListener.cpp
|
|
|
|
bindings/js/JSLocationCustom.cpp
|
|
|
|
bindings/js/JSMediaStreamTrackCustom.cpp
|
|
|
|
bindings/js/JSMessageChannelCustom.cpp
|
|
|
|
bindings/js/JSMessageEventCustom.cpp
|
|
|
|
bindings/js/JSMessagePortCustom.cpp
|
|
|
|
bindings/js/JSMutationObserverCustom.cpp
|
2018-10-04 21:12:04 +00:00
|
|
|
bindings/js/JSMutationRecordCustom.cpp
|
2017-10-31 20:38:12 +00:00
|
|
|
bindings/js/JSNavigatorCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSNodeCustom.cpp
|
|
|
|
bindings/js/JSNodeIteratorCustom.cpp
|
|
|
|
bindings/js/JSNodeListCustom.cpp
|
2017-12-12 23:35:51 +00:00
|
|
|
bindings/js/JSOffscreenCanvasRenderingContext2DCustom.cpp
|
2018-10-23 00:46:14 +00:00
|
|
|
bindings/js/JSPaintRenderingContext2DCustom.cpp
|
2018-11-03 04:01:29 +00:00
|
|
|
bindings/js/JSPaintWorkletGlobalScopeCustom.cpp
|
2018-09-09 02:03:52 +00:00
|
|
|
bindings/js/JSPaymentMethodChangeEventCustom.cpp
|
2018-09-10 20:08:00 +00:00
|
|
|
bindings/js/JSPaymentResponseCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSPerformanceEntryCustom.cpp
|
2018-06-21 19:04:02 +00:00
|
|
|
bindings/js/JSPerformanceObserverCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSPluginElementFunctions.cpp
|
|
|
|
bindings/js/JSPopStateEventCustom.cpp
|
2018-08-14 13:04:43 +00:00
|
|
|
bindings/js/JSPromiseRejectionEventCustom.cpp
|
2021-02-19 20:39:40 +00:00
|
|
|
bindings/js/JSRTCRtpSFrameTransformCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSReadableStreamSourceCustom.cpp
|
2018-04-17 16:59:34 +00:00
|
|
|
bindings/js/JSRemoteDOMWindowBase.cpp
|
|
|
|
bindings/js/JSRemoteDOMWindowCustom.cpp
|
2020-10-22 12:41:10 +00:00
|
|
|
bindings/js/JSResizeObserverCustom.cpp
|
2019-06-04 07:38:17 +00:00
|
|
|
bindings/js/JSResizeObserverEntryCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSSVGPathSegCustom.cpp
|
2018-12-11 06:50:33 +00:00
|
|
|
bindings/js/JSSVGViewSpecCustom.cpp
|
2017-10-25 21:36:39 +00:00
|
|
|
bindings/js/JSServiceWorkerClientCustom.cpp
|
2017-11-29 01:33:29 +00:00
|
|
|
bindings/js/JSServiceWorkerGlobalScopeCustom.cpp
|
2021-01-30 08:53:10 +00:00
|
|
|
bindings/js/JSStaticRangeCustom.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
bindings/js/JSStyleSheetCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSTextCustom.cpp
|
|
|
|
bindings/js/JSTextTrackCueCustom.cpp
|
|
|
|
bindings/js/JSTrackCustom.cpp
|
|
|
|
bindings/js/JSTreeWalkerCustom.cpp
|
2021-08-12 15:47:18 +00:00
|
|
|
bindings/js/JSCSSStyleValueCustom.cpp
|
Add some bindings-related bookkeeping to UndoManager and UndoItem
https://bugs.webkit.org/show_bug.cgi?id=193111
<rdar://problem/44807048>
Reviewed by Ryosuke Niwa.
This patch is work in progress towards supporting `UndoManager.addItem()`. Here, we add helper methods to
UndoItem and UndoManager which later patches will exercise, as well as introduce some custom bindings to
properly handle the case where UndoItems are given anonymous JavaScript functions (see below for more details).
No new tests, because there is no script-observable change in behavior yet. When `addItems()` is hooked up, I
will write a test to verify that the undo and redo JavaScript functions survive garbage collection.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSUndoItemCustom.cpp:
(WebCore::JSUndoItem::visitAdditionalChildren):
Have each JSUndoItem visit its undo and redo callback functions to ensure that the JavaScript wrapper objects
for these functions are not garbage collected underneath the item.
(WebCore::JSUndoItemOwner::isReachableFromOpaqueRoots):
Consider the undo item wrapper reachable from opaque roots if it is associated with its UndoManager's Document.
This ensures that if script isn't holding on to a reference to the wrapper (for instance, by calling
`UndoManager.addItem(new UndoItem({ ... }))`), we still protect the corresponding JSUndoItem as long as the
UndoManager's Document is alive. In the case where the undo item is not associated with a document, either (1)
script is keeping a reference to it, in which case it will be trivially reachable, or (2) script won't be able
to observe the destruction of the wrapper anyways (e.g. calling `new UndoItem({ ... })` by itself).
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
Invalidate all undo items when the document is about to go away.
* page/UndoItem.cpp:
(WebCore::UndoItem::setUndoManager):
(WebCore::UndoItem::invalidate):
(WebCore::UndoItem::isValid const):
Add a few helpers, to be used in a future patch. We consider an UndoItem valid if it has been added to an
UndoManager, and is thus associated with a document.
(WebCore::UndoItem::document const):
* page/UndoItem.h:
* page/UndoItem.idl:
* page/UndoManager.cpp:
(WebCore::UndoManager::UndoManager):
(WebCore::UndoManager::addItem):
Have an UndoManager keep its UndoItems alive. These UndoItems remain in this set until either the document will
be destroyed, or the corresponding undo action is no longer needed because the platform undo stack has changed
(this latter behavior is yet to be implemented).
(WebCore::UndoManager::removeItem):
(WebCore::UndoManager::removeAllItems):
* page/UndoManager.h:
(WebCore::UndoManager::UndoManager): Deleted.
* page/scrolling/ScrollingTreeScrollingNode.cpp:
Unified build fix.
Canonical link: https://commits.webkit.org/208215@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-01-23 02:06:53 +00:00
|
|
|
bindings/js/JSUndoItemCustom.cpp
|
2018-01-27 09:26:18 +00:00
|
|
|
bindings/js/JSWebAnimationCustom.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSWebGL2RenderingContextCustom.cpp
|
|
|
|
bindings/js/JSWebGLRenderingContextCustom.cpp
|
2021-03-05 10:50:10 +00:00
|
|
|
bindings/js/JSWebXRReferenceSpaceCustom.cpp
|
2021-03-26 16:41:27 +00:00
|
|
|
bindings/js/JSWebXRRigidTransformCustom.cpp
|
2021-03-05 10:50:10 +00:00
|
|
|
bindings/js/JSWebXRSpaceCustom.cpp
|
2021-03-26 16:41:27 +00:00
|
|
|
bindings/js/JSWebXRViewCustom.cpp
|
2018-04-20 02:15:39 +00:00
|
|
|
bindings/js/JSWindowProxy.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSWorkerGlobalScopeBase.cpp
|
|
|
|
bindings/js/JSWorkerGlobalScopeCustom.cpp
|
2017-11-28 18:22:20 +00:00
|
|
|
bindings/js/JSWorkerNavigatorCustom.cpp
|
2018-11-03 04:01:29 +00:00
|
|
|
bindings/js/JSWorkletGlobalScopeBase.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/JSXMLDocumentCustom.cpp
|
|
|
|
bindings/js/JSXMLHttpRequestCustom.cpp
|
|
|
|
bindings/js/JSXPathResultCustom.cpp
|
|
|
|
bindings/js/ReadableStream.cpp
|
|
|
|
bindings/js/ReadableStreamDefaultController.cpp
|
|
|
|
bindings/js/ScheduledAction.cpp
|
|
|
|
bindings/js/ScriptCachedFrameData.cpp
|
|
|
|
bindings/js/ScriptController.cpp
|
|
|
|
bindings/js/ScriptModuleLoader.cpp
|
|
|
|
bindings/js/ScriptState.cpp
|
2019-09-18 22:10:00 +00:00
|
|
|
bindings/js/ScriptWrappable.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/SerializedScriptValue.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
bindings/js/StructuredClone.cpp
|
2020-10-03 23:51:12 +00:00
|
|
|
bindings/js/WebCoreJITOperations.cpp
|
2017-10-18 19:14:51 +00:00
|
|
|
bindings/js/WebCoreJSClientData.cpp
|
|
|
|
bindings/js/WebCoreTypedArrayController.cpp
|
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/WorkerModuleScriptLoader.cpp
|
2018-04-19 04:02:30 +00:00
|
|
|
bindings/js/WindowProxy.cpp
|
2020-11-20 12:25:32 +00:00
|
|
|
bindings/js/WritableStream.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
bridge/IdentifierRep.cpp
|
|
|
|
bridge/NP_jsobject.cpp
|
|
|
|
bridge/c/CRuntimeObject.cpp
|
|
|
|
bridge/c/c_class.cpp
|
|
|
|
bridge/c/c_instance.cpp
|
|
|
|
bridge/c/c_runtime.cpp
|
|
|
|
bridge/c/c_utility.cpp
|
|
|
|
bridge/jsc/BridgeJSC.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
bridge/npruntime.cpp
|
|
|
|
bridge/runtime_array.cpp
|
|
|
|
bridge/runtime_method.cpp
|
|
|
|
bridge/runtime_object.cpp
|
|
|
|
bridge/runtime_root.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
contentextensions/CombinedFiltersAlphabet.cpp
|
|
|
|
contentextensions/CombinedURLFilters.cpp
|
|
|
|
contentextensions/CompiledContentExtension.cpp
|
|
|
|
contentextensions/ContentExtension.cpp
|
|
|
|
contentextensions/ContentExtensionCompiler.cpp
|
|
|
|
contentextensions/ContentExtensionError.cpp
|
|
|
|
contentextensions/ContentExtensionParser.cpp
|
|
|
|
contentextensions/ContentExtensionRule.cpp
|
|
|
|
contentextensions/ContentExtensionStyleSheet.cpp
|
|
|
|
contentextensions/ContentExtensionsBackend.cpp
|
|
|
|
contentextensions/DFA.cpp
|
|
|
|
contentextensions/DFABytecodeCompiler.cpp
|
|
|
|
contentextensions/DFABytecodeInterpreter.cpp
|
|
|
|
contentextensions/DFACombiner.cpp
|
|
|
|
contentextensions/DFAMinimizer.cpp
|
|
|
|
contentextensions/DFANode.cpp
|
|
|
|
contentextensions/NFA.cpp
|
|
|
|
contentextensions/NFAToDFA.cpp
|
2020-12-04 00:01:23 +00:00
|
|
|
contentextensions/SerializedNFA.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
contentextensions/URLFilterParser.cpp
|
|
|
|
crypto/CryptoAlgorithm.cpp
|
|
|
|
crypto/CryptoAlgorithmRegistry.cpp
|
|
|
|
crypto/CryptoKey.cpp
|
|
|
|
crypto/SubtleCrypto.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmAES_CFB.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmAES_CTR.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmAES_KW.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmECDH.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmECDSA.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmHKDF.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmHMAC.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmPBKDF2.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmSHA1.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmSHA224.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmSHA256.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmSHA384.cpp
|
|
|
|
crypto/algorithms/CryptoAlgorithmSHA512.cpp
|
|
|
|
crypto/keys/CryptoKeyAES.cpp
|
|
|
|
crypto/keys/CryptoKeyEC.cpp
|
|
|
|
crypto/keys/CryptoKeyHMAC.cpp
|
|
|
|
crypto/keys/CryptoKeyRSA.cpp
|
|
|
|
crypto/keys/CryptoKeyRSAComponents.cpp
|
|
|
|
crypto/keys/CryptoKeyRaw.cpp
|
|
|
|
css/BasicShapeFunctions.cpp
|
|
|
|
css/CSSAspectRatioValue.cpp
|
|
|
|
css/CSSBasicShapes.cpp
|
|
|
|
css/CSSBorderImage.cpp
|
|
|
|
css/CSSBorderImageSliceValue.cpp
|
|
|
|
css/CSSCanvasValue.cpp
|
|
|
|
css/CSSComputedStyleDeclaration.cpp
|
2020-09-25 17:19:48 +00:00
|
|
|
css/CSSConditionRule.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/CSSContentDistributionValue.cpp
|
[css-counter-styles] Parse and add feature flag for @counter-style
https://bugs.webkit.org/show_bug.cgi?id=223150
Patch by Tyler Wilcock <twilco.o@protonmail.com> on 2021-04-16
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
@counter-style and its descriptors are now exposed behind a feature
flag, so pass some tests and fail others for a different reason
because this patch doesn't actually implement descriptor parsing and
setting yet.
* web-platform-tests/css/css-counter-styles/counter-style-additive-symbols-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-fallback-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-name-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-negative-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-pad-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-prefix-suffix-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-range-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-speak-as-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-symbols-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-system-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/idlharness-expected.txt:
* web-platform-tests/css/cssom/CSSCounterStyleRule-expected.txt:
Source/WebCore:
Parse @counter-style (without implementing descriptor parsing) behind
a new feature flag, CSSCounterStyleAtRulesEnabled. A separate feature
flag for @counter-style <image> symbol values has also been added, as
image symbols have extra complexities that we won't want to hold the
entire feature back on.
https://www.w3.org/TR/css-counter-styles-3
The CSSCounterStyleRule IDL interface is also added and implemented,
and similarly feature flagged.
https://www.w3.org/TR/css-counter-styles-3/#apis
Test: webexposed/counter-style-is-not-exposed.html and existing WPTs.
* CMakeLists.txt:
Add CSSCounterStyleRule.idl.
* DerivedSources-input.xcfilelist:
Add CSSCounterStyleRule.idl.
* DerivedSources-output.xcfilelist:
Add JSCSSCounterStyleRule.h and JSCSSCounterStyleRule.cpp.
* DerivedSources.make:
Add CSSCounterStyleRule.idl.
* Sources.txt:
Add CSSCounterStyleRule.cpp and JSCSSCounterStyleRule.cpp.
* WebCore.xcodeproj/project.pbxproj:
Add CounterStyle.h, CounterStyle.cpp, and CounterStyle.idl.
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
Support CSSCounterStyleRule.
* bindings/js/WebCoreBuiltinNames.h:
Add macro(CSSCounterStyleRule) to generate counter-style built-in
names.
* css/CSSCounterStyleRule.cpp: Added.
(WebCore::StyleRuleCounterStyle::StyleRuleCounterStyle):
(WebCore::StyleRuleCounterStyle::create):
(WebCore::StyleRuleCounterStyle::mutableProperties):
(WebCore::CSSCounterStyleRule::CSSCounterStyleRule):
(WebCore::CSSCounterStyleRule::reattach):
(WebCore::CSSCounterStyleRule::cssText const):
* css/CSSCounterStyleRule.h: Added.
(isType): Add specialized rule.isCounterStyleRule() implementation.
* css/CSSCounterStyleRule.idl: Added.
* css/CSSRule.cpp: Add new StyleRuleType::CounterStyle COMPILE_ASSERT.
* css/CSSRule.h:
Add COUNTER_STYLE_RULE constant. Also add comment `// WebIDL enum` to
disable enum_casing lint, since these values are named to match IDL
attributes.
* css/CSSRule.idl: Add COUNTER_STYLE_RULE constant behind flag.
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy const):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
Handle newly added StyleRuleType::CounterStyle.
* css/StyleRule.h:
(WebCore::StyleRuleBase::isCounterStyleRule const): Added.
* css/StyleRuleType.h: Add StyleRuleType::CounterStyle
* css/StyleSheetContents.cpp:
(WebCore::traverseRulesInVector):
(WebCore::StyleSheetContents::traverseSubresources const):
If @counter-style image symbols flag is enabled, do traverse
subresources.
* css/parser/CSSAtRuleID.cpp:
If the @counter-style feature flag is enabled, return newly added
CSSAtRuleCounterStyle ID.
(WebCore::cssAtRuleID):
* css/parser/CSSAtRuleID.h:
Add CSSAtRuleCounterStyle ID.
* css/parser/CSSParserContext.cpp:
(WebCore::operator==):
* css/parser/CSSParserContext.h:
(WebCore::CSSParserContextHash::hash):
Add cssCounterStyleAtRulesEnabled and
cssCounterStyleAtRuleImageSymbolsEnabled flags.
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
Refactor to use new CSSPropertyParserHelpers::isPredefinedCounterStyle
method.
* css/parser/CSSParserImpl.cpp:
(WebCore::computeNewAllowedRules):
(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeCounterStyleRule): Added.
(WebCore::CSSParserImpl::consumeDeclarationList):
(WebCore::CSSParserImpl::consumeDeclaration):
* css/parser/CSSParserImpl.h:
Handle new @counter-style rule.
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseValue): Handle
StyleRuleType::CounterStyle.
(WebCore::consumeCounterContent):
Refactor to use new CSSPropertyParserHelpers::isPredefinedCounterStyle
method.
(WebCore::CSSPropertyParser::parseCounterStyleDescriptor):
Add placeholder for future @counter-style descriptor parsing work.
* css/parser/CSSPropertyParser.h:
Add parseCounterStyleDescriptor method
* css/parser/CSSPropertyParserHelpers.h:
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
Add new flag that allows consumed custom ident values to be lowercased
on-parse. This is necessary for some <counter-style-name> values.
(WebCore::CSSPropertyParserHelpers::isPredefinedCounterStyle): Added.
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleName):
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleNameInPrelude):
Parse @counter-style names, both in-prelude names and non-prelude
names (e.g. as part of the `extends` descriptor).
Source/WTF:
* Scripts/Preferences/WebPreferencesExperimental.yaml:
Add CSSCounterStyleAtRulesEnabled and CSSCounterStyleAtRuleImageSymbolsEnabled flags.
Tools:
* DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):
Add `false` defaults for CSSCounterStyleAtRulesEnabled and
CSSCounterStyleAtRuleImageSymbolsEnabled flags.
LayoutTests:
Add tests ensuring @counter-style is not exposed when feature flag is
disabled.
* webexposed/counter-style-is-not-exposed-expected.txt: Added.
* webexposed/counter-style-is-not-exposed.html: Added.
Canonical link: https://commits.webkit.org/236643@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-16 19:19:04 +00:00
|
|
|
css/CSSCounterStyleRule.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/CSSCrossfadeValue.cpp
|
|
|
|
css/CSSCursorImageValue.cpp
|
|
|
|
css/CSSCustomPropertyValue.cpp
|
|
|
|
css/CSSFilterImageValue.cpp
|
|
|
|
css/CSSFontFace.cpp
|
|
|
|
css/CSSFontFaceRule.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
css/CSSFontFaceSet.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/CSSFontFaceSource.cpp
|
|
|
|
css/CSSFontFaceSrcValue.cpp
|
|
|
|
css/CSSFontFeatureValue.cpp
|
|
|
|
css/CSSFontSelector.cpp
|
|
|
|
css/CSSFontStyleRangeValue.cpp
|
|
|
|
css/CSSFontStyleValue.cpp
|
|
|
|
css/CSSFontValue.cpp
|
|
|
|
css/CSSFontVariationValue.cpp
|
|
|
|
css/CSSFunctionValue.cpp
|
|
|
|
css/CSSGradientValue.cpp
|
|
|
|
css/CSSGridAutoRepeatValue.cpp
|
2019-05-27 21:27:15 +00:00
|
|
|
css/CSSGridIntegerRepeatValue.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/CSSGridLineNamesValue.cpp
|
|
|
|
css/CSSGridTemplateAreasValue.cpp
|
|
|
|
css/CSSGroupingRule.cpp
|
|
|
|
css/CSSImageGeneratorValue.cpp
|
|
|
|
css/CSSImageSetValue.cpp
|
|
|
|
css/CSSImageValue.cpp
|
|
|
|
css/CSSImportRule.cpp
|
|
|
|
css/CSSInheritedValue.cpp
|
|
|
|
css/CSSInitialValue.cpp
|
|
|
|
css/CSSKeyframeRule.cpp
|
|
|
|
css/CSSKeyframesRule.cpp
|
|
|
|
css/CSSLineBoxContainValue.cpp
|
|
|
|
css/CSSMarkup.cpp
|
|
|
|
css/CSSMediaRule.cpp
|
|
|
|
css/CSSNamedImageValue.cpp
|
|
|
|
css/CSSNamespaceRule.cpp
|
|
|
|
css/CSSPageRule.cpp
|
2018-10-18 02:47:00 +00:00
|
|
|
css/CSSPaintImageValue.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/CSSPrimitiveValue.cpp
|
|
|
|
css/CSSProperty.cpp
|
|
|
|
css/CSSPropertySourceData.cpp
|
|
|
|
css/CSSReflectValue.cpp
|
2018-10-04 06:23:02 +00:00
|
|
|
css/CSSRegisteredCustomProperty.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/CSSRevertValue.cpp
|
|
|
|
css/CSSRule.cpp
|
|
|
|
css/CSSRuleList.cpp
|
|
|
|
css/CSSSegmentedFontFace.cpp
|
|
|
|
css/CSSSelector.cpp
|
|
|
|
css/CSSSelectorList.cpp
|
|
|
|
css/CSSShadowValue.cpp
|
|
|
|
css/CSSStyleDeclaration.cpp
|
|
|
|
css/CSSStyleRule.cpp
|
|
|
|
css/CSSStyleSheet.cpp
|
|
|
|
css/CSSSupportsRule.cpp
|
|
|
|
css/CSSTimingFunctionValue.cpp
|
|
|
|
css/CSSToLengthConversionData.cpp
|
|
|
|
css/CSSToStyleMap.cpp
|
|
|
|
css/CSSUnicodeRangeValue.cpp
|
2019-11-13 06:51:57 +00:00
|
|
|
css/CSSUnits.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/CSSUnsetValue.cpp
|
|
|
|
css/CSSValue.cpp
|
|
|
|
css/CSSValueList.cpp
|
2021-03-17 02:12:13 +00:00
|
|
|
css/CSSValuePair.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/CSSValuePool.cpp
|
|
|
|
css/CSSVariableData.cpp
|
|
|
|
css/CSSVariableReferenceValue.cpp
|
|
|
|
css/DOMCSSNamespace.cpp
|
2018-10-16 18:04:43 +00:00
|
|
|
css/DOMCSSPaintWorklet.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
css/DOMCSSRegisterCustomProperty.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/DOMMatrix.cpp
|
|
|
|
css/DOMMatrixReadOnly.cpp
|
|
|
|
css/DeprecatedCSSOMPrimitiveValue.cpp
|
|
|
|
css/DeprecatedCSSOMValue.cpp
|
|
|
|
css/DeprecatedCSSOMValueList.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
css/FontFace.cpp
|
|
|
|
css/FontFaceSet.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/FontVariantBuilder.cpp
|
|
|
|
css/LengthFunctions.cpp
|
|
|
|
css/MediaFeatureNames.cpp
|
|
|
|
css/MediaList.cpp
|
|
|
|
css/MediaQuery.cpp
|
|
|
|
css/MediaQueryEvaluator.cpp
|
|
|
|
css/MediaQueryExpression.cpp
|
|
|
|
css/MediaQueryList.cpp
|
2020-04-17 10:16:36 +00:00
|
|
|
css/MediaQueryListEvent.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/MediaQueryMatcher.cpp
|
2018-03-16 01:12:39 +00:00
|
|
|
css/MediaQueryParserContext.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/PropertySetCSSStyleDeclaration.cpp
|
|
|
|
css/SVGCSSComputedStyleDeclaration.cpp
|
|
|
|
css/SelectorChecker.cpp
|
|
|
|
css/SelectorFilter.cpp
|
|
|
|
css/StyleColor.cpp
|
|
|
|
css/StyleMedia.cpp
|
|
|
|
css/StyleProperties.cpp
|
|
|
|
css/StylePropertyShorthand.cpp
|
|
|
|
css/StyleRule.cpp
|
|
|
|
css/StyleRuleImport.cpp
|
|
|
|
css/StyleSheet.cpp
|
|
|
|
css/StyleSheetContents.cpp
|
|
|
|
css/StyleSheetList.cpp
|
|
|
|
css/TransformFunctions.cpp
|
2021-05-30 00:51:26 +00:00
|
|
|
css/calc/CSSCalcCategoryMapping.cpp
|
|
|
|
css/calc/CSSCalcExpressionNode.cpp
|
|
|
|
css/calc/CSSCalcExpressionNodeParser.cpp
|
|
|
|
css/calc/CSSCalcInvertNode.cpp
|
|
|
|
css/calc/CSSCalcNegateNode.cpp
|
|
|
|
css/calc/CSSCalcOperationNode.cpp
|
|
|
|
css/calc/CSSCalcPrimitiveValueNode.cpp
|
2021-06-01 13:50:16 +00:00
|
|
|
css/calc/CSSCalcSymbolTable.cpp
|
2021-05-30 00:51:26 +00:00
|
|
|
css/calc/CSSCalcValue.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/parser/CSSAtRuleID.cpp
|
|
|
|
css/parser/CSSDeferredParser.cpp
|
|
|
|
css/parser/CSSParser.cpp
|
2018-07-05 15:46:25 +00:00
|
|
|
css/parser/CSSParserContext.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/parser/CSSParserFastPaths.cpp
|
|
|
|
css/parser/CSSParserIdioms.cpp
|
|
|
|
css/parser/CSSParserImpl.cpp
|
|
|
|
css/parser/CSSParserObserverWrapper.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
css/parser/CSSParserSelector.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/parser/CSSParserToken.cpp
|
|
|
|
css/parser/CSSParserTokenRange.cpp
|
|
|
|
css/parser/CSSPropertyParser.cpp
|
|
|
|
css/parser/CSSPropertyParserHelpers.cpp
|
2021-04-15 11:14:07 +00:00
|
|
|
css/parser/CSSPropertyParserWorkerSafe.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
css/parser/CSSSelectorParser.cpp
|
|
|
|
css/parser/CSSSupportsParser.cpp
|
|
|
|
css/parser/CSSTokenizer.cpp
|
|
|
|
css/parser/CSSTokenizerInputStream.cpp
|
|
|
|
css/parser/CSSVariableParser.cpp
|
|
|
|
css/parser/MediaQueryBlockWatcher.cpp
|
|
|
|
css/parser/MediaQueryParser.cpp
|
|
|
|
css/parser/SizesAttributeParser.cpp
|
|
|
|
css/parser/SizesCalcParser.cpp
|
2018-12-18 18:51:05 +00:00
|
|
|
css/typedom/StylePropertyMapReadOnly.cpp
|
2021-08-12 15:47:18 +00:00
|
|
|
css/typedom/CSSStyleImageValue.cpp
|
|
|
|
css/typedom/CSSNumericValue.cpp
|
|
|
|
css/typedom/CSSStyleValue.cpp
|
|
|
|
css/typedom/CSSUnitValue.cpp
|
|
|
|
css/typedom/CSSUnparsedValue.cpp
|
2017-10-24 00:08:40 +00:00
|
|
|
cssjit/SelectorCompiler.cpp
|
2020-12-07 00:35:56 +00:00
|
|
|
display/compositing/DisplayLayerController.cpp
|
2020-09-23 23:39:29 +00:00
|
|
|
display/css/DisplayBox.cpp
|
2020-11-28 05:17:21 +00:00
|
|
|
display/css/DisplayBoxClip.cpp
|
2020-10-25 04:27:10 +00:00
|
|
|
display/css/DisplayBoxDecorationData.cpp
|
2020-11-07 21:50:44 +00:00
|
|
|
display/css/DisplayBoxDecorationPainter.cpp
|
2020-10-25 20:26:01 +00:00
|
|
|
display/css/DisplayBoxFactory.cpp
|
2020-10-12 17:03:10 +00:00
|
|
|
display/css/DisplayBoxModelBox.cpp
|
2020-10-25 21:34:47 +00:00
|
|
|
display/css/DisplayBoxPainter.cpp
|
2020-11-29 04:05:09 +00:00
|
|
|
display/css/DisplayBoxRareGeometry.cpp
|
2020-09-23 23:39:29 +00:00
|
|
|
display/css/DisplayContainerBox.cpp
|
|
|
|
display/css/DisplayCSSPainter.cpp
|
2020-10-25 04:27:10 +00:00
|
|
|
display/css/DisplayFillLayerImageGeometry.cpp
|
2020-09-23 23:39:29 +00:00
|
|
|
display/css/DisplayImageBox.cpp
|
|
|
|
display/css/DisplayReplacedBox.cpp
|
2020-12-05 18:53:41 +00:00
|
|
|
display/css/DisplayStackingItem.cpp
|
2020-09-23 23:39:29 +00:00
|
|
|
display/css/DisplayStyle.cpp
|
2020-09-30 05:56:10 +00:00
|
|
|
display/css/DisplayTextBox.cpp
|
2020-09-23 23:39:29 +00:00
|
|
|
display/DisplayTree.cpp
|
|
|
|
display/DisplayTreeBuilder.cpp
|
2020-09-20 19:21:31 +00:00
|
|
|
display/DisplayView.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/AbortController.cpp
|
|
|
|
dom/AbortSignal.cpp
|
2020-10-17 20:33:53 +00:00
|
|
|
dom/AbstractRange.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/ActiveDOMCallback.cpp
|
|
|
|
dom/ActiveDOMObject.cpp
|
2019-04-04 19:07:53 +00:00
|
|
|
dom/AllDescendantsCollection.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/AnimationEvent.cpp
|
|
|
|
dom/Attr.cpp
|
2019-09-18 22:10:00 +00:00
|
|
|
dom/BeforeLoadEvent.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/BeforeTextInsertedEvent.cpp
|
|
|
|
dom/BeforeUnloadEvent.cpp
|
2020-11-11 00:41:21 +00:00
|
|
|
dom/BoundaryPoint.cpp
|
2021-07-16 00:36:39 +00:00
|
|
|
dom/BroadcastChannel.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/CDATASection.cpp
|
|
|
|
dom/CharacterData.cpp
|
|
|
|
dom/ChildListMutationScope.cpp
|
|
|
|
dom/ChildNodeList.cpp
|
|
|
|
dom/ClassCollection.cpp
|
|
|
|
dom/ClipboardEvent.cpp
|
|
|
|
dom/CollectionIndexCache.cpp
|
|
|
|
dom/Comment.cpp
|
|
|
|
dom/ComposedTreeIterator.cpp
|
|
|
|
dom/CompositionEvent.cpp
|
|
|
|
dom/ConstantPropertyMap.cpp
|
|
|
|
dom/ContainerNode.cpp
|
|
|
|
dom/ContainerNodeAlgorithms.cpp
|
|
|
|
dom/ContextDestructionObserver.cpp
|
|
|
|
dom/CustomElementReactionQueue.cpp
|
|
|
|
dom/CustomElementRegistry.cpp
|
|
|
|
dom/CustomEvent.cpp
|
|
|
|
dom/DOMException.cpp
|
|
|
|
dom/DOMImplementation.cpp
|
|
|
|
dom/DOMPointReadOnly.cpp
|
|
|
|
dom/DOMQuad.cpp
|
|
|
|
dom/DOMRectList.cpp
|
2019-04-04 19:07:53 +00:00
|
|
|
dom/DOMRectReadOnly.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/DOMStringList.cpp
|
|
|
|
dom/DataTransfer.cpp
|
|
|
|
dom/DataTransferItem.cpp
|
|
|
|
dom/DataTransferItemList.cpp
|
|
|
|
dom/DatasetDOMStringMap.cpp
|
|
|
|
dom/DecodedDataDocumentParser.cpp
|
|
|
|
dom/DeviceMotionController.cpp
|
|
|
|
dom/DeviceMotionData.cpp
|
|
|
|
dom/DeviceMotionEvent.cpp
|
2019-03-09 00:30:45 +00:00
|
|
|
dom/DeviceOrientationAndMotionAccessController.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/DeviceOrientationController.cpp
|
|
|
|
dom/DeviceOrientationData.cpp
|
|
|
|
dom/DeviceOrientationEvent.cpp
|
|
|
|
dom/Document.cpp
|
2021-04-12 09:26:42 +00:00
|
|
|
dom/DocumentFontLoader.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/DocumentFragment.cpp
|
|
|
|
dom/DocumentMarkerController.cpp
|
|
|
|
dom/DocumentParser.cpp
|
|
|
|
dom/DocumentSharedObjectPool.cpp
|
2019-05-07 19:55:29 +00:00
|
|
|
dom/DocumentStorageAccess.cpp
|
2017-10-24 17:05:23 +00:00
|
|
|
dom/DocumentTouch.cpp @no-unify
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/DocumentType.cpp
|
2020-01-04 07:05:25 +00:00
|
|
|
dom/DragEvent.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/Element.cpp
|
|
|
|
dom/ElementData.cpp
|
|
|
|
dom/ElementRareData.cpp
|
|
|
|
dom/ErrorEvent.cpp
|
|
|
|
dom/Event.cpp
|
|
|
|
dom/EventContext.cpp
|
|
|
|
dom/EventDispatcher.cpp
|
|
|
|
dom/EventListenerMap.cpp
|
2019-11-19 21:57:52 +00:00
|
|
|
dom/EventLoop.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/EventNames.cpp
|
|
|
|
dom/EventPath.cpp
|
|
|
|
dom/EventTarget.cpp
|
2020-02-17 01:41:27 +00:00
|
|
|
dom/EventTargetConcrete.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/ExceptionData.cpp
|
|
|
|
dom/ExtensionStyleSheets.cpp
|
|
|
|
dom/FocusEvent.cpp
|
2021-07-26 20:15:49 +00:00
|
|
|
dom/FormDataEvent.cpp
|
2019-04-18 22:16:54 +00:00
|
|
|
dom/FullscreenManager.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
dom/GCReachableRef.cpp
|
2019-09-18 22:10:00 +00:00
|
|
|
dom/HashChangeEvent.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/IdTargetObserver.cpp
|
|
|
|
dom/IdTargetObserverRegistry.cpp
|
2019-10-08 06:22:46 +00:00
|
|
|
dom/IdleCallbackController.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
dom/IdleDeadline.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/InlineClassicScript.cpp
|
|
|
|
dom/InlineStyleSheetOwner.cpp
|
|
|
|
dom/InputEvent.cpp
|
|
|
|
dom/KeyboardEvent.cpp
|
|
|
|
dom/LiveNodeList.cpp
|
|
|
|
dom/LoadableClassicScript.cpp
|
|
|
|
dom/LoadableModuleScript.cpp
|
|
|
|
dom/LoadableScript.cpp
|
|
|
|
dom/MessageChannel.cpp
|
|
|
|
dom/MessageEvent.cpp
|
|
|
|
dom/MessagePort.cpp
|
|
|
|
dom/Microtasks.cpp
|
|
|
|
dom/MouseEvent.cpp
|
|
|
|
dom/MouseRelatedEvent.cpp
|
|
|
|
dom/MutationEvent.cpp
|
|
|
|
dom/MutationObserver.cpp
|
|
|
|
dom/MutationObserverInterestGroup.cpp
|
|
|
|
dom/MutationObserverRegistration.cpp
|
|
|
|
dom/MutationRecord.cpp
|
|
|
|
dom/NameNodeList.cpp
|
|
|
|
dom/NamedNodeMap.cpp
|
|
|
|
dom/NativeNodeFilter.cpp
|
|
|
|
dom/Node.cpp
|
|
|
|
dom/NodeFilterCondition.cpp
|
|
|
|
dom/NodeIterator.cpp
|
2019-04-04 19:07:53 +00:00
|
|
|
dom/NodeList.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/NodeRareData.cpp
|
|
|
|
dom/NodeTraversal.cpp
|
|
|
|
dom/OverflowEvent.cpp
|
|
|
|
dom/PageTransitionEvent.cpp
|
|
|
|
dom/PendingScript.cpp
|
2018-09-22 00:51:47 +00:00
|
|
|
dom/PointerEvent.cpp
|
2021-02-23 03:16:32 +00:00
|
|
|
dom/PointerEventTypeNames.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/PopStateEvent.cpp
|
|
|
|
dom/Position.cpp
|
|
|
|
dom/PositionIterator.cpp
|
|
|
|
dom/ProcessingInstruction.cpp
|
|
|
|
dom/ProgressEvent.cpp
|
|
|
|
dom/PromiseRejectionEvent.cpp
|
|
|
|
dom/PseudoElement.cpp
|
|
|
|
dom/QualifiedName.cpp
|
|
|
|
dom/QualifiedNameCache.cpp
|
|
|
|
dom/RadioButtonGroups.cpp
|
|
|
|
dom/Range.cpp
|
|
|
|
dom/RejectedPromiseTracker.cpp
|
|
|
|
dom/ScopedEventQueue.cpp
|
|
|
|
dom/ScriptElement.cpp
|
|
|
|
dom/ScriptElementCachedScriptFetcher.cpp
|
|
|
|
dom/ScriptExecutionContext.cpp
|
|
|
|
dom/ScriptRunner.cpp
|
|
|
|
dom/ScriptableDocumentParser.cpp
|
|
|
|
dom/ScriptedAnimationController.cpp
|
|
|
|
dom/SecurityContext.cpp
|
|
|
|
dom/SecurityOriginPolicy.cpp
|
2019-09-18 22:10:00 +00:00
|
|
|
dom/SecurityPolicyViolationEvent.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/SelectorQuery.cpp
|
|
|
|
dom/ShadowRoot.cpp
|
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.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/SimulatedClick.cpp
|
|
|
|
dom/SlotAssignment.cpp
|
|
|
|
dom/SpaceSplitString.cpp
|
|
|
|
dom/StaticNodeList.cpp
|
|
|
|
dom/StaticRange.cpp
|
|
|
|
dom/StringCallback.cpp
|
|
|
|
dom/StyledElement.cpp
|
|
|
|
dom/TagCollection.cpp
|
2018-03-17 06:11:00 +00:00
|
|
|
dom/TemplateContentDocumentFragment.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/Text.cpp
|
|
|
|
dom/TextDecoder.cpp
|
2020-08-31 09:01:55 +00:00
|
|
|
dom/TextDecoderStreamDecoder.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/TextEncoder.cpp
|
2020-08-30 09:53:17 +00:00
|
|
|
dom/TextEncoderStreamEncoder.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/TextEvent.cpp
|
|
|
|
dom/TextNodeTraversal.cpp
|
2017-10-24 17:05:23 +00:00
|
|
|
dom/Touch.cpp @no-unify
|
|
|
|
dom/TouchEvent.cpp @no-unify
|
|
|
|
dom/TouchList.cpp @no-unify
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/TransformSourceLibxslt.cpp
|
|
|
|
dom/TransitionEvent.cpp
|
|
|
|
dom/Traversal.cpp
|
|
|
|
dom/TreeScope.cpp
|
2018-05-04 23:52:43 +00:00
|
|
|
dom/TreeScopeOrderedMap.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
dom/TreeWalker.cpp
|
|
|
|
dom/UIEvent.cpp
|
|
|
|
dom/UIEventWithKeyState.cpp
|
|
|
|
dom/UserActionElementSet.cpp
|
|
|
|
dom/UserGestureIndicator.cpp
|
|
|
|
dom/UserTypingGestureIndicator.cpp
|
|
|
|
dom/ViewportArguments.cpp
|
|
|
|
dom/VisitedLinkState.cpp
|
|
|
|
dom/WebKitAnimationEvent.cpp
|
|
|
|
dom/WebKitTransitionEvent.cpp
|
|
|
|
dom/WheelEvent.cpp
|
2019-10-12 20:34:07 +00:00
|
|
|
dom/WindowEventLoop.cpp
|
2018-03-17 06:11:00 +00:00
|
|
|
dom/XMLDocument.cpp
|
2018-01-19 06:33:11 +00:00
|
|
|
dom/messageports/MessagePortChannel.cpp
|
|
|
|
dom/messageports/MessagePortChannelProvider.cpp
|
|
|
|
dom/messageports/MessagePortChannelProviderImpl.cpp
|
|
|
|
dom/messageports/MessagePortChannelRegistry.cpp
|
|
|
|
dom/messageports/MessageWithMessagePorts.cpp
|
2019-09-02 09:31:14 +00:00
|
|
|
dom/messageports/WorkerMessagePortChannelProvider.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
domjit/DOMJITHelpers.cpp
|
|
|
|
domjit/JSDocumentDOMJIT.cpp
|
|
|
|
domjit/JSDocumentFragmentDOMJIT.cpp
|
|
|
|
domjit/JSElementDOMJIT.cpp
|
|
|
|
domjit/JSEventDOMJIT.cpp
|
|
|
|
domjit/JSNodeDOMJIT.cpp
|
|
|
|
editing/AlternativeTextController.cpp
|
|
|
|
editing/AppendNodeCommand.cpp
|
|
|
|
editing/ApplyBlockElementCommand.cpp
|
|
|
|
editing/ApplyStyleCommand.cpp
|
|
|
|
editing/BreakBlockquoteCommand.cpp
|
Implement a new edit command to change the enclosing list type
https://bugs.webkit.org/show_bug.cgi?id=191487
<rdar://problem/45955922>
Reviewed by Ryosuke Niwa.
Source/WebCore:
Add support for a new edit command that changes the type of the enclosing list element around the selection from
unordered to ordered list and vice versa. This new edit command is exposed only to internal WebKit2 clients, via
SPI on WKWebView (`-_changeListType:`).
This is currently intended for use in Mail compose, but may also be adopted by legacy Notes in the future. As
such, the behavior of this editing command mostly matches shipping behavior in Mail compose (which is currently
implemented entirely by Mail). See below for more details.
Test: editing/execCommand/change-list-type.html
WKWebViewEditActions.ChangeListType
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* editing/ChangeListTypeCommand.cpp: Added.
(WebCore::listConversionTypeForSelection):
(WebCore::ChangeListTypeCommand::listConversionType):
Helper that returns a potential list conversion command that may be executed at the given document's selection,
if any exists. We also use existing logic from Mail here to determine which list to change, by walking up the
DOM from the lowest common ancestor container of the current selection until we hit the first list element.
(WebCore::ChangeListTypeCommand::createNewList):
Helper method to create a new list element to replace the given list, and then clone element data from the given
list to the new list. This addresses an existing bug in Mail, wherein changing list type for an enclosing list
which contains inline style properties drops the inline styles, because existing logic in Mail that implements
this editing command only copies the `class` attribute of the old list to the new list.
(WebCore::ChangeListTypeCommand::doApply):
Apply the edit command by running the following steps:
- Find the enclosing list element, if any (see above).
- Create a new list element of the opposite type as the enclosing list, and clone over element data from the
list element being replaced.
- Insert the new list next to the original list.
- Move all children of the original list to the new list.
- Remove the original list.
- Set the selection to the end of the new list.
* editing/ChangeListTypeCommand.h: Added.
* editing/EditAction.h:
Add a pair of new edit actions for conversion from unordered list to ordered list and vice versa.
* editing/Editor.cpp:
(WebCore::Editor::changeSelectionListType):
Implement this by creating and applying a new ChangeListTypeCommand.
(WebCore::Editor::canChangeSelectionListType): Deleted.
Remove this for now, since there's no need for it until full support for edit command validation is implemented.
* editing/Editor.h:
* testing/Internals.cpp:
(WebCore::Internals::changeSelectionListType):
* testing/Internals.h:
* testing/Internals.idl:
Add internal hooks to change list type from layout tests.
Source/WebKit:
* UIProcess/WebEditCommandProxy.cpp:
(WebKit::WebEditCommandProxy::nameForEditAction):
Add undo/redo edit action strings for ConvertToOrderedList and ConvertToUnorderedList.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::increaseListLevel):
(WebKit::WebPage::decreaseListLevel):
(WebKit::WebPage::changeListType):
Remove preflight checks for these list editing commands. These are not necessary because these commands fall
back to being noops if these checks return false. This avoids an extraneous ancestor walk to determine the
enclosing list element when changing list type.
Source/WebKitLegacy/mac:
Add undo/redo edit action strings for ConvertToOrderedList and ConvertToUnorderedList.
* WebCoreSupport/WebEditorClient.mm:
(undoNameForEditAction):
Tools:
Add a new API test to verify that `-[WKWebView _changeListType:]` is hooked up to the corresponding editing
command in WebCore. See the new layout test for a test that exercises more nuanced corner cases.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm:
(-[TestWKWebView setPosition:offset:]):
(-[TestWKWebView setBase:baseOffset:extent:extentOffset:]):
(TestWebKitAPI::webViewForEditActionTestingWithPageNamed):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/editable-nested-lists.html: Added.
LayoutTests:
Add a new layout test to verify that the list change type editing command can be used to swap between enclosing
ordered and unordered lists. Also exercises undo, redo, changing list types under `pre` and `table` elements,
and handling selection within nested list elements.
* editing/execCommand/change-list-type-expected.txt: Added.
* editing/execCommand/change-list-type.html: Added.
Canonical link: https://commits.webkit.org/206294@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-12 01:39:27 +00:00
|
|
|
editing/ChangeListTypeCommand.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
editing/CompositeEditCommand.cpp
|
|
|
|
editing/CreateLinkCommand.cpp
|
2019-01-23 06:10:45 +00:00
|
|
|
editing/CustomUndoStep.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
editing/DeleteFromTextNodeCommand.cpp
|
|
|
|
editing/DeleteSelectionCommand.cpp
|
|
|
|
editing/DictationCommand.cpp
|
2019-01-04 19:56:51 +00:00
|
|
|
editing/EditAction.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
editing/EditCommand.cpp
|
|
|
|
editing/Editing.cpp
|
|
|
|
editing/EditingStyle.cpp
|
|
|
|
editing/Editor.cpp
|
|
|
|
editing/EditorCommand.cpp
|
2018-09-07 22:53:50 +00:00
|
|
|
editing/FontAttributeChanges.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
editing/FormatBlockCommand.cpp
|
|
|
|
editing/FrameSelection.cpp
|
|
|
|
editing/HTMLInterchange.cpp
|
|
|
|
editing/IndentOutdentCommand.cpp
|
|
|
|
editing/InsertIntoTextNodeCommand.cpp
|
|
|
|
editing/InsertLineBreakCommand.cpp
|
|
|
|
editing/InsertListCommand.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
editing/InsertNestedListCommand.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
editing/InsertNodeBeforeCommand.cpp
|
|
|
|
editing/InsertParagraphSeparatorCommand.cpp
|
|
|
|
editing/InsertTextCommand.cpp
|
|
|
|
editing/MarkupAccumulator.cpp
|
|
|
|
editing/MergeIdenticalElementsCommand.cpp
|
|
|
|
editing/ModifySelectionListLevel.cpp
|
|
|
|
editing/MoveSelectionCommand.cpp
|
|
|
|
editing/RemoveFormatCommand.cpp
|
|
|
|
editing/RemoveNodeCommand.cpp
|
|
|
|
editing/RemoveNodePreservingChildrenCommand.cpp
|
|
|
|
editing/RenderedPosition.cpp
|
|
|
|
editing/ReplaceNodeWithSpanCommand.cpp
|
|
|
|
editing/ReplaceRangeWithTextCommand.cpp
|
|
|
|
editing/ReplaceSelectionCommand.cpp
|
|
|
|
editing/SetNodeAttributeCommand.cpp
|
|
|
|
editing/SetSelectionCommand.cpp
|
|
|
|
editing/SimplifyMarkupCommand.cpp
|
|
|
|
editing/SmartReplace.cpp
|
|
|
|
editing/SpellChecker.cpp
|
|
|
|
editing/SpellingCorrectionCommand.cpp
|
|
|
|
editing/SplitElementCommand.cpp
|
|
|
|
editing/SplitTextNodeCommand.cpp
|
|
|
|
editing/SplitTextNodeContainingElementCommand.cpp
|
|
|
|
editing/TextCheckingHelper.cpp
|
|
|
|
editing/TextInsertionBaseCommand.cpp
|
|
|
|
editing/TextIterator.cpp
|
2019-10-25 00:08:13 +00:00
|
|
|
editing/TextManipulationController.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
editing/TypingCommand.cpp
|
|
|
|
editing/UnlinkCommand.cpp
|
|
|
|
editing/VisiblePosition.cpp
|
|
|
|
editing/VisibleSelection.cpp
|
|
|
|
editing/VisibleUnits.cpp
|
|
|
|
editing/WebContentReader.cpp
|
|
|
|
editing/WebCorePasteboardFileReader.cpp
|
|
|
|
editing/WrapContentsInDummySpanCommand.cpp
|
|
|
|
editing/markup.cpp
|
|
|
|
fileapi/AsyncFileStream.cpp
|
|
|
|
fileapi/Blob.cpp
|
|
|
|
fileapi/BlobBuilder.cpp
|
|
|
|
fileapi/BlobCallback.cpp
|
|
|
|
fileapi/BlobURL.cpp
|
|
|
|
fileapi/File.cpp
|
|
|
|
fileapi/FileList.cpp
|
|
|
|
fileapi/FileReader.cpp
|
|
|
|
fileapi/FileReaderLoader.cpp
|
|
|
|
fileapi/FileReaderSync.cpp
|
2019-09-04 16:46:55 +00:00
|
|
|
fileapi/NetworkSendQueue.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
fileapi/ThreadableBlobRegistry.cpp
|
2019-10-17 01:44:16 +00:00
|
|
|
history/BackForwardCache.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
history/BackForwardController.cpp
|
2019-12-05 20:20:48 +00:00
|
|
|
history/BackForwardItemIdentifier.cpp
|
2017-10-24 00:27:34 +00:00
|
|
|
history/CachedFrame.cpp
|
|
|
|
history/CachedPage.cpp
|
|
|
|
history/HistoryItem.cpp
|
2020-01-07 10:48:45 +00:00
|
|
|
html/Autocapitalize.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/Autofill.cpp
|
|
|
|
html/BaseButtonInputType.cpp
|
|
|
|
html/BaseCheckableInputType.cpp
|
|
|
|
html/BaseClickableWithKeyInputType.cpp
|
|
|
|
html/BaseDateAndTimeInputType.cpp
|
|
|
|
html/BaseTextInputType.cpp
|
|
|
|
html/ButtonInputType.cpp
|
Add a base class for HTMLCanvasElement and OffscreenCanvas
https://bugs.webkit.org/show_bug.cgi?id=179701
<rdar://problem/35545195>
Reviewed by Sam Weinig.
In order for OffscreenCanvas to be able to create a WebGLRenderingContext,
there needs to be a shared base class with HTMLCanvasElement. Add such a
class called CanvasBase.
There is a lot of potential for functionality to move into the base class, but
unfortunately HTMLCanvasElement is a bit messy. It implements a lot of the 2d
rendering context functionality, and also many const functions that actually
cause changes. Thus, things like the canvas size have to remain in the subclasses
for now.
The existence of the new base class meant the canvas() accessor in CanvasRenderingContext
had to move out into the subclasses, and do the correct casting. Eventually, at least
for WebGLRenderingContext, this will have a change in behaviour, but for now we only
ever use HTMLCanvasElements, so most of these changes are just for the sake of
compilation.
No behaviour change - covered by existing tests.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* html/CanvasBase.cpp: Copied from Source/WebCore/html/canvas/GPUBasedCanvasRenderingContext.h.
(WebCore::CanvasBase::CanvasBase): New base class.
(WebCore::CanvasBase::asHTMLCanvasElement): Casts to an HTMLCanvasElement*, which many of the
rendering context code uses.
* html/CanvasBase.h: Copied from Source/WebCore/html/canvas/GPUBasedCanvasRenderingContext.h.
(WebCore::CanvasBase::isHTMLCanvasElement const):
(WebCore::CanvasBase::isOffscreenCanvas const):
(WebCore::CanvasBase::setOriginClean):
(WebCore::CanvasBase::setOriginTainted):
(WebCore::CanvasBase::originClean const):
(WebCore::CanvasBase::securityOrigin const):
(WebCore::CanvasBase::scriptExecutionContext const):
* html/HTMLCanvasElement.cpp: Use the base class methods where possible.
(WebCore::HTMLCanvasElement::HTMLCanvasElement):
(WebCore::HTMLCanvasElement::toDataURL):
(WebCore::HTMLCanvasElement::toBlob):
(WebCore::HTMLCanvasElement::createImageBuffer const): Be explict as to
which of the derived classes scriptExecutionContext() method we are calling.
* html/HTMLCanvasElement.h: Use the base class, mark a few things as virtual,
and remove the parts that are now in CanvasBase.
* html/OffscreenCanvas.cpp: Use the base class.
(WebCore::OffscreenCanvas::OffscreenCanvas):
(WebCore::OffscreenCanvas::size const):
(WebCore::OffscreenCanvas::setSize):
* html/OffscreenCanvas.h:
* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::CanvasRenderingContext):
(WebCore::CanvasRenderingContext::ref): Call the correct ref/deref functions, depending
on the base class type.
(WebCore::CanvasRenderingContext::deref):
(WebCore::CanvasRenderingContext::wouldTaintOrigin): We no longer have a canvas() method.
(WebCore::CanvasRenderingContext::checkOrigin):
* html/canvas/CanvasRenderingContext.h:
(WebCore::CanvasRenderingContext::canvasBase const): Add this accessor to the base canvas object
to replace the canvas() call.
(WebCore::CanvasRenderingContext::checkOrigin):
(WebCore::CanvasRenderingContext::ref): Deleted.
(WebCore::CanvasRenderingContext::deref): Deleted.
(WebCore::CanvasRenderingContext::canvas const): Deleted.
* html/canvas/CanvasRenderingContext2D.cpp: Use the base class.
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/GPUBasedCanvasRenderingContext.h:
(WebCore::GPUBasedCanvasRenderingContext::GPUBasedCanvasRenderingContext):
* html/canvas/ImageBitmapRenderingContext.cpp:
(WebCore::ImageBitmapRenderingContext::ImageBitmapRenderingContext):
(WebCore::ImageBitmapRenderingContext::canvas const):
(WebCore::ImageBitmapRenderingContext::setOutputBitmap):
* html/canvas/ImageBitmapRenderingContext.h:
* html/canvas/PlaceholderRenderingContext.cpp:
(WebCore::PlaceholderRenderingContext::PlaceholderRenderingContext):
* html/canvas/PlaceholderRenderingContext.h:
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::WebGLRenderingContext):
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create): Assume that we're still getting an HTMLCanvasElement,
but protect some of the logic just in case we don't.
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::canvas):
(WebCore::WebGLRenderingContextBase::checkForContextLossHandling):
(WebCore::WebGLRenderingContextBase::registerWithWebGLStateTracker):
(WebCore::WebGLRenderingContextBase::setupFlags):
(WebCore::WebGLRenderingContextBase::addActivityStateChangeObserverIfNecessary):
(WebCore::WebGLRenderingContextBase::removeActivityStateChangeObserver):
(WebCore::WebGLRenderingContextBase::markContextChanged):
(WebCore::WebGLRenderingContextBase::markContextChangedAndNotifyCanvasObserver):
(WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas):
(WebCore::WebGLRenderingContextBase::reshape):
(WebCore::WebGLRenderingContextBase::compileShader):
(WebCore::WebGLRenderingContextBase::isContextLostOrPending):
(WebCore::WebGLRenderingContextBase::readPixels):
(WebCore::WebGLRenderingContextBase::loseContextImpl):
(WebCore::WebGLRenderingContextBase::printToConsole):
(WebCore::WebGLRenderingContextBase::dispatchContextLostEvent):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
(WebCore::WebGLRenderingContextBase::dispatchContextChangedEvent):
(WebCore::WebGLRenderingContextBase::clampedCanvasSize):
* html/canvas/WebGLRenderingContextBase.h:
* html/canvas/WebGLRenderingContextBase.idl:
* html/canvas/WebGPURenderingContext.cpp:
(WebCore::WebGPURenderingContext::create):
(WebCore::WebGPURenderingContext::WebGPURenderingContext):
(WebCore::WebGPURenderingContext::canvas const):
(WebCore::WebGPURenderingContext::clampedCanvasSize const):
* html/canvas/WebGPURenderingContext.h:
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::recordCanvasAction):
(WebCore::InspectorInstrumentation::didEnableExtension):
(WebCore::InspectorInstrumentation::didCreateProgram):
(WebCore::InspectorInstrumentation::willDeleteProgram):
(WebCore::InspectorInstrumentation::isShaderProgramDisabled):
* inspector/agents/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::recordCanvasAction):
(WebCore::InspectorCanvasAgent::didEnableExtension):
(WebCore::InspectorCanvasAgent::didCreateProgram):
Canonical link: https://commits.webkit.org/195806@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-16 19:19:39 +00:00
|
|
|
html/CanvasBase.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/CheckboxInputType.cpp
|
|
|
|
html/ColorInputType.cpp
|
2018-10-23 00:46:14 +00:00
|
|
|
html/CustomPaintCanvas.cpp
|
2021-05-15 03:34:17 +00:00
|
|
|
html/CustomPaintImage.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/DOMFormData.cpp
|
|
|
|
html/DOMTokenList.cpp
|
|
|
|
html/DOMURL.cpp
|
|
|
|
html/DateInputType.cpp
|
|
|
|
html/DateTimeLocalInputType.cpp
|
2020-06-17 00:47:11 +00:00
|
|
|
html/DirectoryFileListCreator.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/EmailInputType.cpp
|
Add bindings support for the enterkeyhint HTML attribute
https://bugs.webkit.org/show_bug.cgi?id=203440
Reviewed by Ryosuke Niwa.
Source/WebCore:
Work towards support for the enterkeyhint attribute. This patch introduces the new attribute to HTMLElement's
IDL; see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-enterkeyhint-attribute
for more information. This version of the spec was last updated October 25, 2019 (at time of writing).
Test: fast/forms/enterkeyhint-attribute-values.html
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* html/EnterKeyHint.cpp: Added.
Add a new helper file that declares a new EnterKeyHint enum type, as well as helper functions to map between
attribute values and EnterKeyHint values.
(WebCore::enterKeyHintForAttributeValue):
(WebCore::attributeValueForEnterKeyHint):
* html/EnterKeyHint.h: Added.
* html/HTMLAttributeNames.in:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::canonicalEnterKeyHint const):
Returns the canonical EnterKeyHint enum value, by inspecting the "enterkeyhint" attribute value.
(WebCore::HTMLElement::enterKeyHint const):
(WebCore::HTMLElement::setEnterKeyHint):
Implement enterKeyHint. Since enterkeyhint is a reflected HTML attribute with enumerated values, the setter sets
the attribute value and the getter returns the "canonicalized" attribute value.
* html/HTMLElement.h:
* html/HTMLElement.idl:
Add the new attribute. Note that this isn't marked as [Reflect] in IDL, since doing so would generate incorrect
bindings code. This is because we don't support reflection for enumerated attributes in our bindings generator
yet, so for now, we just match `HTMLInputElement.type` and `HTMLElement.inputMode`.
* page/Settings.yaml:
Add a new runtime switch to guard the enterkeyhint attribute.
Source/WebKit:
Add a new runtime switch for the enterkeyhint attribute, and enable it by default on macOS and iOS.
* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDefaultValues.h:
LayoutTests:
* fast/forms/enterkeyhint-attribute-values-expected.txt: Added.
* fast/forms/enterkeyhint-attribute-values.html: Added.
Add a new layout test to exercise the new attribute (including case sensitivity, the default value, unknown
values, all known value types, and different types of elements).
* platform/ios-wk2/TestExpectations:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt: Added.
* platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt:
* platform/mac-wk2/TestExpectations:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt: Added.
* platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt:
Add some new baselines for some existing layout tests.
Canonical link: https://commits.webkit.org/216912@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-28 23:56:14 +00:00
|
|
|
html/EnterKeyHint.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/FTPDirectoryDocument.cpp
|
2019-05-22 17:38:42 +00:00
|
|
|
html/FeaturePolicy.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/FileInputType.cpp
|
|
|
|
html/FormAssociatedElement.cpp
|
|
|
|
html/FormController.cpp
|
|
|
|
html/GenericCachedHTMLCollection.cpp
|
|
|
|
html/HTMLAllCollection.cpp
|
|
|
|
html/HTMLAnchorElement.cpp
|
|
|
|
html/HTMLAreaElement.cpp
|
|
|
|
html/HTMLAttachmentElement.cpp
|
|
|
|
html/HTMLAudioElement.cpp
|
2018-03-17 06:11:00 +00:00
|
|
|
html/HTMLBDIElement.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/HTMLBRElement.cpp
|
|
|
|
html/HTMLBaseElement.cpp
|
|
|
|
html/HTMLBodyElement.cpp
|
|
|
|
html/HTMLButtonElement.cpp
|
|
|
|
html/HTMLCanvasElement.cpp
|
|
|
|
html/HTMLCollection.cpp
|
|
|
|
html/HTMLDListElement.cpp
|
|
|
|
html/HTMLDataElement.cpp
|
|
|
|
html/HTMLDataListElement.cpp
|
|
|
|
html/HTMLDetailsElement.cpp
|
2019-07-17 18:58:14 +00:00
|
|
|
html/HTMLDialogElement.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/HTMLDirectoryElement.cpp
|
|
|
|
html/HTMLDivElement.cpp
|
|
|
|
html/HTMLDocument.cpp
|
|
|
|
html/HTMLElement.cpp
|
|
|
|
html/HTMLEmbedElement.cpp
|
|
|
|
html/HTMLFieldSetElement.cpp
|
|
|
|
html/HTMLFontElement.cpp
|
|
|
|
html/HTMLFormControlElement.cpp
|
|
|
|
html/HTMLFormControlElementWithState.cpp
|
|
|
|
html/HTMLFormControlsCollection.cpp
|
|
|
|
html/HTMLFormElement.cpp
|
|
|
|
html/HTMLFrameElement.cpp
|
|
|
|
html/HTMLFrameElementBase.cpp
|
|
|
|
html/HTMLFrameOwnerElement.cpp
|
|
|
|
html/HTMLFrameSetElement.cpp
|
|
|
|
html/HTMLHRElement.cpp
|
|
|
|
html/HTMLHeadElement.cpp
|
|
|
|
html/HTMLHeadingElement.cpp
|
|
|
|
html/HTMLHtmlElement.cpp
|
|
|
|
html/HTMLIFrameElement.cpp
|
|
|
|
html/HTMLImageElement.cpp
|
|
|
|
html/HTMLImageLoader.cpp
|
|
|
|
html/HTMLInputElement.cpp
|
|
|
|
html/HTMLKeygenElement.cpp
|
|
|
|
html/HTMLLIElement.cpp
|
|
|
|
html/HTMLLabelElement.cpp
|
|
|
|
html/HTMLLegendElement.cpp
|
|
|
|
html/HTMLLinkElement.cpp
|
|
|
|
html/HTMLMapElement.cpp
|
|
|
|
html/HTMLMarqueeElement.cpp
|
|
|
|
html/HTMLMediaElement.cpp
|
|
|
|
html/HTMLMenuElement.cpp
|
2017-11-04 08:20:03 +00:00
|
|
|
html/HTMLMenuItemElement.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/HTMLMetaElement.cpp
|
|
|
|
html/HTMLMeterElement.cpp
|
|
|
|
html/HTMLModElement.cpp
|
|
|
|
html/HTMLNameCollection.cpp
|
|
|
|
html/HTMLOListElement.cpp
|
|
|
|
html/HTMLObjectElement.cpp
|
|
|
|
html/HTMLOptGroupElement.cpp
|
|
|
|
html/HTMLOptionElement.cpp
|
|
|
|
html/HTMLOptionsCollection.cpp
|
|
|
|
html/HTMLOutputElement.cpp
|
|
|
|
html/HTMLParagraphElement.cpp
|
|
|
|
html/HTMLParamElement.cpp
|
|
|
|
html/HTMLPictureElement.cpp
|
|
|
|
html/HTMLPlugInElement.cpp
|
|
|
|
html/HTMLPlugInImageElement.cpp
|
|
|
|
html/HTMLPreElement.cpp
|
|
|
|
html/HTMLProgressElement.cpp
|
|
|
|
html/HTMLQuoteElement.cpp
|
|
|
|
html/HTMLScriptElement.cpp
|
|
|
|
html/HTMLSelectElement.cpp
|
|
|
|
html/HTMLSlotElement.cpp
|
|
|
|
html/HTMLSourceElement.cpp
|
|
|
|
html/HTMLSpanElement.cpp
|
|
|
|
html/HTMLStyleElement.cpp
|
|
|
|
html/HTMLSummaryElement.cpp
|
|
|
|
html/HTMLTableCaptionElement.cpp
|
|
|
|
html/HTMLTableCellElement.cpp
|
|
|
|
html/HTMLTableColElement.cpp
|
|
|
|
html/HTMLTableElement.cpp
|
|
|
|
html/HTMLTablePartElement.cpp
|
|
|
|
html/HTMLTableRowElement.cpp
|
|
|
|
html/HTMLTableRowsCollection.cpp
|
|
|
|
html/HTMLTableSectionElement.cpp
|
|
|
|
html/HTMLTemplateElement.cpp
|
|
|
|
html/HTMLTextAreaElement.cpp
|
|
|
|
html/HTMLTextFormControlElement.cpp
|
|
|
|
html/HTMLTimeElement.cpp
|
|
|
|
html/HTMLTitleElement.cpp
|
|
|
|
html/HTMLTrackElement.cpp
|
|
|
|
html/HTMLUListElement.cpp
|
2018-03-17 06:11:00 +00:00
|
|
|
html/HTMLUnknownElement.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/HTMLVideoElement.cpp
|
|
|
|
html/HTMLWBRElement.cpp
|
|
|
|
html/HiddenInputType.cpp
|
|
|
|
html/ImageBitmap.cpp
|
2020-09-26 01:42:08 +00:00
|
|
|
html/ImageBitmapBacking.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/ImageData.cpp
|
|
|
|
html/ImageDocument.cpp
|
|
|
|
html/ImageInputType.cpp
|
2018-08-23 21:24:42 +00:00
|
|
|
html/InputMode.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/InputType.cpp
|
|
|
|
html/InputTypeNames.cpp
|
|
|
|
html/LabelableElement.cpp
|
|
|
|
html/LabelsNodeList.cpp
|
2020-09-12 08:35:27 +00:00
|
|
|
html/LazyLoadFrameObserver.cpp
|
2020-02-17 23:21:35 +00:00
|
|
|
html/LazyLoadImageObserver.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/LinkIconCollector.cpp
|
|
|
|
html/LinkRelAttribute.cpp
|
|
|
|
html/MediaController.cpp
|
|
|
|
html/MediaDocument.cpp
|
|
|
|
html/MediaElementSession.cpp
|
|
|
|
html/MediaFragmentURIParser.cpp
|
|
|
|
html/MonthInputType.cpp
|
|
|
|
html/NumberInputType.cpp
|
2017-11-03 18:05:13 +00:00
|
|
|
html/OffscreenCanvas.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/PasswordInputType.cpp
|
|
|
|
html/PluginDocument.cpp
|
|
|
|
html/PublicURLManager.cpp
|
|
|
|
html/RadioInputType.cpp
|
|
|
|
html/RadioNodeList.cpp
|
|
|
|
html/RangeInputType.cpp
|
|
|
|
html/ResetInputType.cpp
|
|
|
|
html/RubyElement.cpp
|
|
|
|
html/RubyTextElement.cpp
|
|
|
|
html/SearchInputType.cpp
|
|
|
|
html/StepRange.cpp
|
2021-07-16 06:52:15 +00:00
|
|
|
html/SubmitEvent.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/SubmitInputType.cpp
|
|
|
|
html/TelephoneInputType.cpp
|
|
|
|
html/TextDocument.cpp
|
|
|
|
html/TextFieldInputType.cpp
|
|
|
|
html/TextInputType.cpp
|
|
|
|
html/TimeInputType.cpp
|
|
|
|
html/TimeRanges.cpp
|
|
|
|
html/TypeAhead.cpp
|
2020-04-26 14:53:33 +00:00
|
|
|
html/URLDecomposition.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/URLInputType.cpp
|
|
|
|
html/URLSearchParams.cpp
|
|
|
|
html/ValidationMessage.cpp
|
|
|
|
html/WeekInputType.cpp
|
2019-07-15 22:24:14 +00:00
|
|
|
html/canvas/ANGLEInstancedArrays.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/canvas/CanvasGradient.cpp
|
|
|
|
html/canvas/CanvasPath.cpp
|
|
|
|
html/canvas/CanvasPattern.cpp
|
|
|
|
html/canvas/CanvasRenderingContext.cpp
|
|
|
|
html/canvas/CanvasRenderingContext2D.cpp
|
2017-12-12 23:35:51 +00:00
|
|
|
html/canvas/CanvasRenderingContext2DBase.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/canvas/CanvasStyle.cpp
|
2019-07-15 22:24:14 +00:00
|
|
|
html/canvas/EXTBlendMinMax.cpp
|
2020-04-29 19:01:50 +00:00
|
|
|
html/canvas/EXTColorBufferFloat.cpp
|
|
|
|
html/canvas/EXTColorBufferHalfFloat.cpp
|
2020-09-25 22:41:27 +00:00
|
|
|
html/canvas/EXTFloatBlend.cpp
|
2019-07-15 22:24:14 +00:00
|
|
|
html/canvas/EXTFragDepth.cpp
|
|
|
|
html/canvas/EXTShaderTextureLOD.cpp
|
2020-10-09 00:24:42 +00:00
|
|
|
html/canvas/EXTTextureCompressionRGTC.cpp
|
2019-07-15 22:24:14 +00:00
|
|
|
html/canvas/EXTTextureFilterAnisotropic.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
html/canvas/EXTsRGB.cpp
|
2019-08-20 00:37:55 +00:00
|
|
|
html/canvas/GPUBasedCanvasRenderingContext.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/canvas/ImageBitmapRenderingContext.cpp
|
2020-11-30 20:29:35 +00:00
|
|
|
html/canvas/KHRParallelShaderCompile.cpp
|
2019-07-15 22:24:14 +00:00
|
|
|
html/canvas/OESElementIndexUint.cpp
|
2020-09-26 00:41:37 +00:00
|
|
|
html/canvas/OESFBORenderMipmap.cpp
|
2019-07-15 22:24:14 +00:00
|
|
|
html/canvas/OESStandardDerivatives.cpp
|
|
|
|
html/canvas/OESTextureFloat.cpp
|
|
|
|
html/canvas/OESTextureFloatLinear.cpp
|
|
|
|
html/canvas/OESTextureHalfFloat.cpp
|
|
|
|
html/canvas/OESTextureHalfFloatLinear.cpp
|
|
|
|
html/canvas/OESVertexArrayObject.cpp
|
2017-12-12 23:35:51 +00:00
|
|
|
html/canvas/OffscreenCanvasRenderingContext2D.cpp
|
2018-10-23 00:46:14 +00:00
|
|
|
html/canvas/PaintRenderingContext2D.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/canvas/Path2D.cpp
|
|
|
|
html/canvas/PlaceholderRenderingContext.cpp
|
2021-05-05 16:36:55 +00:00
|
|
|
html/canvas/PredefinedColorSpace.cpp
|
2019-07-15 22:24:14 +00:00
|
|
|
html/canvas/WebGL2RenderingContext.cpp
|
|
|
|
html/canvas/WebGLBuffer.cpp
|
2020-04-29 19:01:50 +00:00
|
|
|
html/canvas/WebGLColorBufferFloat.cpp
|
2019-07-15 22:24:14 +00:00
|
|
|
html/canvas/WebGLCompressedTextureASTC.cpp
|
|
|
|
html/canvas/WebGLCompressedTextureATC.cpp
|
2019-11-08 01:38:26 +00:00
|
|
|
html/canvas/WebGLCompressedTextureETC.cpp
|
|
|
|
html/canvas/WebGLCompressedTextureETC1.cpp
|
2019-07-15 22:24:14 +00:00
|
|
|
html/canvas/WebGLCompressedTexturePVRTC.cpp
|
|
|
|
html/canvas/WebGLCompressedTextureS3TC.cpp
|
2020-08-31 18:59:08 +00:00
|
|
|
html/canvas/WebGLCompressedTextureS3TCsRGB.cpp
|
2019-07-15 22:24:14 +00:00
|
|
|
html/canvas/WebGLContextEvent.cpp
|
|
|
|
html/canvas/WebGLContextGroup.cpp
|
|
|
|
html/canvas/WebGLContextObject.cpp
|
|
|
|
html/canvas/WebGLDebugRendererInfo.cpp
|
|
|
|
html/canvas/WebGLDebugShaders.cpp
|
|
|
|
html/canvas/WebGLDepthTexture.cpp
|
|
|
|
html/canvas/WebGLDrawBuffers.cpp
|
|
|
|
html/canvas/WebGLExtension.cpp
|
|
|
|
html/canvas/WebGLFramebuffer.cpp
|
|
|
|
html/canvas/WebGLLoseContext.cpp
|
2021-01-21 01:42:45 +00:00
|
|
|
html/canvas/WebGLMultiDraw.cpp
|
2019-07-15 22:24:14 +00:00
|
|
|
html/canvas/WebGLObject.cpp
|
|
|
|
html/canvas/WebGLProgram.cpp
|
|
|
|
html/canvas/WebGLQuery.cpp
|
|
|
|
html/canvas/WebGLRenderbuffer.cpp
|
|
|
|
html/canvas/WebGLRenderingContext.cpp
|
|
|
|
html/canvas/WebGLRenderingContextBase.cpp
|
|
|
|
html/canvas/WebGLSampler.cpp
|
|
|
|
html/canvas/WebGLShader.cpp
|
|
|
|
html/canvas/WebGLShaderPrecisionFormat.cpp
|
|
|
|
html/canvas/WebGLSharedObject.cpp
|
|
|
|
html/canvas/WebGLSync.cpp
|
|
|
|
html/canvas/WebGLTexture.cpp
|
|
|
|
html/canvas/WebGLTransformFeedback.cpp
|
|
|
|
html/canvas/WebGLUniformLocation.cpp
|
|
|
|
html/canvas/WebGLVertexArrayObject.cpp
|
|
|
|
html/canvas/WebGLVertexArrayObjectBase.cpp
|
|
|
|
html/canvas/WebGLVertexArrayObjectOES.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/forms/FileIconLoader.cpp
|
|
|
|
html/parser/CSSPreloadScanner.cpp
|
|
|
|
html/parser/HTMLConstructionSite.cpp
|
|
|
|
html/parser/HTMLDocumentParser.cpp
|
|
|
|
html/parser/HTMLElementStack.cpp
|
|
|
|
html/parser/HTMLEntityParser.cpp
|
|
|
|
html/parser/HTMLEntitySearch.cpp
|
|
|
|
html/parser/HTMLFormattingElementList.cpp
|
|
|
|
html/parser/HTMLMetaCharsetParser.cpp
|
|
|
|
html/parser/HTMLParserIdioms.cpp
|
|
|
|
html/parser/HTMLParserOptions.cpp
|
|
|
|
html/parser/HTMLParserScheduler.cpp
|
|
|
|
html/parser/HTMLPreloadScanner.cpp
|
|
|
|
html/parser/HTMLResourcePreloader.cpp
|
|
|
|
html/parser/HTMLScriptRunner.cpp
|
|
|
|
html/parser/HTMLSourceTracker.cpp
|
|
|
|
html/parser/HTMLSrcsetParser.cpp
|
|
|
|
html/parser/HTMLTokenizer.cpp
|
|
|
|
html/parser/HTMLTreeBuilder.cpp
|
|
|
|
html/parser/TextDocumentParser.cpp
|
|
|
|
html/parser/XSSAuditor.cpp
|
|
|
|
html/parser/XSSAuditorDelegate.cpp
|
|
|
|
html/shadow/AutoFillButtonElement.cpp
|
2019-07-21 22:59:38 +00:00
|
|
|
html/shadow/DataListButtonElement.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/shadow/DetailsMarkerControl.cpp
|
[macOS] Date inputs should contain editable components
https://bugs.webkit.org/show_bug.cgi?id=215155
Reviewed by Devin Rousso.
Source/WebCore:
Currently, users are unable to edit the values in date and time input types.
To match system date controls, users should be able to select and edit
individual components of the input. For example, <input type="date"> should
contain an editable year, month, and day control.
Note that this functionality was present in WebKit, up until it was removed
in r150876. Previously known as "INPUT_MULTIPLE_FIELDS_UI", the feature was
removed as it was only used by Chromium port. However, much of the removed
logic remains useful and is resurfaced in this patch. Modifications were made
to update the code to follow current WebKit practices.
DateTimeEditElement is a wrapper element that contains individual fields.
The fields are all DateTimeFieldElements. Note that DateTimeFieldElements
are further specialized into DateTimeNumericFieldElement (for integral
values) and DateTimeSymbolicFieldElement (for symbolic values such as A.M
and P.M). DateTimeEditElement builds the control using the visitor pattern
and existing parsing logic contained in DateTimeFormat.
In order to reduce the patch size, this patch only sets up the rendering
and layout of multiple fields for <input type="date">. Upcoming patches will
add rendering for other date/time input types and introduce editability.
Test: fast/forms/date/date-pseudo-elements.html
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/html.css:
(input::-webkit-datetime-edit):
(input::-webkit-datetime-edit-fields-wrapper):
(input::-webkit-datetime-edit-year-field,):
(input::-webkit-datetime-edit-year-field:focus,):
(input::-webkit-datetime-edit-text):
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
(WebCore::DateTimeFormatValidator::visitField):
(WebCore::DateTimeFormatValidator::validateFormat):
(WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree):
(WebCore::BaseChooserOnlyDateAndTimeInputType::destroyShadowSubtree):
(WebCore::BaseChooserOnlyDateAndTimeInputType::updateInnerTextValue):
(WebCore::BaseChooserOnlyDateAndTimeInputType::valueForEditControl const):
(WebCore::BaseChooserOnlyDateAndTimeInputType::localeIdentifier const):
* html/BaseChooserOnlyDateAndTimeInputType.h:
* html/BaseDateAndTimeInputType.h:
* html/DateInputType.cpp:
(WebCore::DateInputType::isValidFormat const):
(WebCore::DateInputType::setupLayoutParameters const):
* html/DateInputType.h:
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::isValidFormat const):
(WebCore::DateTimeLocalInputType::setupLayoutParameters const):
* html/DateTimeLocalInputType.h:
* html/MonthInputType.cpp:
(WebCore::MonthInputType::isValidFormat const):
(WebCore::MonthInputType::setupLayoutParameters const):
* html/MonthInputType.h:
* html/TimeInputType.cpp:
(WebCore::TimeInputType::isValidFormat const):
(WebCore::TimeInputType::setupLayoutParameters const):
* html/TimeInputType.h:
* html/WeekInputType.cpp:
(WebCore::WeekInputType::isValidFormat const):
(WebCore::WeekInputType::setupLayoutParameters const):
* html/WeekInputType.h:
* html/shadow/DateTimeEditElement.cpp: Added.
(WebCore::DateTimeEditBuilder::DateTimeEditBuilder):
(WebCore::DateTimeEditBuilder::build):
(WebCore::DateTimeEditBuilder::visitField):
(WebCore::DateTimeEditBuilder::visitLiteral):
(WebCore::DateTimeEditElement::DateTimeEditElement):
(WebCore::DateTimeEditElement::fieldsWrapperElement const):
(WebCore::DateTimeEditElement::addField):
(WebCore::DateTimeEditElement::create):
(WebCore::DateTimeEditElement::layout):
(WebCore::DateTimeEditElement::localeIdentifier const):
(WebCore::DateTimeEditElement::resetFields):
(WebCore::DateTimeEditElement::setValueAsDate):
(WebCore::DateTimeEditElement::setEmptyValue):
(WebCore::DateTimeEditElement::value const):
* html/shadow/DateTimeEditElement.h: Added.
* html/shadow/DateTimeFieldElement.cpp: Added.
(WebCore::DateTimeFieldElement::DateTimeFieldElement):
(WebCore::DateTimeFieldElement::initialize):
(WebCore::DateTimeFieldElement::localeForOwner const):
(WebCore::DateTimeFieldElement::localeIdentifier const):
(WebCore::DateTimeFieldElement::updateVisibleValue):
(WebCore::DateTimeFieldElement::supportsFocus const):
* html/shadow/DateTimeFieldElement.h: Added.
* html/shadow/DateTimeFieldElements.cpp: Added.
(WebCore::DateTimeDayFieldElement::DateTimeDayFieldElement):
(WebCore::DateTimeDayFieldElement::create):
(WebCore::DateTimeDayFieldElement::setValueAsDate):
(WebCore::DateTimeMonthFieldElement::DateTimeMonthFieldElement):
(WebCore::DateTimeMonthFieldElement::create):
(WebCore::DateTimeMonthFieldElement::setValueAsDate):
(WebCore::DateTimeSymbolicMonthFieldElement::DateTimeSymbolicMonthFieldElement):
(WebCore::DateTimeSymbolicMonthFieldElement::create):
(WebCore::DateTimeSymbolicMonthFieldElement::setValueAsDate):
(WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement):
(WebCore::DateTimeYearFieldElement::create):
(WebCore::DateTimeYearFieldElement::setValueAsDate):
* html/shadow/DateTimeFieldElements.h: Added.
* html/shadow/DateTimeNumericFieldElement.cpp: Added.
(WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
(WebCore::DateTimeNumericFieldElement::formatValue const):
(WebCore::DateTimeNumericFieldElement::hasValue const):
(WebCore::DateTimeNumericFieldElement::initialize):
(WebCore::DateTimeNumericFieldElement::setEmptyValue):
(WebCore::DateTimeNumericFieldElement::setValueAsInteger):
(WebCore::DateTimeNumericFieldElement::value const):
(WebCore::DateTimeNumericFieldElement::valueAsInteger const):
(WebCore::DateTimeNumericFieldElement::visibleValue const):
* html/shadow/DateTimeNumericFieldElement.h: Added.
* html/shadow/DateTimeSymbolicFieldElement.cpp: Added.
(WebCore::makeVisibleEmptyValue):
(WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
(WebCore::DateTimeSymbolicFieldElement::hasValue const):
(WebCore::DateTimeSymbolicFieldElement::initialize):
(WebCore::DateTimeSymbolicFieldElement::setEmptyValue):
(WebCore::DateTimeSymbolicFieldElement::setValueAsInteger):
(WebCore::DateTimeSymbolicFieldElement::value const):
(WebCore::DateTimeSymbolicFieldElement::valueAsInteger const):
(WebCore::DateTimeSymbolicFieldElement::visibleEmptyValue const):
(WebCore::DateTimeSymbolicFieldElement::visibleValue const):
* html/shadow/DateTimeSymbolicFieldElement.h: Added.
(WebCore::DateTimeSymbolicFieldElement::symbolsSize const):
LayoutTests:
Added a test to verify styling of pseudo elements within date inputs.
Rebaselined existing tests to match new appearance.
* fast/forms/date/date-pseudo-elements-expected.txt: Added.
* fast/forms/date/date-pseudo-elements.html: Added.
* platform/mac-wk2/fast/forms/date/date-input-rendering-basic-expected.txt:
* platform/mac-wk2/fast/forms/date/date-pseudo-elements-expected.txt: Added.
* platform/mac-wk2/fast/forms/time/time-appearance-basic-expected.txt: Added.
* platform/mac-wk2/fast/forms/time/time-input-rendering-basic-expected.txt:
Canonical link: https://commits.webkit.org/228787@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-31 14:25:37 +00:00
|
|
|
html/shadow/DateTimeEditElement.cpp
|
|
|
|
html/shadow/DateTimeFieldElement.cpp
|
|
|
|
html/shadow/DateTimeFieldElements.cpp
|
|
|
|
html/shadow/DateTimeNumericFieldElement.cpp
|
|
|
|
html/shadow/DateTimeSymbolicFieldElement.cpp
|
2020-04-03 00:37:03 +00:00
|
|
|
html/shadow/MediaControlTextTrackContainerElement.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
html/shadow/ProgressShadowElement.cpp
|
|
|
|
html/shadow/SliderThumbElement.cpp
|
|
|
|
html/shadow/SpinButtonElement.cpp
|
|
|
|
html/shadow/TextControlInnerElements.cpp
|
2020-03-07 03:04:32 +00:00
|
|
|
html/shadow/TextPlaceholderElement.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
html/track/AudioTrack.cpp
|
|
|
|
html/track/AudioTrackList.cpp
|
|
|
|
html/track/BufferedLineReader.cpp
|
|
|
|
html/track/DataCue.cpp
|
|
|
|
html/track/InbandDataTextTrack.cpp
|
|
|
|
html/track/InbandGenericTextTrack.cpp
|
|
|
|
html/track/InbandTextTrack.cpp
|
|
|
|
html/track/InbandWebVTTTextTrack.cpp
|
|
|
|
html/track/LoadableTextTrack.cpp
|
|
|
|
html/track/TextTrack.cpp
|
|
|
|
html/track/TextTrackCue.cpp
|
|
|
|
html/track/TextTrackCueGeneric.cpp
|
|
|
|
html/track/TextTrackCueList.cpp
|
|
|
|
html/track/TextTrackList.cpp
|
|
|
|
html/track/TrackBase.cpp
|
|
|
|
html/track/TrackEvent.cpp
|
|
|
|
html/track/TrackListBase.cpp
|
|
|
|
html/track/VTTCue.cpp
|
|
|
|
html/track/VTTRegion.cpp
|
|
|
|
html/track/VTTRegionList.cpp
|
|
|
|
html/track/VTTScanner.cpp
|
|
|
|
html/track/VideoTrack.cpp
|
|
|
|
html/track/VideoTrackList.cpp
|
|
|
|
html/track/WebVTTElement.cpp
|
|
|
|
html/track/WebVTTParser.cpp
|
|
|
|
html/track/WebVTTTokenizer.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
inspector/CommandLineAPIHost.cpp
|
|
|
|
inspector/CommandLineAPIModule.cpp
|
|
|
|
inspector/DOMEditor.cpp
|
|
|
|
inspector/DOMPatchSupport.cpp
|
2019-01-15 08:25:33 +00:00
|
|
|
inspector/InspectorAuditAccessibilityObject.cpp
|
|
|
|
inspector/InspectorAuditDOMObject.cpp
|
2019-03-14 10:13:57 +00:00
|
|
|
inspector/InspectorAuditResourcesObject.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
inspector/InspectorCanvas.cpp
|
2021-03-04 01:34:21 +00:00
|
|
|
inspector/InspectorCanvasCallTracer.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
inspector/InspectorController.cpp
|
|
|
|
inspector/InspectorDatabaseResource.cpp
|
2020-10-30 23:56:26 +00:00
|
|
|
inspector/InspectorFrontendAPIDispatcher.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
inspector/InspectorFrontendClientLocal.cpp
|
|
|
|
inspector/InspectorFrontendHost.cpp
|
|
|
|
inspector/InspectorHistory.cpp
|
|
|
|
inspector/InspectorInstrumentation.cpp
|
Web Inspector: Local Overrides - Provide substitution content for resource loads (URL based)
https://bugs.webkit.org/show_bug.cgi?id=201262
<rdar://problem/13108764>
Reviewed by Devin Rousso.
Source/JavaScriptCore:
When interception is enabled, Network requests that match any of the configured
interception patterns will be paused on the backend and allowed to be modified
by the frontend.
Currently the only time a network request can be intercepted is during the
HTTP response. However, this intercepting interface is mean to extend to
HTTP requests as well.
When a response is to be intercepted a new event is sent to the frontend:
`Network.responseIntercepted` event
With a `requestId` to identify that network request. The frontend
must respond with one of the following commands to continue:
`Network.interceptContinue` - proceed with the response unmodified
`Network.interceptWithResponse` - provide a response
The response is paused in the meantime.
* inspector/protocol/Network.json:
New interfaces for intercepting network responses and suppling override content.
* Scripts/generate-combined-inspector-json.py:
* inspector/scripts/generate-inspector-protocol-bindings.py:
(generate_from_specification.load_specification):
Complete allowing comments in JSON protocol files.
* inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:
(ObjCBackendDispatcherImplementationGenerator._generate_invocation_for_command):
* inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
Allow optional enums in ObjC interfaces.
Source/WebCore:
Tests: http/tests/inspector/network/local-resource-override-basic.html
http/tests/inspector/network/local-resource-override-main-resource.html
http/tests/inspector/network/local-resource-override-script-tag.html
http/tests/inspector/network/resource-response-inspector-override.html
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* Headers.cmake:
New files.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willInterceptRequestImpl):
(WebCore::InspectorInstrumentation::shouldInterceptResponseImpl):
(WebCore::InspectorInstrumentation::interceptResponseImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::hasFrontends):
(WebCore::InspectorInstrumentation::willInterceptRequest):
(WebCore::InspectorInstrumentation::shouldInterceptResponse):
(WebCore::InspectorInstrumentation::interceptResponse):
(WebCore::InspectorInstrumentation::frontendCreated):
(WebCore::InspectorInstrumentation::frontendDeleted):
* inspector/InspectorInstrumentationPublic.cpp:
* inspector/InspectorInstrumentationPublic.h:
* inspector/InspectorInstrumentationWebKit.cpp:
(WebCore::InspectorInstrumentationWebKit::shouldInterceptResponseInternal):
(WebCore::InspectorInstrumentationWebKit::interceptResponseInternal):
* inspector/InspectorInstrumentationWebKit.h: Added.
(WebCore::InspectorInstrumentationWebKit::shouldInterceptResponse):
(WebCore::InspectorInstrumentationWebKit::interceptResponse):
Provide a slim InspectorInstrumentation API that can be used in the WebKit
layer without a ton of includes.
* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::responseSource):
(WebCore::InspectorNetworkAgent::disable):
(WebCore::InspectorNetworkAgent::continuePendingResponses):
(WebCore::InspectorNetworkAgent::setInterceptionEnabled):
(WebCore::InspectorNetworkAgent::addInterception):
(WebCore::InspectorNetworkAgent::removeInterception):
(WebCore::InspectorNetworkAgent::willInterceptRequest):
(WebCore::InspectorNetworkAgent::shouldInterceptResponse):
(WebCore::InspectorNetworkAgent::interceptResponse):
(WebCore::InspectorNetworkAgent::interceptContinue):
(WebCore::InspectorNetworkAgent::interceptWithResponse):
Manage a list of URLs that will be intercepted and send
intercepts to an active frontend for response content.
* inspector/agents/InspectorNetworkAgent.h:
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::PendingInterceptResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::~PendingInterceptResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::originalResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::respondWithOriginalResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::respond):
Callback for an eventual intercept response.
* platform/network/ResourceResponseBase.h:
New ResponseSource - Inspector Override.
* loader/DocumentLoader.cpp:
(WebCore::logResourceResponseSource):
* testing/Internals.cpp:
(WebCore::responseSourceToString):
Handle new response sources.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::preload):
Avoid preloading or using the cache for URLs that would be intercepted
by an active Inspector frontend.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::remove):
Assertion to help detect if we ever get override content into the MemoryCache.
* loader/ResourceLoader.h:
(WebCore::DocumentLoader::responseReceived):
* loader/ResourceLoader.cpp:
Fix typos.
Source/WebInspectorUI:
This adds a new "Local Overrides" section to the Sources tab sidebar
which will allow users to provide their own resource content for text
resources. Users can clone a resource, and provide their own content
(by editing in Web Inspector) and new requests for those particular
URLs will get the substitute content.
Overrides are based on a particular URL (ignoring fragment). They
can override: status code, status text, response headers, content,
and MIME Type (Content-Type).
* Tools/CodeMirrorModes/index.html: Added.
* Tools/CodeMirrorModes/styles.css: Added.
Debug tool for CodeMirror editors and our custom CodeMirror modes.
* UserInterface/Main.html:
* UserInterface/Test.html:
* Localizations/en.lproj/localizedStrings.js:
New files and strings.
* UserInterface/Base/HTTPUtilities.js: Added.
(WI.httpStatusTextForStatusCode):
Translate between typical status codes and status text.
* UserInterface/Base/ObjectStore.js:
(WI.ObjectStore._open):
New persistent store for local resource overrides.
* UserInterface/Base/Main.js:
(WI.showLocalResourceOverride):
Convenience for showing an override file.
* UserInterface/Base/URLUtilities.js:
(parseURL):
Avoid uncaught exceptions with the URL constructor for common WebKit internal sourceURL strings.
(WI.urlWithoutFragment):
Strip a fragment from a URL.
* UserInterface/Controllers/HARBuilder.js:
(WI.HARBuilder.fetchType):
(WI.HARBuilder.responseSourceFromHARFetchType):
Handle new custom response types.
* UserInterface/Protocol/NetworkObserver.js:
(WI.NetworkObserver.prototype.responseIntercepted):
(WI.NetworkObserver):
New events.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager):
(WI.NetworkManager.supportsLocalResourceOverrides):
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.get localResourceOverrides):
(WI.NetworkManager.prototype.get interceptionEnabled):
(WI.NetworkManager.prototype.set interceptionEnabled):
(WI.NetworkManager.prototype.addLocalResourceOverride):
(WI.NetworkManager.prototype.removeLocalResourceOverride):
(WI.NetworkManager.prototype.localResourceOverrideForURL):
(WI.NetworkManager.prototype.canBeOverridden):
(WI.NetworkManager.prototype.responseIntercepted):
(WI.NetworkManager.prototype._handleResourceContentDidChange):
(WI.NetworkManager.prototype._persistLocalResourceOverrideSoonAfterContentChange):
(WI.NetworkManager.prototype._saveLocalResourceOverrides):
(WI.NetworkManager.prototype._extraDomainsActivated):
(WI.NetworkManager.prototype.localResourceForURL): Deleted.
Handle saving and restoring local resource overrides.
Handle responding to a `responseIntercepted` Network protocol event.
* UserInterface/Models/LocalResource.js:
(WI.LocalResource.fromJSON):
(WI.LocalResource.prototype.toJSON):
(WI.LocalResource.prototype.get localContent):
(WI.LocalResource.prototype.get localContentIsBase64Encoded):
(WI.LocalResource.prototype.isLocalResourceOverride):
(WI.LocalResource.prototype.updateOverrideContent):
Allow a LocalResource to identify itself as an "override".
* UserInterface/Models/LocalResourceOverride.js: Added.
(WI.LocalResourceOverride.prototype.create):
(WI.LocalResourceOverride.fromJSON):
(WI.LocalResourceOverride.prototype.toJSON):
(WI.LocalResourceOverride.prototype.get url):
(WI.LocalResourceOverride.prototype.get localResource):
(WI.LocalResourceOverride.prototype.get disabled):
(WI.LocalResourceOverride.prototype.set disabled):
(WI.LocalResourceOverride.prototype.saveIdentityToCookie):
(WI.LocalResourceOverride):
Model object for a LocalResourceOverride. This has LocalResource content
and an enabled/disabled state.
* UserInterface/Models/Resource.js:
(WI.Resource.classNamesForResource):
(WI.Resource.responseSourceFromPayload):
(WI.Resource.prototype.isLocalResourceOverride):
(WI.Resource.prototype.async.createLocalResourceOverride):
(WI.Resource.classNameForResource): Deleted.
Convenience functions and icon updates.
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.prototype.canShowRepresentedObject):
* UserInterface/Views/ContentView.js:
(WI.ContentView.createFromRepresentedObject):
(WI.ContentView.resolvedRepresentedObjectForRepresentedObject):
(WI.ContentView.isViewable):
Handle new represented object type.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.SourcesNavigationSidebarPanel.prototype.willDismissPopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissLocalOverridePopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissEventBreakpointPopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissURLBreakpointPopover):
(WI.SourcesNavigationSidebarPanel.prototype._addLocalResourceOverride):
(WI.SourcesNavigationSidebarPanel.prototype._removeLocalResourceOverride):
(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideRemoved):
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > .warning-banner):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container, .local-overrides)):
(.sidebar > .panel.navigation.sources > .content > .local-overrides):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted.
Hide and show Local Overrides section.
* UserInterface/Views/LocalResourceOverrideTreeElement.css:
(.item.resource.override .status > div):
* UserInterface/Views/LocalResourceOverrideTreeElement.js: Added.
(WI.LocalResourceOverrideTreeElement):
(WI.LocalResourceOverrideTreeElement.prototype.canSelectOnMouseDown):
(WI.LocalResourceOverrideTreeElement.prototype.populateContextMenu):
(WI.LocalResourceOverrideTreeElement.prototype.willDismissPopover):
TreeElement for a Local Resource Override.
* UserInterface/Views/CodeMirrorLocalOverrideURLMode.css:
(.cm-s-default .cm-local-override-url-bad-scheme):
(.cm-s-default .cm-local-override-url-fragment):
* UserInterface/Views/CodeMirrorLocalOverrideURLMode.js: Added.
(tokenBase):
(return.startState):
(return.token):
* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
* UserInterface/Views/ContextMenu.js:
(WI.ContextMenu.prototype._itemSelected):
(WI.ContextMenu):
Better debugging for exceptions in context menu handlers.
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForSourceCode):
(WI.appendContextMenuItemsForURL):
Context menu items for Local Resource Overrides.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.startEditingNode):
(WI.DataGrid.prototype._startEditingNodeAtColumnIndex):
(WI.DataGrid.prototype._startEditing):
(WI.DataGrid.prototype._contextMenuInDataTable):
* UserInterface/Views/DataGridNode.js:
(WI.DataGridNode):
(WI.DataGridNode.prototype.get editable):
(WI.DataGridNode.prototype.set editable):
Improve DataGrid editing functionality.
Allow a node to not be editable.
Allow adding a new node and starting to edit in one action.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject):
Do not provide overrides in the Debugger tab.
* UserInterface/Views/LocalResourceOverrideLabelView.css:
(.local-resource-override-label-view):
(.local-resource-override-label-view > div):
(.local-resource-override-label-view > div > .label):
(.local-resource-override-label-view > div > .url):
(@media (prefers-color-scheme: dark)):
* UserInterface/Views/LocalResourceOverrideLabelView.js:
(WI.LocalResourceOverrideLabelView):
(WI.LocalResourceOverrideLabelView.prototype.initialLayout):
* UserInterface/Views/LocalResourceOverridePopover.css: Added.
(.popover .local-resource-override-popover-content):
(.popover .local-resource-override-popover-content > label.toggle):
(.popover .local-resource-override-popover-content > table):
(.popover .local-resource-override-popover-content > table > tr > th):
(.popover .local-resource-override-popover-content > table > tr > td):
(.popover .local-resource-override-popover-content .editor):
(.popover .local-resource-override-popover-content .editor > .CodeMirror):
(.popover .local-resource-override-popover-content .editor.url):
(.popover .local-resource-override-popover-content .editor.mime):
(.popover .local-resource-override-popover-content .editor.status):
(.popover .local-resource-override-popover-content .editor.status-text):
(.popover .local-resource-override-popover-content .add-header):
(@media (prefers-color-scheme: dark)):
New banner view for a local resource override itself.
Shows the URL being overriden.
* UserInterface/Views/LocalResourceOverrideWarningView.css:
(.local-resource-override-warning-view):
(.local-resource-override-warning-view[hidden]):
(.local-resource-override-warning-view > div):
(.local-resource-override-warning-view > div > button):
(@media (prefers-color-scheme: dark)):
* UserInterface/Views/LocalResourceOverrideWarningView.js: Added.
(WI.LocalResourceOverrideWarningView):
(WI.LocalResourceOverrideWarningView.prototype.attached):
(WI.LocalResourceOverrideWarningView.prototype.detached):
(WI.LocalResourceOverrideWarningView.prototype._updateContent):
(WI.LocalResourceOverrideWarningView.prototype._handleLocalResourceOverrideChanged):
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.pruneStaleResourceTreeElements):
New banner view for a resource that has been overridden.
Allows jumping to the override itself.
* UserInterface/Views/LocalResourceOverridePopover.js: Added.
(WI.LocalResourceOverridePopover):
(WI.LocalResourceOverridePopover.prototype.get serializedData):
(WI.LocalResourceOverridePopover.prototype.show.addDataGridNodeForHeader):
(WI.LocalResourceOverridePopover.prototype.show):
(WI.LocalResourceOverridePopover.prototype._createEditor):
(WI.LocalResourceOverridePopover.prototype._defaultURL):
(WI.LocalResourceOverridePopover.prototype._presentOverTargetElement):
New popover for creating or editing a Local Resource Override.
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.performSearch):
Consider searching overrides.
* UserInterface/Views/Variables.css:
(:root):
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search.changed > .banner):
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .warning-banner):
* UserInterface/Views/ConsoleMessageView.css:
(.console-warning-level):
Use a new variable for a common warning color.
* UserInterface/Images/NavigationItemNetworkOverride.svg: Added.
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.canBeFormatted):
(WI.SourceCodeTextEditor.prototype.get _supportsDebugging):
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > .warning-banner):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container, .local-overrides)):
(.sidebar > .panel.navigation.sources > .content > .local-overrides):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted.
* UserInterface/Views/TextEditor.css:
(.text-editor):
* UserInterface/Views/TextResourceContentView.css:
(.content-view.resource.text):
(.content-view.resource.text > .text-editor):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView):
(WI.TextResourceContentView.prototype.get navigationItems):
(WI.TextResourceContentView.prototype.closed):
(WI.TextResourceContentView.prototype._contentWillPopulate):
(WI.TextResourceContentView.prototype._contentDidPopulate):
(WI.TextResourceContentView.prototype.async._handleCreateLocalResourceOverride):
(WI.TextResourceContentView.prototype._handleRemoveLocalResourceOverride):
(WI.TextResourceContentView.prototype._handleLocalResourceOverrideChanged):
(WI.TextResourceContentView.prototype._textEditorContentDidChange):
(WI.TextResourceContentView.prototype._shouldBeEditable):
Allow Text resources to create a local resource override.
Support for Image resources will come separately.
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._responseSourceDisplayString):
Handle new response type.
* UserInterface/Controllers/CSSManager.js:
Avoid extra handling for Local Resource Overrides.
* UserInterface/Views/ResourceIcons.css:
(.resource-icon.override .icon):
* UserInterface/Views/ResourceSizesContentView.js:
(WI.ResourceSizesContentView.prototype.initialLayout):
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WI.ResourceTimelineDataGridNode.prototype.iconClassNames):
* UserInterface/Views/ResourceTreeElement.js:
(WI.ResourceTreeElement.prototype._updateResource):
(WI.ResourceTreeElement.prototype._updateIcon):
(WI.ResourceTreeElement.prototype._responseReceived):
(WI.ResourceTreeElement):
* UserInterface/Views/TimelineDataGridNode.js:
(WI.TimelineDataGridNode.prototype.createCellContent):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._populateNameCell):
(WI.NetworkTableContentView.prototype._populateTransferSizeCell):
(WI.NetworkTableContentView.prototype._generateSortComparator):
Better Resource icons all over for overrides.
* UserInterface/Views/URLBreakpointPopover.js:
(WI.URLBreakpointPopover.prototype._createEditor):
Code cleanup.
Source/WebKit:
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj:
New sources.
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didFailResourceLoad):
On receiving a response, check with the inspector if an active
frontend will override the response content.
* WebProcess/Network/WebResourceInterceptController.h:
* WebProcess/Network/WebResourceInterceptController.cpp:
(WebKit::WebResourceInterceptController::isIntercepting const):
(WebKit::WebResourceInterceptController::beginInterceptingResponse):
(WebKit::WebResourceInterceptController::continueResponse):
(WebKit::WebResourceInterceptController::interceptedResponse):
(WebKit::WebResourceInterceptController::defer):
Buffer networking callbacks for an ongoing intercept.
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::havePerformedSecurityChecks const):
Handle new response source.
LayoutTests:
* http/tests/inspector/network/local-resource-override-basic-expected.txt: Added.
* http/tests/inspector/network/local-resource-override-basic.html: Added.
* http/tests/inspector/network/local-resource-override-main-resource-expected.txt: Added.
* http/tests/inspector/network/local-resource-override-main-resource.html: Added.
* http/tests/inspector/network/local-resource-override-script-tag-expected.txt: Added.
* http/tests/inspector/network/local-resource-override-script-tag.html: Added.
* http/tests/inspector/network/resource-response-inspector-override-expected.txt: Added.
* http/tests/inspector/network/resource-response-inspector-override.html: Added.
* http/tests/inspector/network/resources/override.js: Added.
* http/tests/inspector/network/resources/override.txt: Added.
* inspector/network/local-resource-override-continue-response-expected.txt: Added.
* inspector/network/local-resource-override-continue-response.html: Added.
Tests for overrides.
* inspector/unit-tests/url-utilities-expected.txt:
* inspector/unit-tests/url-utilities.html:
Test WI.urlWithoutFragment.
* platform/mac-wk1/TestExpectations:
WebKitLegacy does not support overrides.
Canonical link: https://commits.webkit.org/215111@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-04 23:35:03 +00:00
|
|
|
inspector/InspectorInstrumentationPublic.cpp
|
|
|
|
inspector/InspectorInstrumentationWebKit.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
inspector/InspectorNodeFinder.cpp
|
|
|
|
inspector/InspectorOverlay.cpp
|
2018-01-26 05:08:15 +00:00
|
|
|
inspector/InspectorShaderProgram.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
inspector/InspectorStyleSheet.cpp
|
|
|
|
inspector/InstrumentingAgents.cpp
|
|
|
|
inspector/NetworkResourcesData.cpp
|
2020-08-24 18:40:30 +00:00
|
|
|
inspector/PageDebugger.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
inspector/TimelineRecordFactory.cpp
|
|
|
|
inspector/WebInjectedScriptHost.cpp
|
|
|
|
inspector/WebInjectedScriptManager.cpp
|
|
|
|
inspector/WorkerInspectorController.cpp
|
2020-08-24 18:40:30 +00:00
|
|
|
inspector/WorkerDebugger.cpp
|
Web Inspector: Timelines: add a timeline that shows information about any recorded CSS animation/transition
https://bugs.webkit.org/show_bug.cgi?id=203651
<rdar://problem/56128726>
Reviewed by Brian Burg.
Source/JavaScriptCore:
Unlike all other forms of Web Animations, CSS animations/transitions, are _not_ created by
JavaScript, and therefore can seemingly appear out of nowhere. This patch expands the Media
timeline to be the Media & Animations timeline, which tracks when CSS animations/transitions
are created, started, delayed, iterated, canceled, or finished.
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources.make:
* inspector/protocol/Animation.json: Added.
* inspector/protocol/Timeline.json:
Add an Animation domain for handling the tracking of CSS Web Animations.
Source/WebCore:
Unlike all other forms of Web Animations, CSS animations/transitions, are _not_ created by
JavaScript, and therefore can seemingly appear out of nowhere. This patch expands the Media
timeline to be the Media & Animations timeline, which tracks when CSS animations/transitions
are created, started, delayed, iterated, canceled, or finished.
Test: inspector/animation/tracking.html
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::apply):
* animation/WebAnimation.h:
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::~WebAnimation):
(WebCore::WebAnimation::contextDestroyed): Added.
(WebCore::WebAnimation::setEffectInternal):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willApplyKeyframeEffect): Added.
(WebCore::InspectorInstrumentation::didChangeWebAnimationEffect): Added.
(WebCore::InspectorInstrumentation::willDestroyWebAnimation): Added.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willApplyKeyframeEffectImpl): Added.
(WebCore::InspectorInstrumentation::didChangeWebAnimationEffectImpl): Added.
(WebCore::InspectorInstrumentation::willDestroyWebAnimationImpl): Added.
Add instrumentation points for CSS animations/transitions.
* inspector/agents/InspectorAnimationAgent.h: Added.
* inspector/agents/InspectorAnimationAgent.cpp: Added.
(WebCore::InspectorAnimationAgent::InspectorAnimationAgent):
(WebCore::InspectorAnimationAgent::didCreateFrontendAndBackend):
(WebCore::InspectorAnimationAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorAnimationAgent::startTracking):
(WebCore::InspectorAnimationAgent::stopTracking):
(WebCore::isDelayed):
(WebCore::InspectorAnimationAgent::willApplyKeyframeEffect):
(WebCore::InspectorAnimationAgent::didChangeWebAnimationEffect):
(WebCore::InspectorAnimationAgent::willDestroyWebAnimation):
(WebCore::InspectorAnimationAgent::stopTrackingDeclarativeAnimation):
* inspector/InstrumentingAgents.h:
(WebCore::InstrumentingAgents::persistentInspectorAnimationAgent const): Added.
(WebCore::InstrumentingAgents::setPersistentInspectorAnimationAgent): Added.
(WebCore::InstrumentingAgents::trackingInspectorAnimationAgent const): Added.
(WebCore::InstrumentingAgents::setTrackingInspectorAnimationAgent): Added.
* inspector/InstrumentingAgents.cpp:
(WebCore::InstrumentingAgents::reset):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::createLazyAgents):
Add an Animation domain for handling the tracking of CSS Web Animations.
* inspector/agents/InspectorTimelineAgent.h:
* inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::toggleInstruments):
(WebCore::InspectorTimelineAgent::toggleAnimationInstrument): Added.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Source/WebInspectorUI:
Unlike all other forms of Web Animations, CSS animations/transitions, are _not_ created by
JavaScript, and therefore can seemingly appear out of nowhere. This patch expands the Media
timeline to be the Media & Animations timeline, which tracks when CSS animations/transitions
are created, started, delayed, iterated, canceled, or finished.
* UserInterface/Protocol/AnimationObserver.js: Added.
(WI.AnimationObserver.prototype.trackingStart):
(WI.AnimationObserver.prototype.trackingUpdate):
(WI.AnimationObserver.prototype.trackingComplete):
* UserInterface/Protocol/Target.js:
(WI.Target.prototype.get AnimationAgent): Added.
* UserInterface/Main.html:
* UserInterface/Base/Main.js:
(WI.loaded):
* UserInterface/Test.html:
* UserInterface/Test/Test.js:
(WI.loaded):
Add an Animation domain for handling the tracking of CSS Web Animations.
* UserInterface/Models/MediaInstrument.js:
(WI.MediaInstrument.prototype.startInstrumentation):
(WI.MediaInstrument.prototype.stopInstrumentation):
(WI.MediaInstrument):
* UserInterface/Models/MediaTimeline.js: Added.
(WI.MediaTimeline.prototype.recordForTrackingAnimationId):
(WI.MediaTimeline.prototype.recordForMediaElementEvents):
(WI.MediaTimeline.prototype.reset):
(WI.MediaTimeline.prototype.addRecord):
* UserInterface/Models/MediaTimelineRecord.js:
(WI.MediaTimelineRecord):
(WI.MediaTimelineRecord.async fromJSON):
(WI.MediaTimelineRecord.prototype.toJSON):
(WI.MediaTimelineRecord.prototype.get trackingAnimationId): Added.
(WI.MediaTimelineRecord.prototype.get timestamps): Added.
(WI.MediaTimelineRecord.prototype.get activeStartTime): Added.
(WI.MediaTimelineRecord.prototype.get updatesDynamically): Added.
(WI.MediaTimelineRecord.prototype.get usesActiveStartTime): Added.
(WI.MediaTimelineRecord.prototype.get displayName):
(WI.MediaTimelineRecord.prototype.get subtitle): Added.
(WI.MediaTimelineRecord.prototype.saveIdentityToCookie):
(WI.MediaTimelineRecord.prototype.updateProgress): Added.
(WI.MediaTimelineRecord.prototype.addDOMEvent): Added.
(WI.MediaTimelineRecord.prototype.powerEfficientPlaybackStateChanged): Added.
(WI.MediaTimelineRecord.prototype._updateTimes): Added.
(WI.MediaTimelineRecord.fromJSON): Deleted.
(WI.MediaTimelineRecord.prototype.get domEvent): Deleted.
(WI.MediaTimelineRecord.prototype.get isPowerEfficient): Deleted.
* UserInterface/Models/Timeline.js:
(WI.Timeline.create):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager):
(WI.TimelineManager.prototype.async processJSON):
(WI.TimelineManager.prototype.animationTrackingStarted): Added.
(WI.TimelineManager.prototype.animationTrackingUpdated): Added.
(WI.TimelineManager.prototype.animationTrackingCompleted): Added.
(WI.TimelineManager.prototype._updateAutoCaptureInstruments):
(WI.TimelineManager.prototype._handleDOMNodeDidFireEvent):
(WI.TimelineManager.prototype._handleDOMNodePowerEfficientPlaybackStateChanged):
Start/Stop tracking animations based on whether the Media & Animations timeline is enabled.
* UserInterface/Views/MediaTimelineOverviewGraph.js:
(WI.MediaTimelineOverviewGraph):
(WI.MediaTimelineOverviewGraph.get maximumRowCount): Added.
(WI.MediaTimelineOverviewGraph.prototype.reset):
(WI.MediaTimelineOverviewGraph.prototype.layout):
(WI.MediaTimelineOverviewGraph.prototype.updateSelectedRecord):
(WI.MediaTimelineOverviewGraph.prototype._processRecord): Added.
(WI.MediaTimelineOverviewGraph.prototype._processRecord.compareByStartTime): Added.
(WI.MediaTimelineOverviewGraph.prototype._handleRecordAdded):
(WI.MediaTimelineOverviewGraph.prototype._handleTimesUpdated): Added.
(WI.MediaTimelineOverviewGraph.prototype.shown): Deleted.
(WI.MediaTimelineOverviewGraph.prototype.hidden): Deleted.
* UserInterface/Views/MediaTimelineOverviewGraph.css:
(.timeline-overview-graph.media): Added.
(.timeline-overview-graph.media > .graph-row): Added.
(.timeline-overview-graph.media > .graph-row > .timeline-record-bar): Added.
(.timeline-overview-graph.media > .graph-row > .timeline-record-bar:not(.unfinished) > .segment:not(.inactive)): Added.
(.timeline-overview-graph.media:nth-child(even) > .graph-row > .timeline-record-bar:not(.unfinished) > .segment:not(.inactive)): Added.
(.timeline-overview-graph.media > .timeline-record-bar): Deleted.
(.timeline-overview-graph.media > .timeline-record-bar > .segment): Deleted.
* UserInterface/Views/MediaTimelineView.js:
(WI.MediaTimelineView):
(WI.MediaTimelineView.prototype.shown): Added.
(WI.MediaTimelineView.prototype.hidden): Added.
(WI.MediaTimelineView.prototype.closed):
(WI.MediaTimelineView.prototype.reset):
(WI.MediaTimelineView.prototype.dataGridSortComparator):
(WI.MediaTimelineView.prototype.dataGridSortComparator.compareDOMNodes):
(WI.MediaTimelineView.prototype._processPendingRecords):
* UserInterface/Views/MediaTimelineDataGridNode.js:
(WI.MediaTimelineDataGridNode):
(WI.MediaTimelineDataGridNode.prototype.get data):
(WI.MediaTimelineDataGridNode.prototype.createCellContent):
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren): Added.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addReadySegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addDelaySegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addActiveSegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addFullScreenSegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addPowerEfficientPlaybackSegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addPausedSegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addPlayingSegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.filterableDataForColumn):
(WI.MediaTimelineDataGridNode.prototype._createNameCellDocumentFragment): Added.
(WI.MediaTimelineDataGridNode.prototype.iconClassNames): Deleted.
* UserInterface/Views/TimelineRecordBar.js:
(WI.TimelineRecordBar):
(WI.TimelineRecordBar.prototype.refresh):
(WI.TimelineRecordBar.prototype._handleClick):
* UserInterface/Views/TimelineRecordBar.css:
(.timeline-record-bar):
(.timeline-record-bar > :matches(img, .segment)):
(.timeline-record-bar > img):
(.timeline-record-bar > .segment):
(body[dir=ltr] .timeline-record-bar > .segment):
(body[dir=ltr] .timeline-record-bar > .segment:first-of-type):
(body[dir=ltr] .timeline-record-bar > .segment:last-of-type):
(body[dir=rtl] .timeline-record-bar > .segment):
(body[dir=rtl] .timeline-record-bar > .segment:first-of-type):
(body[dir=rtl] .timeline-record-bar > .segment:last-of-type):
(.timeline-record-bar > .segment:not(:last-of-type)):
(.timeline-record-bar.selected > .segment):
(.timeline-record-bar > .segment.inactive,):
(.timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(:focus .selected .timeline-record-bar:not(.has-custom-children) > .segment):
(:focus .selected .timeline-record-bar:not(.has-custom-children) > .segment.inactive):
(:focus .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(.timeline-record-bar.timeline-record-type-network > .segment):
(.timeline-record-bar.timeline-record-type-network > .segment.inactive):
(.timeline-record-bar.timeline-record-type-layout > .segment):
(.timeline-record-bar.timeline-record-type-layout.paint > .segment,):
(.timeline-record-bar.timeline-record-type-script > .segment):
(.timeline-record-bar.timeline-record-type-script.garbage-collected > .segment,):
(.timeline-record-bar.timeline-record-type-media > .segment):
(.timeline-record-bar.has-custom-children.timeline-record-type-media > .segment):
(.timeline-record-bar.has-custom-children.timeline-record-type-media > .segment.css-animation-ready):
(.timeline-record-bar.has-custom-children.timeline-record-type-media > .segment:matches(.css-animation-delay, .media-element-paused)):
(.timeline-record-bar.has-custom-children.timeline-record-type-media.media-element > .segment):
(.timeline-record-bar.has-custom-children.timeline-record-type-media.media-element > .segment.media-element-full-screen):
(.timeline-record-bar.has-custom-children.timeline-record-type-media.media-element > .segment.media-element-power-efficient-playback):
(body[dir=ltr] .timeline-record-bar > .segment.inactive,): Deleted.
(body[dir=ltr] .timeline-record-bar.has-inactive-segment > .segment:not(.inactive),): Deleted.
(:focus .selected .timeline-record-bar > .segment): Deleted.
(:focus .selected .timeline-record-bar > .segment.inactive): Deleted.
(body[dir=ltr] :focus .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)): Deleted.
(body[dir=rtl] :focus .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)): Deleted.
Allow timeline record bars to be customized through a delegate callback. If provided, it
will be used instead of any default content. It is expected to return an array of objects,
each having a `startTime` number, `classNames` array, and `title` string. It can also have a
`endTime` number and an `image` string. If `endTime` is `NaN`, the record is unfinished. If
`image` is provided, an `<img>` will be used instead of a segment, allowing for markers.
* UserInterface/Views/TimelineDataGridNode.js:
(WI.TimelineDataGridNode.prototype.createCellContent):
Add a default fallback for `WI.DOMNode` values.
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.displayNameForTimelineType):
(WI.TimelineTabContentView.iconClassNameForRecord):
(WI.TimelineTabContentView.displayNameForRecord):
* UserInterface/Views/TimelineRecordTreeElement.js:
* UserInterface/Views/TimelineIcons.css:
(.animation-frame-record .icon):
(.css-animation-record .icon): Added.
(.css-transition-record .icon): Added.
(.media-element-record .icon): Added.
(.animation-record .icon): Deleted.
(.dom-event-record .icon): Deleted.
(.dom-event-record.fullscreen .icon): Deleted.
(.power-efficient-playback-state-changed-record .icon): Deleted.
* UserInterface/Images/DOMEventFullscreen.svg: Removed.
* UserInterface/Images/EventCancel.svg: Added.
* UserInterface/Images/EventIteration.svg: Added.
* UserInterface/Images/EventPause.svg:
* UserInterface/Images/EventPlay.svg:
* UserInterface/Images/EventProcessing.svg:
* UserInterface/Images/EventStop.svg:
* UserInterface/Images/PowerEfficientPlaybackStateChanged.svg: Removed.
* UserInterface/Images/TimelineRecordAnimationFrame.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/TimelineRecordAnimation.svg.
* UserInterface/Images/TimelineRecordCSSAnimation.svg: Added.
* UserInterface/Images/TimelineRecordCSSTransition.svg: Added.
* UserInterface/Images/TimelineRecordMediaElement.svg: Added.
Add new media icons.
* UserInterface/Models/TimelineRecording.js:
(WI.TimelineRecording.async import): Added.
(WI.TimelineRecording.import): Deleted.
* UserInterface/Models/TimelineRecord.js:
* UserInterface/Models/CPUTimelineRecord.js:
* UserInterface/Models/HeapAllocationsTimelineRecord.js:
(WI.HeapAllocationsTimelineRecord.async fromJSON): Added.
(WI.HeapAllocationsTimelineRecord.fromJSON): Deleted.
* UserInterface/Models/LayoutTimelineRecord.js:
* UserInterface/Models/MemoryTimelineRecord.js:
* UserInterface/Models/RenderingFrameTimelineRecord.js:
* UserInterface/Models/ResourceTimelineRecord.js:
* UserInterface/Models/ScriptTimelineRecord.js:
Make the importing of timeline records `async` so we can attempt to rehydrate the DOM nodes
of any media records (as well as wait for heap snapshots).
* UserInterface/Models/DOMNode.js:
(WI.DOMNode):
(WI.DOMNode.prototype.isMediaElement): Added.
(WI.DOMNode.prototype._shouldListenForEventListeners): Deleted.
* Localizations/en.lproj/localizedStrings.js:
Source/WTF:
* wtf/Markable.h:
(WTF::operator==):
(WTF::operator!=):
Add extra utility operators.
Tools:
* TestWebKitAPI/Tests/WTF/Markable.cpp:
(TestWebKitAPI::TEST):
Add tests for extra utility operators.
LayoutTests:
* inspector/animation/tracking.html: Added.
* inspector/animation/tracking-expected.txt: Added.
Canonical link: https://commits.webkit.org/217127@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-11-02 00:45:35 +00:00
|
|
|
inspector/agents/InspectorAnimationAgent.cpp
|
2017-11-02 18:25:28 +00:00
|
|
|
inspector/agents/InspectorApplicationCacheAgent.cpp
|
2019-01-25 01:06:17 +00:00
|
|
|
inspector/agents/InspectorCPUProfilerAgent.cpp
|
2017-11-02 18:25:28 +00:00
|
|
|
inspector/agents/InspectorCSSAgent.cpp
|
|
|
|
inspector/agents/InspectorCanvasAgent.cpp
|
|
|
|
inspector/agents/InspectorDOMAgent.cpp
|
|
|
|
inspector/agents/InspectorDOMDebuggerAgent.cpp
|
|
|
|
inspector/agents/InspectorDOMStorageAgent.cpp
|
|
|
|
inspector/agents/InspectorDatabaseAgent.cpp
|
|
|
|
inspector/agents/InspectorIndexedDBAgent.cpp
|
|
|
|
inspector/agents/InspectorLayerTreeAgent.cpp
|
|
|
|
inspector/agents/InspectorMemoryAgent.cpp
|
|
|
|
inspector/agents/InspectorNetworkAgent.cpp
|
|
|
|
inspector/agents/InspectorPageAgent.cpp
|
|
|
|
inspector/agents/InspectorTimelineAgent.cpp
|
|
|
|
inspector/agents/InspectorWorkerAgent.cpp
|
|
|
|
inspector/agents/WebConsoleAgent.cpp
|
|
|
|
inspector/agents/WebDebuggerAgent.cpp
|
|
|
|
inspector/agents/WebHeapAgent.cpp
|
2019-01-15 08:25:33 +00:00
|
|
|
inspector/agents/page/PageAuditAgent.cpp
|
2017-11-02 18:25:28 +00:00
|
|
|
inspector/agents/page/PageConsoleAgent.cpp
|
2019-08-30 01:08:03 +00:00
|
|
|
inspector/agents/page/PageDOMDebuggerAgent.cpp
|
2017-11-02 18:25:28 +00:00
|
|
|
inspector/agents/page/PageDebuggerAgent.cpp
|
|
|
|
inspector/agents/page/PageHeapAgent.cpp
|
Web Inspector: Include a NetworkAgent in ServiceWorkers for network debugging
https://bugs.webkit.org/show_bug.cgi?id=179513
<rdar://problem/35456402>
Reviewed by Brian Burg.
In order to show Network requests for a ServiceWorker, we need to add
inspector networking hooks for Worker loads. While we show Network
requests for DedicatedWorkers, we do that through the Page during Page
inspection. In ServiceWorker inspection, the remote connection is
connected to the ServiceWorkerThreadProxy, and interacts with the
WorkerGlobalScope without making any assumptions about a Page existing.
We don't want to make any assumptions about a Page/Document being needed
for Network hooks, so we should add new hooks that will work in the
WorkerGlobalScope's context.
This patch adds InspectorInstrumentation networking hooks for workers inside
of the WorkerThreadableLoader bridge. This is where the majority of Worker
initiated network requests happen (Fetch/XHR, but not WebSockets). The hooks
are simpler versions of the existing network hooks for a Page, and allow for
complete inspector networking information (will send, did receive response,
did receive data, success, failure, and timing metrics).
This patch generalizes InspectorNetworkAgent to work for a Page and Worker.
Some of the existing functionality was specific to a Page (frameId/loaderId)
but did not make sense for a Worker. In order to handle these cases, all
of the unique logic was extracted out into virtual methods that subclasses
PageNetworkAgent and WorkerNetworkAgent provide as appropriate. The majority
of NetworkAgent remains unchanged and algorithms are shared.
We needed to change the existing InspectorInstrumentation networking hooks
to allow for an optional DocumentLoader. This way we can keep all of the
same hooks leading inside of NetworkAgent, but loads for a Page will have a
DocumentLoader, and loads for a ServiceWorker will not.
While the WorkerNetworkAgent would work for a DedicatedWorker, we still
only create it for a ServiceWorker. The existing behavior of showing Network
loads for a DedicatedWorker will continue to go through the Page inspector
so we can avoid creating a NetworkAgent for DedicatedWorkers. If we created
a way to directly inspect a DedicatedWorker we could look at making this
always available, but it would require extra work to function perfectly.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
Add new files.
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::createLazyAgents):
Switch from InspectorNetworkAgent to PageNetworkAgent.
* inspector/WorkerInspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::workerAgentContext):
(WebCore::WorkerInspectorController::createLazyAgents):
Create a WorkerNetworkAgent when inside of a ServiceWorker.
Also start the lazy agent pattern for agents that can defer
creation until a frontend attached.
(WebCore::WorkerInspectorController::connectFrontend):
(WebCore::WorkerInspectorController::disconnectFrontend):
When frontends connect/disconnect toggle the necessary states.
Also start the execution stopwatch, otherwise it will always be at 0.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willSendRequestImpl):
(WebCore::InspectorInstrumentation::willSendRequestOfTypeImpl):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willSendRequest):
(WebCore::InspectorInstrumentation::didReceiveResourceResponse):
(WebCore::InspectorInstrumentation::didReceiveData):
(WebCore::InspectorInstrumentation::didFinishLoading):
(WebCore::InspectorInstrumentation::didFailLoading):
Add Worker networking hooks that pass through to the same general hooks.
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishTiming):
* loader/WorkerThreadableLoader.h:
Use the new worker networking instrumentation hooks.
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoader::create):
Drive-by: use a move.
* inspector/agents/InspectorNetworkAgent.h:
* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::InspectorNetworkAgent):
(WebCore::InspectorNetworkAgent::willSendRequest):
(WebCore::InspectorNetworkAgent::willSendRequestOfType):
(WebCore::InspectorNetworkAgent::didReceiveResponse):
(WebCore::InspectorNetworkAgent::didFinishLoading):
(WebCore::InspectorNetworkAgent::didFailLoading):
(WebCore::InspectorNetworkAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorNetworkAgent::buildInitiatorObject):
(WebCore::InspectorNetworkAgent::enable):
(WebCore::InspectorNetworkAgent::disable):
(WebCore::InspectorNetworkAgent::setResourceCachingDisabled):
(WebCore::InspectorNetworkAgent::loadResource):
(WebCore::InspectorNetworkAgent::webSocketForRequestId):
(WebCore::InspectorNetworkAgent::resolveWebSocket):
(WebCore::InspectorNetworkAgent::mainFrameNavigated):
Extract logic for subclasses. Transition to DocumentLoader being null.
* inspector/agents/page/PageNetworkAgent.h:
* inspector/agents/page/PageNetworkAgent.cpp: Added.
(WebCore::PageNetworkAgent::PageNetworkAgent):
(WebCore::PageNetworkAgent::loaderIdentifier):
(WebCore::PageNetworkAgent::frameIdentifier):
(WebCore::PageNetworkAgent::setResourceCachingDisabled):
(WebCore::PageNetworkAgent::scriptExecutionContext):
Extracted Page implementation. This is just moving from the original.
* inspector/agents/worker/WorkerNetworkAgent.h:
* inspector/agents/worker/WorkerNetworkAgent.cpp:
(WebCore::WorkerNetworkAgent::WorkerNetworkAgent):
(WebCore::WorkerNetworkAgent::loaderIdentifier):
(WebCore::WorkerNetworkAgent::frameIdentifier):
(WebCore::WorkerNetworkAgent::setResourceCachingDisabled):
(WebCore::WorkerNetworkAgent::scriptExecutionContext):
Implement for a worker.
* inspector/agents/worker/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
* inspector/agents/worker/WorkerConsoleAgent.cpp:
(WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
* inspector/agents/worker/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
Add some assertions for all Worker agents for clarify.
* workers/WorkerDebuggerProxy.h:
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::identifier const):
(WebCore::WorkerGlobalScope::createUniqueIdentifier):
Provide a way to get unique identifiers in a worker. For the Page
this is done through the Page's ProgressTracker. For a Worker we just
put this on the WorkerGlobalScope. This is used for request ids.
* workers/WorkerMessagingProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::setResourceCachingDisabled):
* workers/service/context/ServiceWorkerThreadProxy.h:
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::setResourceCachingDisabled):
Add a debug method for disabling the resource cache from a worker.
In service workers this sets the override flag on the hidden page.
Canonical link: https://commits.webkit.org/195673@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-13 23:15:57 +00:00
|
|
|
inspector/agents/page/PageNetworkAgent.cpp
|
2017-11-02 18:25:28 +00:00
|
|
|
inspector/agents/page/PageRuntimeAgent.cpp
|
2019-10-26 01:10:59 +00:00
|
|
|
inspector/agents/page/UserGestureEmulationScope.cpp
|
2017-11-14 19:44:18 +00:00
|
|
|
inspector/agents/worker/ServiceWorkerAgent.cpp
|
2019-01-15 08:25:33 +00:00
|
|
|
inspector/agents/worker/WorkerAuditAgent.cpp
|
2017-11-02 18:25:28 +00:00
|
|
|
inspector/agents/worker/WorkerConsoleAgent.cpp
|
2019-08-30 01:08:03 +00:00
|
|
|
inspector/agents/worker/WorkerDOMDebuggerAgent.cpp
|
2017-11-02 18:25:28 +00:00
|
|
|
inspector/agents/worker/WorkerDebuggerAgent.cpp
|
Web Inspector: Include a NetworkAgent in ServiceWorkers for network debugging
https://bugs.webkit.org/show_bug.cgi?id=179513
<rdar://problem/35456402>
Reviewed by Brian Burg.
In order to show Network requests for a ServiceWorker, we need to add
inspector networking hooks for Worker loads. While we show Network
requests for DedicatedWorkers, we do that through the Page during Page
inspection. In ServiceWorker inspection, the remote connection is
connected to the ServiceWorkerThreadProxy, and interacts with the
WorkerGlobalScope without making any assumptions about a Page existing.
We don't want to make any assumptions about a Page/Document being needed
for Network hooks, so we should add new hooks that will work in the
WorkerGlobalScope's context.
This patch adds InspectorInstrumentation networking hooks for workers inside
of the WorkerThreadableLoader bridge. This is where the majority of Worker
initiated network requests happen (Fetch/XHR, but not WebSockets). The hooks
are simpler versions of the existing network hooks for a Page, and allow for
complete inspector networking information (will send, did receive response,
did receive data, success, failure, and timing metrics).
This patch generalizes InspectorNetworkAgent to work for a Page and Worker.
Some of the existing functionality was specific to a Page (frameId/loaderId)
but did not make sense for a Worker. In order to handle these cases, all
of the unique logic was extracted out into virtual methods that subclasses
PageNetworkAgent and WorkerNetworkAgent provide as appropriate. The majority
of NetworkAgent remains unchanged and algorithms are shared.
We needed to change the existing InspectorInstrumentation networking hooks
to allow for an optional DocumentLoader. This way we can keep all of the
same hooks leading inside of NetworkAgent, but loads for a Page will have a
DocumentLoader, and loads for a ServiceWorker will not.
While the WorkerNetworkAgent would work for a DedicatedWorker, we still
only create it for a ServiceWorker. The existing behavior of showing Network
loads for a DedicatedWorker will continue to go through the Page inspector
so we can avoid creating a NetworkAgent for DedicatedWorkers. If we created
a way to directly inspect a DedicatedWorker we could look at making this
always available, but it would require extra work to function perfectly.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
Add new files.
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::createLazyAgents):
Switch from InspectorNetworkAgent to PageNetworkAgent.
* inspector/WorkerInspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::workerAgentContext):
(WebCore::WorkerInspectorController::createLazyAgents):
Create a WorkerNetworkAgent when inside of a ServiceWorker.
Also start the lazy agent pattern for agents that can defer
creation until a frontend attached.
(WebCore::WorkerInspectorController::connectFrontend):
(WebCore::WorkerInspectorController::disconnectFrontend):
When frontends connect/disconnect toggle the necessary states.
Also start the execution stopwatch, otherwise it will always be at 0.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willSendRequestImpl):
(WebCore::InspectorInstrumentation::willSendRequestOfTypeImpl):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willSendRequest):
(WebCore::InspectorInstrumentation::didReceiveResourceResponse):
(WebCore::InspectorInstrumentation::didReceiveData):
(WebCore::InspectorInstrumentation::didFinishLoading):
(WebCore::InspectorInstrumentation::didFailLoading):
Add Worker networking hooks that pass through to the same general hooks.
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishTiming):
* loader/WorkerThreadableLoader.h:
Use the new worker networking instrumentation hooks.
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoader::create):
Drive-by: use a move.
* inspector/agents/InspectorNetworkAgent.h:
* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::InspectorNetworkAgent):
(WebCore::InspectorNetworkAgent::willSendRequest):
(WebCore::InspectorNetworkAgent::willSendRequestOfType):
(WebCore::InspectorNetworkAgent::didReceiveResponse):
(WebCore::InspectorNetworkAgent::didFinishLoading):
(WebCore::InspectorNetworkAgent::didFailLoading):
(WebCore::InspectorNetworkAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorNetworkAgent::buildInitiatorObject):
(WebCore::InspectorNetworkAgent::enable):
(WebCore::InspectorNetworkAgent::disable):
(WebCore::InspectorNetworkAgent::setResourceCachingDisabled):
(WebCore::InspectorNetworkAgent::loadResource):
(WebCore::InspectorNetworkAgent::webSocketForRequestId):
(WebCore::InspectorNetworkAgent::resolveWebSocket):
(WebCore::InspectorNetworkAgent::mainFrameNavigated):
Extract logic for subclasses. Transition to DocumentLoader being null.
* inspector/agents/page/PageNetworkAgent.h:
* inspector/agents/page/PageNetworkAgent.cpp: Added.
(WebCore::PageNetworkAgent::PageNetworkAgent):
(WebCore::PageNetworkAgent::loaderIdentifier):
(WebCore::PageNetworkAgent::frameIdentifier):
(WebCore::PageNetworkAgent::setResourceCachingDisabled):
(WebCore::PageNetworkAgent::scriptExecutionContext):
Extracted Page implementation. This is just moving from the original.
* inspector/agents/worker/WorkerNetworkAgent.h:
* inspector/agents/worker/WorkerNetworkAgent.cpp:
(WebCore::WorkerNetworkAgent::WorkerNetworkAgent):
(WebCore::WorkerNetworkAgent::loaderIdentifier):
(WebCore::WorkerNetworkAgent::frameIdentifier):
(WebCore::WorkerNetworkAgent::setResourceCachingDisabled):
(WebCore::WorkerNetworkAgent::scriptExecutionContext):
Implement for a worker.
* inspector/agents/worker/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
* inspector/agents/worker/WorkerConsoleAgent.cpp:
(WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
* inspector/agents/worker/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
Add some assertions for all Worker agents for clarify.
* workers/WorkerDebuggerProxy.h:
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::identifier const):
(WebCore::WorkerGlobalScope::createUniqueIdentifier):
Provide a way to get unique identifiers in a worker. For the Page
this is done through the Page's ProgressTracker. For a Worker we just
put this on the WorkerGlobalScope. This is used for request ids.
* workers/WorkerMessagingProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::setResourceCachingDisabled):
* workers/service/context/ServiceWorkerThreadProxy.h:
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::setResourceCachingDisabled):
Add a debug method for disabling the resource cache from a worker.
In service workers this sets the override flag on the hidden page.
Canonical link: https://commits.webkit.org/195673@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-13 23:15:57 +00:00
|
|
|
inspector/agents/worker/WorkerNetworkAgent.cpp
|
2017-11-02 18:25:28 +00:00
|
|
|
inspector/agents/worker/WorkerRuntimeAgent.cpp
|
2021-05-01 19:55:35 +00:00
|
|
|
layout/formattingContexts/FormattingContext.cpp
|
2021-05-16 01:56:55 +00:00
|
|
|
layout/formattingContexts/FormattingGeometry.cpp
|
2021-05-15 21:11:40 +00:00
|
|
|
layout/formattingContexts/FormattingQuirks.cpp
|
2018-04-23 23:08:47 +00:00
|
|
|
layout/FormattingState.cpp
|
2019-09-20 13:36:00 +00:00
|
|
|
layout/LayoutContext.cpp
|
2019-08-07 14:23:54 +00:00
|
|
|
layout/LayoutPhase.cpp
|
2018-12-08 00:26:34 +00:00
|
|
|
layout/LayoutState.cpp
|
2019-09-18 19:56:14 +00:00
|
|
|
layout/LayoutUnits.cpp
|
2018-05-28 17:55:18 +00:00
|
|
|
layout/Verification.cpp
|
2021-05-02 16:59:56 +00:00
|
|
|
layout/formattingContexts/block/BlockFormattingContext.cpp
|
2021-05-15 22:30:39 +00:00
|
|
|
layout/formattingContexts/block/BlockFormattingGeometry.cpp
|
2021-05-15 17:50:07 +00:00
|
|
|
layout/formattingContexts/block/BlockFormattingQuirks.cpp
|
2021-05-02 16:59:56 +00:00
|
|
|
layout/formattingContexts/block/BlockFormattingState.cpp
|
|
|
|
layout/formattingContexts/block/BlockMarginCollapse.cpp
|
|
|
|
layout/formattingContexts/block/PrecomputedBlockMarginCollapse.cpp
|
|
|
|
layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.cpp
|
2021-05-15 18:27:43 +00:00
|
|
|
layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingQuirks.cpp
|
2021-05-02 16:59:56 +00:00
|
|
|
layout/formattingContexts/flex/FlexFormattingContext.cpp
|
2021-05-15 23:03:02 +00:00
|
|
|
layout/formattingContexts/flex/FlexFormattingGeometry.cpp
|
2021-05-02 16:59:56 +00:00
|
|
|
layout/formattingContexts/flex/FlexFormattingState.cpp
|
2018-08-27 05:01:28 +00:00
|
|
|
layout/floats/FloatAvoider.cpp
|
2018-08-22 17:10:34 +00:00
|
|
|
layout/floats/FloatingContext.cpp
|
|
|
|
layout/floats/FloatingState.cpp
|
2021-05-02 16:59:56 +00:00
|
|
|
layout/formattingContexts/inline/InlineContentBreaker.cpp
|
|
|
|
layout/formattingContexts/inline/InlineFormattingContext.cpp
|
2021-05-15 23:55:58 +00:00
|
|
|
layout/formattingContexts/inline/InlineFormattingGeometry.cpp
|
2021-05-15 19:50:54 +00:00
|
|
|
layout/formattingContexts/inline/InlineFormattingQuirks.cpp
|
2021-05-02 16:59:56 +00:00
|
|
|
layout/formattingContexts/inline/InlineFormattingState.cpp
|
|
|
|
layout/formattingContexts/inline/InlineItem.cpp
|
|
|
|
layout/formattingContexts/inline/InlineLine.cpp
|
|
|
|
layout/formattingContexts/inline/InlineLineBox.cpp
|
|
|
|
layout/formattingContexts/inline/InlineLineBuilder.cpp
|
|
|
|
layout/formattingContexts/inline/InlineTextItem.cpp
|
|
|
|
layout/formattingContexts/inline/text/TextUtil.cpp
|
2020-01-19 16:30:27 +00:00
|
|
|
layout/integration/LayoutIntegrationBoxTree.cpp
|
2020-09-23 12:03:57 +00:00
|
|
|
layout/integration/LayoutIntegrationCoverage.cpp
|
2020-11-07 19:34:49 +00:00
|
|
|
layout/integration/LayoutIntegrationInlineContentBuilder.cpp
|
2020-10-05 15:43:07 +00:00
|
|
|
layout/integration/LayoutIntegrationInlineContent.cpp
|
2020-10-07 15:47:16 +00:00
|
|
|
layout/integration/LayoutIntegrationLineIterator.cpp
|
2019-12-03 15:41:43 +00:00
|
|
|
layout/integration/LayoutIntegrationLineLayout.cpp
|
2020-09-23 04:39:06 +00:00
|
|
|
layout/integration/LayoutIntegrationPagination.cpp
|
2020-09-28 13:42:33 +00:00
|
|
|
layout/integration/LayoutIntegrationRunIterator.cpp
|
2019-11-13 18:39:44 +00:00
|
|
|
layout/invalidation/InvalidationContext.cpp
|
|
|
|
layout/invalidation/InvalidationState.cpp
|
2018-04-23 23:08:47 +00:00
|
|
|
layout/layouttree/LayoutBox.cpp
|
2020-02-12 01:08:08 +00:00
|
|
|
layout/layouttree/LayoutContainerBox.cpp
|
2020-09-15 05:52:14 +00:00
|
|
|
layout/layouttree/LayoutBoxGeometry.cpp
|
2020-03-22 17:41:12 +00:00
|
|
|
layout/layouttree/LayoutInitialContainingBlock.cpp
|
2020-02-11 15:13:15 +00:00
|
|
|
layout/layouttree/LayoutInlineTextBox.cpp
|
2020-02-11 17:12:44 +00:00
|
|
|
layout/layouttree/LayoutLineBreakBox.cpp
|
2020-02-11 23:13:00 +00:00
|
|
|
layout/layouttree/LayoutReplacedBox.cpp
|
2018-04-28 23:13:04 +00:00
|
|
|
layout/layouttree/LayoutTreeBuilder.cpp
|
2021-05-02 16:59:56 +00:00
|
|
|
layout/formattingContexts/table/TableFormattingContext.cpp
|
2021-05-16 01:21:21 +00:00
|
|
|
layout/formattingContexts/table/TableFormattingGeometry.cpp
|
2021-05-15 20:22:37 +00:00
|
|
|
layout/formattingContexts/table/TableFormattingQuirks.cpp
|
2021-05-02 16:59:56 +00:00
|
|
|
layout/formattingContexts/table/TableFormattingState.cpp
|
|
|
|
layout/formattingContexts/table/TableGrid.cpp
|
|
|
|
layout/formattingContexts/table/TableLayout.cpp
|
2020-11-12 02:04:28 +00:00
|
|
|
loader/PrivateClickMeasurement.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
loader/ApplicationManifestLoader.cpp
|
2018-09-11 17:14:07 +00:00
|
|
|
loader/CanvasActivityRecord.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
loader/ContentFilter.cpp
|
|
|
|
loader/CookieJar.cpp
|
|
|
|
loader/CrossOriginAccessControl.cpp
|
2021-07-31 00:07:37 +00:00
|
|
|
loader/CrossOriginEmbedderPolicy.cpp
|
|
|
|
loader/CrossOriginOpenerPolicy.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
loader/CrossOriginPreflightChecker.cpp
|
|
|
|
loader/CrossOriginPreflightResultCache.cpp
|
2019-05-17 21:50:02 +00:00
|
|
|
loader/CustomHeaderFields.cpp @no-unify
|
2021-04-15 06:17:39 +00:00
|
|
|
loader/DefaultResourceLoadPriority.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
loader/DocumentLoader.cpp
|
|
|
|
loader/DocumentThreadableLoader.cpp
|
|
|
|
loader/DocumentWriter.cpp
|
|
|
|
loader/EmptyClients.cpp
|
|
|
|
loader/FTPDirectoryParser.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
loader/FetchIdioms.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
loader/FormState.cpp
|
|
|
|
loader/FormSubmission.cpp
|
|
|
|
loader/FrameLoadRequest.cpp
|
|
|
|
loader/FrameLoader.cpp
|
|
|
|
loader/FrameLoaderStateMachine.cpp
|
|
|
|
loader/HTTPHeaderField.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
loader/HeaderFieldTokenizer.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
loader/HistoryController.cpp
|
|
|
|
loader/ImageLoader.cpp
|
|
|
|
loader/LinkHeader.cpp
|
|
|
|
loader/LinkLoader.cpp
|
|
|
|
loader/LinkPreloadResourceClients.cpp
|
|
|
|
loader/LoaderStrategy.cpp
|
|
|
|
loader/MediaResourceLoader.cpp
|
|
|
|
loader/MixedContentChecker.cpp
|
|
|
|
loader/NavigationAction.cpp
|
|
|
|
loader/NavigationScheduler.cpp
|
|
|
|
loader/NetscapePlugInStreamLoader.cpp
|
|
|
|
loader/PingLoader.cpp
|
|
|
|
loader/PolicyChecker.cpp
|
|
|
|
loader/ProgressTracker.cpp
|
|
|
|
loader/ResourceCryptographicDigest.cpp
|
[GTK][WPE] Add content extensions support in WKTR and unskip layout tests
https://bugs.webkit.org/show_bug.cgi?id=193622
Reviewed by Michael Catanzaro.
.:
* Source/cmake/OptionsGTK.cmake: Enable CONTENT_EXTENSIONS by default.
* Source/cmake/OptionsWPE.cmake: Ditto.
* Source/cmake/WebKitFeatures.cmake: Add a private CONTENT_EXTENSIONS option.
Source/WebCore:
No new tests needed.
* SourcesCocoa.txt: Remove loader/ResourceLoadInfo.cpp, it's not Cocoa-specific anymore.
* Sources.txt: Add loader/ResourceLoadInfo.cpp, all ports use it now.
Source/WebKit:
* NetworkProcess/cache/NetworkCacheData.h: Define an adoptAndMapFile() implementation
for GFileIOStream objects.
* NetworkProcess/cache/NetworkCacheDataSoup.cpp:
(WebKit::NetworkCache::adoptAndMapFile): Added implementation, which extracts the file
descriptor from a GFileIOStream, as it inherits from GFileDescriptorBased, and then
reuses the version of adoptAndMapFile() which takes a file descritor for the actual work.
* NetworkProcess/NetworkLoadChecker.cpp:
(Webkit::NetworkLoadChecker::checkRequest): Use "this" when referring to
processContentExtensionRulesForLoad() in order to avoid ambiguity.
* Sources.txt: Add WKUserContentExtensionStoreRef.cpp, all ports use it now.
* SourcesCocoa.txt: Remove WKUserContentExtensionStoreRef.cpp, because it is not
Cocoa-specific anymore.
* SourcesGTK.txt: Add APIContentRuleListStoreGLib.cpp.
* SourcesWPE.txt: Ditto.
* UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:
(WKUserContentExtensionStoreCreate): Added.
(toResult): Added.
(WKUserContentExtensionStoreCompile): Added.
(WKUserContentExtensionStoreLookup): Added.
(WKUserContentExtensionStoreRemove): Added.
* UIProcess/API/C/WKUserContentExtensionStoreRef.h: Add declarations for the new C API
functions and for the WKUserContentExtensionStoreResult status enum.
* UIProcess/API/glib/APIContentRuleListStoreGLib.cpp: Added.
(API::ContentRuleListStore::defaultStorePath): Add a dummy implementation. The public API
for the GLib based ports (GTK+ and WPE) will not allow using the default store and will
always indicating a path.
Tools:
This adds support for loading content extension rule sets from the JSON files which
accompany the corresponding layout test, using the C API. The Cocoa specific parts
of WKTR for this could be removed, but that is left for a follow-up patch with
cleanups.
* Scripts/webkitperl/FeatureList.pm: Add an option to toggle CONTENT_EXTENSIONS.
* WebKitTestRunner/TestController.cpp:
(WTR::testPath): Subtract one from the length when constructing the result std::string to
avoid having the null-terminator copied into the result.
(WTR::TestController::configureViewForTest): Call configureContentExtensionForTest() as
part of the preparations to run a test.
(WTR::ContentExtensionStoreCallbackContext::ContentExtensionStoreCallbackContext): Added.
(WTR::contentExtensionStoreCallback): Added.
(WTR::contentExtensionJSONPath): Used to calculate the path to the JSON rule set to be
used for content extensions test.
(WTR::TestController::configureContentExtensionForTest): Added, handles enabling content
extensions and compiling the JSON rule set for tests involving content extensions.
(WTR::TestController::resetContentExtensions): Removes the content extension built for
testing and disables content extensions.
(WTR::TestController::resetPreferencesToConsistentValues): Add a call to
resetContentExtensions().
(WTR::TestController::userContentController): Added implementation for ports other than Cocoa.
* WebKitTestRunner/TestController.h: Add declarations for resetContentExtensions(),
configureContentExtensionForTest(), and userContentController().
LayoutTests:
* platform/gtk/TestExpectations: Un-skip tests for content extensions and add expectations.
Canonical link: https://commits.webkit.org/208942@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-12 00:07:21 +00:00
|
|
|
loader/ResourceLoadInfo.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
loader/ResourceLoadNotifier.cpp
|
|
|
|
loader/ResourceLoadObserver.cpp
|
|
|
|
loader/ResourceLoadStatistics.cpp
|
|
|
|
loader/ResourceLoader.cpp
|
|
|
|
loader/ResourceTiming.cpp
|
|
|
|
loader/ResourceTimingInformation.cpp
|
2018-05-15 19:24:30 +00:00
|
|
|
loader/ServerTiming.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
loader/ServerTimingParser.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
loader/SinkDocument.cpp
|
|
|
|
loader/SubframeLoader.cpp
|
|
|
|
loader/SubresourceIntegrity.cpp
|
|
|
|
loader/SubresourceLoader.cpp
|
|
|
|
loader/TextResourceDecoder.cpp
|
|
|
|
loader/TextTrackLoader.cpp
|
|
|
|
loader/ThreadableLoader.cpp
|
|
|
|
loader/WorkerThreadableLoader.cpp
|
|
|
|
loader/appcache/ApplicationCache.cpp
|
|
|
|
loader/appcache/ApplicationCacheGroup.cpp
|
|
|
|
loader/appcache/ApplicationCacheHost.cpp
|
2020-06-30 22:43:02 +00:00
|
|
|
loader/appcache/ApplicationCacheManifestParser.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
loader/appcache/ApplicationCacheResource.cpp
|
2018-02-21 20:21:59 +00:00
|
|
|
loader/appcache/ApplicationCacheResourceLoader.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
loader/appcache/ApplicationCacheStorage.cpp
|
|
|
|
loader/appcache/DOMApplicationCache.cpp
|
|
|
|
loader/archive/Archive.cpp
|
|
|
|
loader/archive/ArchiveFactory.cpp
|
|
|
|
loader/archive/ArchiveResource.cpp
|
|
|
|
loader/archive/ArchiveResourceCollection.cpp
|
|
|
|
loader/archive/mhtml/MHTMLArchive.cpp
|
|
|
|
loader/archive/mhtml/MHTMLParser.cpp
|
2020-07-03 21:16:56 +00:00
|
|
|
loader/cache/CachedApplicationManifest.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
loader/cache/CachedCSSStyleSheet.cpp
|
|
|
|
loader/cache/CachedFont.cpp
|
|
|
|
loader/cache/CachedImage.cpp
|
|
|
|
loader/cache/CachedRawResource.cpp
|
|
|
|
loader/cache/CachedResource.cpp
|
|
|
|
loader/cache/CachedResourceHandle.cpp
|
|
|
|
loader/cache/CachedResourceLoader.cpp
|
|
|
|
loader/cache/CachedResourceRequest.cpp
|
|
|
|
loader/cache/CachedResourceRequestInitiators.cpp
|
|
|
|
loader/cache/CachedSVGDocument.cpp
|
|
|
|
loader/cache/CachedSVGDocumentReference.cpp
|
|
|
|
loader/cache/CachedSVGFont.cpp
|
|
|
|
loader/cache/CachedScript.cpp
|
2020-06-07 09:55:32 +00:00
|
|
|
loader/cache/CachedTextTrack.cpp
|
2017-10-25 00:33:13 +00:00
|
|
|
loader/cache/CachedXSLStyleSheet.cpp
|
|
|
|
loader/cache/KeepaliveRequestTracker.cpp
|
|
|
|
loader/cache/MemoryCache.cpp
|
|
|
|
loader/icon/IconLoader.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
mathml/MathMLAnnotationElement.cpp
|
|
|
|
mathml/MathMLElement.cpp
|
|
|
|
mathml/MathMLFractionElement.cpp
|
|
|
|
mathml/MathMLMathElement.cpp
|
|
|
|
mathml/MathMLMencloseElement.cpp
|
|
|
|
mathml/MathMLOperatorDictionary.cpp
|
|
|
|
mathml/MathMLOperatorElement.cpp
|
|
|
|
mathml/MathMLPaddedElement.cpp
|
|
|
|
mathml/MathMLPresentationElement.cpp
|
2017-12-04 11:30:10 +00:00
|
|
|
mathml/MathMLRootElement.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
mathml/MathMLRowElement.cpp
|
|
|
|
mathml/MathMLScriptsElement.cpp
|
|
|
|
mathml/MathMLSelectElement.cpp
|
|
|
|
mathml/MathMLSpaceElement.cpp
|
|
|
|
mathml/MathMLTokenElement.cpp
|
|
|
|
mathml/MathMLUnderOverElement.cpp
|
2018-03-17 06:11:00 +00:00
|
|
|
mathml/MathMLUnknownElement.cpp
|
2018-04-12 23:55:02 +00:00
|
|
|
page/AbstractDOMWindow.cpp
|
|
|
|
page/AbstractFrame.cpp
|
2018-08-08 19:06:43 +00:00
|
|
|
page/ActivityState.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/AutoscrollController.cpp
|
|
|
|
page/BarProp.cpp
|
|
|
|
page/Base64Utilities.cpp
|
|
|
|
page/CaptionUserPreferences.cpp
|
|
|
|
page/Chrome.cpp
|
|
|
|
page/ContextMenuContext.cpp
|
|
|
|
page/ContextMenuController.cpp
|
|
|
|
page/Crypto.cpp
|
|
|
|
page/DOMSelection.cpp
|
|
|
|
page/DOMTimer.cpp
|
|
|
|
page/DOMWindow.cpp
|
|
|
|
page/DOMWindowExtension.cpp
|
|
|
|
page/DOMWindowProperty.cpp
|
|
|
|
page/DatabaseProvider.cpp
|
|
|
|
page/DebugPageOverlays.cpp
|
|
|
|
page/DeprecatedGlobalSettings.cpp
|
|
|
|
page/DeviceController.cpp
|
|
|
|
page/DiagnosticLoggingKeys.cpp
|
[Extra zoom mode] Google search results are excessively zoomed in
https://bugs.webkit.org/show_bug.cgi?id=185347
<rdar://problem/39999778>
Reviewed by Tim Horton.
Source/WebCore:
It turns out that basing minimum layout size and shrink-to-fit behaviors off of the `shrink-to-fit` viewport
argument poses compatibility risks with web pages that already specify `shrink-to-fit` to opt out of default
viewport shrinking behaviors in 1/3 multitasking mode on iPad.
One way to resolve this is to introduce a new viewport meta content attribute to disable viewport heuristics in
extra zoom mode. However, combined shrink-to-fit and minimum device width behaviors are difficult to describe
using a single backwards-compatible viewport meta content attribute, and the need to suppress the default
behavior of `shrink-to-fit=no` if such an attribute is not disabled further muddles our viewport story.
After some internal deliberation, we’ve decided to experiment with a new meta tag named "disabled-adaptations".
The content of this meta tag is a comma-separated list of adaptation names; if an adaptation name matches a
known adaptation type (for instance, extra zoom mode), we disable the class of behaviors used to adapt web
content. The first and only known adaptation type is extra zoom mode, which affects `shrink-to-fit` and layout
size adjustments.
See per-method changes below for more details.
Test: fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations.html
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::processDisabledAdaptations):
* dom/Document.h:
(WebCore::Document::disabledAdaptations const):
Add disabled adaptations to Document. Changes to disabled adaptations are not propagated if the parsed disabled
adaptation types don't change; upon changing adaptation types, notify the client to adjust for the new disabled
adaptations (currently, this only affects the viewport configuration).
* dom/ViewportArguments.h:
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::process):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
Restore the set of disabled adaptations when restoring a page from the cache.
* page/Chrome.cpp:
(WebCore::Chrome::dispatchDisabledAdaptationsDidChange const):
* page/Chrome.h:
* page/ChromeClient.h:
Add plumbing for changes to the set of disabled adaptations.
* page/DisabledAdaptations.cpp: Added.
(WebCore::extraZoomModeAdaptationName):
* page/DisabledAdaptations.h: Added.
Introduce a header containing a new enum for the extra zoom mode adaptation, as well as a helper function to
return the extra zoom mode adaptation name.
* page/Page.cpp:
(WebCore::Page::disabledAdaptations const):
Returns the mainframe's set of adaptations to disable.
* page/Page.h:
* page/RemoteFrame.h:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setDisabledAdaptationsMetaTagEnabled):
(WebCore::RuntimeEnabledFeatures::disabledAdaptationsMetaTagEnabled const):
Add a new runtime feature to gate handling the "disabled-adaptations" meta tag.
* page/ViewportConfiguration.cpp:
(WebCore::shouldOverrideShrinkToFitArgument):
(WebCore::needsUpdateAfterChangingDisabledAdaptations):
(WebCore::ViewportConfiguration::setDisabledAdaptations):
(WebCore::ViewportConfiguration::shouldOverrideDeviceWidthAndShrinkToFit const):
Consult whether or not extra zoom mode adaptations are disabled, instead of the shrink-to-fit attribute value.
(WebCore::ViewportConfiguration::updateConfiguration):
* page/ViewportConfiguration.h:
Add an OptionSet of disabled adaptation types to ViewportConfiguration. Updates to the adaptation type are
propagated to the ViewportConfiguration from Document, through the ChromeClient and the client layer (refer to
changes in WebKit). Once the OptionSet is changed, we recompute the viewport configuration only if needed by the
platform.
(WebCore::ViewportConfiguration::viewLayoutSize const):
(WebCore::ViewportConfiguration::disabledAdaptations const):
* page/WindowFeatures.cpp:
(WebCore::parseDisabledAdaptations):
* page/WindowFeatures.h:
Add a new helper to parse the meta content of a "disabled-adaptations" tag as an OptionSet of disabled
adaptation types. The string is parsed by first splitting on the comma character, and then iterating over lower
case, whitespace-stripped tokens to look for known adaptation names. So far, only extra zoom mode is supported.
* testing/Internals.cpp:
(WebCore::Internals::extraZoomModeAdaptationName const):
* testing/Internals.h:
* testing/Internals.idl:
Expose the extra zoom mode adaptation name to the DOM, only when running layout tests.
Source/WebKit:
Adds a new experimental feature for the "disabled-adaptations" meta tag, and adds plumbing in WebKit to
propagate disabled adaptation changes to the ViewportConfiguration. The experimental feature is on by default in
extra zoom mode.
* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDefaultValues.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::dispatchDisabledAdaptationsDidChange const):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::disabledAdaptationsDidChange):
* WebProcess/WebPage/WebPage.h:
Source/WebKitLegacy/ios:
Adds a WebKitLegacy method stub for disabled adaptation plumbing.
* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::dispatchDisabledAdaptationsDidChange const):
LayoutTests:
Refactor an existing layout test to exercise disabled adaptations in extra zoom mode.
* fast/viewport/extrazoom/viewport-change-min-device-width.html: Removed.
* fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations.html: Added.
Canonical link: https://commits.webkit.org/201100@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-05-15 01:07:36 +00:00
|
|
|
page/DisabledAdaptations.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/DragController.cpp
|
|
|
|
page/EventHandler.cpp
|
|
|
|
page/EventSource.cpp
|
|
|
|
page/FocusController.cpp
|
|
|
|
page/Frame.cpp
|
|
|
|
page/FrameDestructionObserver.cpp
|
|
|
|
page/FrameSnapshotting.cpp
|
|
|
|
page/FrameTree.cpp
|
|
|
|
page/FrameView.cpp
|
2018-04-24 19:48:53 +00:00
|
|
|
page/FrameViewLayoutContext.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/History.cpp
|
Allow some image overlay content to render in fully transparent image elements
https://bugs.webkit.org/show_bug.cgi?id=223781
<rdar://problem/75886351>
Reviewed by Tim Horton.
Source/WebCore:
Introduce `ImageOverlayController`, and use it to render selections in image overlay content when the image
overlay's host element is fully transparent.
Test: fast/images/image-extraction/mac/select-word-in-transparent-image-overlay.html
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::willBeRemovedFromFrame):
Add plumbing to allow `ImageOverlayController` to uninstall its `PageOverlay` when the document is about to be
detached. See `ImageOverlayController::` below.
* editing/SelectionRectGatherer.cpp:
(WebCore::SelectionRectGatherer::Notifier::~Notifier):
Have `SelectionRectGatherer` notify the image overlay controller as well, when selection rects change.
* page/ChromeClient.h:
(WebCore::ChromeClient::needsImageOverlayControllerForSelectionPainting const):
Add a new client hook that returns whether or not we should use `ImageOverlayController` to paint selections.
If not (i.e. we're on iOS, where we use UIKit to draw selections in the UI process), then we'll never install
page overlays, since `selectionRectsDidChange` is effectively a no-op.
* page/ImageOverlayController.cpp: Added.
(WebCore::ImageOverlayController::ImageOverlayController):
(WebCore::ImageOverlayController::selectionRectsDidChange):
When selection rects change, if the selection is inside an image overlay whose host is completely transparent
(or very close to being completely transparent), then remember the selection rects along with the renderer's
background color, and use this to render selection highlights separately, in a `PageOverlay`.
(WebCore::ImageOverlayController::documentDetached):
If the `Document` containing the current rendered overlay selection is detached, immediately uninstall the
current `PageOverlay`. This ensures that the overlays don't persist through navigation.
(WebCore::ImageOverlayController::installPageOverlayIfNeeded):
(WebCore::ImageOverlayController::uninstallPageOverlayIfNeeded):
Helper methods to add or remove the `PageOverlay` from the current `Page`.
(WebCore::ImageOverlayController::willMoveToPage):
Uninstall the current page overlay if needed.
(WebCore::ImageOverlayController::drawRect):
Use the information stored in `ImageOverlayController::selectionRectsDidChange` to render custom selection
rects.
* page/ImageOverlayController.h: Added.
* page/Page.cpp:
* page/Page.h:
Add an `ImageOverlayController` to the `Page`.
(WebCore::Page::imageOverlayController):
Source/WebKit:
Implement a new chrome client hook. See WebCore ChangeLog for more information.
* WebProcess/WebCoreSupport/WebChromeClient.h:
LayoutTests:
Adjust an existing layout test so that it actually checks what it was intended to check; add a new layout test
to cover the changes in this bug.
* fast/images/image-extraction/mac/select-word-in-draggable-image-overlay.html:
Drive-by fix: remove some extraneous imported scripts from this layout test, and additionally simplify the test
so that it doesn't rely on event sender to select text.
* fast/images/image-extraction/mac/select-word-in-transparent-image-overlay-expected-mismatch.html: Added.
* fast/images/image-extraction/mac/select-word-in-transparent-image-overlay.html: Added.
Add a new layout test with a fully transparent image element that covers a div of the same size, with a
background image that is identical to the image element's image. This emulates the behavior of certain websites
that prompted this fallback image overlay rendering codepath in the first place.
Canonical link: https://commits.webkit.org/235820@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-26 21:23:17 +00:00
|
|
|
page/ImageOverlayController.cpp
|
2021-06-29 00:39:15 +00:00
|
|
|
page/KeyboardScroll.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/IntersectionObserver.cpp
|
|
|
|
page/IntersectionObserverEntry.cpp
|
|
|
|
page/Location.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
page/LoggedInStatus.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/MemoryRelease.cpp
|
|
|
|
page/MouseEventWithHitTestResults.cpp
|
|
|
|
page/Navigator.cpp
|
|
|
|
page/NavigatorBase.cpp
|
2019-10-10 00:03:47 +00:00
|
|
|
page/NavigatorIsLoggedIn.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/OriginAccessEntry.cpp
|
|
|
|
page/Page.cpp
|
2021-05-15 00:29:19 +00:00
|
|
|
page/PageColorSampler.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/PageConfiguration.cpp
|
|
|
|
page/PageConsoleClient.cpp
|
|
|
|
page/PageDebuggable.cpp
|
|
|
|
page/PageGroup.cpp
|
|
|
|
page/PageGroupLoadDeferrer.cpp
|
|
|
|
page/PageOverlay.cpp
|
|
|
|
page/PageOverlayController.cpp
|
|
|
|
page/PageSerializer.cpp
|
|
|
|
page/Performance.cpp
|
|
|
|
page/PerformanceEntry.cpp
|
|
|
|
page/PerformanceLogging.cpp
|
|
|
|
page/PerformanceLoggingClient.cpp
|
Update User Timing interfaces to User Timing Level 3
https://bugs.webkit.org/show_bug.cgi?id=216787
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
Import missing case-sensitivity test case from upstream and update the results
of User Timing tests now that we support Level 3.
* web-platform-tests/user-timing/case-sensitivity.any-expected.txt: Added.
* web-platform-tests/user-timing/case-sensitivity.any.html: Added.
* web-platform-tests/user-timing/case-sensitivity.any.js: Added.
* web-platform-tests/user-timing/case-sensitivity.any.worker-expected.txt: Added.
* web-platform-tests/user-timing/case-sensitivity.any.worker.html: Added.
* web-platform-tests/user-timing/idlharness.any-expected.txt:
* web-platform-tests/user-timing/idlharness.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-entry-constructor.any-expected.txt:
* web-platform-tests/user-timing/mark-entry-constructor.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-errors.any-expected.txt:
* web-platform-tests/user-timing/mark-errors.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-l3.any-expected.txt:
* web-platform-tests/user-timing/mark-l3.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-measure-return-objects.any-expected.txt:
* web-platform-tests/user-timing/mark-measure-return-objects.any.worker-expected.txt:
* web-platform-tests/user-timing/measure-l3.any-expected.txt:
* web-platform-tests/user-timing/measure-l3.any.worker-expected.txt:
* web-platform-tests/user-timing/measure-with-dict.any-expected.txt:
* web-platform-tests/user-timing/measure-with-dict.any.worker-expected.txt:
* web-platform-tests/user-timing/measure_exception-expected.txt:
* web-platform-tests/user-timing/performance-measure-invalid.worker-expected.txt:
* web-platform-tests/user-timing/structured-serialize-detail.any-expected.txt:
* web-platform-tests/user-timing/structured-serialize-detail.any.worker-expected.txt:
Source/WebCore:
Adds support for User Timing Level 3 which adds more flexibility in how PerformanceMarks
and PerformanceMeasures are created via synthetic start/end times and associate 'details'
values serialized with events themselves.
Updates results to existing WPT and standalone tests.
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new files.
* page/Performance.cpp:
(WebCore::Performance::mark):
(WebCore::Performance::clearMarks):
(WebCore::Performance::measure):
(WebCore::Performance::clearMeasures):
* page/Performance.h:
* page/Performance.idl:
Update for new signatures for mark and measure, and rename of UserTiming to PerformanceUserTiming.
* page/PerformanceMark.cpp: Added.
(WebCore::peformanceNow):
(WebCore::PerformanceMark::create):
(WebCore::PerformanceMark::PerformanceMark):
(WebCore::PerformanceMark::detail):
* page/PerformanceMark.h:
* page/PerformanceMark.idl:
Add support for PerformanceMark's constructor `detail` getter. While the spec says to
serialize and the deserialize in the constructor, we only serialize, and delay deserialization
until the first access, which is a non-observable difference. We also utilize [CachedAttribute]
to only ever deserialize once per wrapper world (and also greatly simplify the GC shenanigans).
* page/PerformanceMarkOptions.h: Added.
* page/PerformanceMarkOptions.idl: Added.
Import and bind PerformanceMarkOptions dictionary to a new struct.
* page/PerformanceMeasure.cpp: Added.
(WebCore::PerformanceMeasure::create):
(WebCore::PerformanceMeasure::PerformanceMeasure):
(WebCore::PerformanceMeasure::detail):
* page/PerformanceMeasure.h:
* page/PerformanceMeasure.idl:
Like with PerformanceMark, but there is no constructor here, so we only need to handle adding
support for the detail getter.
* page/PerformanceMeasureOptions.h: Added.
* page/PerformanceMeasureOptions.idl: Added.
Import and bind PerformanceMeasureOptions dictionary to a new struct.
* page/PerformanceUserTiming.cpp:
(WebCore::restrictedMarkNamesToNavigationTimingFunctionMap):
(WebCore::restrictedMarkFunction):
(WebCore::isRestrictedMarkNameNonMainThread):
(WebCore::PerformanceUserTiming::isRestrictedMarkName):
Split up existing map to enable accessing it safely from a worker using conservative
callOnMainThreadAndWait approach, though since the map is immutable after initialization,
we can probably optimize this to allow concurrent querying in the future.
(WebCore::addPerformanceEntry):
Add helper, mirroring clearPerformanceEntries, to add entries.
(WebCore::PerformanceUserTiming::mark):
Matching the spec language, utilize the new PerformanceMark constructor to create
the mark.
(WebCore::PerformanceUserTiming::convertMarkToTimestamp const):
(WebCore::isNonEmptyDictionary):
(WebCore::PerformanceUserTiming::measure):
Implement measure support by dispatching various combinations of arguments to
overloads manually by inspecting the Variant.
* page/PerformanceUserTiming.h:
Renames class from UserTiming to PerformanceUserTiming to match file names.
LayoutTests:
Update error text due to some changes in which exceptions are thrown due to
new support for User Timing Level 3.
* performance-api/performance-measure-name-expected.txt:
* performance-api/performance-now-api-expected.txt:
* performance-api/user-timing-apis-expected.txt:
Canonical link: https://commits.webkit.org/229612@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-22 08:46:36 +00:00
|
|
|
page/PerformanceMark.cpp
|
|
|
|
page/PerformanceMeasure.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/PerformanceMonitor.cpp
|
|
|
|
page/PerformanceNavigation.cpp
|
Add support for Navigation Timing Level 2
https://bugs.webkit.org/show_bug.cgi?id=184363
Reviewed by Ryosuke Niwa.
LayoutTests/imported/w3c:
* web-platform-tests/navigation-timing/META.yml: Added.
* web-platform-tests/navigation-timing/dom_interactive_image_document-expected.txt: Added.
* web-platform-tests/navigation-timing/dom_interactive_image_document.html: Added.
* web-platform-tests/navigation-timing/dom_interactive_media_document-expected.txt: Added.
* web-platform-tests/navigation-timing/dom_interactive_media_document.html: Added.
* web-platform-tests/navigation-timing/idlharness.window.js:
* web-platform-tests/navigation-timing/nav2_test_attributes_exist-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_attributes_exist.html: Added.
This test fails because we have not implemented transferSize, encodedBodySize, and decodedBodySize as noted in PerformanceResourceTiming.idl
* web-platform-tests/navigation-timing/nav2_test_attributes_values-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_attributes_values.html: Added.
This test fails because we have not implemented transferSize, encodedBodySize, and decodedBodySize as noted in PerformanceResourceTiming.idl
* web-platform-tests/navigation-timing/nav2_test_document_open-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_document_open.html:
* web-platform-tests/navigation-timing/nav2_test_document_replaced-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_document_replaced.html:
* web-platform-tests/navigation-timing/nav2_test_frame_removed-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_instance_accessible_from_the_start-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_instance_accessible_from_the_start.html:
* web-platform-tests/navigation-timing/nav2_test_instance_accessors-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_instance_accessors.html: Added.
* web-platform-tests/navigation-timing/nav2_test_navigate_iframe-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_navigate_iframe.html: Added.
* web-platform-tests/navigation-timing/nav2_test_navigate_within_document-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_navigate_within_document.html:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_backforward-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_backforward.html:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_navigate-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_navigation_type_navigate.html: Added.
* web-platform-tests/navigation-timing/nav2_test_navigation_type_reload-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_reload.html:
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin-expected.txt: Added.
This test fails because our test infrastructure doesn't support loading from www.localhost.
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin.html: Copied from LayoutTests/imported/w3c/web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html.
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in-expected.txt:
This test fails because our test infrastructure doesn't support loading from www.localhost.
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html:
* web-platform-tests/navigation-timing/nav2_test_redirect_none-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_redirect_none.html: Added.
* web-platform-tests/navigation-timing/nav2_test_redirect_server-expected.txt:
This test failure needs further investigation.
* web-platform-tests/navigation-timing/nav2_test_redirect_server.html:
* web-platform-tests/navigation-timing/nav2_test_redirect_xserver-expected.txt:
This test fails because our test infrastructure doesn't support loading from www.localhost.
* web-platform-tests/navigation-timing/nav2_test_redirect_xserver.html:
* web-platform-tests/navigation-timing/nav2_test_unique_nav_instances-expected.txt: Added.
This test failure needs further investigation.
* web-platform-tests/navigation-timing/nav2_test_unique_nav_instances.html: Added.
* web-platform-tests/navigation-timing/po-navigation-expected.txt: Added.
* web-platform-tests/navigation-timing/po-navigation.html: Added.
* web-platform-tests/navigation-timing/resources/webperftestharness.js:
(test_namespace):
(test_attribute_exists):
(test_enum):
* web-platform-tests/navigation-timing/secure-connection-start-reuse.https-expected.txt: Added.
* web-platform-tests/navigation-timing/secure-connection-start-reuse.https.html: Added.
* web-platform-tests/navigation-timing/secure_connection_start_non_zero.https-expected.txt:
This test has been marked as flaky. It needs to be fixed to not rely on no initial connection reuse.
* web-platform-tests/navigation-timing/supported_navigation_type.any-expected.txt:
* web-platform-tests/navigation-timing/supported_navigation_type.any.worker-expected.txt:
* web-platform-tests/navigation-timing/test_document_onload-expected.txt: Added.
* web-platform-tests/navigation-timing/test_document_onload.html: Added.
This test failure needs further investigation.
* web-platform-tests/navigation-timing/unload-event-same-origin-check-expected.txt:
* web-platform-tests/navigation-timing/unload-event-same-origin-check.html:
* web-platform-tests/performance-timeline/META.yml: Added.
* web-platform-tests/performance-timeline/buffered-flag-after-timeout.any.js: Added.
(async_test.t.t.step_timeout):
* web-platform-tests/performance-timeline/buffered-flag-observer.any.js: Added.
* web-platform-tests/performance-timeline/get-invalid-entries-expected.txt: Added.
* web-platform-tests/performance-timeline/get-invalid-entries.html: Added.
* web-platform-tests/performance-timeline/idlharness.any.js: Added.
(async idl_array):
* web-platform-tests/performance-timeline/multiple-buffered-flag-observers.any.js: Added.
(promise_test):
* web-platform-tests/performance-timeline/not-clonable-expected.txt: Added.
* web-platform-tests/performance-timeline/not-clonable.html: Added.
* web-platform-tests/performance-timeline/observer-buffered-false.any.js: Added.
(async_test.t.t.step_timeout):
* web-platform-tests/performance-timeline/performanceentry-tojson.any.js: Added.
(test):
* web-platform-tests/performance-timeline/po-callback-mutate.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-disconnect-removes-observed-types.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-disconnect.any.js: Added.
(async_test):
(test):
* web-platform-tests/performance-timeline/po-entries-sort.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-getentries.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-mark-measure.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-observe-expected.txt: Added.
* web-platform-tests/performance-timeline/po-observe-repeated-type.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-observe.html: Added.
* web-platform-tests/performance-timeline/po-resource-expected.txt: Added.
* web-platform-tests/performance-timeline/po-resource.html: Added.
* web-platform-tests/performance-timeline/po-takeRecords.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/resources/postmessage-entry.html: Added.
* web-platform-tests/performance-timeline/resources/worker-invalid-entries.js: Added.
* web-platform-tests/performance-timeline/resources/worker-with-performance-observer.js: Added.
(catch):
* web-platform-tests/performance-timeline/supportedEntryTypes.any-expected.txt:
This test failure needs further investigation. It's a bindings generation problem I've unsuccessfully looked into before.
* web-platform-tests/performance-timeline/supportedEntryTypes.any.js:
(test):
* web-platform-tests/performance-timeline/supportedEntryTypes.any.worker-expected.txt:
* web-platform-tests/performance-timeline/webtiming-resolution.any.js: Added.
(testTimeResolution):
(timeByUserTiming):
* web-platform-tests/performance-timeline/worker-with-performance-observer-expected.txt: Added.
* web-platform-tests/performance-timeline/worker-with-performance-observer.html: Added.
* web-platform-tests/service-workers/service-worker/navigation-timing.https-expected.txt:
This existing test failure needs more investigation. We are probably close to a fix after this patch.
Source/WebCore:
This is basically just a new shape for exposing the same data as window.performance.navigation, but with a shape that fits better into the rest of the
performance timeline measurements that have been added to the web platform since performance.navigation.
I noted that exposing transfer size is problematic, and some of the tests for reading transfer size still fail.
There are still a few relatively minor test failures to fix in future patches. Each one is annotated in the LayoutTests ChangeLogs.
Tests: imported/w3c/web-platform-tests/navigation-timing/dom_interactive_image_document.html
imported/w3c/web-platform-tests/navigation-timing/dom_interactive_media_document.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_exist.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_values.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_instance_accessors.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_navigate_iframe.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_navigation_type_navigate.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_redirect_none.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_unique_nav_instances.html
imported/w3c/web-platform-tests/navigation-timing/po-navigation.html
imported/w3c/web-platform-tests/navigation-timing/secure-connection-start-reuse.https.html
imported/w3c/web-platform-tests/navigation-timing/test_document_onload.html
imported/w3c/web-platform-tests/performance-timeline/get-invalid-entries.html
imported/w3c/web-platform-tests/performance-timeline/not-clonable.html
imported/w3c/web-platform-tests/performance-timeline/po-observe.html
imported/w3c/web-platform-tests/performance-timeline/po-resource.html
imported/w3c/web-platform-tests/performance-timeline/worker-with-performance-observer.html
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSPerformanceEntryCustom.cpp:
(WebCore::toJSNewlyCreated):
* dom/Document.cpp:
(WebCore::Document::setReadyState):
Sometimes the ready state jumps right to Complete without hitting Interactive along the way.
When this happens, we want to mark both m_documentTiming.domComplete and m_documentTiming.domInteractive.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::notifyFinished):
Call addNavigationTiming in notifyFinished to create the navigation timing object when we are done navigating
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didFinishLoading):
* loader/ResourceLoader.h:
* loader/ResourceTiming.cpp:
(WebCore::ResourceTiming::fromLoad):
Add a URL parameter. Sometimes we need to use the request's URL and sometimes the response's. Different specs written at different times.
(WebCore::ResourceTiming::populateServerTiming const):
(WebCore::ResourceTiming::populateServerTiming): Deleted.
* loader/ResourceTiming.h:
(WebCore::ResourceTiming::url const):
(WebCore::ResourceTiming::initiator const):
(WebCore::ResourceTiming::loadTiming const):
(WebCore::ResourceTiming::networkLoadMetrics const):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::reportResourceTiming):
* page/Performance.cpp:
(WebCore::Performance::getEntries const):
(WebCore::Performance::getEntriesByType const):
(WebCore::Performance::getEntriesByName const):
(WebCore::Performance::appendBufferedEntriesByType const):
(WebCore::Performance::addNavigationTiming):
(WebCore::Performance::registerPerformanceObserver):
(WebCore::Performance::queueEntry):
(WebCore::Performance::scheduleTaskIfNeeded):
* page/Performance.h:
* page/PerformanceEntry.h:
(WebCore::PerformanceEntry::startTime const):
(WebCore::PerformanceEntry::duration const):
(WebCore::PerformanceEntry::isResource const): Deleted.
(WebCore::PerformanceEntry::isMark const): Deleted.
(WebCore::PerformanceEntry::isMeasure const): Deleted.
(WebCore::PerformanceEntry::isPaint const): Deleted.
* page/PerformanceMark.h:
(isType): Deleted.
SPECIALIZE_TYPE_TRAITS_BEGIN/END doesn't work well with PerformanceNavigationTiming which inherits from PerformanceResourceTiming which both have distinct types.
is<PerformanceResourceTiming> doesn't give us the info we need. I replaced that with "switch (entry->performanceEntryType())" in the one place it's used, and it works like a charm.
Also renamed type to performanceEntryType so it doesn't conflict with PerformanceNavigationTiming::type, which is specified in the idl.
* page/PerformanceMeasure.h:
(isType): Deleted.
* page/PerformanceNavigationTiming.cpp: Added.
(WebCore::toPerformanceNavigationTimingNavigationType):
(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::type const):
(WebCore::PerformanceNavigationTiming::redirectCount const):
(WebCore::PerformanceNavigationTiming::startTime const):
(WebCore::PerformanceNavigationTiming::duration const):
* page/PerformanceNavigationTiming.h: Added.
* page/PerformanceNavigationTiming.idl: Copied from Source/WebCore/page/PerformanceObserver.idl.
* page/PerformanceObserver.cpp:
(WebCore::PerformanceObserver::takeRecords):
(WebCore::PerformanceObserver::disconnect):
(WebCore::PerformanceObserver::deliver):
(WebCore::PerformanceObserver::supportedEntryTypes):
* page/PerformanceObserver.h:
* page/PerformanceObserver.idl:
* page/PerformanceObserverEntryList.cpp:
(WebCore::PerformanceObserverEntryList::getEntriesByName const):
* page/PerformancePaintTiming.h:
(isType): Deleted.
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::nextHopProtocol const):
(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::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp const):
* page/PerformanceResourceTiming.h:
(WebCore::PerformanceResourceTiming::initiatorType const):
(isType): Deleted.
* page/PerformanceResourceTiming.idl:
* platform/network/BlobResourceHandle.cpp:
(WebCore::doNotifyFinish):
* platform/network/NetworkLoadMetrics.h:
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::didFinishLoading):
* platform/network/SynchronousLoaderClient.cpp:
(WebCore::SynchronousLoaderClient::didFinishLoading):
* platform/network/SynchronousLoaderClient.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
Pass metrics including the response end time from NSURLConnection so we don't assert in WebKitLegacy.
* platform/network/cocoa/NetworkLoadMetrics.mm:
(WebCore::copyTimingData):
Use currentRequest instead of passing in the response so we can call it from didFinishLoading, where we don't have a response stored anywhere.
We're just looking for whether it's http or https, so the currentRequest (which is the request after all the redirects) fits our purpose.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::handleDataURL):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]):
Source/WebKit:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
Mark reused TLS connections in complete metrics like I did in incomplete metrics in r277493.
Source/WebKitLegacy:
* WebCoreSupport/PingHandle.h:
Source/WTF:
* Scripts/Preferences/WebPreferencesExperimental.yaml:
LayoutTests:
* TestExpectations:
Annoyingly secure_connection_start_non_zero.https.html becomes flaky with a correct implementation because it assumes
that no connection is reused. However, when running this test after other tests, another connection is often reused.
* performance-api/paint-timing/performance-observer-first-contentful-paint-expected.txt:
* performance-api/paint-timing/performance-observer-first-contentful-paint.html:
* performance-api/performance-observer-api-expected.txt:
* performance-api/performance-timeline-api-expected.txt:
* performance-api/resources/timeline-api.js:
* platform/mac-wk1/imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_values-expected.txt:
Next hop protocol isn't implemented in ResourceHandle. That's probably no big deal because WebKitLegacy is deprecated and not used by Safari.
Canonical link: https://commits.webkit.org/237930@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-20 00:33:02 +00:00
|
|
|
page/PerformanceNavigationTiming.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/PerformanceObserver.cpp
|
|
|
|
page/PerformanceObserverEntryList.cpp
|
|
|
|
page/PerformanceResourceTiming.cpp
|
2018-05-11 18:33:43 +00:00
|
|
|
page/PerformanceServerTiming.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/PerformanceTiming.cpp
|
|
|
|
page/PerformanceUserTiming.cpp
|
2019-01-29 03:15:02 +00:00
|
|
|
page/PointerCaptureController.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/PointerLockController.cpp
|
|
|
|
page/PrintContext.cpp
|
2018-09-06 21:37:15 +00:00
|
|
|
page/ProcessWarming.cpp
|
2018-10-04 00:50:46 +00:00
|
|
|
page/Quirks.cpp
|
2018-04-12 23:55:02 +00:00
|
|
|
page/RemoteDOMWindow.cpp
|
|
|
|
page/RemoteFrame.cpp
|
requestAnimationFrame should execute before the next frame
https://bugs.webkit.org/show_bug.cgi?id=177484
Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-04-10
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
Add trace points for the page RenderingUpdate.
* web-platform-tests/resize-observer/resources/resizeTestHelper.js:
Change ResizeTestHelper.TIMEOUT to be 1 second instead of 100 ms which
is too short for layout tests.
Source/WebCore:
This change fixes these issues with animation timing:
1. Calling the requestAnimationFrame callbacks would have happened when
the DisplayLink fires. This may have happened even if the frame is
missed and no display is committed.
2. Style changes and layout triggered by script could trigger painting
at more than 60fps. CoreAnimation commits could happen at more than
60fps, although WindowServer will throttle those, and only some will
be shown on the screen.
This change introduces a new paint scheduling model where painting is
driven by a "RenderingUpdateScheduler", which only triggers paints once
per 16.7ms frame.
Code that previously scheduled a compositing layer flush now schedules a
"RenderingUpdate", and that update is driven by a DisplayRefreshMonitor
callback. When the render happens, we service requestAnimationFrame callbacks,
Web Animations, intersection observations and resize observations per the
"Update the rendering" step of the HTML Event Loop specification:
<https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering>.
In the future, more rendering steps will be added to this code.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
Fix layout tests by adding null check.
* animation/DocumentAnimationScheduler.cpp: Removed.
* animation/DocumentAnimationScheduler.h: Removed.
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::DocumentTimeline):
(WebCore::DocumentTimeline::updateThrottlingState):
(WebCore::DocumentTimeline::suspendAnimations):
(WebCore::DocumentTimeline::resumeAnimations):
(WebCore::DocumentTimeline::liveCurrentTime const):
(WebCore::DocumentTimeline::currentTime):
(WebCore::DocumentTimeline::cacheCurrentTime):
(WebCore::DocumentTimeline::animationTimingDidChange):
(WebCore::DocumentTimeline::scheduleAnimationResolution):
(WebCore::DocumentTimeline::unscheduleAnimationResolution):
(WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
(WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):
(WebCore::DocumentTimeline::scheduleNextTick):
(WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement):
Simplify this function by handling the case of no-animations separately.
(WebCore::DocumentTimeline::resolveAnimationsForElement):
Simplify the loop and delete hasPendingAcceleratedAnimations because it
is initialized to true and is not changed inside the loop.
(WebCore::DocumentTimeline::scheduleAnimationResolutionIfNeeded): Deleted.
(WebCore::DocumentTimeline::animationResolutionTimerFired): Deleted.
* animation/DocumentTimeline.h:
* dom/Document.cpp:
(WebCore::Document::resolveStyle):
There is no need to force update in resolveStyle(). notifyFlushRequired()
will be called eventually which will scheduleRenderingUpdate().
(WebCore::Document::prepareForDestruction):
(WebCore::Document::updateAnimationsAndSendEvents):
(WebCore::Document::serviceRequestAnimationFrameCallbacks):
(WebCore::Document::windowScreenDidChange):
(WebCore::Document::scheduleRenderingUpdate):
(WebCore::Document::updateIntersectionObservations):
(WebCore::Document::addResizeObserver):
(WebCore::Document::updateResizeObservations):
(WebCore::Document::scheduleForcedIntersectionObservationUpdate): Deleted.
(WebCore::Document::scheduleResizeObservations): Deleted.
(WebCore::Document::animationScheduler): Deleted.
No need to schedule web-animations, intersection observations and resize
observations updates separately. All of them will be updated through the
"Update the rendering" step, i.e. Page::updateRendering().
* dom/Document.h:
(WebCore::Document::numberOfIntersectionObservers const):
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
(WebCore::ScriptedAnimationController::scheduleAnimation):
(WebCore::ScriptedAnimationController::animationTimerFired):
(WebCore::ScriptedAnimationController::serviceScriptedAnimations): Deleted.
(WebCore::ScriptedAnimationController::documentAnimationSchedulerDidFire): Deleted.
* dom/ScriptedAnimationController.h:
* page/FrameView.cpp:
(WebCore::FrameView::didLayout):
(WebCore::FrameView::viewportContentsChanged):
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::layoutTimerFired):
* page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::observe):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::layoutIfNeeded):
(WebCore::Page::updateRendering):
(WebCore::Page::renderingUpdateScheduler):
(WebCore::Page::willDisplayPage): Deleted.
(WebCore::Page::addDocumentNeedingIntersectionObservationUpdate): Deleted.
(WebCore::Page::updateIntersectionObservations): Deleted.
(WebCore::Page::scheduleForcedIntersectionObservationUpdate): Deleted.
(WebCore::Page::hasResizeObservers const): Deleted.
(WebCore::Page::gatherDocumentsNeedingResizeObservationCheck): Deleted.
(WebCore::Page::checkResizeObservations): Deleted.
(WebCore::Page::scheduleResizeObservations): Deleted.
(WebCore::Page::notifyResizeObservers): Deleted.
* page/Page.h:
(WebCore::Page::setNeedsCheckResizeObservations): Deleted.
(WebCore::Page::needsCheckResizeObservations const): Deleted.
The IntersectionObserver and the ResizeObserver do not need to schedule
their own timers. The RenderingUpdateScheduler will schedule the "Update
the rendering" step in which these obverses will be served.
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::didChangeViewExposedRect):
(WebCore::PageOverlayController::notifyFlushRequired):
Force committing the layers to be 60 fps at maximum.
* page/RenderingUpdateScheduler.cpp: Added.
(WebCore::RenderingUpdateScheduler::RenderingUpdateScheduler):
(WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
(WebCore::RenderingUpdateScheduler::isScheduled const):
(WebCore::RenderingUpdateScheduler::startTimer):
(WebCore::RenderingUpdateScheduler::clearScheduled):
(WebCore::RenderingUpdateScheduler::createDisplayRefreshMonitor const):
(WebCore::RenderingUpdateScheduler::windowScreenDidChange):
(WebCore::RenderingUpdateScheduler::displayRefreshFired):
(WebCore::RenderingUpdateScheduler::scheduleCompositingLayerFlush):
* page/RenderingUpdateScheduler.h: Added.
(WebCore::RenderingUpdateScheduler::create):
* page/ResizeObserver.cpp:
(WebCore::ResizeObserver::observe):
(WebCore::ResizeObserver::scheduleObservations): Deleted.
* page/ResizeObserver.h:
(WebCore::ResizeObserver::hasActiveObservations const):
* page/ios/ContentChangeObserver.h:
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
* page/scrolling/ScrollingStateTree.cpp:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::scheduleLayerFlushNow):
(WebCore::RenderLayerCompositor::layerTreeAsText):
Source/WebKit:
Replace the calls to Page::layoutIfNeeded() and willDisplayPage() by
a single call to Page::updateRendering(). This new function implements
"Update the rendering" step of the HTML Event Loop specification
<https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering>.
* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::scheduleCompositingLayerFlush):
(WebKit::DrawingAreaCoordinatedGraphics::updateBackingStoreState):
(WebKit::DrawingAreaCoordinatedGraphics::display):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::layerFlushTimerFired):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
-- Call Page::updateRendering() to make sure that "Update the rendering"
happens immediately before updating the page.
-- Move the call to RemoteLayerBackingStoreCollection::willFlushLayers()
to be exactly before flushing the layers. This fixes the assertion
ASSERT(m_inLayerFlush) which was firing when running a layout test.
RemoteLayerTreeDrawingArea::flushLayers() now can call itself through
TestRunner::notifyDone(). flushLayers() was calling willFlushLayers()
twice before calling didFlushLayers().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::layoutIfNeeded):
(WebKit::WebPage::updateRendering):
(WebKit::WebPage::willDisplayPage): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
Source/WebKitLegacy/mac:
* WebView/WebView.mm:
(-[WebView _viewWillDrawInternal]):
(-[WebView _flushCompositingChanges]):
Call Page::updateRendering() which implements "Update the rendering"
step of the HTML Event Loop specification.
Source/WebKitLegacy/win:
* WebView.cpp:
(WebView::updateBackingStore):
(WebView::flushPendingGraphicsLayerChangesSoon):
(WebView::flushPendingGraphicsLayerChanges):
Call Page::updateRendering() which implements "Update the rendering"
step of the HTML Event Loop specification.
Source/WTF:
Add trace points for the page RenderingUpdate.
* wtf/SystemTracing.h:
Tools:
Add trace points for the page RenderingUpdate.
* Tracing/SystemTracePoints.plist:
LayoutTests:
* TestExpectations:
There is a slight difference between the actual DRT and the expected DRT
due to animation timing change. But these two tests are not animating
correctly if they are opened in Safari with web animation turned on.
* accessibility/mac/selection-notification-focus-change-expected.txt:
* accessibility/mac/selection-notification-focus-change.html:
Remove the debug statements form notificationCallback() since the number
of times this function is called back and the order of notifications are
not defined. This test has been flaky and some trials were made to make
it more reliable. With this change it became flaky again.
* animations/animation-multiple-callbacks-timestamp.html:
Fix variable names used by an error message.
* animations/no-style-recalc-during-accelerated-animation-expected.txt:
* animations/no-style-recalc-during-accelerated-animation.html:
One extra styleReclc was incurred due to the document styleRecalcTimer.
I think this timer is not needed anymore. I will look at removing it in
a separate patch.
* animations/resources/animation-test-helpers.js:
(waitForAnimationToStart):
The expectation that animation will start at the beginning of the next
event loop is not true anymore. The animation will start at the time the
requestAnimationFrame fires.
* compositing/video/video-clip-change-src.html:
This test loads a video data and pushes it to the encoder. Originally it
used to wait 150 ms after receiving the second canplaythrough. I had to
change this timing to 250 ms.
* css3/filters/composited-during-animation.html:
Ditto. setTimeout({...}, 0) versus requestAnimationFrame.
* media/media-controls-accessibility.html:
Updating the accessibility button happens asynchronously, see
[WebAccessibilityObjectWrapper accessibilityPerformPressAction]. Due to
changing the page update timing, this test became flaky. Originally it used
to setTimeout({...}, 10) to ensure the stringValue of the mutate button
was changed after it was pressed. The fix is to loop using rAF till the
stringValue changes.
* platform/mac-wk2/accessibility/mac/selection-notification-focus-change-expected.txt: Removed.
The number of time notificationCallback() is called and the order of
notifications are not defined. And this is why we have two expected files:
one for WK1 and the other for WK2. Since the test is now simplified, we
can get rid of this duplication. We will test the minimum reliable thing
we can test.
Canonical link: https://commits.webkit.org/211093@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-11 05:44:13 +00:00
|
|
|
page/RenderingUpdateScheduler.cpp
|
2019-03-29 08:37:46 +00:00
|
|
|
page/ResizeObservation.cpp
|
|
|
|
page/ResizeObserver.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/ResourceUsageOverlay.cpp
|
|
|
|
page/ResourceUsageThread.cpp
|
|
|
|
page/RuntimeEnabledFeatures.cpp
|
|
|
|
page/Screen.cpp
|
2020-01-18 05:49:24 +00:00
|
|
|
page/ScrollBehavior.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/SecurityOrigin.cpp
|
|
|
|
page/SecurityOriginData.cpp
|
|
|
|
page/SecurityPolicy.cpp
|
|
|
|
page/SettingsBase.cpp
|
2020-05-08 20:46:10 +00:00
|
|
|
page/ShareDataReader.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/SocketProvider.cpp
|
|
|
|
page/SpatialNavigation.cpp
|
|
|
|
page/SuspendableTimer.cpp
|
|
|
|
page/TextIndicator.cpp
|
Add some bindings-related bookkeeping to UndoManager and UndoItem
https://bugs.webkit.org/show_bug.cgi?id=193111
<rdar://problem/44807048>
Reviewed by Ryosuke Niwa.
This patch is work in progress towards supporting `UndoManager.addItem()`. Here, we add helper methods to
UndoItem and UndoManager which later patches will exercise, as well as introduce some custom bindings to
properly handle the case where UndoItems are given anonymous JavaScript functions (see below for more details).
No new tests, because there is no script-observable change in behavior yet. When `addItems()` is hooked up, I
will write a test to verify that the undo and redo JavaScript functions survive garbage collection.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSUndoItemCustom.cpp:
(WebCore::JSUndoItem::visitAdditionalChildren):
Have each JSUndoItem visit its undo and redo callback functions to ensure that the JavaScript wrapper objects
for these functions are not garbage collected underneath the item.
(WebCore::JSUndoItemOwner::isReachableFromOpaqueRoots):
Consider the undo item wrapper reachable from opaque roots if it is associated with its UndoManager's Document.
This ensures that if script isn't holding on to a reference to the wrapper (for instance, by calling
`UndoManager.addItem(new UndoItem({ ... }))`), we still protect the corresponding JSUndoItem as long as the
UndoManager's Document is alive. In the case where the undo item is not associated with a document, either (1)
script is keeping a reference to it, in which case it will be trivially reachable, or (2) script won't be able
to observe the destruction of the wrapper anyways (e.g. calling `new UndoItem({ ... })` by itself).
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
Invalidate all undo items when the document is about to go away.
* page/UndoItem.cpp:
(WebCore::UndoItem::setUndoManager):
(WebCore::UndoItem::invalidate):
(WebCore::UndoItem::isValid const):
Add a few helpers, to be used in a future patch. We consider an UndoItem valid if it has been added to an
UndoManager, and is thus associated with a document.
(WebCore::UndoItem::document const):
* page/UndoItem.h:
* page/UndoItem.idl:
* page/UndoManager.cpp:
(WebCore::UndoManager::UndoManager):
(WebCore::UndoManager::addItem):
Have an UndoManager keep its UndoItems alive. These UndoItems remain in this set until either the document will
be destroyed, or the corresponding undo action is no longer needed because the platform undo stack has changed
(this latter behavior is yet to be implemented).
(WebCore::UndoManager::removeItem):
(WebCore::UndoManager::removeAllItems):
* page/UndoManager.h:
(WebCore::UndoManager::UndoManager): Deleted.
* page/scrolling/ScrollingTreeScrollingNode.cpp:
Unified build fix.
Canonical link: https://commits.webkit.org/208215@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-01-23 02:06:53 +00:00
|
|
|
page/UndoItem.cpp
|
2019-01-11 18:28:06 +00:00
|
|
|
page/UndoManager.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/UserContentController.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
page/UserContentProvider.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/UserContentURLPattern.cpp
|
|
|
|
page/VisitedLinkStore.cpp
|
2017-11-22 22:20:26 +00:00
|
|
|
page/VisualViewport.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/WheelEventDeltaFilter.cpp
|
2019-10-10 00:24:44 +00:00
|
|
|
page/WheelEventTestMonitor.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/WindowFeatures.cpp
|
|
|
|
page/WindowFocusAllowedIndicator.cpp
|
|
|
|
page/WorkerNavigator.cpp
|
|
|
|
page/csp/ContentSecurityPolicy.cpp
|
2018-05-08 03:51:10 +00:00
|
|
|
page/csp/ContentSecurityPolicyClient.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/csp/ContentSecurityPolicyDirective.cpp
|
|
|
|
page/csp/ContentSecurityPolicyDirectiveList.cpp
|
|
|
|
page/csp/ContentSecurityPolicyDirectiveNames.cpp
|
|
|
|
page/csp/ContentSecurityPolicyMediaListDirective.cpp
|
|
|
|
page/csp/ContentSecurityPolicyResponseHeaders.cpp
|
|
|
|
page/csp/ContentSecurityPolicySource.cpp
|
|
|
|
page/csp/ContentSecurityPolicySourceList.cpp
|
|
|
|
page/csp/ContentSecurityPolicySourceListDirective.cpp
|
2018-04-26 07:54:19 +00:00
|
|
|
page/scrolling/AsyncScrollingCoordinator.cpp
|
2020-12-03 09:50:39 +00:00
|
|
|
page/scrolling/ScrollSnapOffsetsInfo.cpp
|
2020-08-30 17:25:15 +00:00
|
|
|
page/scrolling/ScrollLatchingController.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/scrolling/ScrollingConstraints.cpp
|
|
|
|
page/scrolling/ScrollingCoordinator.cpp
|
2021-02-15 21:48:10 +00:00
|
|
|
page/scrolling/ScrollingMomentumCalculator.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/scrolling/ScrollingStateFixedNode.cpp
|
Source/WebCore:
Add "frame hosting" nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=193753
Reviewed by Antti Koivisto.
When the scrolling tree crosses frame boundaries, mutations in the parent frame currently
require the iframe's scrolling node to get reparented in a new ancestor, which requires
a layer tree walk of the parent frame. This is error-prone, and not very future-proof.
Fix this by introducing "frame hosting" scrolling tree nodes. These are mostly inert
nodes that are owned by the RenderIFrame's layer backing in the parent frame, and exist
to provide a consistent parent node for the subframe's scrolling node.
This patch adds the node types, but does not instantiate them yet.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::operator<<):
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingStateFrameHostingNode.cpp: Added.
(WebCore::ScrollingStateFrameHostingNode::create):
(WebCore::ScrollingStateFrameHostingNode::ScrollingStateFrameHostingNode):
(WebCore::ScrollingStateFrameHostingNode::clone):
(WebCore::ScrollingStateFrameHostingNode::dumpProperties const):
* page/scrolling/ScrollingStateFrameHostingNode.h: Added.
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::isFrameHostingNode const):
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::createNode):
* page/scrolling/ScrollingTreeFrameHostingNode.cpp: Added.
(WebCore::ScrollingTreeFrameHostingNode::create):
(WebCore::ScrollingTreeFrameHostingNode::ScrollingTreeFrameHostingNode):
(WebCore::ScrollingTreeFrameHostingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameHostingNode::updateLayersAfterAncestorChange):
(WebCore::ScrollingTreeFrameHostingNode::dumpProperties const):
* page/scrolling/ScrollingTreeFrameHostingNode.h: Added.
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::isFrameHostingNode const):
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::createScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::createScrollingTreeNode):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
(WebCore::operator<<):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::scrollCoordinationRoleForNodeType):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerWithRole):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
* rendering/RenderLayerCompositor.h:
Source/WebKit:
Create "frame hosting" nodes for the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=193753
Reviewed by Antti Koivisto.
When the scrolling tree crosses frame boundaries, mutations in the parent frame currently
require the iframe's scrolling node to get reparented in a new ancestor, which requires
a layer tree walk of the parent frame. This is error-prone, and not very future-proof.
Fix this by introducing "frame hosting" scrolling tree nodes. These are mostly inert
nodes that are owned by the RenderIFrame's layer backing in the parent frame, and exist
to provide a consistent parent node for the subframe's scrolling node.
This patch adds the node types, but does not instantiate them yet.
* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateFrameHostingNode>::encode):
(ArgumentCoder<ScrollingStateFrameHostingNode>::decode):
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::dump):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createScrollingTreeNode):
* UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
Canonical link: https://commits.webkit.org/208281@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-01-24 16:10:43 +00:00
|
|
|
page/scrolling/ScrollingStateFrameHostingNode.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/scrolling/ScrollingStateFrameScrollingNode.cpp
|
|
|
|
page/scrolling/ScrollingStateNode.cpp
|
2019-06-23 19:34:44 +00:00
|
|
|
page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
page/scrolling/ScrollingStateOverflowScrollingNode.cpp
|
Source/WebCore:
Scrolling tree should reposition non-stacking order descendents of overflow:scroll
https://bugs.webkit.org/show_bug.cgi?id=195608
Reviewed by Zalan Bujtas.
Step 1: add scrolling tree positioning nodes classes (but don't create them yet).
Add Scrolling{State,Tree}PositionedNode to track composited layers that have to be repositioned when
an async overflow:scroll scrolls. There are two instances in which this is necessary, reflected by
the values of ScrollPositioningBehavior:
ScrollPositioningBehavior::Moves - a composited layer whose containing block chain includes an
async overflow scroller, but whose composited (i.e. z-order) parent is outside of the overflow.
When the overflow scrolls, this layer has to move along with the overflow.
ScrollPositioningBehavior::Stationary - a composited layer whose containing block chain skips the
overflow scroller, but whose compositing (z-order) parent is the scroller, or inside the scroller.
This only applies to position:absolute, on, for example, an overflow:scroll ith opacity.
PositionedNodes are modeled after Fixed/Sticky nodes, with a new type of layout constraint just called LayoutConstraints.
This patch adds support for PositionedNodes in the scrolling trees, but RenderLayerCompositor::computeCoordinatedPositioningForLayer()
is just a stub so the new node types aren't created yet.
RenderLayerBacking stores a ScrollingNodeID for the positioning role (just like the other roles). Since the Positioning
role is about position relative to ancestors, a node with both Positioning and FrameHosting or Scrolling roles treats
the Positioning node as the parent of the other types. A node should never have both Positioning and ViewportConstrained roles.
Test: scrollingcoordinator/scrolling-tree/positioned-nodes.html
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::setPositionedNodeGeometry):
(WebCore::AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingConstraints.cpp:
(WebCore::operator<<):
* page/scrolling/ScrollingConstraints.h:
(WebCore::LayoutConstraints::LayoutConstraints):
(WebCore::LayoutConstraints::operator== const):
(WebCore::LayoutConstraints::operator!= const):
(WebCore::LayoutConstraints::alignmentOffset const):
(WebCore::LayoutConstraints::setAlignmentOffset):
(WebCore::LayoutConstraints::layerPositionAtLastLayout const):
(WebCore::LayoutConstraints::setLayerPositionAtLastLayout):
(WebCore::LayoutConstraints::scrollPositioningBehavior const):
(WebCore::LayoutConstraints::setScrollPositioningBehavior):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::operator<<):
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::setPositionedNodeGeometry):
(WebCore::ScrollingCoordinator::setRelatedOverflowScrollingNodes):
* page/scrolling/ScrollingCoordinatorTypes.h:
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::isPositionedNode const):
* page/scrolling/ScrollingStatePositionedNode.cpp: Added.
(WebCore::ScrollingStatePositionedNode::create):
(WebCore::ScrollingStatePositionedNode::ScrollingStatePositionedNode):
(WebCore::ScrollingStatePositionedNode::clone):
(WebCore::ScrollingStatePositionedNode::setAllPropertiesChanged):
(WebCore::ScrollingStatePositionedNode::setRelatedOverflowScrollingNodes):
(WebCore::ScrollingStatePositionedNode::updateConstraints):
(WebCore::ScrollingStatePositionedNode::dumpProperties const):
* page/scrolling/ScrollingStatePositionedNode.h: Added.
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::createNode):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode):
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::isPositionedNode const):
* page/scrolling/cocoa/ScrollingTreePositionedNode.h: Copied from Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNode.h.
* page/scrolling/cocoa/ScrollingTreePositionedNode.mm: Added.
(WebCore::ScrollingTreePositionedNode::create):
(WebCore::ScrollingTreePositionedNode::ScrollingTreePositionedNode):
(WebCore::ScrollingTreePositionedNode::~ScrollingTreePositionedNode):
(WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
(WebCore::ScrollingTreePositionedNode::applyLayerPositions):
(WebCore::ScrollingTreePositionedNode::relatedNodeScrollPositionDidChange):
(WebCore::ScrollingTreePositionedNode::dumpProperties const):
* page/scrolling/cocoa/ScrollingTreeStickyNode.h:
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::createScrollingTreeNode):
* platform/ScrollTypes.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::coordinatedScrollingRoles const):
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
(WebCore::scrollCoordinationRoleForNodeType):
(WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeForViewportConstrainedRole):
(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
(WebCore::RenderLayerCompositor::updateScrollingNodeForPositioningRole):
* rendering/RenderLayerCompositor.h:
Source/WebKit:
Scrolling tree should reposition non-stacking order descendents of overflow:scroll.
https://bugs.webkit.org/show_bug.cgi?id=195608
Reviewed by Zalan Bujtas.
Step 1: add scrolling tree positioning nodes classes (but don't create them yet).
Add Scrolling{State,Tree}PositionedNode to track composited layers that have to be repositioned when
an async overflow:scroll scrolls. There are two instances in which this is necessary, reflected by
the values of ScrollPositioningBehavior:
ScrollPositioningBehavior::Moves - a composited layer whose containing block chain includes an
async overflow scroller, but whose composited (i.e. z-order) parent is outside of the overflow.
When the overflow scrolls, this layer has to move along with the overflow.
ScrollPositioningBehavior::Stationary - a composited layer whose containing block chain skips the
overflow scroller, but whose compositing (z-order) parent is the scroller, or inside the scroller.
This only applies to position:absolute, on, for example, an overflow:scroll ith opacity.
PositionedNodes are modeled after Fixed/Sticky nodes, with a new type of layout constraint just called LayoutConstraints.
This patch adds support for PositionedNodes in the scrolling trees, but RenderLayerCompositor::computeCoordinatedPositioningForLayer()
is just a stub so the new node types aren't created yet.
RenderLayerBacking stores a ScrollingNodeID for the positioning role (just like the other roles). Since the Positioning
role is about position relative to ancestors, a node with both Positioning and FrameHosting or Scrolling roles treats
the Positioning node as the parent of the other types. A node should never have both Positioning and ViewportConstrained roles.
* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
(ArgumentCoder<ScrollingStatePositionedNode>::encode):
(ArgumentCoder<ScrollingStatePositionedNode>::decode):
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::dump):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<LayoutConstraints>::encode):
(IPC::ArgumentCoder<LayoutConstraints>::decode):
(IPC::ArgumentCoder<StickyPositionViewportConstraints>::decode):
* Shared/WebCoreArgumentCoders.h:
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createScrollingTreeNode):
* UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
LayoutTests:
Scrolling tree should reposition non-stacking order descendents of overflow:scroll
https://bugs.webkit.org/show_bug.cgi?id=195608
Reviewed by Zalan Bujtas.
The results of this test will change when we enable positioned nodes. It tests various
combinations of overflow and stacking.
* platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt: Added.
* scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt: Added.
* scrollingcoordinator/scrolling-tree/positioned-nodes.html: Added.
Canonical link: https://commits.webkit.org/210004@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-13 22:06:18 +00:00
|
|
|
page/scrolling/ScrollingStatePositionedNode.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/scrolling/ScrollingStateScrollingNode.cpp
|
|
|
|
page/scrolling/ScrollingStateStickyNode.cpp
|
|
|
|
page/scrolling/ScrollingStateTree.cpp
|
|
|
|
page/scrolling/ScrollingThread.cpp
|
|
|
|
page/scrolling/ScrollingTree.cpp
|
Source/WebCore:
Add "frame hosting" nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=193753
Reviewed by Antti Koivisto.
When the scrolling tree crosses frame boundaries, mutations in the parent frame currently
require the iframe's scrolling node to get reparented in a new ancestor, which requires
a layer tree walk of the parent frame. This is error-prone, and not very future-proof.
Fix this by introducing "frame hosting" scrolling tree nodes. These are mostly inert
nodes that are owned by the RenderIFrame's layer backing in the parent frame, and exist
to provide a consistent parent node for the subframe's scrolling node.
This patch adds the node types, but does not instantiate them yet.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::operator<<):
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingStateFrameHostingNode.cpp: Added.
(WebCore::ScrollingStateFrameHostingNode::create):
(WebCore::ScrollingStateFrameHostingNode::ScrollingStateFrameHostingNode):
(WebCore::ScrollingStateFrameHostingNode::clone):
(WebCore::ScrollingStateFrameHostingNode::dumpProperties const):
* page/scrolling/ScrollingStateFrameHostingNode.h: Added.
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::isFrameHostingNode const):
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::createNode):
* page/scrolling/ScrollingTreeFrameHostingNode.cpp: Added.
(WebCore::ScrollingTreeFrameHostingNode::create):
(WebCore::ScrollingTreeFrameHostingNode::ScrollingTreeFrameHostingNode):
(WebCore::ScrollingTreeFrameHostingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameHostingNode::updateLayersAfterAncestorChange):
(WebCore::ScrollingTreeFrameHostingNode::dumpProperties const):
* page/scrolling/ScrollingTreeFrameHostingNode.h: Added.
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::isFrameHostingNode const):
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::createScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::createScrollingTreeNode):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
(WebCore::operator<<):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::scrollCoordinationRoleForNodeType):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerWithRole):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
* rendering/RenderLayerCompositor.h:
Source/WebKit:
Create "frame hosting" nodes for the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=193753
Reviewed by Antti Koivisto.
When the scrolling tree crosses frame boundaries, mutations in the parent frame currently
require the iframe's scrolling node to get reparented in a new ancestor, which requires
a layer tree walk of the parent frame. This is error-prone, and not very future-proof.
Fix this by introducing "frame hosting" scrolling tree nodes. These are mostly inert
nodes that are owned by the RenderIFrame's layer backing in the parent frame, and exist
to provide a consistent parent node for the subframe's scrolling node.
This patch adds the node types, but does not instantiate them yet.
* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateFrameHostingNode>::encode):
(ArgumentCoder<ScrollingStateFrameHostingNode>::decode):
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::dump):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createScrollingTreeNode):
* UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
Canonical link: https://commits.webkit.org/208281@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-01-24 16:10:43 +00:00
|
|
|
page/scrolling/ScrollingTreeFrameHostingNode.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/scrolling/ScrollingTreeFrameScrollingNode.cpp
|
2020-05-05 00:59:07 +00:00
|
|
|
page/scrolling/ScrollingTreeGestureState.cpp
|
[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.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/scrolling/ScrollingTreeNode.cpp
|
|
|
|
page/scrolling/ScrollingTreeOverflowScrollingNode.cpp
|
|
|
|
page/scrolling/ScrollingTreeScrollingNode.cpp
|
2021-03-04 13:22:14 +00:00
|
|
|
page/scrolling/ScrollingTreeScrollingNodeDelegate.cpp
|
2017-10-25 19:27:05 +00:00
|
|
|
page/scrolling/ThreadedScrollingTree.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/ContentType.cpp
|
|
|
|
platform/ContextMenu.cpp
|
|
|
|
platform/ContextMenuItem.cpp
|
|
|
|
platform/Cursor.cpp
|
2017-12-05 23:59:31 +00:00
|
|
|
platform/DateComponents.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/Decimal.cpp
|
|
|
|
platform/DragData.cpp
|
2017-11-02 17:13:34 +00:00
|
|
|
platform/DragImage.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/EventTrackingRegions.cpp
|
|
|
|
platform/FileChooser.cpp
|
|
|
|
platform/FileHandle.cpp
|
|
|
|
platform/FileMonitor.cpp
|
|
|
|
platform/FileStream.cpp
|
2020-06-24 14:07:32 +00:00
|
|
|
platform/FrameRateMonitor.cpp
|
2021-07-30 20:26:51 +00:00
|
|
|
platform/KeyboardScrollingAnimator.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/LayoutUnit.cpp
|
2019-10-04 19:30:08 +00:00
|
|
|
platform/LegacySchemeRegistry.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/Length.cpp
|
|
|
|
platform/LengthBox.cpp
|
|
|
|
platform/LengthPoint.cpp
|
|
|
|
platform/LengthSize.cpp
|
|
|
|
platform/LocalizedStrings.cpp
|
Deduplicate logging channel algorithms
https://bugs.webkit.org/show_bug.cgi?id=228809
Reviewed by Fujii Hironori.
Source/WebCore:
No new tests because there is no behavior change.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXLogger.cpp:
* inspector/agents/page/PageConsoleAgent.cpp:
* page/Page.cpp:
* platform/LogInitialization.cpp: Copied from Source/WebCore/platform/LogInitialization.h.
(WebCore::logChannels):
(WebCore::getLogChannel):
* platform/LogInitialization.h:
* platform/Logging.cpp:
(WebCore::isLogChannelEnabled): Deleted.
(WebCore::setLogChannelToAccumulate): Deleted.
(WebCore::clearAllLogChannelsToAccumulate): Deleted.
(WebCore::initializeLogChannelsIfNecessary): Deleted.
(WebCore::getLogChannel): Deleted.
* platform/Logging.h:
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::setLogChannelToAccumulate):
(WebCoreTestSupport::clearAllLogChannelsToAccumulate):
(WebCoreTestSupport::initializeLogChannelsIfNecessary):
Source/WebKit:
* GPUProcess/GPUConnectionToWebProcess.cpp:
* GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::initializeGPUProcess):
* Platform/LogInitialization.cpp: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.
(WebKit::logChannels):
(WebKit::getLogChannel):
* Platform/LogInitialization.h:
* Platform/Logging.cpp:
(WebKit::initializeLogChannelsIfNecessary): Deleted.
(WebKit::getLogChannel): Deleted.
* Platform/Logging.h:
* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):
* Shared/WebKit2Initialize.cpp:
(WebKit::InitializeWebKit2):
* Sources.txt:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebProcessPool.cpp:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Source/WebKitLegacy:
* WebKitLegacy.xcodeproj/project.pbxproj:
Source/WebKitLegacy/mac:
* Misc/WebKitLogInitialization.h: Copied from Source/WebKit/Platform/LogInitialization.h.
* Misc/WebKitLogInitialization.mm: Copied from Source/WebKitLegacy/mac/Misc/WebKitLogging.m.
(WebKit::logChannels):
(ReportDiscardedDelegateException):
* Misc/WebKitLogging.h:
* Misc/WebKitLogging.m:
(ReportDiscardedDelegateException): Deleted.
* WebCoreSupport/WebDragClient.mm:
* WebView/WebDelegateImplementationCaching.mm:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
Source/WTF:
The current infrastructure (before this patch) had the following duplicated for each framework:
- A .cpp file declared the list of logging channels for that framework
- The .cpp file also had algorithms to search, modify, and initialize these logging channels
Each framework's .cpp file had duplicate algorithms. (The initialization algorithm was even
duplicated 3 times!)
Because the algorithms directly name their specific list of logging channels, a naive deduplication
would have had to add new parameters to these algorithms to pass in the appropriate framework's
list. That's fine, but this is exactly the sort of thing classes were designed for - classes are
an association of algorithms and data. The algorithms are shared but the data isn't, which really
just means we should have 3 instances of a shared class - one for the 3 sets of data.
So, this patch creates the LogChannels class which contains the deduplicated algorithms, and each
framework has a NeverDestroyed singleton instance of that class. There is a single virtual method
in the class, so the appropriate "default write" variable can be queried for each framework.
The instances cannot be declared in the Logging.h files in the frameworks, because certain WebKit2
files want to initialize all 3 instances of LogChannels, but you can't #include multiple Logging.h
files at the same time because their LOG_CHANNEL_PREFIX #defines will collide with each other.
Luckily, LogInitialization.h files exist exactly to solve this purpose, so that's where the
LogChannels instances are declared in. After this change, the Logging.h files are just for the
declarations of the logging channels themselves, and the LogInitialization.h files are for the
LogChannels instances which contain the searching/modifying/initializing algorithms on the list of
logging channels. If you just want to LOG(...) something, #include the relevant Logging.h file, and
if you want to search/modify/initialize across the entire list of channels, then #include the
relevant LogInitialization.h file.
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/LogChannels.cpp: Copied from Source/WebCore/platform/Logging.cpp.
(WTF::LogChannels::isLogChannelEnabled):
(WTF::LogChannels::setLogChannelToAccumulate):
(WTF::LogChannels::clearAllLogChannelsToAccumulate):
(WTF::LogChannels::initializeLogChannelsIfNecessary):
(WTF::LogChannels::getLogChannel):
* wtf/LogChannels.h: Copied from Source/WebCore/platform/LogInitialization.h.
Canonical link: https://commits.webkit.org/240343@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-07 18:50:12 +00:00
|
|
|
platform/LogInitialization.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/Logging.cpp
|
|
|
|
platform/LowPowerModeNotifier.cpp
|
|
|
|
platform/MIMETypeRegistry.cpp
|
|
|
|
platform/MainThreadSharedTimer.cpp
|
2020-04-01 19:15:17 +00:00
|
|
|
platform/MediaStrategy.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/NotImplemented.cpp
|
2020-03-06 20:01:52 +00:00
|
|
|
platform/NowPlayingManager.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/Pasteboard.cpp
|
[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.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/PasteboardWriterData.cpp
|
2018-11-06 21:58:29 +00:00
|
|
|
platform/PlatformKeyboardEvent.cpp
|
2020-03-26 17:04:14 +00:00
|
|
|
platform/PlatformScreen.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/PlatformSpeechSynthesisUtterance.cpp
|
|
|
|
platform/PlatformSpeechSynthesisVoice.cpp
|
|
|
|
platform/PlatformSpeechSynthesizer.cpp
|
|
|
|
platform/PlatformStrategies.cpp
|
2020-01-15 21:22:55 +00:00
|
|
|
platform/PlatformWheelEvent.cpp
|
2019-10-26 01:48:04 +00:00
|
|
|
platform/PreviewConverter.cpp
|
2019-01-29 05:58:00 +00:00
|
|
|
platform/ProcessIdentifier.cpp
|
2018-04-03 17:15:17 +00:00
|
|
|
platform/ReferrerPolicy.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/RemoteCommandListener.cpp
|
|
|
|
platform/RuntimeApplicationChecks.cpp
|
2018-11-08 23:58:42 +00:00
|
|
|
platform/SSLKeyGenerator.cpp
|
Add support for scroll behavior relies on ScrollAnimation of the Web process
https://bugs.webkit.org/show_bug.cgi?id=204882
Reviewed by Frédéric Wang
Based on the patch by Frédéric Wang.
LayoutTests/imported/w3c:
Enable CSSOMViewSmoothScrollingEnabled on scroll behavior tests and update expectations.
* web-platform-tests/css/cssom-view/scroll-behavior-default-css-expected.txt:
* web-platform-tests/css/cssom-view/scroll-behavior-default-css.html:
* web-platform-tests/css/cssom-view/scroll-behavior-element-expected.txt:
* web-platform-tests/css/cssom-view/scroll-behavior-element.html:
* web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root-expected.txt:
* web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html:
* web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window-expected.txt:
* web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html:
* web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested-expected.txt:
* web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html:
* web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html:
* web-platform-tests/css/cssom-view/scroll-behavior-subframe-root-expected.txt:
* web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html:
* web-platform-tests/css/cssom-view/scroll-behavior-subframe-window-expected.txt:
* web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html:
Source/WebCore:
This patch introduces a programmatic smooth scrolling in WebKit from the CSSOM View
specification [1]. To use this effect, web developers can pass a behavior parameter (auto,
smooth, or instant) to Element.scroll, Element.scrollTo, Element.scrollBy,
Element.scrollIntoView, Window.scroll, Window.scrollTo or Window.scrollBy [2]. When behavior
is auto, the instant/smooth characteristic is actually taken from the value of a new CSS
scroll-behavior property [3]. Both the new CSS and DOM behavior are protected by a runtime
flag.
[1] https://drafts.csswg.org/cssom-view
[2] https://drafts.csswg.org/cssom-view/#dictdef-scrolloptions
[3] https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior
Tests: imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html
* Sources.txt: Build ScrollAnimationSmooth.cpp on all platforms.
* SourcesGTK.txt: Remove ScrollAnimationSmooth.cpp since it is built on all platforms now.
* dom/Element.cpp:
(WebCore::Element::scrollIntoView): Pass scroll behavior, if any.
(WebCore::Element::scrollBy):
(WebCore::Element::scrollTo): Handle the case when scroll behavior is smooth.
(WebCore::Element::setScrollLeft): Handle the case when scroll behavior is smooth.
(WebCore::Element::setScrollTop): Handle the case when scroll behavior is smooth.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::scrollBy const):
(WebCore::DOMWindow::scrollTo const): Handle the case when scroll behavior is smooth.
The optimization of cancel (0, 0) scrolling is skipped if an animated scroll is in progress.
Otherwise, the previous scroll won't be stopped by a follow-up scroll.
* page/FrameView.cpp:
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::scrollToOffsetWithAnimation): Start an animated scroll.
* page/FrameView.h:
* platform/ScrollAnimation.h:
(WebCore::ScrollAnimation::scroll): Function to animate scrolling to a specified position.
* platform/ScrollAnimationSmooth.cpp: Build this file on all platforms. Add a
smoothFactorForProgrammaticScroll parameter to slow down the smooth scrolling.
(WebCore::ScrollAnimationSmooth::scroll):
(WebCore::ScrollAnimationSmooth::updatePerAxisData): Scale the time parameters of the
animation so that it looks smoother.
* platform/ScrollAnimationSmooth.h: Declare the class on all platforms.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::ScrollAnimator): Initialize animation member for programmatic scrolling.
(WebCore::ScrollAnimator::scrollToOffset): Animate scrolling to the specified position.
(WebCore::ScrollAnimator::cancelAnimations): Copy logic from ScrollAnimationSmooth.cpp.
(WebCore::ScrollAnimator::serviceScrollAnimations): Ditto.
(WebCore::ScrollAnimator::willEndLiveResize): Ditto.
(WebCore::ScrollAnimator::didAddVerticalScrollbar): Ditto.
(WebCore::ScrollAnimator::didAddHorizontalScrollbar): Ditto.
* platform/ScrollAnimator.h: New animation member for smooth programmatic scrolling.
(WebCore::ScrollAnimator::ScrollAnimator::cancelAnimations): Deleted.
(WebCore::ScrollAnimator::ScrollAnimator::serviceScrollAnimations): Deleted.
(WebCore::ScrollAnimator::ScrollAnimator::willEndLiveResize): Deleted.
(WebCore::ScrollAnimator::ScrollAnimator::didAddVerticalScrollbar): Deleted.
(WebCore::ScrollAnimator::ScrollAnimator::didAddHorizontalScrollbar): Deleted.
* platform/ScrollTypes.h: Add ScrollBehaviorStatus to indicate the status of scrolling.
* platform/ScrollView.cpp:
(WebCore::ScrollView::setScrollPosition): Follow the CSSOM View spec: If a scroll is in
progress, we interrupt it and continue the scroll call (even when we are at the final position).
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::ScrollableArea):
(WebCore::ScrollableArea::scrollToOffsetWithAnimation):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::currentScrollBehaviorStatus const): Maintain currentScrollBehaviorStatus.
(WebCore::ScrollableArea::setScrollBehaviorStatus):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::cancelAnimations): Call parent member to handle programmatic scrolling.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::setScrollLeft): Add flag to indicate animated or not.
(WebCore::RenderBox::setScrollTop): Ditto.
(WebCore::RenderBox::setScrollPosition):
* rendering/RenderBox.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollToXPosition): Ditto.
(WebCore::RenderLayer::scrollToYPosition): Ditto.
(WebCore::RenderLayer::scrollToPosition):
(WebCore::RenderLayer::scrollToOffset): Follow the CSSOM View spec: If a scroll is in
progress, we interrupt it and continue the scroll call (even when we are at the final
position). It's ScrollBehaviorType::Instant scroll.
(WebCore::RenderLayer::scrollToOffsetWithAnimation): Ditto. This is similar to scrollToOffset
but animates the scroll. It's ScrollBehaviorType::Smooth scroll.
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::scrollRectToVisible): Again don't do an early return if scroll is in
progress. We call scrollToOffsetWithAnimation instead of scrollToOffset when appropriate.
Note that this function may not work well for several nested scroll boxes with at least one
element with smooth behavior. It will handled in bug Follow.
* rendering/RenderLayer.h: Add scroll behavior to ScrollTectToVisibleOptions.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::setScrollLeft): Add animated flag.
(WebCore::RenderListBox::setScrollTop): Ditto.
* rendering/RenderListBox.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::setScrollLeft):
(WebCore::RenderTextControlSingleLine::setScrollTop):
* rendering/RenderTextControlSingleLine.h:
* testing/Internals.cpp:
(WebCore::Internals::unconstrainedScrollTo):
LayoutTests:
* platform/mac-wk1/TestExpectations: Skip these tests on WK1 as they don't work for now.
Canonical link: https://commits.webkit.org/220323@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-06 16:49:04 +00:00
|
|
|
platform/ScrollAnimationSmooth.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
platform/ScrollAnimator.cpp
|
2021-02-15 21:48:10 +00:00
|
|
|
platform/ScrollController.cpp
|
|
|
|
platform/ScrollSnapAnimatorState.cpp
|
2020-01-23 21:51:37 +00:00
|
|
|
platform/ScrollTypes.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/ScrollView.cpp
|
|
|
|
platform/ScrollableArea.cpp
|
|
|
|
platform/Scrollbar.cpp
|
|
|
|
platform/ScrollbarTheme.cpp
|
|
|
|
platform/ScrollbarThemeComposite.cpp
|
2020-02-21 03:35:50 +00:00
|
|
|
platform/SerializedPlatformDataCue.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/SharedBuffer.cpp
|
|
|
|
platform/SharedBufferChunkReader.cpp
|
|
|
|
platform/SharedStringHash.cpp
|
2020-03-30 14:48:38 +00:00
|
|
|
platform/SleepDisabler.cpp
|
|
|
|
platform/SleepDisablerClient.cpp
|
2020-11-09 20:20:06 +00:00
|
|
|
platform/SystemSoundManager.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/StaticPasteboard.cpp
|
|
|
|
platform/Theme.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
platform/ThemeTypes.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/ThreadGlobalData.cpp
|
|
|
|
platform/ThreadTimers.cpp
|
|
|
|
platform/Timer.cpp
|
|
|
|
platform/UserActivity.cpp
|
|
|
|
platform/WebCoreCrossThreadCopier.cpp
|
|
|
|
platform/WebGLStateTracker.cpp
|
|
|
|
platform/Widget.cpp
|
|
|
|
platform/animation/Animation.cpp
|
|
|
|
platform/animation/AnimationList.cpp
|
|
|
|
platform/animation/TimingFunction.cpp
|
|
|
|
platform/audio/AudioBus.cpp
|
|
|
|
platform/audio/AudioChannel.cpp
|
|
|
|
platform/audio/AudioDSPKernelProcessor.cpp
|
|
|
|
platform/audio/AudioHardwareListener.cpp
|
|
|
|
platform/audio/AudioResampler.cpp
|
|
|
|
platform/audio/AudioResamplerKernel.cpp
|
|
|
|
platform/audio/AudioUtilities.cpp
|
|
|
|
platform/audio/Biquad.cpp
|
|
|
|
platform/audio/Cone.cpp
|
|
|
|
platform/audio/DirectConvolver.cpp
|
|
|
|
platform/audio/Distance.cpp
|
|
|
|
platform/audio/DownSampler.cpp
|
|
|
|
platform/audio/DynamicsCompressor.cpp
|
|
|
|
platform/audio/DynamicsCompressorKernel.cpp
|
|
|
|
platform/audio/EqualPowerPanner.cpp
|
|
|
|
platform/audio/FFTConvolver.cpp
|
|
|
|
platform/audio/FFTFrame.cpp
|
|
|
|
platform/audio/HRTFDatabase.cpp
|
|
|
|
platform/audio/HRTFDatabaseLoader.cpp
|
|
|
|
platform/audio/HRTFElevation.cpp
|
|
|
|
platform/audio/HRTFKernel.cpp
|
|
|
|
platform/audio/HRTFPanner.cpp
|
2020-08-26 20:09:39 +00:00
|
|
|
platform/audio/IIRFilter.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/audio/MultiChannelResampler.cpp
|
|
|
|
platform/audio/Panner.cpp
|
|
|
|
platform/audio/PlatformMediaSession.cpp
|
|
|
|
platform/audio/PlatformMediaSessionManager.cpp
|
2020-09-14 15:47:53 +00:00
|
|
|
platform/audio/PushPullFIFO.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/audio/Reverb.cpp
|
|
|
|
platform/audio/ReverbAccumulationBuffer.cpp
|
|
|
|
platform/audio/ReverbConvolver.cpp
|
|
|
|
platform/audio/ReverbConvolverStage.cpp
|
|
|
|
platform/audio/ReverbInputBuffer.cpp
|
|
|
|
platform/audio/SincResampler.cpp
|
2020-08-20 20:44:25 +00:00
|
|
|
platform/audio/StereoPanner.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/audio/UpSampler.cpp
|
|
|
|
platform/audio/VectorMath.cpp
|
|
|
|
platform/audio/ZeroPole.cpp
|
2021-05-30 00:51:26 +00:00
|
|
|
platform/calc/CalcExpressionBlendLength.cpp
|
|
|
|
platform/calc/CalcExpressionInversion.cpp
|
|
|
|
platform/calc/CalcExpressionLength.cpp
|
|
|
|
platform/calc/CalcExpressionNegation.cpp
|
|
|
|
platform/calc/CalcExpressionNode.cpp
|
|
|
|
platform/calc/CalcExpressionNumber.cpp
|
|
|
|
platform/calc/CalcExpressionOperation.cpp
|
|
|
|
platform/calc/CalcOperator.cpp
|
|
|
|
platform/calc/CalculationCategory.cpp
|
|
|
|
platform/calc/CalculationValue.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/encryptedmedia/CDMFactory.cpp
|
2020-03-10 18:25:31 +00:00
|
|
|
platform/encryptedmedia/CDMLogging.cpp
|
[GPUP] Implement Modern EME API in the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=208090
Reviewed by Eric Carlson.
Source/WebCore:
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/CDMPrivate.cpp
|
[EME][GStreamer] Introduce CDMProxy
https://bugs.webkit.org/show_bug.cgi?id=206730
Reviewed by Xabier Rodriguez-Calvar.
Introduce a new subclass of CDMInstance, CDMProxyInstance.
CDMInstance is a main-thread only class, its purpose is to provide
an interface that will satisfy the JavaScript EME APIs, which by
design, don't actually interact with a real DRM system, what might
also be called "The CDM Instance". That's why the naming is
misleading here, CDMInstance isn't actually an instance of a real
CDM, rather it is a facade for JavaScript.
CDMProxyInstance is a sub-class which provides two APIs,
1/ For background media threads to safely interrogate the status
of keys and to perform decryption using said keys. This API is
exposed by CDMProxy and is platform specific.
2/ For media players to safely assess the state of decryptors and
what their status is.
CDMProxy exists to allow thread-safe access to a real CDM, along
with their quirks. The two main problems GTK integrators of a CDM
have in WebKit is key management and CDM access from background
media threads.
Key management is how to manage the state of keys in a way
coherent with JavaScript, the cross-platform EME implementation,
the real CDMs themselves, and the background media
threads. CDMProxy provides a default key store interface for
sub-classes. Sub-classes can, on receipt of new information from a
real CDM, tell CDMProxy about the keys and their
statuses. CDMProxy is intended to Do The Right Thing from there,
letting JavaScript and WebCore know all the details they need to
about the new state, as well as the media decode threads when they
next come asking.
Access from background threads is ill-advised when using the
thread-unsafe CDMInstance. We used to get away with doing exactly
this, but WebCore recently became more diligent about
thread-unsafe access of main-thread-only data, and we had to do
something to fix the asserts. That something was ProxyCDM (a
terrible name, removed now), which was a hack and please forget
about it. CDMProxy can be safely passed to background threads, and
it will by default provide a thread-safe view of the key store for
background threads to interrogate the key store and perform
CDM-specific decryption / decode.
Covered by existing tests.
* WebCore.xcodeproj/project.pbxproj: Add CDMProxy to build
definition.
* platform/GStreamer.cmake: Add CDMProxy include directories and
implementation files.
* platform/encryptedmedia/CDMInstance.h: Remove references to old
ProxyCDM shim. This approach was a temporary hack to avoid some
thread-safety asserts. I took the liberty of renaming to CDMProxy,
for no other reason that it felt like a better name, sorry for the
confusion.
* platform/encryptedmedia/CDMProxy.cpp: Added.
(WebCore::Key::idAsString const):
(WebCore::Key::valueAsString const):
(WebCore::KeyStore::containsKeyID const):
(WebCore::KeyStore::merge):
(WebCore::KeyStore::allKeysAsReleased const):
(WebCore::KeyStore::addKeys):
(WebCore::KeyStore::add):
(WebCore::KeyStore::removeAllKeysFrom):
(WebCore::KeyStore::remove):
(WebCore::KeyStore::keyValue const):
(WebCore::KeyStore::convertToJSKeyStatusVector const):
(WebCore::CDMProxy::updateKeyStore):
(WebCore::CDMProxy::setInstance):
(WebCore::CDMProxy::keyValue const):
(WebCore::CDMProxy::startedWaitingForKey const):
(WebCore::CDMProxy::stoppedWaitingForKey const):
(WebCore::CDMProxy::tryWaitForKey const):
(WebCore::CDMProxy::keyAvailableUnlocked const):
(WebCore::CDMProxy::keyAvailable const):
(WebCore::CDMProxy::getOrWaitForKey const):
(WebCore::CDMInstanceProxy::startedWaitingForKey):
(WebCore::CDMInstanceProxy::stoppedWaitingForKey):
(WebCore::CDMInstanceProxy::mergeKeysFrom):
(WebCore::CDMInstanceProxy::removeAllKeysFrom):
* platform/encryptedmedia/CDMProxy.h: Added.
(WebCore::Key::create):
(WebCore::Key::idAsSharedBuffer const):
(WebCore::Key::id const):
(WebCore::Key::value const):
(WebCore::Key::value):
(WebCore::Key::status const):
(WebCore::Key::operator==):
(WebCore::Key::addSessionReference):
(WebCore::Key::removeSessionReference):
(WebCore::Key::numSessionReferences const):
(WebCore::Key::Key):
(WebCore::KeyStore::removeAllKeys):
(WebCore::KeyStore::numKeys const):
(WebCore::KeyStore::begin):
(WebCore::KeyStore::begin const):
(WebCore::KeyStore::end):
(WebCore::KeyStore::end const):
(WebCore::KeyStore::rbegin):
(WebCore::KeyStore::rbegin const):
(WebCore::KeyStore::rend):
(WebCore::KeyStore::rend const):
(WebCore::CDMInstanceProxy::setProxy):
(WebCore::CDMInstanceProxy::proxy const):
(WebCore::CDMInstanceProxy::isWaitingForKey const):
(WebCore::CDMInstanceProxy::setPlayer):
(WebCore::CDMInstanceProxy::trackSession):
* platform/encryptedmedia/clearkey/CDMClearKey.cpp:
(WebCore::parseLicenseFormat): Refactored to use new Key class.
(WebCore::extractKeyidsLocationFromCencInitData): Refactored to
use better named constants.
(WebCore::extractKeyidsFromCencInitData): Ditto.
(WebCore::CDMInstanceClearKey::createSession): Use the
trackSession method to allow easier monitoring of all EME
sessions.
(WebCore::CDMInstanceSessionClearKey::requestLicense): Refactor to
keep track of generated session IDs.
(WebCore::CDMInstanceSessionClearKey::updateLicense): Refactor to
use new key management classes.
(WebCore::CDMInstanceSessionClearKey::loadSession): Ditto.
(WebCore::CDMInstanceSessionClearKey::removeSessionData): Ditto.
(WebCore::ClearKeyState::keys): Deleted.
(WebCore::ClearKeyState::singleton): Deleted.
(WebCore::isolatedKey): Deleted.
(WebCore::ProxyCDMClearKey::isolatedKeys const): Deleted.
(WebCore::CDMInstanceClearKey::CDMInstanceClearKey): Deleted.
(WebCore::CDMInstanceClearKey::Key::keyIDAsString const): Deleted.
(WebCore::CDMInstanceClearKey::Key::keyValueAsString const): Deleted.
(WebCore::operator==): Deleted.
(WebCore::operator<): Deleted. It looks like we were unnecessarily
sorting the key vectors. It doesn't make any sense to impose an
ordering on keys, so I removed it.
* platform/encryptedmedia/clearkey/CDMClearKey.h: Refactor to use
new key management classes.
* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
Remove obsolete ProxyCDM method.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::parseInitDataFromProtectionMessage):
Refactored out of syncMessage. The code was moved here and into
waitForCDMAttachment.
(WebCore::MediaPlayerPrivateGStreamer::waitForCDMAttachment):
Ditto.
(WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Remove
waiting-for-key code, it was all broken anyway.
(WebCore::MediaPlayerPrivateGStreamer::cdmInstanceAttached):
Enforce use of CDMInstanceProxy, all GStreamer-based ports will be
using the CDMProxy derived classes from background
threads. CDMProxy's need a handle to the MediaPlayer for
waitingForKey management, so wire that in here too. Also wire the
GStreamer specific ClearKey proxy here.
(WebCore::MediaPlayerPrivateGStreamer::cdmInstanceDetached):
(WebCore::MediaPlayerPrivateGStreamer::waitingForKey const): Key
status notifications are the responsibility of the CDMProxy now.
(WebCore::MediaPlayerPrivateGStreamer::setWaitingForKey): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Now
we use CDMInstanceProxy, not CDMInstance.
* platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp:
Added. G*-specific ClearKey implementation.
(WebCore::CDMProxyClearKey::~CDMProxyClearKey):
(WebCore::CDMProxyClearKey::cencSetCounterVector):
(WebCore::CDMProxyClearKey::cencSetDecryptionKey):
(WebCore::CDMProxyClearKey::cencDecryptFullSample):
(WebCore::CDMProxyClearKey::cencDecryptSubsampled):
(WebCore::CDMProxyClearKey::cencDecrypt):
(WebCore::CDMProxyClearKey::initializeGcrypt):
* platform/graphics/gstreamer/eme/CDMProxyClearKey.h: Added.
* platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
Refactor to use CDMProxy.
(webkit_media_clear_key_decrypt_class_init):
(webkit_media_clear_key_decrypt_init):
(finalize):
(cdmProxyAttached):
(decrypt):
(handleKeyResponse): Deleted. This was a badly named method that
has been changed to cdmProxyAttached.
(findAndSetKey): Deleted.
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(webkit_media_common_encryption_decrypt_class_init):
(transformInPlace):
(isCDMProxyAvailable):
(getCDMProxyFromGstContext):
(attachCDMProxy):
(installCDMProxyIfNotAvailable):
(sinkEventHandler):
(changeState):
(setContext):
(): Deleted.
(isCDMInstanceAvailable): Deleted.
(queryHandler): Deleted.
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
* testing/MockCDMFactory.cpp:
(WebCore::MockCDMInstance::proxyCDM const): Deleted.
* testing/MockCDMFactory.h:
Canonical link: https://commits.webkit.org/220588@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-12 11:11:22 +00:00
|
|
|
platform/encryptedmedia/CDMProxy.cpp
|
2021-02-09 01:45:06 +00:00
|
|
|
platform/encryptedmedia/CDMUtilities.cpp
|
|
|
|
platform/encryptedmedia/clearkey/CDMClearKey.cpp
|
2020-07-30 07:21:44 +00:00
|
|
|
platform/gamepad/EmptyGamepadProvider.cpp
|
2020-07-31 19:50:33 +00:00
|
|
|
platform/gamepad/GamepadConstants.cpp
|
2020-07-30 07:21:44 +00:00
|
|
|
platform/gamepad/GamepadProvider.cpp
|
2021-05-13 20:54:21 +00:00
|
|
|
platform/graphics/AlphaPremultiplication.cpp
|
2021-03-02 21:31:00 +00:00
|
|
|
platform/graphics/AnimationFrameRate.cpp
|
2021-05-27 19:14:01 +00:00
|
|
|
platform/graphics/BifurcatedGraphicsContext.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/BitmapImage.cpp
|
|
|
|
platform/graphics/Color.cpp
|
2020-06-30 22:50:33 +00:00
|
|
|
platform/graphics/ColorBlending.cpp
|
2020-07-03 16:55:41 +00:00
|
|
|
platform/graphics/ColorConversion.cpp
|
2021-04-15 00:15:02 +00:00
|
|
|
platform/graphics/ColorLuminance.cpp
|
2020-07-01 05:53:20 +00:00
|
|
|
platform/graphics/ColorSerialization.cpp
|
Simplify adding new color spaces to WebCore
https://bugs.webkit.org/show_bug.cgi?id=220146
Reviewed by Dean Jackson.
Reduce the number of places one needs to touch when adding new color types to:
- ColorTypes.h
- ColorConversion.h/cpp
- ColorSpace.h/cpp (only needed if support in Color is required).
- ColorSerialization.h (only needed if support in Color is required).
- ColorSpaceCG.h/cpp (only needed if support in Color is required).
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add ColorSpace.cpp, ColorSpaceCG.h and ColorSpaceCG.cpp.
* platform/graphics/Color.cpp:
* platform/graphics/Color.h:
(WebCore::Color::Color):
(WebCore::Color::setColor):
Replace specific overloads of the contructor and setColor with template functions
that do the same things. These are safe to make as if a non-supported color type
(one that doesn't have a colorSpace member) is passed it will fail to compile due
to use beneath ExtendedColor::create().
Also moves WTF::TextStream operator<< overload for ColorSpace out and into
ColorSpace.cpp where it makes more sense.
* platform/graphics/ColorConversion.cpp:
* platform/graphics/ColorConversion.h:
Re-order and explicitly comment conversion functions to be more clear.
As the comment indicates, all color types must implement at least the following
conversions:
XYZA<float> toXYZA(const ColorType<float>&);
ColorType<float> toColorType(const XYZA<float>&);
This allows generic fallback code, inline at the bottom of the header, to
support conversion to and from any set of colors. Additional conversion functions
are useful for the cases where the optimal or base conversion is not through XYZ
such as from SRGBA to LinearSRGBA.
To allow this to work a few additional conversion functions were added which just
combine existing conversions together and one was added for SRGBA to CMYKA which
was missing, though currently unused.
* platform/graphics/ColorSpace.cpp: Added.
(WebCore::operator<<):
* platform/graphics/ColorSpace.h:
Moved from Color.h
* platform/graphics/ColorTypes.h:
(WebCore::callWithColorType):
This is a generalization of ExtendedColor::callOnUnderlyingType() that also
has the benefit of now being in the same file as the color type definitions,
reducing the number of files people need to touch.
* platform/graphics/ColorUtilities.h:
(WebCore::colorByModifingEachNonAlphaComponent):
Update to not assume that colors use the names red/green/blue for non-alpha
components. This makes it work generically for all four component color types.
* platform/graphics/ExtendedColor.h:
(WebCore::ExtendedColor::callOnUnderlyingType const):
Use generalized form, callWithColorType to avoid requiring modiftying this
when new color types are added.
* platform/graphics/cg/ColorCG.cpp:
(WebCore::leakCGColor):
When going to generalize this (we could have simply called
`return CGColorCreate(cachedCGColorSpace(colorSpace), cgFloatComponents))`
I noticed this was not doing the right thing for CG ports that don't support
all the color spaces WebCore requires (such as Windows). For instance,
displayP3ColorSpaceRef() just returns sRGBColorSpaceRef() on windows, meaning
we would be taking some DisplayP3 components and having CG interpret them as
sRGB. To avoid this, we now check if the color space returned is the fallback
color space, sRGB, and do our own conversion to sRGB using ColorConversion
before creating the color.
This also resolves a long standing bug / FIXME around LinearRGB where we were
using sRGBColorSpaceRef() for them. In practice, we don't actually ever create
LinearRGB CGColorRefs right now, but if we ever do in the future, makes sense
to use the right color space.
* platform/graphics/cg/ColorSpaceCG.cpp: Added.
(WebCore::sRGBColorSpaceRef):
(WebCore::linearRGBColorSpaceRef):
(WebCore::displayP3ColorSpaceRef):
(WebCore::extendedSRGBColorSpaceRef):
* platform/graphics/cg/ColorSpaceCG.h: Added.
(WebCore::cachedCGColorSpace):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::sRGBColorSpaceRef): Deleted.
(WebCore::linearRGBColorSpaceRef): Deleted.
(WebCore::extendedSRGBColorSpaceRef): Deleted.
(WebCore::displayP3ColorSpaceRef): Deleted.
* platform/graphics/cg/GraphicsContextCG.h:
(WebCore::cachedCGColorSpace): Deleted.
Moved color space specific CG code to its own files to make it more clear
where to find them.
Canonical link: https://commits.webkit.org/232686@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-26 17:42:33 +00:00
|
|
|
platform/graphics/ColorSpace.cpp
|
2017-11-18 02:32:00 +00:00
|
|
|
platform/graphics/ColorUtilities.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/ComplexTextController.cpp
|
|
|
|
platform/graphics/CrossfadeGeneratedImage.cpp
|
2021-05-25 01:26:18 +00:00
|
|
|
platform/graphics/DestinationColorSpace.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/DisplayRefreshMonitor.cpp
|
|
|
|
platform/graphics/DisplayRefreshMonitorClient.cpp
|
|
|
|
platform/graphics/DisplayRefreshMonitorManager.cpp
|
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.cpp
|
2021-03-08 20:55:46 +00:00
|
|
|
platform/graphics/FloatLine.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/FloatPoint.cpp
|
|
|
|
platform/graphics/FloatPoint3D.cpp
|
|
|
|
platform/graphics/FloatPolygon.cpp
|
|
|
|
platform/graphics/FloatQuad.cpp
|
|
|
|
platform/graphics/FloatRect.cpp
|
|
|
|
platform/graphics/FloatRoundedRect.cpp
|
|
|
|
platform/graphics/FloatSize.cpp
|
|
|
|
platform/graphics/Font.cpp
|
|
|
|
platform/graphics/FontCache.cpp
|
|
|
|
platform/graphics/FontCascade.cpp
|
2018-10-08 16:09:28 +00:00
|
|
|
platform/graphics/FontCascadeDescription.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/FontCascadeFonts.cpp
|
|
|
|
platform/graphics/FontDescription.cpp
|
|
|
|
platform/graphics/FontFamilySpecificationNull.cpp
|
|
|
|
platform/graphics/FontGenericFamilies.cpp
|
|
|
|
platform/graphics/FontPlatformData.cpp
|
|
|
|
platform/graphics/FontRanges.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
platform/graphics/FontSelectionAlgorithm.cpp
|
|
|
|
platform/graphics/FontTaggedSettings.cpp
|
2017-11-15 04:09:51 +00:00
|
|
|
platform/graphics/FourCC.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/GeneratedImage.cpp
|
|
|
|
platform/graphics/GeometryUtilities.cpp
|
|
|
|
platform/graphics/Gradient.cpp
|
|
|
|
platform/graphics/GradientImage.cpp
|
|
|
|
platform/graphics/GraphicsContext.cpp
|
2020-01-06 18:52:42 +00:00
|
|
|
platform/graphics/GraphicsContextGL.cpp
|
2020-10-16 10:55:59 +00:00
|
|
|
platform/graphics/GraphicsContextGLImageExtractor.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/GraphicsLayer.cpp
|
|
|
|
platform/graphics/GraphicsLayerTransform.cpp
|
|
|
|
platform/graphics/GraphicsLayerUpdater.cpp
|
|
|
|
platform/graphics/GraphicsTypes.cpp
|
2018-09-17 23:24:21 +00:00
|
|
|
platform/graphics/HEVCUtilities.cpp
|
2018-11-16 22:16:34 +00:00
|
|
|
platform/graphics/Icon.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/Image.cpp
|
|
|
|
platform/graphics/ImageBuffer.cpp
|
2020-02-19 01:12:47 +00:00
|
|
|
platform/graphics/ImageBufferBackend.cpp
|
2020-09-29 15:52:57 +00:00
|
|
|
platform/graphics/ImageBufferPipe.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/ImageDecoder.cpp
|
|
|
|
platform/graphics/ImageFrame.cpp
|
2017-12-02 00:01:54 +00:00
|
|
|
platform/graphics/ImageSource.cpp
|
2020-02-28 03:05:58 +00:00
|
|
|
platform/graphics/InbandGenericCue.cpp
|
2020-10-22 20:20:51 +00:00
|
|
|
platform/graphics/ImageResolution.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/IntPoint.cpp
|
|
|
|
platform/graphics/IntRect.cpp
|
|
|
|
platform/graphics/IntSize.cpp
|
|
|
|
platform/graphics/LayoutPoint.cpp
|
|
|
|
platform/graphics/LayoutRect.cpp
|
|
|
|
platform/graphics/LayoutSize.cpp
|
2019-12-30 20:52:41 +00:00
|
|
|
platform/graphics/MIMETypeCache.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
platform/graphics/MediaPlayer.cpp
|
<model> should create a model-owning compositing layer
https://bugs.webkit.org/show_bug.cgi?id=222798
Reviewed by Simon Fraser.
Source/JavaScriptCore:
* inspector/protocol/LayerTree.json:
Add a compositing reason for <model>.
Source/WebCore:
Test: model-element/model-element-graphics-layers.html
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setContentsToModel):
* platform/graphics/Model.cpp: Added.
(WebCore::Model::create):
(WebCore::Model::Model):
(WebCore::operator<<):
* platform/graphics/Model.h: Added.
(WebCore::Model::encode const):
(WebCore::Model::decode):
Add Model, a wrapper for the model.
For now, it just wraps a SharedBuffer.
In the future, it may contain other things, like file paths, identifiers, etc.
* Modules/model-element/HTMLModelElement.cpp:
(WebCore::HTMLModelElement::model const):
* Modules/model-element/HTMLModelElement.h:
HTMLModelElement can now vend a Model instead of just a SharedBuffer.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createPlatformCALayer):
(WebCore::GraphicsLayerCA::setContentsToModel):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::operator<<):
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
Allow a GraphicsLayer to be given a Model as contents (as we do for e.g. Image and other things).
For simplicity's sake, and because anything more is unnecessary, just re-create
the ModelLayer when the model changes.
* rendering/RenderBoxModelObject.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::contentChanged):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::contentChanged):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingLayer const):
(WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
(WebCore::RenderLayerCompositor::reasonsForCompositing const):
(WebCore::RenderLayerCompositor::logReasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForModel const):
* rendering/RenderLayerCompositor.h:
* rendering/RenderModel.cpp:
(WebCore::RenderModel::requiresLayer const):
(WebCore::RenderModel::updateFromElement):
(WebCore::RenderModel::update):
* rendering/RenderModel.h:
Require compositing for <model>, and add a custom layer type.
* inspector/agents/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
Add a compositing reason for <model>.
Source/WebInspectorUI:
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WI.LayerTreeDetailsSidebarPanel.prototype._populateListOfCompositingReasons):
(WI.LayerTreeDetailsSidebarPanel):
* UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView.prototype._updateReasonsList):
(WI.Layers3DContentView):
Add a compositing reason for <model>.
Source/WebKit:
* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode const):
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
(WebKit::RemoteLayerTreeTransaction::description const):
* SourcesCocoa.txt:
* UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::makeNode):
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::makeNode):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.cpp:
(WebKit::GraphicsLayerCARemote::createPlatformCALayer):
* WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.h:
* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::create):
(WebKit::PlatformCALayerRemote::populateCreationProperties):
* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.h:
* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::populateCreationProperties):
* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteModelHosting.h: Added.
* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteModelHosting.mm: Added.
(WebKit::PlatformCALayerRemoteModelHosting::create):
(WebKit::PlatformCALayerRemoteModelHosting::PlatformCALayerRemoteModelHosting):
(WebKit::PlatformCALayerRemoteModelHosting::clone const):
(WebKit::PlatformCALayerRemoteModelHosting::populateCreationProperties):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::layerDidEnterContext):
Create a new PlatformCALayerRemote subclass that knows about Model, and
passes its model along in the layer creation properties.
For now, the special model layer type will just make a plain layer.
Future patches will replace it with model-specific rendering.
LayoutTests:
* model-element/model-element-graphics-layers-expected.txt: Added.
* model-element/model-element-graphics-layers.html: Added.
* model-element/model-element-renderer-expected.txt:
* model-element/model-element-renderer-no-source-expected.txt:
Add a test ensuring that we make a compositing layer via layer dump, and update
existing tests that also happen to reveal this via render tree dump as well.
Canonical link: https://commits.webkit.org/234969@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-06 11:13:42 +00:00
|
|
|
platform/graphics/Model.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/NamedImageGeneratedImage.cpp
|
2020-11-10 03:14:18 +00:00
|
|
|
platform/graphics/NativeImage.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/Path.cpp
|
|
|
|
platform/graphics/PathTraversalState.cpp
|
|
|
|
platform/graphics/PathUtilities.cpp
|
|
|
|
platform/graphics/Pattern.cpp
|
2021-05-09 01:29:38 +00:00
|
|
|
platform/graphics/PixelBuffer.cpp
|
2021-05-12 14:51:31 +00:00
|
|
|
platform/graphics/PixelBufferConversion.cpp
|
2021-05-13 20:54:21 +00:00
|
|
|
platform/graphics/PixelBufferFormat.cpp
|
|
|
|
platform/graphics/PixelFormat.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/PlatformTimeRanges.cpp
|
|
|
|
platform/graphics/Region.cpp
|
2020-12-09 18:32:29 +00:00
|
|
|
platform/graphics/RemoteGraphicsContextGLProxyBase.cpp
|
2018-10-19 05:22:15 +00:00
|
|
|
platform/graphics/RemoteVideoSample.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/RoundedRect.cpp
|
|
|
|
platform/graphics/ShadowBlur.cpp
|
[MSE] Move track buffer management from SourceBuffer to SourceBufferPrivate
https://bugs.webkit.org/show_bug.cgi?id=219332
Reviewed by Daniel Bates.
Source/WebCore:
Currently, the `SourceBuffer` class deals with both the DOM related tasks (providing
Javascript interfaces, firing events, handling object properties, etc.) and track
buffer management. This patch moves the track buffer management from `SourceBuffer`
to `SourceBufferPrivate`. The purpose of this change is to support running the track
buffer management in the GPU process so that the callbacks from a media parser regarding
a new sample is parsed does not need to cross the process boundary (`SourceBufferPrivate`
will run in the GPU process). We have to update the interface `SourceBufferPrivateClient`
accordingly.
When running the track buffer management in the `SourceBuffer` class, we can get
some information related to `MediaSource` directly, such as `isSeeking`, `duration`,
and `currentMediaTime`. However, after moving it to `SourceBufferPrivate`, we have to
get the information from the corresponding `MediaSourcePrivate`. This patch includes
some changes for that.
No new tests because this patch does not want to introduce any behavior change.
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::seekToTime):
(WebCore::MediaSource::completeSeek):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::~SourceBuffer):
(WebCore::SourceBuffer::buffered const):
(WebCore::SourceBuffer::timestampOffset const):
(WebCore::SourceBuffer::setTimestampOffset):
(WebCore::SourceBuffer::setAppendWindowStart):
(WebCore::SourceBuffer::setAppendWindowEnd):
(WebCore::SourceBuffer::resetParserState):
(WebCore::SourceBuffer::abort):
(WebCore::SourceBuffer::changeType):
(WebCore::SourceBuffer::highestPresentationTimestamp const):
(WebCore::SourceBuffer::readyStateChanged):
(WebCore::SourceBuffer::removedFromMediaSource):
(WebCore::SourceBuffer::seekToTime):
(WebCore::SourceBuffer::appendBufferInternal):
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
(WebCore::SourceBuffer::removeTimerFired):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
(WebCore::SourceBuffer::validateInitializationSegment):
(WebCore::SourceBuffer::sourceBufferPrivateAppendError):
(WebCore::SourceBuffer::appendError):
(WebCore::SourceBuffer::trySignalAllSamplesEnqueued):
(WebCore::SourceBuffer::sourceBufferPrivateDidParseSample):
(WebCore::SourceBuffer::sourceBufferPrivateDurationChanged):
(WebCore::SourceBuffer::sourceBufferPrivateDidDropSample):
(WebCore::SourceBuffer::sourceBufferPrivateStreamEndedWithDecodeError):
(WebCore::SourceBuffer::extraMemoryCost const):
(WebCore::SourceBuffer::bufferedSamplesForTrackID):
(WebCore::SourceBuffer::setMode):
(WebCore::SourceBuffer::setShouldGenerateTimestamps):
(WebCore::SourceBuffer::isBufferedDirty const):
(WebCore::SourceBuffer::setBufferedDirty):
(): Deleted.
(WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Deleted.
(WebCore::SourceBuffer::TrackBuffer::enqueueDiscontinuityBoundary): Deleted.
(WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted.
(WebCore::decodeTimeComparator): Deleted.
(WebCore::removeSamplesFromTrackBuffer): Deleted.
(WebCore::SourceBuffer::removeCodedFrames): Deleted.
(WebCore::SourceBuffer::evictCodedFrames): Deleted.
(WebCore::SampleLessThanComparator::operator()): Deleted.
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Deleted.
(WebCore::SourceBuffer::sourceBufferPrivateReenqueSamples): Deleted.
(WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples): Deleted.
(WebCore::SourceBuffer::provideMediaData): Deleted.
(WebCore::SourceBuffer::updateMinimumUpcomingPresentationTime): Deleted.
(WebCore::SourceBuffer::resetMinimumUpcomingPresentationTime): Deleted.
(WebCore::SourceBuffer::trySignalAllSamplesInTrackEnqueued): Deleted.
(WebCore::SourceBuffer::reenqueueMediaForTime): Deleted.
(WebCore::SourceBuffer::didDropSample): Deleted.
(WebCore::SourceBuffer::updateBufferedFromTrackBuffers): Deleted.
* Modules/mediasource/SourceBuffer.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/MediaSourcePrivate.h:
(WebCore::MediaSourcePrivate::setIsSeeking):
(WebCore::MediaSourcePrivate::isSeeking const):
* platform/graphics/SourceBufferPrivate.cpp: Added.
(WebCore::SourceBufferPrivate::TrackBuffer::TrackBuffer):
(WebCore::enqueueDiscontinuityBoundary):
(WebCore::SourceBufferPrivate::SourceBufferPrivate):
(WebCore::SourceBufferPrivate::resetTimestampOffsetInTrackBuffers):
(WebCore::SourceBufferPrivate::resetTrackBuffers):
(WebCore::SourceBufferPrivate::highestPresentationTimestamp const):
(WebCore::SourceBufferPrivate::updateBufferedFromTrackBuffers):
(WebCore::SourceBufferPrivate::reenqueSamples):
(WebCore::SourceBufferPrivate::seekToTime):
(WebCore::SourceBufferPrivate::clearTrackBuffers):
(WebCore::SourceBufferPrivate::bufferedSamplesForTrackID):
(WebCore::SourceBufferPrivate::fastSeekTimeForMediaTime):
(WebCore::SourceBufferPrivate::updateMinimumUpcomingPresentationTime):
(WebCore::SourceBufferPrivate::trySignalAllSamplesInTrackEnqueued):
(WebCore::SourceBufferPrivate::provideMediaData):
(WebCore::SourceBufferPrivate::reenqueueMediaForTime):
(WebCore::SourceBufferPrivate::reenqueueMediaIfNeeded):
(WebCore::decodeTimeComparator):
(WebCore::removeSamplesFromTrackBuffer):
(WebCore::SourceBufferPrivate::removeCodedFrames):
(WebCore::SourceBufferPrivate::evictCodedFrames):
(WebCore::SourceBufferPrivate::totalTrackBufferSizeInBytes const):
(WebCore::SourceBufferPrivate::addTrackBuffer):
(WebCore::SourceBufferPrivate::updateTrackIds):
(WebCore::SourceBufferPrivate::setAllTrackBuffersNeedRandomAccess):
(WebCore::SourceBufferPrivate::didReceiveInitializationSegment):
(WebCore::SourceBufferPrivate::validateInitializationSegment):
(WebCore::SourceBufferPrivate::didReceiveSample):
* platform/graphics/SourceBufferPrivate.h:
(WebCore::SourceBufferPrivate::setActive):
(WebCore::SourceBufferPrivate::setClient):
(WebCore::SourceBufferPrivate::setIsAttached):
(WebCore::SourceBufferPrivate::setCurrentTimeFudgeFactor):
(WebCore::SourceBufferPrivate::setAppendWindowStart):
(WebCore::SourceBufferPrivate::setAppendWindowEnd):
(WebCore::SourceBufferPrivate::bufferFull const):
(WebCore::SourceBufferPrivate::buffered const):
(WebCore::SourceBufferPrivate::isBufferedDirty const):
(WebCore::SourceBufferPrivate::setBufferedDirty):
(WebCore::SourceBufferPrivate::timestampOffset const):
(WebCore::SourceBufferPrivate::setTimestampOffset):
(WebCore::SourceBufferPrivate::startChangingType):
(WebCore::SourceBufferPrivate::setShouldGenerateTimestamps):
(WebCore::SourceBufferPrivate::setMode):
(WebCore::SourceBufferPrivate::setGroupStartTimestamp):
(WebCore::SourceBufferPrivate::setGroupStartTimestampToEndTimestamp):
(WebCore::SourceBufferPrivate::isActive const):
(WebCore::SourceBufferPrivate::isSeeking const):
(WebCore::SourceBufferPrivate::currentMediaTime const):
(WebCore::SourceBufferPrivate::duration const):
(WebCore::SourceBufferPrivate::flush):
(WebCore::SourceBufferPrivate::enqueueSample):
(WebCore::SourceBufferPrivate::allSamplesInTrackEnqueued):
(WebCore::SourceBufferPrivate::isReadyForMoreSamples):
(WebCore::SourceBufferPrivate::notifyClientWhenReadyForMoreSamples):
(WebCore::SourceBufferPrivate::canSetMinimumUpcomingPresentationTime const):
(WebCore::SourceBufferPrivate::setMinimumUpcomingPresentationTime):
(WebCore::SourceBufferPrivate::clearMinimumUpcomingPresentationTime):
* platform/graphics/SourceBufferPrivateClient.h:
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::duration const):
(WebCore::MediaSourcePrivateAVFObjC::currentMediaTime const):
(WebCore::MediaSourcePrivateAVFObjC::duration): Deleted.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource):
(WebCore::SourceBufferPrivateAVFObjC::setActive):
(WebCore::SourceBufferPrivateAVFObjC::isActive const):
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::isSeeking const):
(WebCore::SourceBufferPrivateAVFObjC::currentMediaTime const):
(WebCore::SourceBufferPrivateAVFObjC::duration const):
(WebCore::SourceBufferPrivateAVFObjC::setVideoLayer):
(WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession):
(WebCore::SourceBufferPrivateAVFObjC::setClient): Deleted.
(WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime): Deleted.
* platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp:
(WebCore::MediaSourcePrivateGStreamer::duration const):
(WebCore::MediaSourcePrivateGStreamer::currentMediaTime const):
* platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h:
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::append):
(WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource):
(WebCore::SourceBufferPrivateGStreamer::notifyReadyForMoreSamples):
(WebCore::SourceBufferPrivateGStreamer::setActive):
(WebCore::SourceBufferPrivateGStreamer::isActive const):
(WebCore::SourceBufferPrivateGStreamer::didReceiveInitializationSegment):
(WebCore::SourceBufferPrivateGStreamer::didReceiveSample):
(WebCore::SourceBufferPrivateGStreamer::didReceiveAllPendingSamples):
(WebCore::SourceBufferPrivateGStreamer::appendParsingFailed):
(WebCore::SourceBufferPrivateGStreamer::isSeeking const):
(WebCore::SourceBufferPrivateGStreamer::currentMediaTime const):
(WebCore::SourceBufferPrivateGStreamer::duration const):
(WebCore::SourceBufferPrivateGStreamer::setClient): Deleted.
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
* platform/mock/mediasource/MockMediaPlayerMediaSource.h:
* platform/mock/mediasource/MockMediaSourcePrivate.cpp:
(WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
(WebCore::MockMediaSourcePrivate::currentMediaTime const):
(WebCore::MockMediaSourcePrivate::logChannel const):
(WebCore::MockMediaSourcePrivate::mediaSourceLogger const): Deleted.
(WebCore::MockMediaSourcePrivate::mediaSourceLogIdentifier): Deleted.
* platform/mock/mediasource/MockMediaSourcePrivate.h:
* platform/mock/mediasource/MockSourceBufferPrivate.cpp:
(WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate):
(WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment):
(WebCore::MockSourceBufferPrivate::didReceiveSample):
(WebCore::MockSourceBufferPrivate::setActive):
(WebCore::MockSourceBufferPrivate::isActive const):
(WebCore::MockSourceBufferPrivate::isSeeking const):
(WebCore::MockSourceBufferPrivate::currentMediaTime const):
(WebCore::MockSourceBufferPrivate::duration const):
(WebCore::MockSourceBufferPrivate::logChannel const):
(WebCore::MockSourceBufferPrivate::setClient): Deleted.
(WebCore::MockSourceBufferPrivate::fastSeekTimeForMediaTime): Deleted.
(WebCore::MockSourceBufferPrivate::sourceBufferLogger const): Deleted.
(WebCore::MockSourceBufferPrivate::sourceBufferLogIdentifier): Deleted.
* platform/mock/mediasource/MockSourceBufferPrivate.h:
Source/WebKit:
Update `SourceBufferPrivateRemote` and `RemoteSourceBufferProxy` because of
the changes on `SourceBufferPrivate` and `SourceBufferPrivateClient`.
* GPUProcess/media/RemoteSourceBufferProxy.cpp:
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendError):
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDurationChanged):
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidParseSample):
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidDropSample):
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateStreamEndedWithDecodeError):
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasAudio const):
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasVideo const):
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveSample): Deleted.
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateReenqueSamples): Deleted.
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidBecomeReadyForMoreSamples): Deleted.
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted.
* GPUProcess/media/RemoteSourceBufferProxy.h:
* WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
(WebKit::SourceBufferPrivateRemote::setClient): Deleted.
* WebProcess/GPU/media/SourceBufferPrivateRemote.h:
Canonical link: https://commits.webkit.org/232118@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-04 18:12:18 +00:00
|
|
|
platform/graphics/SourceBufferPrivate.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/StringTruncator.cpp
|
|
|
|
platform/graphics/SurrogatePairAwareTextIterator.cpp
|
|
|
|
platform/graphics/TextRun.cpp
|
2020-06-07 09:55:32 +00:00
|
|
|
platform/graphics/TextTrackRepresentation.cpp
|
|
|
|
platform/graphics/TrackPrivateBase.cpp
|
2020-07-14 19:18:39 +00:00
|
|
|
platform/graphics/VP9Utilities.cpp
|
2019-05-27 01:12:00 +00:00
|
|
|
platform/graphics/VelocityData.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/WOFFFileFormat.cpp
|
|
|
|
platform/graphics/WidthIterator.cpp
|
|
|
|
platform/graphics/cpu/arm/filters/FELightingNEON.cpp
|
|
|
|
platform/graphics/displaylists/DisplayList.cpp
|
2020-02-21 20:26:30 +00:00
|
|
|
platform/graphics/displaylists/DisplayListDrawingContext.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/displaylists/DisplayListItems.cpp
|
[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.cpp
|
2020-11-03 21:08:38 +00:00
|
|
|
platform/graphics/displaylists/DisplayListItemType.cpp
|
2021-04-14 02:57:52 +00:00
|
|
|
platform/graphics/displaylists/DisplayListIterator.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/displaylists/DisplayListRecorder.cpp
|
|
|
|
platform/graphics/displaylists/DisplayListReplayer.cpp
|
2021-04-06 00:22:02 +00:00
|
|
|
platform/graphics/displaylists/InMemoryDisplayList.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/filters/DistantLightSource.cpp
|
|
|
|
platform/graphics/filters/FEBlend.cpp
|
|
|
|
platform/graphics/filters/FEColorMatrix.cpp
|
|
|
|
platform/graphics/filters/FEComponentTransfer.cpp
|
|
|
|
platform/graphics/filters/FEComposite.cpp
|
|
|
|
platform/graphics/filters/FEConvolveMatrix.cpp
|
|
|
|
platform/graphics/filters/FEDiffuseLighting.cpp
|
|
|
|
platform/graphics/filters/FEDisplacementMap.cpp
|
|
|
|
platform/graphics/filters/FEDropShadow.cpp
|
|
|
|
platform/graphics/filters/FEFlood.cpp
|
|
|
|
platform/graphics/filters/FEGaussianBlur.cpp
|
|
|
|
platform/graphics/filters/FELighting.cpp
|
|
|
|
platform/graphics/filters/FEMerge.cpp
|
2018-01-30 21:55:12 +00:00
|
|
|
platform/graphics/filters/FEMorphology.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/filters/FEOffset.cpp
|
|
|
|
platform/graphics/filters/FESpecularLighting.cpp
|
|
|
|
platform/graphics/filters/FETile.cpp
|
|
|
|
platform/graphics/filters/FETurbulence.cpp
|
|
|
|
platform/graphics/filters/FilterEffect.cpp
|
Infrastructure Work for Integrating CoreImage for Accelerated CSS/SVG Filter Rendering
https://bugs.webkit.org/show_bug.cgi?id=213672
Patch by Guowei Yang <guowei_yang@apple.com> on 2020-07-23
Reviewed by Simon Fraser.
This patch is the infrastructure work to enable filter rendering using
CoreImage. The design of this code is as follows:
0) changing WebCore configuration for using CoreImage framework from
iOS/mac only to unconditional, so watchOS and tvOS could also use
CoreImage
1) adding a new API to obtain the IOSurface from an AcceleratedImageBuffer
since CoreImage needs to render to an IOSurface
2) Instead of applying the filters inside FilterEffect, a new class,
FilterEffectRendererCoreImage is designed to handle the rendering. We hide
the implementation details by subclassing from a generic FilterEffectRenderer class.
This also has the benefit of organizing CoreImage obj-c calls in one place. This class
owns a FilterEffect node, that is the last FilterEffect of a given filter graph.
The filter graph will be traversed backwards and filter parameters is gathered
along the way. Then CIFilters will be created and connected to a larger CIFilter
graph. The output of the CIFilter graph will be rendered to the IOSurface of
a newly created AcceleratedImageBuffer. This image buffer will be returned
to RenderLayerFilters and rendered to the screen
3) Inside CSSFilter::build, we first try to create a FilterEffectRenderer by passing in
a renderer setting. A valid pointer will be returned only when the following two conditions
are met:
. CoreImage rendering is enabled in settings
. All the filters inside the filter graph is implemented using CIFilters
No new tests are required as this is the
infrastructure code for integrating CoreImage
This patch should pass all the existing css3/filters tests
* Configurations/WebCore.xcconfig: modified flag definition
so that CoreImage is used on all Apple Platforms, not only iPhone.
* Sources.txt: Added the generic FilterEffectRenderer class file
* SourcesCocoa.txt: added FilterEffectRendererCoreImage.mm
* WebCore.xcodeproj/project.pbxproj: Reflecting newly added files,
with some ordering changes
* platform/graphics/ConcreteImageBuffer.h: overrides isAccelerated()
function that returns true only if the backend is IOSurface
* platform/graphics/ImageBuffer.h: defined virtual function isAccelerated()
* platform/graphics/ImageBufferBackend.h: defined virtual function
isAccelerated() that returns false in the base class
(WebCore::ImageBufferBackend::isAccelerated const): returns false for the base class
* platform/graphics/PlatformImageBuffer.h: added SPECIALIZE_TYPE_TRAITS to check
what type of ImageBufferBackend is
* platform/graphics/PlatformImageBuffer.h: Added API to obtain
IOSurface from IOSurfaceBackend; added SPECIALIZE_TYPE_TRAITS
(WebCore::AcceleratedImageBuffer::surface): Obtain the IOSurface pointer
from ImageBufferIOSurfaceBackend
(isType): check if a given ImageBuffer is type AcceleratedImageBuffer
* platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::surface): added an API to get the
IOSurface pointer
(WebCore::ImageBufferIOSurfaceBackend::isAccelerated const): returns true
because it is an accelerated image buffer
* platform/graphics/cg/ImageBufferIOSurfaceBackend.h: added function surface()
and isAccelerated()
* platform/graphics/coreimage/FilterEffectRendererCoreImage.h: Added.
* platform/graphics/coreimage/FilterEffectRendererCoreImage.mm: Added.
(WebCore::FilterEffectRendererCoreImage::tryCreate): creates a FilterEffectRendererCoreImage
unique pointer. If the filters inside the graph are not all implemented,
we return nullptr
(WebCore::FilterEffectRendererCoreImage::supportsCoreImageRendering):
a function that takes in FilterEffect& and returns true if its a filter effect
type that is implemented in CoreImage, false otherwise
(WebCore::FilterEffectRendererCoreImage::applyEffects): takes in a FilterEffect pointer,
calls FilterEffectRendererCoreImage::connectCIFilters to create the final output CIImage
(WebCore::FilterEffectRendererCoreImage::connectCIFilters): recursive
helper function that traverses the FilterEffect graph backwards,
creates CIFilter graph based on the subclass type of current processing
FilterEffect node. It will cache the CIFilter in a hashmap, whose key
is the corresponding FilterEffect pointer.
(WebCore::FilterEffectRendererCoreImage::canRenderUsingCIFilters): unction
that takes in the last FilterEffect node and determines whether
all of the filters inside the filter graph is already implemented using
CIFilters. It returns false as long as there is one filter that hasn't
been implemented. The rendering procedure will fallback to software mode
if this function returns false
(WebCore::FilterEffectRendererCoreImage::output const): returns the ImageBuffer
that contains the data of the final output image
(WebCore::FilterEffectRendererCoreImage::renderToImageBuffer): r
enders CIImage* to an ImageBuffer
(WebCore::FilterEffectRendererCoreImage::destRect const): calculates the destination
bounding box
(WebCore::FilterEffectRendererCoreImage::clearResult): clears all the saved results
(WebCore::FilterEffectRendererCoreImage::FilterEffectRendererCoreImage): constructor
* platform/graphics/filters/FEBlend.cpp:
(WebCore::FEBlend::FEBlend): Pass an additional FilterEffect::Type argument
to base class constructor
* platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::FEColorMatrix::FEColorMatrix): ditto
* platform/graphics/filters/FEComponentTransfer.cpp:
(WebCore::FEComponentTransfer::FEComponentTransfer): ditto
* platform/graphics/filters/FEComposite.cpp:
(WebCore::FEComposite::FEComposite): ditto
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::FEConvolveMatrix): ditto
* platform/graphics/filters/FEDiffuseLighting.cpp:
(WebCore::FEDiffuseLighting::FEDiffuseLighting):ditto
* platform/graphics/filters/FEDisplacementMap.cpp:
(WebCore::FEDisplacementMap::FEDisplacementMap):ditto
* platform/graphics/filters/FEDisplacementMap.h:
* platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::FEDropShadow):ditto
* platform/graphics/filters/FEFlood.cpp:
(WebCore::FEFlood::FEFlood):ditto
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::FEGaussianBlur):ditto
* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::FELighting):ditto
* platform/graphics/filters/FELighting.h:
* platform/graphics/filters/FEMerge.cpp:
(WebCore::FEMerge::FEMerge): ditto
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::FEMorphology): ditto
* platform/graphics/filters/FEOffset.cpp:
(WebCore::FEOffset::FEOffset): ditto
* platform/graphics/filters/FESpecularLighting.cpp:
(WebCore::FESpecularLighting::FESpecularLighting): ditto
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::FETile): ditto
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::FETurbulence): ditto
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::FilterEffect): ditto
* platform/graphics/filters/FilterEffect.h: added a const member,
m_filterEffectType
(WebCore::FilterEffect::filterEffectClassType): returns the FilterEffect
class type
* platform/graphics/filters/FilterEffectRenderer.cpp: Added.
(WebCore::FilterEffectRenderer::tryCreate): tries creates a new FilterEffectRenderer
unique pointer. Here, we check whether the renderer setting has
CoreImage accelerated filter rendering enabled; we also check if all the
filters in the given FilterEffect graph is already implemented using
CoreImage. If both conditions are satisfied, create a FilterEffectRendererCoreImage
otherwise returns nullptr.
* platform/graphics/filters/FilterEffectRenderer.h: Added.
* platform/graphics/filters/SourceAlpha.cpp:
(WebCore::SourceAlpha::SourceAlpha): Pass an additional FilterEffect::Type argument
to base class constructor
* platform/graphics/filters/SourceAlpha.h:
* platform/graphics/filters/SourceGraphic.h:
(WebCore::SourceGraphic::SourceGraphic): ditto
* rendering/CSSFilter.cpp:
(WebCore::CSSFilter::build): we try to create a FilterEffectRenderer here by passing
in the state of the CoreImage Accelerated Rendering feature switch
(WebCore::CSSFilter::apply): If we have a valid m_filterRenderer pointer, that means
we can render the result image using CoreImage path, thus we don't call effect.apply()
fall back to software mode if hasResult() returns false.
(WebCore::CSSFilter::output const): if we have a valid m_filterRenderer, then we will
obtain the ImageBuffer result from it, not FilterEffect
(WebCore::CSSFilter::outputRect const): if we have a valid m_filterRenderer, then we will
obtain the ImageBuffer result from it, not FilterEffect
* rendering/CSSFilter.h:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::FEImage): Pass an additional FilterEffect::Type argument
to base class constructor
Canonical link: https://commits.webkit.org/227531@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-23 23:42:42 +00:00
|
|
|
platform/graphics/filters/FilterEffectRenderer.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/filters/FilterOperation.cpp
|
|
|
|
platform/graphics/filters/FilterOperations.cpp
|
|
|
|
platform/graphics/filters/PointLightSource.cpp
|
|
|
|
platform/graphics/filters/SourceAlpha.cpp
|
|
|
|
platform/graphics/filters/SourceGraphic.cpp
|
|
|
|
platform/graphics/filters/SpotLightSource.cpp
|
2017-11-10 23:02:14 +00:00
|
|
|
platform/graphics/iso/ISOBox.cpp
|
|
|
|
platform/graphics/iso/ISOOriginalFormatBox.cpp
|
|
|
|
platform/graphics/iso/ISOProtectionSchemeInfoBox.cpp
|
2018-08-08 10:45:13 +00:00
|
|
|
platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp
|
2017-11-10 23:02:14 +00:00
|
|
|
platform/graphics/iso/ISOSchemeInformationBox.cpp
|
|
|
|
platform/graphics/iso/ISOSchemeTypeBox.cpp
|
|
|
|
platform/graphics/iso/ISOTrackEncryptionBox.cpp
|
|
|
|
platform/graphics/iso/ISOVTTCue.cpp
|
2020-01-06 18:52:42 +00:00
|
|
|
platform/graphics/opengl/GraphicsContextGLOpenGL.cpp
|
2021-04-01 20:01:59 +00:00
|
|
|
platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/graphics/opentype/OpenTypeMathData.cpp
|
|
|
|
platform/graphics/transforms/AffineTransform.cpp
|
|
|
|
platform/graphics/transforms/Matrix3DTransformOperation.cpp
|
|
|
|
platform/graphics/transforms/MatrixTransformOperation.cpp
|
|
|
|
platform/graphics/transforms/PerspectiveTransformOperation.cpp
|
|
|
|
platform/graphics/transforms/RotateTransformOperation.cpp
|
|
|
|
platform/graphics/transforms/ScaleTransformOperation.cpp
|
|
|
|
platform/graphics/transforms/SkewTransformOperation.cpp
|
|
|
|
platform/graphics/transforms/TransformOperation.cpp
|
|
|
|
platform/graphics/transforms/TransformOperations.cpp
|
|
|
|
platform/graphics/transforms/TransformState.cpp
|
|
|
|
platform/graphics/transforms/TransformationMatrix.cpp
|
|
|
|
platform/graphics/transforms/TranslateTransformOperation.cpp
|
2019-12-13 00:48:03 +00:00
|
|
|
platform/mediacapabilities/MediaCapabilitiesLogging.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
platform/mediacapabilities/MediaEngineConfigurationFactory.cpp
|
2020-02-15 01:01:05 +00:00
|
|
|
platform/mediarecorder/MediaRecorderPrivate.cpp
|
2018-10-31 17:19:27 +00:00
|
|
|
platform/mediarecorder/MediaRecorderPrivateMock.cpp
|
2020-01-13 20:21:23 +00:00
|
|
|
platform/mediastream/AudioMediaStreamTrackRenderer.cpp
|
|
|
|
platform/mediastream/AudioTrackPrivateMediaStream.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/mediastream/CaptureDeviceManager.cpp
|
|
|
|
platform/mediastream/MediaConstraints.cpp
|
|
|
|
platform/mediastream/MediaEndpointConfiguration.cpp
|
|
|
|
platform/mediastream/MediaStreamPrivate.cpp
|
|
|
|
platform/mediastream/MediaStreamTrackPrivate.cpp
|
|
|
|
platform/mediastream/RTCIceCandidateDescriptor.cpp
|
|
|
|
platform/mediastream/RTCSessionDescriptionDescriptor.cpp
|
|
|
|
platform/mediastream/RealtimeIncomingAudioSource.cpp
|
|
|
|
platform/mediastream/RealtimeIncomingVideoSource.cpp
|
|
|
|
platform/mediastream/RealtimeMediaSource.cpp
|
|
|
|
platform/mediastream/RealtimeMediaSourceCenter.cpp
|
2018-09-30 07:02:39 +00:00
|
|
|
platform/mediastream/RealtimeMediaSourceFactory.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/mediastream/RealtimeMediaSourceSettings.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
platform/mediastream/RealtimeMediaSourceSupportedConstraints.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/mediastream/RealtimeOutgoingAudioSource.cpp
|
|
|
|
platform/mediastream/RealtimeOutgoingVideoSource.cpp
|
2019-06-20 18:55:32 +00:00
|
|
|
platform/mediastream/RealtimeVideoCaptureSource.cpp
|
Mock video devices should only support discrete sizes
https://bugs.webkit.org/show_bug.cgi?id=189000
<rdar://problem/43766551>
Reviewed by Youenn Fablet.
Source/WebCore:
While many/most video capture devices only support a finite number of discrete width/height
pairs, our mock video capture devices supported arbitrary width and height combinations which
made it difficult to write realistic tests using them. Change the mock devices to support
finite "presets" like those supported by AVFoundation. Create a RealtimeVideoSource base
class with support for these presets, so the same code will eventually be used by the mock
and real capture devices.
No new tests, existing tests updated for these changes.
* Sources.txt: Add RealtimeVideoSource.cpp, remove MockRealtimeMediaSource.cpp.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* platform/mediastream/MediaConstraints.h: Deal with min constraint less than the supported minimum
and max larger than the supported maximum when there is no ideal.
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::selectSettings): Use supportsSizeAndFrameRate for widths,
heights, and framerates in advanced constraints so a width and height that are supported but
in the same preset are filtered out.
(WebCore::RealtimeMediaSource::setSize): New.
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/RealtimeMediaSourceSettings.h: Remove an unneeded include.
* platform/mediastream/RealtimeVideoSource.cpp: Added.
(WebCore::RealtimeVideoSource::RealtimeVideoSource):
(WebCore::RealtimeVideoSource::~RealtimeVideoSource):
(WebCore::RealtimeVideoSource::startProducingData):
(WebCore::RealtimeVideoSource::setSupportedFrameRates):
(WebCore::RealtimeVideoSource::addSupportedCapabilities const):
(WebCore::RealtimeVideoSource::supportsSizeAndFrameRate):
(WebCore::RealtimeVideoSource::bestSupportedCaptureSizeForWidthAndHeight):
(WebCore::RealtimeVideoSource::applySize):
(WebCore::RealtimeVideoSource::applySizeAndFrameRate):
(WebCore::RealtimeVideoSource::videoSampleAvailable):
(WebCore::RealtimeVideoSource::applyFrameRate):
(WebCore::RealtimeVideoSource::supportsFrameRate):
* platform/mediastream/RealtimeVideoSource.h: Copied from Source/WebCore/platform/mock/MockRealtimeAudioSource.h.
(WebCore::RealtimeVideoSource::setSupportedCaptureSizes):
(WebCore::RealtimeVideoSource::setDefaultSize):
(WebCore::RealtimeVideoSource::observedFrameRate const):
* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::initializeSettings): Don't set label, it isn't used.
* platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
(WebCore::MockRealtimeVideoSourceMac::applySize): Call the base class.
* platform/mock/MockMediaDevice.h:
(WebCore::MockCameraProperties::encode const): Add frame rates, sizes, and facing mode.
(WebCore::MockCameraProperties::decode): Ditto.
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource): No more MockRealtimeMediaSource.
(WebCore::MockRealtimeAudioSource::settings const): Clean up.
(WebCore::MockRealtimeAudioSource::capabilities const): Ditto.
(WebCore::MockRealtimeAudioSource::settingsDidChange): Ditto.
(WebCore::MockRealtimeAudioSource::stopProducingData): m_elapsedTime isn't used, delete it.
(WebCore::MockRealtimeAudioSource::updateSettings): Deleted.
(WebCore::MockRealtimeAudioSource::initializeCapabilities): Deleted.
(WebCore::MockRealtimeAudioSource::initializeSupportedConstraints): Deleted.
(WebCore::MockRealtimeAudioSource::elapsedTime): Deleted.
* platform/mock/MockRealtimeAudioSource.h:
* platform/mock/MockRealtimeMediaSourceCenter.cpp: Moved all of the mock device management
code from MockRealtimeMediaSource.cpp here.
(WebCore::defaultDevices):
(WebCore::devices):
(WebCore::deviceMap):
(WebCore::deviceListForDevice):
(WebCore::createCaptureDevice):
(WebCore::MockRealtimeMediaSourceCenter::resetDevices):
(WebCore::MockRealtimeMediaSourceCenter::setDevices):
(WebCore::MockRealtimeMediaSourceCenter::addDevice):
(WebCore::MockRealtimeMediaSourceCenter::removeDevice):
(WebCore::MockRealtimeMediaSourceCenter::mockDeviceWithPersistentID):
(WebCore::MockRealtimeMediaSourceCenter::captureDeviceWithPersistentID):
(WebCore::MockRealtimeMediaSourceCenter::audioDevices):
(WebCore::MockRealtimeMediaSourceCenter::videoDevices):
(WebCore::MockRealtimeMediaSourceCenter::displayDevices):
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource): Use RealtimeVideoSource, no
more MockRealtimeMediaSource.
(WebCore::MockRealtimeVideoSource::capabilities const): Ditto, cleanup.
(WebCore::MockRealtimeVideoSource::settings const): Ditto.
(WebCore::MockRealtimeVideoSource::settingsDidChange): Ditto.
(WebCore::MockRealtimeVideoSource::startCaptureTimer): Ditto.
(WebCore::MockRealtimeVideoSource::startProducingData): Ditto.
(WebCore::MockRealtimeVideoSource::stopProducingData): Ditto.
(WebCore::MockRealtimeVideoSource::elapsedTime): Ditto.
(WebCore::MockRealtimeVideoSource::applySize): Ditto.
(WebCore::MockRealtimeVideoSource::drawText): Render the actual frame rate.
(WebCore::MockRealtimeVideoSource::generateFrame): Use m_fillColor.
(WebCore::MockRealtimeVideoSource::~MockRealtimeVideoSource): Deleted.
(WebCore::MockRealtimeVideoSource::updateSettings): Deleted.
(WebCore::MockRealtimeVideoSource::initializeCapabilities): Deleted.
(WebCore::MockRealtimeVideoSource::initializeSupportedConstraints): Deleted.
(WebCore::MockRealtimeVideoSource::applyFrameRate): Deleted.
* platform/mock/MockRealtimeVideoSource.h:
(WebCore::MockRealtimeVideoSource::updateSampleBuffer): Deleted.
Source/WebKit:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::resetMockMediaDevices):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::resetMockMediaDevices):
LayoutTests:
Updated tests and results now that we have better support for width and height constraints.
* fast/mediastream/MediaDevices-getUserMedia.html:
* fast/mediastream/MediaStreamTrack-getCapabilities-expected.txt:
* fast/mediastream/apply-constraints-advanced-expected.txt:
* fast/mediastream/apply-constraints-advanced.html:
* fast/mediastream/apply-constraints-video-expected.txt:
* fast/mediastream/apply-constraints-video.html:
* fast/mediastream/getUserMedia-default-expected.txt:
* fast/mediastream/getUserMedia-default.html:
* imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https-expected.txt:
* webrtc/video-interruption.html:
* webrtc/video.html:
Canonical link: https://commits.webkit.org/204164@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-30 19:03:55 +00:00
|
|
|
platform/mediastream/RealtimeVideoSource.cpp
|
2019-08-06 00:34:14 +00:00
|
|
|
platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
platform/mediastream/libwebrtc/LibWebRTCProvider.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/mock/DeviceOrientationClientMock.cpp
|
|
|
|
platform/mock/GeolocationClientMock.cpp
|
2018-09-11 23:18:15 +00:00
|
|
|
platform/mock/MediaEngineConfigurationFactoryMock.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/mock/MockRealtimeAudioSource.cpp
|
|
|
|
platform/mock/MockRealtimeMediaSourceCenter.cpp
|
|
|
|
platform/mock/MockRealtimeVideoSource.cpp
|
2021-02-23 17:08:46 +00:00
|
|
|
platform/mock/PlatformSpeechSynthesizerMock.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/mock/RTCDataChannelHandlerMock.cpp
|
|
|
|
platform/mock/RTCNotifiersMock.cpp
|
|
|
|
platform/mock/ScrollAnimatorMock.cpp
|
|
|
|
platform/mock/ScrollbarThemeMock.cpp
|
2021-02-23 17:08:46 +00:00
|
|
|
platform/mock/mediasource/MockBox.cpp
|
|
|
|
platform/mock/mediasource/MockMediaPlayerMediaSource.cpp
|
|
|
|
platform/mock/mediasource/MockMediaSourcePrivate.cpp
|
|
|
|
platform/mock/mediasource/MockSourceBufferPrivate.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/network/AuthenticationChallengeBase.cpp
|
|
|
|
platform/network/BlobData.cpp
|
|
|
|
platform/network/BlobDataFileReference.cpp
|
|
|
|
platform/network/BlobRegistry.cpp
|
|
|
|
platform/network/BlobRegistryImpl.cpp
|
|
|
|
platform/network/BlobResourceHandle.cpp
|
|
|
|
platform/network/CacheValidation.cpp
|
|
|
|
platform/network/Cookie.cpp
|
|
|
|
platform/network/CredentialBase.cpp
|
|
|
|
platform/network/CredentialStorage.cpp
|
Make NetworkRTCResolver port agnostic
https://bugs.webkit.org/show_bug.cgi?id=178855
Patch by Alejandro G. Castro <alex@igalia.com> on 2018-03-07
Reviewed by Youenn Fablet.
Source/WebCore:
Add new API in the DNSResolveQueue allowing to revolve hostnames and get the result. Add platform
specific code for soup platform and refactor the other platforms. Added new API to the DNS API header
and move the general code to the DNS.cpp file, that way we can reuse that code in all the platforms
and leave the ResolveQueue class of the platforms in a file.
No new tests because this is a refactor.
* PlatformAppleWin.cmake: Move the DNSCFNet class to DNSResolveQueueCFNet.
* PlatformMac.cmake: Ditto.
* Sources.txt: Add the DNS.cpp for compilation.
* SourcesCocoa.txt: Move the DNSCFNet class to DNSResolveQueueCFNet.
* WebCore.xcodeproj/project.pbxproj: Move the DNSCFNet class to DNSResolveQueueCFNet, add the DNS.cpp
for compilation. Add the new DNSResolveQueueCFNet class.
* platform/Curl.cmake: Move the DNSCFNet class to DNSResolveQueueCurl.
* platform/network/DNS.cpp: Add this file with the default implementation of the DNS functions for
all the platforms.
(WebCore::prefetchDNS): Copied from every platform implementation.
(WebCore::resolveDNS): Add the function, resolves a hostname, receives the identifier of the operation
and the completion handler.
(WebCore::stopResolveDNS): Add the function, stops a resolution operation, receives the identifier
of the operation.
* platform/network/DNS.h: Add the new APIs resolveDNS and stopResolveDNS with the classes used for the
implementation.
(WebCore::IPAddress::IPAddress): Add this class used to send the resolved address information, it does
not depend on libwebrtc rtc classes.
(WebCore::IPAddress::get): Get a reference to the struct sockaddr_in in the IPAddress class.
(WebCore::DNSCompletionHandler): Add this CompletionHandler type to be used when resolving the DNS
address.
* platform/network/DNSResolveQueue.cpp: Add the DNSResolveQueue platform instantiation in the singleton.
(WebCore::DNSResolveQueue::singleton): Use DNSResolveQueue platform classes when creating the singleton..
(WebCore::DNSResolveQueue::resolve): Add this method to get the address of a hostname, it sends the
identifier and the completion handler to use when returning the result.
(WebCore::DNSResolveQueue::stopResolve): Add this method to stop the resolve operation when required.
* platform/network/DNSResolveQueue.h: Add the new methods and make the class abstract, so that every
platform can implement the functions.
* platform/network/cf/DNSResolveQueueCFNet.cpp: Renamed from Source/WebCore/platform/network/cf/DNSCFNet.cpp.
Add the methods to the new class DNSResolveQueueCFNet, move the prefetchDNS to the DNS.cpp general
implementation.
* platform/network/cf/DNSResolveQueueCFNet.h: Add the new class inheriting from the DNSResolveQueue. Add the
new methods, we have to implement these methods and move the NetworkRTCResolver for COCOA code here.
(WebCore::DNSResolveQueueCF::resolve): Dummy method, not implemented.
(WebCore::DNSResolveQueueCF::stopResolve): Ditto.
* platform/network/curl/DNSResolveQueueCurl.cpp: Renamed from Source/WebCore/platform/network/curl/DNSCurl.cpp.
* platform/network/curl/DNSResolveQueueCurl.h: Add the new class inheriting from the DNSResolveQueue.
(WebCore::DNSResolveQueueCurl::resolve): Ditto.
(WebCore::DNSResolveQueueCurl::stopResolve): Ditto.
* platform/network/soup/DNSResolveQueueSoup.h: New class inheriting from the DNSResolveQueue class, adding
a HasMap with the active operations, it allows stopping them.
* platform/network/soup/DNSResolveQueueSoup.cpp: Renamed from Source/WebCore/platform/network/curl/DNSSoup.cpp.
(WebCore::resolvedWithObserverCallback): Called when the result address from the soup platform is ready,
sends the address to the completion handler.
(WebCore::DNSResolveQueueSoup::resolve): Launch the resolve operation with the soup library.
(WebCore::DNSResolveQueueSoup::stopResolve): Stop the resolve operation on process with a GCancellable.
Source/WebKit:
Create a specific Cocoa class to isolate the generic code in the base class, make the base implementation port
agnostic and dependent on DNS API in the platform directory which encapsulates the platform specific details.
* NetworkProcess/webrtc/NetworkRTCProvider.cpp: Create an alias class name defined per platform to instantiate the resolver.
(WebKit::NetworkRTCProvider::createResolver): Used the alias class name and receive a new IPAddress class that is not
dependent on rtc libwebrtc library.
* NetworkProcess/webrtc/NetworkRTCResolver.cpp: Remove the platform specific code. Use the DNS API to implement the
platform specific code in the default start and stop methods. Add the identifier of the resolve operation to the class.
(WebKit::NetworkRTCResolver::NetworkRTCResolver): Add the identifier in the initialization.
(WebKit::NetworkRTCResolver::~NetworkRTCResolver): Remove the platform specific code.
(WebKit::NetworkRTCResolver::completed): Ditto.
(WebKit::NetworkRTCResolver::start): Add a new implementation using the DNS API.
(WebKit::NetworkRTCResolver::stop): Ditto
* NetworkProcess/webrtc/NetworkRTCResolver.h: Remove the platform specific code and use the DNSResolveQueue for a general
solution to implement the platform specific code. Avoid using the IPAddress class that depends on libwertc classes to make
it more general regarding DNS name resolution.
(WebKit::NetworkRTCResolver::start): Make this class virtual.
(WebKit::NetworkRTCResolver::stop): Ditto.
* NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp: Copied Cocoa code from Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolver.cpp.
Now this class overrides the start and stop methods that use DNS, cocoa implementation should use the DNS methods in the future and
remove this class, making sure all the platform specific class is in the platform directory.
* NetworkProcess/webrtc/NetworkRTCResolverCocoa.h: Copied Cocoa code from Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolver.h.
* PlatformGTK.cmake: Add NetworkRTCResolver compilation for GTK.
* WebKit.xcodeproj/project.pbxproj: Add the NetworkRTCResolverCocoa class to the compilation.
Tools:
Added new unit tests for he resolve and stopResolve functions. We need to compile them for the
other platforms when the APIs are supported.
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebCore/DNS.cpp:
Canonical link: https://commits.webkit.org/199068@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-03-07 15:21:24 +00:00
|
|
|
platform/network/DNS.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/network/DNSResolveQueue.cpp
|
|
|
|
platform/network/DataURLDecoder.cpp
|
|
|
|
platform/network/FormData.cpp
|
|
|
|
platform/network/FormDataBuilder.cpp
|
|
|
|
platform/network/HTTPHeaderMap.cpp
|
|
|
|
platform/network/HTTPHeaderValues.cpp
|
|
|
|
platform/network/HTTPParsers.cpp
|
|
|
|
platform/network/MIMEHeader.cpp
|
|
|
|
platform/network/NetworkStateNotifier.cpp
|
|
|
|
platform/network/NetworkStorageSession.cpp
|
|
|
|
platform/network/ParsedContentRange.cpp
|
|
|
|
platform/network/ParsedContentType.cpp
|
2021-02-16 16:59:26 +00:00
|
|
|
platform/network/ParsedRequestRange.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/network/ProtectionSpaceBase.cpp
|
|
|
|
platform/network/ProxyServer.cpp
|
|
|
|
platform/network/ResourceErrorBase.cpp
|
|
|
|
platform/network/ResourceHandle.cpp
|
|
|
|
platform/network/ResourceHandleClient.cpp
|
|
|
|
platform/network/ResourceRequestBase.cpp
|
|
|
|
platform/network/ResourceResponseBase.cpp
|
2018-04-24 07:36:59 +00:00
|
|
|
platform/network/SameSiteInfo.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/network/SocketStreamHandle.cpp
|
|
|
|
platform/network/SocketStreamHandleImpl.cpp
|
|
|
|
platform/network/SynchronousLoaderClient.cpp
|
2021-06-10 23:29:57 +00:00
|
|
|
platform/network/TimingAllowOrigin.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/sql/SQLiteAuthorizer.cpp
|
|
|
|
platform/sql/SQLiteDatabase.cpp
|
|
|
|
platform/sql/SQLiteDatabaseTracker.cpp
|
|
|
|
platform/sql/SQLiteFileSystem.cpp
|
|
|
|
platform/sql/SQLiteStatement.cpp
|
2020-05-05 03:19:56 +00:00
|
|
|
platform/sql/SQLiteStatementAutoResetScope.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/sql/SQLiteTransaction.cpp
|
|
|
|
platform/text/BidiContext.cpp
|
|
|
|
platform/text/DateTimeFormat.cpp
|
2020-08-30 01:47:51 +00:00
|
|
|
platform/text/EncodingTables.cpp
|
2020-09-16 01:37:37 +00:00
|
|
|
platform/text/LocaleToScriptMapping.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/text/PlatformLocale.cpp
|
|
|
|
platform/text/QuotedPrintable.cpp
|
|
|
|
platform/text/SegmentedString.cpp
|
|
|
|
platform/text/TextBoundaries.cpp
|
|
|
|
platform/text/TextCodec.cpp
|
2020-09-01 16:02:12 +00:00
|
|
|
platform/text/TextCodecCJK.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/text/TextCodecICU.cpp
|
|
|
|
platform/text/TextCodecLatin1.cpp
|
|
|
|
platform/text/TextCodecReplacement.cpp
|
2020-09-03 16:33:59 +00:00
|
|
|
platform/text/TextCodecSingleByte.cpp
|
2017-10-26 03:59:25 +00:00
|
|
|
platform/text/TextCodecUTF16.cpp
|
|
|
|
platform/text/TextCodecUTF8.cpp
|
|
|
|
platform/text/TextCodecUserDefined.cpp
|
|
|
|
platform/text/TextEncoding.cpp
|
|
|
|
platform/text/TextEncodingDetectorICU.cpp
|
|
|
|
platform/text/TextEncodingRegistry.cpp
|
2021-05-24 16:07:30 +00:00
|
|
|
platform/xr/openxr/OpenXRInput.cpp @no-unify
|
|
|
|
platform/xr/openxr/OpenXRInputSource.cpp @no-unify
|
2021-02-24 13:13:21 +00:00
|
|
|
platform/xr/openxr/OpenXRInstance.cpp @no-unify
|
|
|
|
platform/xr/openxr/OpenXRExtensions.cpp @no-unify
|
2021-03-19 01:27:38 +00:00
|
|
|
platform/xr/openxr/OpenXRLayer.cpp @no-unify
|
|
|
|
platform/xr/openxr/OpenXRSwapchain.cpp @no-unify
|
2020-06-10 13:17:30 +00:00
|
|
|
platform/xr/openxr/PlatformXROpenXR.cpp @no-unify
|
2017-10-26 04:57:44 +00:00
|
|
|
plugins/DOMMimeType.cpp
|
|
|
|
plugins/DOMMimeTypeArray.cpp
|
|
|
|
plugins/DOMPlugin.cpp
|
|
|
|
plugins/DOMPluginArray.cpp
|
|
|
|
plugins/PluginData.cpp
|
|
|
|
plugins/PluginInfoProvider.cpp
|
|
|
|
rendering/AutoTableLayout.cpp
|
|
|
|
rendering/BidiRun.cpp
|
|
|
|
rendering/BorderEdge.cpp
|
|
|
|
rendering/BreakLines.cpp
|
2018-09-02 03:04:24 +00:00
|
|
|
rendering/CSSFilter.cpp
|
2020-11-28 19:37:32 +00:00
|
|
|
rendering/CaretRectComputation.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/ClipRect.cpp
|
Implement FCP (first contentful paint)
https://bugs.webkit.org/show_bug.cgi?id=208499
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
Imported paint timing tests that don't require first-paint.
* resources/import-expectations.json:
* web-platform-tests/paint-timing: Added.
* web-platform-tests/paint-timing/fcp-only: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-background-size-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-background-size.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-canvas-context-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-gradient-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-gradient.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-text-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-text.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-opacity-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-opacity.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-svg-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-svg.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-text-input-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-text-input.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-video-frame-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-video-poster-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-whitespace-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-whitespace.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-with-rtl-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html: Added.
* web-platform-tests/paint-timing/resources: Added.
* web-platform-tests/paint-timing/resources/circle.svg: Added.
* web-platform-tests/paint-timing/resources/circles.png: Added.
* web-platform-tests/paint-timing/resources/subframe-painting.html: Added.
* web-platform-tests/paint-timing/resources/subframe-sending-paint.html: Added.
* web-platform-tests/paint-timing/resources/utils.js: Added.
(waitForAnimationFrames):
(async assertNoFirstContentfulPaint):
(async assertFirstContentfulPaint.return.new.Promise):
(async assertFirstContentfulPaint):
(async test_fcp):
Source/WebCore:
Added the necessary interface, extensions to the performance interface and observer, new runtime flag.
Detecting contentfulness after layout and before actual paint, by running a "dummy" paint, similar to
invalidateControlTints() / invalidateImagesWithAsyncDecodes(). Save the result to the GraphicsContext and then to the document.
This would run for every paint until we detect a contentful one.
Note that it paints the entire frame contents, as FCP is not viewport-dependent.
Also, paint timing is currently disabled for LFC (layout formatting context), and will be dealt with later.
Tests: http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars.html
http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-background-size.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-gradient.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-text.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-opacity.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-svg.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-text-input.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-whitespace.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html
performance-api/paint-timing/paint-timing-apis.html
performance-api/paint-timing/paint-timing-frames.html
performance-api/paint-timing/paint-timing-with-worker.html
performance-api/paint-timing/performance-observer-first-contentful-paint.html
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSPerformanceEntryCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/WebCoreBuiltinNames.h:
Add PerformancePaintTiming interface. https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
* dom/Document.cpp:
* dom/Document.h:
(WebCore::Document::supportsPaintTiming const):
We only report paint timing for document that can access the top level security origin, to avoid leakage of information to sandboxed iframes.
(WebCore::Document::enqueuePaintTimingEntryIfNeeded):
Enqueue a paint timing entry, according to https://w3c.github.io/paint-timing/#sec-reporting-paint-timing
* page/FrameView.cpp:
(WebCore::FrameView::paintContents):
Disable FCP fake-paint in LFC mode.
* page/Page.cpp:
(WebCore::Page::doAfterUpdateRendering):
* page/Performance.cpp:
(WebCore::Performance::getEntries const):
(WebCore::Performance::getEntriesByType const):
(WebCore::Performance::getEntriesByName const):
(WebCore::Performance::reportFirstContentfulPaint):
* page/Performance.h:
Support first-contentful-paint reporting.
* page/PerformanceEntry.cpp:
(WebCore::PerformanceEntry::parseEntryTypeString):
* page/PerformanceEntry.h:
(WebCore::PerformanceEntry::isPaint const):
* page/PerformanceObserver.cpp:
(WebCore::PerformanceObserver::supportedEntryTypes):
* page/PerformanceObserver.h:
* page/PerformanceObserver.idl:
* page/PerformancePaintTiming.h: Added.
(isType):
* page/PerformancePaintTiming.idl: Added.
Add paint performance entry type.
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setPaintTimingEnabled):
(WebCore::RuntimeEnabledFeatures::paintTimingEnabled const):
New runtime flag for paint timing.
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::detectingContentfulPaint const):
(WebCore::GraphicsContext::setContentfulPaintDetected):
(WebCore::GraphicsContext::contenfulPaintDetected const):
Add a flag in GraphicsContext where different render operations can report if they're contentful.
* rendering/ContentfulPaintChecker.cpp: Added.
(WebCore::ContentfulPaintChecker::qualifiesForContentfulPaint):
* rendering/ContentfulPaintChecker.h: Added.
Run a "dummy" paint of the FrameView, to detect contentful elements.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::paintReplaced):
* rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextOrEmphasisMarks):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
Report contentfulness when we reach anything that qualifies as contentful,
based on https://w3c.github.io/paint-timing/#contentful.
Source/WebKit:
Add an experimental runtime flag for paint-timing (paintTimingEnabled).
* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPaintTimingEnabled):
(WKPreferencesGetPaintTimingEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::updatePreferencesStore):
LayoutTests:
Added tests for some first-contentful-paint (FCP) use-cases.
Ensure that FCP works well with VNE (first paint delay until contents are visually non-empty).
* platform/win/TestExpectations:
* platform/mac-wk1/TestExpectations:
Disable paint timing for WebKit1.
* TestExpectations:
Disable of the WPT tests.
* http/tests/performance/paint-timing: Added.
* http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars-expected.txt: Added.
* http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars.html: Added.
If VNE due to number of characters blocks painting, make sure FCP is reported only after painting is unblocked.
* http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style-expected.txt: Added.
* http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style.html: Added.
If a pending stylesheet blocks painting, make sure FCP is reported only after stylesheet has loaded.
* http/tests/performance/paint-timing/resources: Added.
* http/tests/performance/paint-timing/resources/slowscript.php: Added.
* http/tests/performance/paint-timing/resources/slowstyle.php: Added.
* http/tests/performance/paint-timing/resources/style.css: Added.
(body):
* performance-api/paint-timing: Added.
* performance-api/paint-timing/paint-timing-apis-expected.txt: Added.
* performance-api/paint-timing/paint-timing-apis.html: Added.
* performance-api/paint-timing/paint-timing-frames-expected.txt: Added.
* performance-api/paint-timing/paint-timing-frames.html: Added.
* performance-api/paint-timing/paint-timing-with-worker-expected.txt: Added.
* performance-api/paint-timing/paint-timing-with-worker.html: Added.
Test that FCP is not available for cross-origin frames and workers.
* performance-api/paint-timing/performance-observer-first-contentful-paint-expected.txt: Added.
* performance-api/paint-timing/performance-observer-first-contentful-paint.html: Added.
Test that performance observers are called for FCP.
* performance-api/paint-timing/resources: Added.
* performance-api/paint-timing/resources/fcp-subframe.html: Added.
* performance-api/paint-timing/resources/paint-api-utils.js: Added.
(async waitForFCP):
* performance-api/paint-timing/resources/paint-timing-api.js: Added.
* performance-api/paint-timing/resources/worker.html: Added.
Canonical link: https://commits.webkit.org/224044@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-28 22:34:52 +00:00
|
|
|
rendering/ContentfulPaintChecker.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/CounterNode.cpp
|
2019-04-06 16:48:58 +00:00
|
|
|
rendering/EventRegion.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/FixedTableLayout.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
rendering/FlexibleBoxAlgorithm.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/FloatingObjects.cpp
|
|
|
|
rendering/Grid.cpp
|
2018-11-23 11:04:23 +00:00
|
|
|
rendering/GridBaselineAlignment.cpp
|
2017-11-22 23:46:15 +00:00
|
|
|
rendering/GridLayoutFunctions.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/GridTrackSizingAlgorithm.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
rendering/HighlightData.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/HitTestLocation.cpp
|
|
|
|
rendering/HitTestResult.cpp
|
|
|
|
rendering/HitTestingTransformState.cpp
|
|
|
|
rendering/ImageQualityController.cpp
|
|
|
|
rendering/InlineIterator.cpp
|
2019-06-24 03:09:40 +00:00
|
|
|
rendering/LayerAncestorClippingStack.cpp
|
2019-05-15 15:59:21 +00:00
|
|
|
rendering/LayerOverlapMap.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/LayoutDisallowedScope.cpp
|
|
|
|
rendering/LayoutRepainter.cpp
|
2021-06-06 14:41:05 +00:00
|
|
|
rendering/LegacyEllipsisBox.cpp
|
2021-06-01 17:22:45 +00:00
|
|
|
rendering/LegacyInlineBox.cpp
|
2021-06-06 14:41:05 +00:00
|
|
|
rendering/LegacyInlineElementBox.cpp
|
2021-06-03 13:39:56 +00:00
|
|
|
rendering/LegacyInlineFlowBox.cpp
|
2021-06-01 13:58:23 +00:00
|
|
|
rendering/LegacyLineLayout.cpp
|
2021-06-02 16:20:15 +00:00
|
|
|
rendering/LegacyRootInlineBox.cpp
|
2021-06-05 12:19:10 +00:00
|
|
|
rendering/LegacyInlineTextBox.cpp
|
2018-02-27 22:35:47 +00:00
|
|
|
rendering/MarkedText.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/OrderIterator.cpp
|
|
|
|
rendering/PointerEventsHitRules.cpp
|
|
|
|
rendering/RenderAttachment.cpp
|
|
|
|
rendering/RenderBlock.cpp
|
|
|
|
rendering/RenderBlockFlow.cpp
|
|
|
|
rendering/RenderBox.cpp
|
|
|
|
rendering/RenderBoxModelObject.cpp
|
|
|
|
rendering/RenderButton.cpp
|
|
|
|
rendering/RenderCombineText.cpp
|
|
|
|
rendering/RenderCounter.cpp
|
|
|
|
rendering/RenderDeprecatedFlexibleBox.cpp
|
|
|
|
rendering/RenderDetailsMarker.cpp
|
|
|
|
rendering/RenderElement.cpp
|
|
|
|
rendering/RenderEmbeddedObject.cpp
|
|
|
|
rendering/RenderFileUploadControl.cpp
|
|
|
|
rendering/RenderFlexibleBox.cpp
|
|
|
|
rendering/RenderFragmentContainer.cpp
|
|
|
|
rendering/RenderFragmentContainerSet.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
rendering/RenderFragmentedFlow.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/RenderFrame.cpp
|
|
|
|
rendering/RenderFrameBase.cpp
|
|
|
|
rendering/RenderFrameSet.cpp
|
|
|
|
rendering/RenderFullScreen.cpp
|
|
|
|
rendering/RenderGeometryMap.cpp
|
|
|
|
rendering/RenderGrid.cpp
|
|
|
|
rendering/RenderHTMLCanvas.cpp
|
|
|
|
rendering/RenderIFrame.cpp
|
|
|
|
rendering/RenderImage.cpp
|
|
|
|
rendering/RenderImageResource.cpp
|
|
|
|
rendering/RenderImageResourceStyleImage.cpp
|
|
|
|
rendering/RenderInline.cpp
|
|
|
|
rendering/RenderLayer.cpp
|
|
|
|
rendering/RenderLayerBacking.cpp
|
|
|
|
rendering/RenderLayerCompositor.cpp
|
2018-09-04 20:27:09 +00:00
|
|
|
rendering/RenderLayerFilters.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/RenderLayerModelObject.cpp
|
2020-12-30 23:01:47 +00:00
|
|
|
rendering/RenderLayerScrollableArea.cpp
|
2018-12-07 20:10:14 +00:00
|
|
|
rendering/RenderLayoutState.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/RenderLineBoxList.cpp
|
|
|
|
rendering/RenderLineBreak.cpp
|
|
|
|
rendering/RenderListBox.cpp
|
|
|
|
rendering/RenderListItem.cpp
|
|
|
|
rendering/RenderListMarker.cpp
|
|
|
|
rendering/RenderMarquee.cpp
|
|
|
|
rendering/RenderMedia.cpp
|
|
|
|
rendering/RenderMenuList.cpp
|
|
|
|
rendering/RenderMeter.cpp
|
2021-02-23 01:43:27 +00:00
|
|
|
rendering/RenderModel.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/RenderMultiColumnFlow.cpp
|
|
|
|
rendering/RenderMultiColumnSet.cpp
|
|
|
|
rendering/RenderMultiColumnSpannerPlaceholder.cpp
|
|
|
|
rendering/RenderObject.cpp
|
|
|
|
rendering/RenderProgress.cpp
|
|
|
|
rendering/RenderQuote.cpp
|
|
|
|
rendering/RenderReplaced.cpp
|
|
|
|
rendering/RenderReplica.cpp
|
|
|
|
rendering/RenderRuby.cpp
|
|
|
|
rendering/RenderRubyBase.cpp
|
|
|
|
rendering/RenderRubyRun.cpp
|
|
|
|
rendering/RenderRubyText.cpp
|
|
|
|
rendering/RenderScrollbar.cpp
|
|
|
|
rendering/RenderScrollbarPart.cpp
|
|
|
|
rendering/RenderScrollbarTheme.cpp
|
|
|
|
rendering/RenderSearchField.cpp
|
|
|
|
rendering/RenderSelectionInfo.cpp
|
|
|
|
rendering/RenderSlider.cpp
|
|
|
|
rendering/RenderTable.cpp
|
|
|
|
rendering/RenderTableCaption.cpp
|
|
|
|
rendering/RenderTableCell.cpp
|
|
|
|
rendering/RenderTableCol.cpp
|
|
|
|
rendering/RenderTableRow.cpp
|
|
|
|
rendering/RenderTableSection.cpp
|
|
|
|
rendering/RenderText.cpp
|
|
|
|
rendering/RenderTextControl.cpp
|
|
|
|
rendering/RenderTextControlMultiLine.cpp
|
|
|
|
rendering/RenderTextControlSingleLine.cpp
|
|
|
|
rendering/RenderTextFragment.cpp
|
|
|
|
rendering/RenderTextLineBoxes.cpp
|
|
|
|
rendering/RenderTheme.cpp
|
|
|
|
rendering/RenderTreeAsText.cpp
|
2020-08-13 22:28:42 +00:00
|
|
|
rendering/RenderTreeMutationDisallowedScope.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/RenderVTTCue.cpp
|
|
|
|
rendering/RenderVideo.cpp
|
|
|
|
rendering/RenderView.cpp
|
|
|
|
rendering/RenderWidget.cpp
|
|
|
|
rendering/ScrollAlignment.cpp
|
2020-10-14 20:42:23 +00:00
|
|
|
rendering/SelectionRangeData.cpp
|
2021-08-19 16:05:09 +00:00
|
|
|
rendering/StyledMarkedText.cpp
|
Experiment: create lots of different malloc zones for easier accounting of memory use
https://bugs.webkit.org/show_bug.cgi?id=186422
Patch by Yusuke Suzuki <ysuzuki@apple.com> and Simon Fraser <simon.fraser@apple.com> on 2020-01-02
Reviewed by Saam Barati.
Source/bmalloc:
* bmalloc/BPlatform.h:
* bmalloc/Environment.cpp:
(bmalloc::Environment::computeIsDebugHeapEnabled):
* bmalloc/IsoHeap.h:
(bmalloc::api::IsoHeap::IsoHeap):
* bmalloc/IsoHeapInlines.h:
(bmalloc::api::IsoHeap<Type>::IsoHeap):
* bmalloc/IsoTLSInlines.h:
(bmalloc::IsoTLS::allocateSlow):
(bmalloc::IsoTLS::deallocateSlow):
Source/JavaScriptCore:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* assembler/AssemblerBuffer.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
* assembler/AssemblerBuffer.h:
(JSC::AssemblerData::AssemblerData):
(JSC::AssemblerData::operator=):
(JSC::AssemblerData::~AssemblerData):
(JSC::AssemblerData::grow):
* bytecode/AccessCase.cpp:
* bytecode/AccessCase.h:
* bytecode/BytecodeBasicBlock.cpp:
* bytecode/BytecodeBasicBlock.h:
* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
* bytecode/InstructionStream.cpp:
* bytecode/InstructionStream.h:
* bytecode/PolymorphicAccess.cpp:
* bytecode/PolymorphicAccess.h:
* bytecode/UnlinkedMetadataTable.cpp:
(JSC::UnlinkedMetadataTable::finalize):
* bytecode/UnlinkedMetadataTable.h:
* bytecode/UnlinkedMetadataTableInlines.h:
(JSC::UnlinkedMetadataTable::UnlinkedMetadataTable):
(JSC::UnlinkedMetadataTable::~UnlinkedMetadataTable):
(JSC::UnlinkedMetadataTable::link):
(JSC::UnlinkedMetadataTable::unlink):
* bytecode/ValueProfile.h:
(JSC::ValueProfileAndVirtualRegisterBuffer::ValueProfileAndVirtualRegisterBuffer):
* bytecode/Watchpoint.cpp:
* bytecode/Watchpoint.h:
* dfg/DFGBasicBlock.cpp:
* dfg/DFGBasicBlock.h:
* dfg/DFGNode.cpp:
* dfg/DFGNode.h:
* dfg/DFGSpeculativeJIT.cpp:
* dfg/DFGSpeculativeJIT.h:
* heap/BlockDirectory.cpp:
* heap/BlockDirectory.h:
* heap/FastMallocAlignedMemoryAllocator.cpp:
(JSC::FastMallocAlignedMemoryAllocator::FastMallocAlignedMemoryAllocator):
(JSC::FastMallocAlignedMemoryAllocator::tryAllocateAlignedMemory):
(JSC::FastMallocAlignedMemoryAllocator::freeAlignedMemory):
(JSC::FastMallocAlignedMemoryAllocator::tryAllocateMemory):
(JSC::FastMallocAlignedMemoryAllocator::freeMemory):
(JSC::FastMallocAlignedMemoryAllocator::tryReallocateMemory):
* heap/FastMallocAlignedMemoryAllocator.h:
* heap/GCSegmentedArray.cpp: Copied from Source/JavaScriptCore/parser/SourceProviderCache.cpp.
* heap/GCSegmentedArray.h:
* heap/GCSegmentedArrayInlines.h:
(JSC::GCArraySegment<T>::create):
(JSC::GCArraySegment<T>::destroy):
* heap/GigacageAlignedMemoryAllocator.cpp:
(JSC::GigacageAlignedMemoryAllocator::GigacageAlignedMemoryAllocator):
(JSC::GigacageAlignedMemoryAllocator::tryAllocateAlignedMemory):
(JSC::GigacageAlignedMemoryAllocator::freeAlignedMemory):
(JSC::GigacageAlignedMemoryAllocator::tryAllocateMemory):
(JSC::GigacageAlignedMemoryAllocator::freeMemory):
(JSC::GigacageAlignedMemoryAllocator::tryReallocateMemory):
* heap/GigacageAlignedMemoryAllocator.h:
* heap/IsoAlignedMemoryAllocator.cpp:
(JSC::IsoAlignedMemoryAllocator::IsoAlignedMemoryAllocator):
(JSC::IsoAlignedMemoryAllocator::~IsoAlignedMemoryAllocator):
(JSC::IsoAlignedMemoryAllocator::tryAllocateAlignedMemory):
(JSC::IsoAlignedMemoryAllocator::freeAlignedMemory):
(JSC::IsoAlignedMemoryAllocator::tryAllocateMemory):
(JSC::IsoAlignedMemoryAllocator::freeMemory):
* heap/IsoAlignedMemoryAllocator.h:
* heap/IsoSubspace.cpp:
(JSC::IsoSubspace::IsoSubspace):
* heap/MarkedBlock.cpp:
* heap/MarkedBlock.h:
* heap/WeakBlock.cpp:
(JSC::WeakBlock::create):
(JSC::WeakBlock::destroy):
* heap/WeakBlock.h:
* jit/JITCode.cpp:
* jit/JITCode.h:
* jit/RegisterAtOffsetList.cpp:
* jit/RegisterAtOffsetList.h:
* parser/Nodes.cpp:
* parser/Nodes.h:
* parser/ParserArena.cpp:
(JSC::ParserArena::deallocateObjects):
(JSC::ParserArena::allocateFreeablePool):
* parser/ParserArena.h:
* parser/SourceProvider.cpp:
* parser/SourceProvider.h:
* parser/SourceProviderCache.cpp:
* parser/SourceProviderCache.h:
* parser/SourceProviderCacheItem.h:
(JSC::SourceProviderCacheItem::create):
* runtime/CachePayload.cpp:
(JSC::CachePayload::makeMallocPayload):
* runtime/CachePayload.h:
* runtime/CachedBytecode.h:
(JSC::CachedBytecode::create):
* runtime/CachedTypes.cpp:
(JSC::Encoder::release):
(JSC::Encoder::Page::Page):
(JSC::CachedVector::encode):
(JSC::CachedVector::decode const):
(JSC::CachedInstructionStream::decode const):
* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::rehash):
* runtime/PropertyTable.cpp:
(JSC::PropertyTable::PropertyTable):
(JSC::PropertyTable::~PropertyTable):
* runtime/SymbolTable.cpp:
* runtime/SymbolTable.h:
* runtime/VM.cpp:
(JSC::VM::~VM):
* runtime/VM.h:
(JSC::ScratchBuffer::create):
(JSC::VM::exceptionFuzzingBuffer):
* wasm/WasmInstance.cpp:
(JSC::Wasm::Instance::Instance):
* wasm/WasmInstance.h:
* wasm/WasmTable.cpp:
(JSC::Wasm::Table::Table):
(JSC::Wasm::FuncRefTable::FuncRefTable):
* wasm/WasmTable.h:
Source/WebCore:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/SerializedScriptValue.cpp:
* bindings/js/SerializedScriptValue.h:
* css/CSSFontFace.cpp:
* css/CSSFontFace.h:
* css/CSSSelector.cpp:
* css/CSSSelector.h:
* css/CSSValue.cpp:
* css/CSSValue.h:
* css/StyleProperties.cpp:
(WebCore::ImmutableStyleProperties::create):
* css/StyleProperties.h:
* css/StyleRule.cpp:
* css/StyleRule.h:
* dom/ElementData.cpp:
(WebCore::ShareableElementData::createWithAttributes):
(WebCore::UniqueElementData::makeShareableCopy const):
* dom/ElementData.h:
* dom/NodeRareData.cpp:
* dom/NodeRareData.h:
* dom/QualifiedName.cpp:
* dom/QualifiedName.h:
* html/parser/HTMLDocumentParser.cpp:
* html/parser/HTMLDocumentParser.h:
* loader/DocumentLoader.cpp:
* loader/DocumentLoader.h:
* loader/ResourceLoader.cpp:
* loader/ResourceLoader.h:
* loader/cache/CachedResource.cpp:
* loader/cache/CachedResource.h:
* page/PerformanceEntry.cpp:
* page/PerformanceEntry.h:
* platform/graphics/Font.cpp:
* platform/graphics/Font.h:
* platform/graphics/FontCascadeFonts.cpp:
* platform/graphics/FontCascadeFonts.h:
* platform/graphics/Region.cpp:
* platform/graphics/Region.h:
* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
(WebCore::releaseUint8Vector):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
* platform/graphics/nicosia/NicosiaBuffer.cpp:
(Nicosia::Buffer::Buffer):
* platform/network/ResourceHandle.cpp:
* platform/network/ResourceHandleInternal.h:
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::closeCurrentStream):
(WebCore::advanceCurrentStream):
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
* rendering/TableLayout.cpp: Copied from Source/JavaScriptCore/parser/SourceProviderCache.cpp.
* rendering/TableLayout.h:
* rendering/style/RenderStyle.cpp:
* rendering/style/RenderStyle.h:
* rendering/style/SVGRenderStyle.cpp:
* rendering/style/SVGRenderStyle.h:
* rendering/style/SVGRenderStyleDefs.cpp:
* rendering/style/SVGRenderStyleDefs.h:
* rendering/style/StyleBoxData.cpp:
* rendering/style/StyleBoxData.h:
* rendering/style/StyleInheritedData.cpp:
* rendering/style/StyleInheritedData.h:
* rendering/style/StyleRareInheritedData.cpp:
* rendering/style/StyleRareInheritedData.h:
* rendering/style/StyleRareNonInheritedData.cpp:
* rendering/style/StyleRareNonInheritedData.h:
* rendering/style/StyleSurroundData.cpp:
* rendering/style/StyleSurroundData.h:
* rendering/style/StyleTransformData.cpp:
* rendering/style/StyleTransformData.h:
* style/StyleTreeResolver.cpp:
* style/StyleTreeResolver.h:
* svg/animation/SMILTimeContainer.cpp:
* svg/animation/SMILTimeContainer.h:
Source/WebKit:
* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::create):
(WebKit::ShareableBitmap::~ShareableBitmap):
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataEncoder::HistoryEntryDataEncoder):
(WebKit::HistoryEntryDataEncoder::finishEncoding):
(WebKit::encodeSessionHistoryEntryData):
(WebKit::encodeLegacySessionState):
Source/WTF:
This patch introduces ENABLE(MALLOC_HEAP_BREAKDOWN). If this is enabled, we allocate malloc_zone per malloc kind.
This offers the way to investigate the usage of memory per kind by using vmmap, like the following.
VIRTUAL RESIDENT DIRTY SWAPPED ALLOCATION BYTES DIRTY+SWAP REGION
MALLOC ZONE SIZE SIZE SIZE SIZE COUNT ALLOCATED FRAG SIZE % FRAG COUNT
=========== ======= ========= ========= ========= ========= ========= ========= ====== ======
StringImpl_0x116efd000 188.0M 69.3M 30.9M 0K 139456 18.0M 12.9M 42% 34
DefaultMallocZone_0x10f487000 176.0M 53.9M 14.1M 0K 115956 9955K 4497K 32% 22
Vector_0x116eff000 162.0M 56.3M 55.3M 0K 140715 17.3M 37.9M 69% 36
MetadataTable_0x11843b000 152.0M 17.5M 17.5M 0K 14200 2353K 15.2M 87% 26
WebKit Using System Malloc_0x114cbe000 150.0M 31.6M 21.8M 0K 87422 16.7M 5278K 24% 23
InstructionStream_0x118469000 150.0M 5764K 5764K 0K 14470 4688K 1076K 19% 24
AssemblerData_0x117ee6000 150.0M 1928K 1928K 0K 1 16 1928K 100% 24
To achieve this goal without making very large change, we put a template type in various containers.
For example, Vector will take Malloc parameter (the default one is FastMalloc allocator). If ENABLE(MALLOC_HEAP_BREAKDOWN) is enabled, we change this to
specific VectorMalloc allocator, and vmmap can show memory usage of this allocator. This patch also supports malloc_zone per IsoHeap. So we can see memory
allocation per IsoHeap in vmmap.
To use this feature, we need to flip two compile time flags, ENABLE(MALLOC_HEAP_BREAKDOWN) in WTF and BENABLE_MALLOC_HEAP_BREAKDOWN in bmalloc.
And use `vmmap $PID` to dump malloc zones. To allocate objects of a class with a specific malloc-zone, use WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(HeapIdentifier) for the class,
and define allocator by DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(HeapIdentifier) in a header and DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(HeapIdentifier) in a cpp file.
This patch also introduce callstack collector for malloc. Vector, HashMap etc. are used to allocate various things, but the above malloc_zone feature only tells thing like "Vector
takes XXX MB memory". But what we want to know in this case is what Vector is consuming memory. We collect StackShot for each malloc call, and combine these information to tell
which callsite is consuming much memory, which tell us that what Vector is consuming memory.
* WTF.xcodeproj/project.pbxproj:
* wtf/Bag.cpp: Copied from Source/JavaScriptCore/parser/SourceProviderCache.cpp.
* wtf/Bag.h:
(WTF::Private::BagNode::BagNode): Deleted.
* wtf/BitVector.cpp:
(WTF::BitVector::OutOfLineBits::create):
(WTF::BitVector::OutOfLineBits::destroy):
* wtf/CMakeLists.txt:
* wtf/ConcurrentBuffer.cpp: Copied from Source/JavaScriptCore/parser/SourceProviderCache.cpp.
* wtf/ConcurrentBuffer.h:
* wtf/DebugHeap.cpp: Copied from Source/JavaScriptCore/runtime/CachePayload.cpp.
(WTF::DebugHeap::DebugHeap):
(WTF::DebugHeap::malloc):
(WTF::DebugHeap::calloc):
(WTF::DebugHeap::memalign):
(WTF::DebugHeap::realloc):
(WTF::DebugHeap::free):
* wtf/DebugHeap.h: Added.
* wtf/FastBitVector.cpp:
(WTF::FastBitVectorWordOwner::setEqualsSlow):
(WTF::FastBitVectorWordOwner::resizeSlow):
* wtf/FastBitVector.h:
(WTF::FastBitVectorWordOwner::~FastBitVectorWordOwner):
* wtf/FastMalloc.cpp:
(WTF::fastMallocDumpMallocStats):
(WTF::AvoidRecordingScope::AvoidRecordingScope):
(WTF::AvoidRecordingScope::~AvoidRecordingScope):
(WTF::MallocCallTracker::MallocSiteData::MallocSiteData):
(WTF::MallocCallTracker::singleton):
(WTF::MallocCallTracker::MallocCallTracker):
(WTF::MallocCallTracker::recordMalloc):
(WTF::MallocCallTracker::recordRealloc):
(WTF::MallocCallTracker::recordFree):
(WTF::MallocCallTracker::dumpStats):
(WTF::fastMalloc):
(WTF::fastRealloc):
(WTF::fastFree):
(WTF::fastAlignedMalloc):
(WTF::tryFastAlignedMalloc):
(WTF::fastAlignedFree):
* wtf/FastMalloc.h:
(WTF::FastMalloc::zeroedMalloc):
(WTF::FastMalloc::tryZeroedMalloc):
* wtf/Forward.h:
* wtf/HashTable.cpp:
* wtf/HashTable.h:
(WTF::KeyTraits>::allocateTable):
(WTF::KeyTraits>::deallocateTable):
(WTF::KeyTraits>::rehash):
* wtf/MallocPtr.h:
(WTF::MallocPtr::MallocPtr):
(WTF::MallocPtr::malloc):
(WTF::MallocPtr::zeroedMalloc):
(WTF::MallocPtr::tryMalloc):
(WTF::MallocPtr::tryZeroedMalloc):
(WTF::adoptMallocPtr):
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::allocFreeSpaceNode):
(WTF::MetaAllocator::freeFreeSpaceNode):
* wtf/MetaAllocatorHandle.h:
* wtf/Platform.h:
* wtf/RefCountedArray.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::RefCountedArray):
(WTF::RefCountedArray::~RefCountedArray):
(WTF::RefCountedArray::assign):
* wtf/SegmentedVector.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
* wtf/SegmentedVector.h:
* wtf/SmallPtrSet.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
* wtf/SmallPtrSet.h:
(WTF::SmallPtrSet::~SmallPtrSet):
(WTF::SmallPtrSet::grow):
* wtf/UniqueArray.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
* wtf/UniqueArray.h:
(WTF::UniqueArrayFree::operator() const):
(WTF::UniqueArrayFree<T::operator() const):
* wtf/Vector.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
* wtf/Vector.h:
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
(WTF::VectorBufferBase::deallocateBuffer):
(WTF::VectorBufferBase::releaseBuffer):
(WTF::VectorBuffer::releaseBuffer):
(WTF::Vector::swap):
(WTF::Malloc>::Vector):
(WTF::=):
(WTF::Malloc>::contains const):
(WTF::Malloc>::findMatching const):
(WTF::Malloc>::find const):
(WTF::Malloc>::reverseFind const):
(WTF::Malloc>::appendIfNotContains):
(WTF::Malloc>::fill):
(WTF::Malloc>::appendRange):
(WTF::Malloc>::expandCapacity):
(WTF::Malloc>::tryExpandCapacity):
(WTF::Malloc>::resize):
(WTF::Malloc>::resizeToFit):
(WTF::Malloc>::shrink):
(WTF::Malloc>::grow):
(WTF::Malloc>::asanSetInitialBufferSizeTo):
(WTF::Malloc>::asanSetBufferSizeToFullCapacity):
(WTF::Malloc>::asanBufferSizeWillChangeTo):
(WTF::Malloc>::reserveCapacity):
(WTF::Malloc>::tryReserveCapacity):
(WTF::Malloc>::reserveInitialCapacity):
(WTF::Malloc>::shrinkCapacity):
(WTF::Malloc>::append):
(WTF::Malloc>::tryAppend):
(WTF::Malloc>::constructAndAppend):
(WTF::Malloc>::tryConstructAndAppend):
(WTF::Malloc>::appendSlowCase):
(WTF::Malloc>::constructAndAppendSlowCase):
(WTF::Malloc>::tryConstructAndAppendSlowCase):
(WTF::Malloc>::uncheckedAppend):
(WTF::Malloc>::uncheckedConstructAndAppend):
(WTF::Malloc>::appendVector):
(WTF::Malloc>::insert):
(WTF::Malloc>::insertVector):
(WTF::Malloc>::remove):
(WTF::Malloc>::removeFirst):
(WTF::Malloc>::removeFirstMatching):
(WTF::Malloc>::removeAll):
(WTF::Malloc>::removeAllMatching):
(WTF::Malloc>::reverse):
(WTF::Malloc>::map const):
(WTF::Malloc>::releaseBuffer):
(WTF::Malloc>::checkConsistency):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
(WTF::Malloc>::isolatedCopy const):
(WTF::removeRepeatedElements):
(WTF::minCapacity>::Vector): Deleted.
(WTF::minCapacity>::contains const): Deleted.
(WTF::minCapacity>::findMatching const): Deleted.
(WTF::minCapacity>::find const): Deleted.
(WTF::minCapacity>::reverseFind const): Deleted.
(WTF::minCapacity>::appendIfNotContains): Deleted.
(WTF::minCapacity>::fill): Deleted.
(WTF::minCapacity>::appendRange): Deleted.
(WTF::minCapacity>::expandCapacity): Deleted.
(WTF::minCapacity>::tryExpandCapacity): Deleted.
(WTF::minCapacity>::resize): Deleted.
(WTF::minCapacity>::resizeToFit): Deleted.
(WTF::minCapacity>::shrink): Deleted.
(WTF::minCapacity>::grow): Deleted.
(WTF::minCapacity>::asanSetInitialBufferSizeTo): Deleted.
(WTF::minCapacity>::asanSetBufferSizeToFullCapacity): Deleted.
(WTF::minCapacity>::asanBufferSizeWillChangeTo): Deleted.
(WTF::minCapacity>::reserveCapacity): Deleted.
(WTF::minCapacity>::tryReserveCapacity): Deleted.
(WTF::minCapacity>::reserveInitialCapacity): Deleted.
(WTF::minCapacity>::shrinkCapacity): Deleted.
(WTF::minCapacity>::append): Deleted.
(WTF::minCapacity>::tryAppend): Deleted.
(WTF::minCapacity>::constructAndAppend): Deleted.
(WTF::minCapacity>::tryConstructAndAppend): Deleted.
(WTF::minCapacity>::appendSlowCase): Deleted.
(WTF::minCapacity>::constructAndAppendSlowCase): Deleted.
(WTF::minCapacity>::tryConstructAndAppendSlowCase): Deleted.
(WTF::minCapacity>::uncheckedAppend): Deleted.
(WTF::minCapacity>::uncheckedConstructAndAppend): Deleted.
(WTF::minCapacity>::appendVector): Deleted.
(WTF::minCapacity>::insert): Deleted.
(WTF::minCapacity>::insertVector): Deleted.
(WTF::minCapacity>::remove): Deleted.
(WTF::minCapacity>::removeFirst): Deleted.
(WTF::minCapacity>::removeFirstMatching): Deleted.
(WTF::minCapacity>::removeAll): Deleted.
(WTF::minCapacity>::removeAllMatching): Deleted.
(WTF::minCapacity>::reverse): Deleted.
(WTF::minCapacity>::map const): Deleted.
(WTF::minCapacity>::releaseBuffer): Deleted.
(WTF::minCapacity>::checkConsistency): Deleted.
(WTF::minCapacity>::isolatedCopy const): Deleted.
* wtf/text/CString.cpp:
(WTF::CStringBuffer::createUninitialized):
* wtf/text/CString.h:
* wtf/text/StringBuffer.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
* wtf/text/StringBuffer.h:
(WTF::StringBuffer::StringBuffer):
(WTF::StringBuffer::~StringBuffer):
(WTF::StringBuffer::resize):
(WTF::StringBuffer::release):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::destroy):
(WTF::StringImpl::createUninitializedInternalNonEmpty):
(WTF::StringImpl::reallocateInternal):
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::createSubstringSharingImpl):
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::adopt):
* wtf/text/cf/StringImplCF.cpp:
(WTF::StringWrapperCFAllocator::allocate):
(WTF::StringWrapperCFAllocator::reallocate):
(WTF::StringWrapperCFAllocator::deallocate):
Canonical link: https://commits.webkit.org/218863@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-03 02:36:43 +00:00
|
|
|
rendering/TableLayout.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/TextDecorationPainter.cpp
|
|
|
|
rendering/TextPaintStyle.cpp
|
|
|
|
rendering/TextPainter.cpp
|
|
|
|
rendering/line/LineBreaker.cpp
|
|
|
|
rendering/line/LineInfo.cpp
|
|
|
|
rendering/line/LineWidth.cpp
|
|
|
|
rendering/line/TrailingObjects.cpp
|
|
|
|
rendering/mathml/MathMLStyle.cpp
|
|
|
|
rendering/mathml/MathOperator.cpp
|
|
|
|
rendering/mathml/RenderMathMLBlock.cpp
|
|
|
|
rendering/mathml/RenderMathMLFenced.cpp
|
|
|
|
rendering/mathml/RenderMathMLFencedOperator.cpp
|
|
|
|
rendering/mathml/RenderMathMLFraction.cpp
|
|
|
|
rendering/mathml/RenderMathMLMath.cpp
|
|
|
|
rendering/mathml/RenderMathMLMenclose.cpp
|
|
|
|
rendering/mathml/RenderMathMLOperator.cpp
|
|
|
|
rendering/mathml/RenderMathMLPadded.cpp
|
|
|
|
rendering/mathml/RenderMathMLRoot.cpp
|
|
|
|
rendering/mathml/RenderMathMLRow.cpp
|
|
|
|
rendering/mathml/RenderMathMLScripts.cpp
|
|
|
|
rendering/mathml/RenderMathMLSpace.cpp
|
|
|
|
rendering/mathml/RenderMathMLToken.cpp
|
|
|
|
rendering/mathml/RenderMathMLUnderOver.cpp
|
|
|
|
rendering/shapes/BoxShape.cpp
|
|
|
|
rendering/shapes/PolygonShape.cpp
|
|
|
|
rendering/shapes/RasterShape.cpp
|
|
|
|
rendering/shapes/RectangleShape.cpp
|
|
|
|
rendering/shapes/Shape.cpp
|
|
|
|
rendering/shapes/ShapeOutsideInfo.cpp
|
|
|
|
rendering/style/BasicShapes.cpp
|
2019-10-16 21:24:58 +00:00
|
|
|
rendering/style/BorderData.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/style/ContentData.cpp
|
|
|
|
rendering/style/FillLayer.cpp
|
2018-01-26 14:57:47 +00:00
|
|
|
rendering/style/GapLength.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/style/GridPosition.cpp
|
|
|
|
rendering/style/GridPositionsResolver.cpp
|
Add support for discrete animations of many CSS properties
https://bugs.webkit.org/show_bug.cgi?id=218902
Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:
By virtue of animation a host of new properties, we run an extra 551 tests and pass 518 of them.
* web-platform-tests/css/css-logical/animations/float-interpolation-expected.txt:
* web-platform-tests/css/css-position/animations/position-interpolation-expected.txt:
* web-platform-tests/css/css-transitions/properties-value-003-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
Source/WebCore:
Add support for discrete animation of the following properties:
-webkit-backface-visibility, -webkit-box-decoration-break, -webkit-hyphens, -webkit-initial-letter,
-webkit-print-color-adjust, -webkit-ruby-position, -webkit-text-emphasis-color, -webkit-text-emphasis-position,
border-bottom-style, border-collapse, border-left-style, border-right-style, border-top-style, box-sizing,
caption-side, clear, column-fill, column-rule-style, column-rule-style, cursor, empty-cells, flex-direction,
flex-wrap, float, grid-auto-columns, grid-auto-flow, grid-auto-rows, grid-column-end, grid-column-start,
grid-row-end, grid-row-start, image-orientation, isolation, justify-content, justify-items, justify-self,
list-style-position, list-style-type, mix-blend-mode, object-fit, outline-style, overflow-wrap, overflow-x,
overflow-y, page-break-after, page-break-before, page-break-inside, paint-order, pointer-events, position,
resize, table-layout, text-align, text-decoration-color, text-decoration-line, text-decoration-style,
text-overflow, text-transform, touch-action, transform-box, transform-style, white-space, word-break.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/style/GridPosition.cpp:
(WebCore::operator<<):
* rendering/style/GridPosition.h:
* rendering/style/GridTrackSize.cpp: Added.
(WebCore::operator<<):
* rendering/style/GridTrackSize.h:
Canonical link: https://commits.webkit.org/231577@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-14 08:52:49 +00:00
|
|
|
rendering/style/GridTrackSize.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/style/KeyframeList.cpp
|
|
|
|
rendering/style/NinePieceImage.cpp
|
|
|
|
rendering/style/QuotesData.cpp
|
|
|
|
rendering/style/RenderStyle.cpp
|
|
|
|
rendering/style/RenderStyleConstants.cpp
|
|
|
|
rendering/style/SVGRenderStyle.cpp
|
|
|
|
rendering/style/SVGRenderStyleDefs.cpp
|
|
|
|
rendering/style/ShadowData.cpp
|
|
|
|
rendering/style/ShapeValue.cpp
|
|
|
|
rendering/style/StyleBackgroundData.cpp
|
|
|
|
rendering/style/StyleBoxData.cpp
|
|
|
|
rendering/style/StyleCachedImage.cpp
|
2020-11-03 22:17:14 +00:00
|
|
|
rendering/style/StyleContentAlignmentData.cpp
|
-webkit-image-set should support all the image functions WebKit supports, not just url()
https://bugs.webkit.org/show_bug.cgi?id=81941
Patch by Noam Rosenthal <noam@webkit.org> on 2020-01-21
Reviewed by Darin Adler.
Source/WebCore:
Separate StyleCachedImage to 4 classes:
- StyleCachedImage: for single images only
- StyleMultiImage: for values that can contain multiple images: like cursor/image-set
- StyleImageSet
- StyleCursorImage
The new classes only deal with their own value type. Before, ImageSet and cursor were resolved
as a StyleCachedImage, which is no longer a valid assumption if image-set can contain generated images.
Though cursors still can only contain cached images, it was cleaner to refactor it out as well.
Refactored best-fit image selection from loading. Now StyleCachedImage is in charge of loading
the actual image, and StyleImageSet/StyleCursorImage perform the source selection.
Also, added the necessary logic in the CSS parser to consume generated images inside image-sets, excluding
when the image-set is a cursor value.
Tests: fast/css/image-set-parsing-generated.html
fast/hidpi/image-set-cross-fade.html
fast/hidpi/image-set-gradient-multi.html
fast/hidpi/image-set-gradient-single.html
fast/hidpi/image-set-gradient.html
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Added new files
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::selectBestFitImage):
(WebCore::CSSCursorImageValue::loadImage): Deleted.
* css/CSSCursorImageValue.h:
Instead of cursor loading the image, it selects an image CSS value
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::CSSImageSetValue):
(WebCore::CSSImageSetValue::fillImageSet):
(WebCore::CSSImageSetValue::cachedImage const):
(WebCore::CSSImageSetValue::selectBestFitImage):
(WebCore::CSSImageSetValue::updateDeviceScaleFactor):
(WebCore::CSSImageSetValue::imageSetWithStylesResolved):
(WebCore::CSSImageSetValue::traverseSubresources const):
(WebCore::CSSImageSetValue::loadBestFitImage): Deleted.
* css/CSSImageSetValue.h:
Refactor CSSImageSetValue to include non-cachedImage images
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeCursor):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeImageSet):
(WebCore::CSSPropertyParserHelpers::consumeImage):
(WebCore::CSSPropertyParserHelpers::consumeUrlOrStringAsStringView): Deleted.
* css/parser/CSSPropertyParserHelpers.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
When blending two images, get the selected images in case it is an image-set
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderImageResourceStyleImage.cpp:
(WebCore::RenderImageResourceStyleImage::initialize):
* rendering/RenderLayerBacking.cpp:
(WebCore::canDirectlyCompositeBackgroundBackgroundImage):
* rendering/style/ShapeValue.cpp:
(WebCore::ShapeValue::isImageValid const):
Use hasCachedImage() instead of isCachedImage() as a StyleImageSet is no longer an isCachedImage()
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::StyleCachedImage):
(WebCore::StyleCachedImage::imageURL):
(WebCore::StyleCachedImage::load):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCursorImage.h:
* rendering/style/StyleCursorImage.cpp:
* rendering/style/StyleMultiImage.h:
* rendering/style/StyleMultiImage.cpp:
* rendering/style/StyleImageSet.h:
* rendering/style/StyleImageSet.cpp:
* rendering/style/StyleImage.h:
(WebCore::StyleImage::selectedImage):
(WebCore::StyleImage::selectedImage const):
(WebCore::StyleImage::isCursorImage const):
(WebCore::StyleImage::isImageSet const):
(WebCore::StyleImage::hasCachedImage const):
(WebCore::StyleImage::StyleImage):
Separate cursor/image-set related stuff away from StyleCachedImage.
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueContent):
* style/StyleBuilderState.cpp:
(WebCore::Style::BuilderState::resolveImageStyles):
(WebCore::Style::BuilderState::createStyleImage):
* style/StyleBuilderState.h:
Match the CSS values with the correct Style class. Also, ensure image-sets resolve their
images' styles as they may contain gradients and other context-aware values.
LayoutTests:
* fast/css/cursor-parsing-expected.txt:
* fast/css/cursor-parsing.html:
Added parsing test to ensure arrow image-sets disable generated images
* fast/css/image-set-parsing-generated-expected.txt: Added.
* fast/css/image-set-parsing-generated.html: Added.
* fast/css/image-set-parsing-invalid-expected.txt:
* fast/css/image-set-parsing-invalid.html:
Added parsing tests for new generated-inside-image-set use cases
Test that image-set inside image-set is not supported
* fast/hidpi/image-set-cross-fade-expected.html: Added.
* fast/hidpi/image-set-cross-fade.html: Added.
* fast/hidpi/image-set-gradient-expected.html: Added.
* fast/hidpi/image-set-gradient-multi-expected.html: Added.
* fast/hidpi/image-set-gradient-multi.html: Added.
* fast/hidpi/image-set-gradient-single-expected.html: Added.
* fast/hidpi/image-set-gradient-single.html: Added.
* fast/hidpi/image-set-gradient.html: Added.
Added ref-tests for several generated-inside-image-set use-cases
Canonical link: https://commits.webkit.org/219598@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-21 18:28:17 +00:00
|
|
|
rendering/style/StyleCursorImage.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/style/StyleDeprecatedFlexibleBoxData.cpp
|
|
|
|
rendering/style/StyleFilterData.cpp
|
|
|
|
rendering/style/StyleFlexibleBoxData.cpp
|
|
|
|
rendering/style/StyleGeneratedImage.cpp
|
|
|
|
rendering/style/StyleGridData.cpp
|
|
|
|
rendering/style/StyleGridItemData.cpp
|
-webkit-image-set should support all the image functions WebKit supports, not just url()
https://bugs.webkit.org/show_bug.cgi?id=81941
Patch by Noam Rosenthal <noam@webkit.org> on 2020-01-21
Reviewed by Darin Adler.
Source/WebCore:
Separate StyleCachedImage to 4 classes:
- StyleCachedImage: for single images only
- StyleMultiImage: for values that can contain multiple images: like cursor/image-set
- StyleImageSet
- StyleCursorImage
The new classes only deal with their own value type. Before, ImageSet and cursor were resolved
as a StyleCachedImage, which is no longer a valid assumption if image-set can contain generated images.
Though cursors still can only contain cached images, it was cleaner to refactor it out as well.
Refactored best-fit image selection from loading. Now StyleCachedImage is in charge of loading
the actual image, and StyleImageSet/StyleCursorImage perform the source selection.
Also, added the necessary logic in the CSS parser to consume generated images inside image-sets, excluding
when the image-set is a cursor value.
Tests: fast/css/image-set-parsing-generated.html
fast/hidpi/image-set-cross-fade.html
fast/hidpi/image-set-gradient-multi.html
fast/hidpi/image-set-gradient-single.html
fast/hidpi/image-set-gradient.html
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Added new files
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::selectBestFitImage):
(WebCore::CSSCursorImageValue::loadImage): Deleted.
* css/CSSCursorImageValue.h:
Instead of cursor loading the image, it selects an image CSS value
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::CSSImageSetValue):
(WebCore::CSSImageSetValue::fillImageSet):
(WebCore::CSSImageSetValue::cachedImage const):
(WebCore::CSSImageSetValue::selectBestFitImage):
(WebCore::CSSImageSetValue::updateDeviceScaleFactor):
(WebCore::CSSImageSetValue::imageSetWithStylesResolved):
(WebCore::CSSImageSetValue::traverseSubresources const):
(WebCore::CSSImageSetValue::loadBestFitImage): Deleted.
* css/CSSImageSetValue.h:
Refactor CSSImageSetValue to include non-cachedImage images
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeCursor):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeImageSet):
(WebCore::CSSPropertyParserHelpers::consumeImage):
(WebCore::CSSPropertyParserHelpers::consumeUrlOrStringAsStringView): Deleted.
* css/parser/CSSPropertyParserHelpers.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
When blending two images, get the selected images in case it is an image-set
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderImageResourceStyleImage.cpp:
(WebCore::RenderImageResourceStyleImage::initialize):
* rendering/RenderLayerBacking.cpp:
(WebCore::canDirectlyCompositeBackgroundBackgroundImage):
* rendering/style/ShapeValue.cpp:
(WebCore::ShapeValue::isImageValid const):
Use hasCachedImage() instead of isCachedImage() as a StyleImageSet is no longer an isCachedImage()
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::StyleCachedImage):
(WebCore::StyleCachedImage::imageURL):
(WebCore::StyleCachedImage::load):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCursorImage.h:
* rendering/style/StyleCursorImage.cpp:
* rendering/style/StyleMultiImage.h:
* rendering/style/StyleMultiImage.cpp:
* rendering/style/StyleImageSet.h:
* rendering/style/StyleImageSet.cpp:
* rendering/style/StyleImage.h:
(WebCore::StyleImage::selectedImage):
(WebCore::StyleImage::selectedImage const):
(WebCore::StyleImage::isCursorImage const):
(WebCore::StyleImage::isImageSet const):
(WebCore::StyleImage::hasCachedImage const):
(WebCore::StyleImage::StyleImage):
Separate cursor/image-set related stuff away from StyleCachedImage.
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueContent):
* style/StyleBuilderState.cpp:
(WebCore::Style::BuilderState::resolveImageStyles):
(WebCore::Style::BuilderState::createStyleImage):
* style/StyleBuilderState.h:
Match the CSS values with the correct Style class. Also, ensure image-sets resolve their
images' styles as they may contain gradients and other context-aware values.
LayoutTests:
* fast/css/cursor-parsing-expected.txt:
* fast/css/cursor-parsing.html:
Added parsing test to ensure arrow image-sets disable generated images
* fast/css/image-set-parsing-generated-expected.txt: Added.
* fast/css/image-set-parsing-generated.html: Added.
* fast/css/image-set-parsing-invalid-expected.txt:
* fast/css/image-set-parsing-invalid.html:
Added parsing tests for new generated-inside-image-set use cases
Test that image-set inside image-set is not supported
* fast/hidpi/image-set-cross-fade-expected.html: Added.
* fast/hidpi/image-set-cross-fade.html: Added.
* fast/hidpi/image-set-gradient-expected.html: Added.
* fast/hidpi/image-set-gradient-multi-expected.html: Added.
* fast/hidpi/image-set-gradient-multi.html: Added.
* fast/hidpi/image-set-gradient-single-expected.html: Added.
* fast/hidpi/image-set-gradient-single.html: Added.
* fast/hidpi/image-set-gradient.html: Added.
Added ref-tests for several generated-inside-image-set use-cases
Canonical link: https://commits.webkit.org/219598@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-21 18:28:17 +00:00
|
|
|
rendering/style/StyleImageSet.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/style/StyleInheritedData.cpp
|
|
|
|
rendering/style/StyleMarqueeData.cpp
|
|
|
|
rendering/style/StyleMultiColData.cpp
|
-webkit-image-set should support all the image functions WebKit supports, not just url()
https://bugs.webkit.org/show_bug.cgi?id=81941
Patch by Noam Rosenthal <noam@webkit.org> on 2020-01-21
Reviewed by Darin Adler.
Source/WebCore:
Separate StyleCachedImage to 4 classes:
- StyleCachedImage: for single images only
- StyleMultiImage: for values that can contain multiple images: like cursor/image-set
- StyleImageSet
- StyleCursorImage
The new classes only deal with their own value type. Before, ImageSet and cursor were resolved
as a StyleCachedImage, which is no longer a valid assumption if image-set can contain generated images.
Though cursors still can only contain cached images, it was cleaner to refactor it out as well.
Refactored best-fit image selection from loading. Now StyleCachedImage is in charge of loading
the actual image, and StyleImageSet/StyleCursorImage perform the source selection.
Also, added the necessary logic in the CSS parser to consume generated images inside image-sets, excluding
when the image-set is a cursor value.
Tests: fast/css/image-set-parsing-generated.html
fast/hidpi/image-set-cross-fade.html
fast/hidpi/image-set-gradient-multi.html
fast/hidpi/image-set-gradient-single.html
fast/hidpi/image-set-gradient.html
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Added new files
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::selectBestFitImage):
(WebCore::CSSCursorImageValue::loadImage): Deleted.
* css/CSSCursorImageValue.h:
Instead of cursor loading the image, it selects an image CSS value
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::CSSImageSetValue):
(WebCore::CSSImageSetValue::fillImageSet):
(WebCore::CSSImageSetValue::cachedImage const):
(WebCore::CSSImageSetValue::selectBestFitImage):
(WebCore::CSSImageSetValue::updateDeviceScaleFactor):
(WebCore::CSSImageSetValue::imageSetWithStylesResolved):
(WebCore::CSSImageSetValue::traverseSubresources const):
(WebCore::CSSImageSetValue::loadBestFitImage): Deleted.
* css/CSSImageSetValue.h:
Refactor CSSImageSetValue to include non-cachedImage images
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeCursor):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeImageSet):
(WebCore::CSSPropertyParserHelpers::consumeImage):
(WebCore::CSSPropertyParserHelpers::consumeUrlOrStringAsStringView): Deleted.
* css/parser/CSSPropertyParserHelpers.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
When blending two images, get the selected images in case it is an image-set
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderImageResourceStyleImage.cpp:
(WebCore::RenderImageResourceStyleImage::initialize):
* rendering/RenderLayerBacking.cpp:
(WebCore::canDirectlyCompositeBackgroundBackgroundImage):
* rendering/style/ShapeValue.cpp:
(WebCore::ShapeValue::isImageValid const):
Use hasCachedImage() instead of isCachedImage() as a StyleImageSet is no longer an isCachedImage()
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::StyleCachedImage):
(WebCore::StyleCachedImage::imageURL):
(WebCore::StyleCachedImage::load):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCursorImage.h:
* rendering/style/StyleCursorImage.cpp:
* rendering/style/StyleMultiImage.h:
* rendering/style/StyleMultiImage.cpp:
* rendering/style/StyleImageSet.h:
* rendering/style/StyleImageSet.cpp:
* rendering/style/StyleImage.h:
(WebCore::StyleImage::selectedImage):
(WebCore::StyleImage::selectedImage const):
(WebCore::StyleImage::isCursorImage const):
(WebCore::StyleImage::isImageSet const):
(WebCore::StyleImage::hasCachedImage const):
(WebCore::StyleImage::StyleImage):
Separate cursor/image-set related stuff away from StyleCachedImage.
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueContent):
* style/StyleBuilderState.cpp:
(WebCore::Style::BuilderState::resolveImageStyles):
(WebCore::Style::BuilderState::createStyleImage):
* style/StyleBuilderState.h:
Match the CSS values with the correct Style class. Also, ensure image-sets resolve their
images' styles as they may contain gradients and other context-aware values.
LayoutTests:
* fast/css/cursor-parsing-expected.txt:
* fast/css/cursor-parsing.html:
Added parsing test to ensure arrow image-sets disable generated images
* fast/css/image-set-parsing-generated-expected.txt: Added.
* fast/css/image-set-parsing-generated.html: Added.
* fast/css/image-set-parsing-invalid-expected.txt:
* fast/css/image-set-parsing-invalid.html:
Added parsing tests for new generated-inside-image-set use cases
Test that image-set inside image-set is not supported
* fast/hidpi/image-set-cross-fade-expected.html: Added.
* fast/hidpi/image-set-cross-fade.html: Added.
* fast/hidpi/image-set-gradient-expected.html: Added.
* fast/hidpi/image-set-gradient-multi-expected.html: Added.
* fast/hidpi/image-set-gradient-multi.html: Added.
* fast/hidpi/image-set-gradient-single-expected.html: Added.
* fast/hidpi/image-set-gradient-single.html: Added.
* fast/hidpi/image-set-gradient.html: Added.
Added ref-tests for several generated-inside-image-set use-cases
Canonical link: https://commits.webkit.org/219598@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-21 18:28:17 +00:00
|
|
|
rendering/style/StyleMultiImage.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/style/StyleRareInheritedData.cpp
|
|
|
|
rendering/style/StyleRareNonInheritedData.cpp
|
2020-11-04 07:34:57 +00:00
|
|
|
rendering/style/StyleSelfAlignmentData.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/style/StyleSurroundData.cpp
|
|
|
|
rendering/style/StyleTransformData.cpp
|
|
|
|
rendering/style/StyleVisualData.cpp
|
Move idempotent text autosizing to StyleTreeResolver
https://bugs.webkit.org/show_bug.cgi?id=197808
<rdar://problem/50283983>
Reviewed by Antti Koivisto.
Source/WebCore:
This patch migrates the idempotent text autosizing code to live inside style resolution. This is almost
the same as the algorithm that uses the result of layout to calculate autosizing, but this version only
operates on style (and thus doesn't require double layouts). Because it is being run in an environment
with less information, autosizing is occurring in more places, so the curves have been adjusted to make
autosizing not boost as much as the previous implementation did. The new algorithm is modelled after
text-decorations-in-effect. I've claimed 4 of the unused bits in RenderStyle to contain the state of the
autosizing algorithm. StyleResolver::adjustRenderStyle() is where the algorithm is implemented:
- Look at the inherited bits
- Interogate the element's RenderStyle
- Compute new bits for the element, and set them in its RenderStyle
- Based on the newly computed bits, determine whether we should increase the text size
- If so, determine how much using the specified font size, and apply the result to the computed font size
This works because StyleBuilderCustom::applyInheritFontSize() inherits from the specified font size, not
the computed font size.
This patch also will disable autosizing using the other methods (so there aren't two methods of autosizing
fighting each other) and will honor text-size-adjust:none. However, it won't honor text-size-adjust:100%.
If content says text-size-adjust:100%, we will disregard it and take this code path.
Tests: fast/text-autosizing/ios/idempotentmode/css-exposure.html
fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-skip.html
fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-identity.html
fast/text-autosizing/ios/idempotentmode/idempotent-autosizing.html
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
* css/CSSProperties.json:
* css/StyleBuilderCustom.h:
(WebCore::computeBaseSpecifiedFontSize):
(WebCore::computeLineHeightMultiplierDueToFontSize):
* css/StyleResolver.cpp:
(WebCore::idempotentTextSize):
(WebCore::hasTextChildren):
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::checkForTextSizeAdjust):
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::applyTextSizingIfNeeded):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustComputedFontSizes):
(WebCore::idempotentTextSize): Deleted.
* rendering/RenderBlockFlow.h:
* rendering/RenderElement.cpp:
(WebCore::includeNonFixedHeight):
(WebCore::RenderElement::adjustComputedFontSizesOnBlocks):
(WebCore::RenderElement::resetTextAutosizing):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::autosizeStatus const):
(WebCore::RenderStyle::setAutosizeStatus):
* rendering/style/RenderStyle.h:
* rendering/style/TextSizeAdjustment.cpp: Added.
(WebCore::AutosizeStatus::AutosizeStatus):
(WebCore::AutosizeStatus::contains const):
(WebCore::AutosizeStatus::modifiedStatus const):
(WebCore::AutosizeStatus::shouldSkipSubtree const):
* rendering/style/TextSizeAdjustment.h:
LayoutTests:
* fast/text-autosizing/ios/idempotentmode/css-exposure-expected.txt: Added.
* fast/text-autosizing/ios/idempotentmode/css-exposure.html: Added.
* fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-skip-expected.html: Added.
* fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-skip.html: Added.
* platform/ipad/fast/text-autosizing/text-size-adjust-inline-style-expected.html: Removed.
* platform/ipad/fast/text-autosizing/text-size-adjust-inline-style.html: Removed.
We're intentionally not honoring percentages, because this is the most common way that
text autosizing is disabled (by setting it to 100%) on the Web today. However, Web authors
that have done this did it without knowing the full extent of the behavior change, and
the new idempotent text autosizing code path seems to be a progression in most cases
we've seen.
Canonical link: https://commits.webkit.org/212351@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-29 02:27:20 +00:00
|
|
|
rendering/style/TextSizeAdjustment.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/style/WillChangeData.cpp
|
|
|
|
rendering/svg/RenderSVGBlock.cpp
|
|
|
|
rendering/svg/RenderSVGContainer.cpp
|
|
|
|
rendering/svg/RenderSVGEllipse.cpp
|
|
|
|
rendering/svg/RenderSVGForeignObject.cpp
|
|
|
|
rendering/svg/RenderSVGGradientStop.cpp
|
|
|
|
rendering/svg/RenderSVGHiddenContainer.cpp
|
|
|
|
rendering/svg/RenderSVGImage.cpp
|
|
|
|
rendering/svg/RenderSVGInline.cpp
|
|
|
|
rendering/svg/RenderSVGInlineText.cpp
|
|
|
|
rendering/svg/RenderSVGModelObject.cpp
|
|
|
|
rendering/svg/RenderSVGPath.cpp
|
|
|
|
rendering/svg/RenderSVGRect.cpp
|
|
|
|
rendering/svg/RenderSVGResource.cpp
|
|
|
|
rendering/svg/RenderSVGResourceClipper.cpp
|
|
|
|
rendering/svg/RenderSVGResourceContainer.cpp
|
|
|
|
rendering/svg/RenderSVGResourceFilter.cpp
|
|
|
|
rendering/svg/RenderSVGResourceFilterPrimitive.cpp
|
|
|
|
rendering/svg/RenderSVGResourceGradient.cpp
|
|
|
|
rendering/svg/RenderSVGResourceLinearGradient.cpp
|
|
|
|
rendering/svg/RenderSVGResourceMarker.cpp
|
|
|
|
rendering/svg/RenderSVGResourceMasker.cpp
|
|
|
|
rendering/svg/RenderSVGResourcePattern.cpp
|
|
|
|
rendering/svg/RenderSVGResourceRadialGradient.cpp
|
|
|
|
rendering/svg/RenderSVGResourceSolidColor.cpp
|
|
|
|
rendering/svg/RenderSVGRoot.cpp
|
|
|
|
rendering/svg/RenderSVGShape.cpp
|
bmalloc should support strictly type-segregated isolated heaps
https://bugs.webkit.org/show_bug.cgi?id=178108
Reviewed by Saam Barati, Simon Fraser, and Ryosuke Niwa.
Source/bmalloc:
This introduces a new allocation API in bmalloc called IsoHeap. An IsoHeap is templatized by
type and created in static storage. When unused, it takes only a few words. When you do use
it, each IsoHeap gets a bag of virtual pages unique to it. This prevents use-after-free bugs
in one IsoHeap from affecting any other memory. At worst, two pointers of the same type will
point to the same object even though they should not have.
IsoHeaps allocate using a first-fit discipline that combines ideas from bmalloc and Riptide
(the JSC GC):
Like Riptide, it uses a bump'n'pop allocator. What Riptide calls blocks, IsoHeaps calls
pages. Pages are collected into directories. Directories track pages using bitvectors, so
that it's easy to quickly find a completely free page or one that has at least one free
object. I think that the bump'n'pop allocator is as fast as the bmalloc Immix-style (page and
line) allocator, but is better at allocating in holes. It's guaranteed to follow a first-fit
discipline. However, the real reason why I wrote it that was is that this is what I'm more
familiar with. This is a part of the design I want to revisit (bug 179278).
Like bmalloc, it uses a deallocation log. This means that the internal IsoHeap data
structures can be locked with a coarse-grained lock, since the deallocator only grabs it when
flushing the log. Similarly, the allocator only grabs it when refilling the bump'n'pop
FreeList.
This adds a unit test for IsoHeaps. In this change, IsoHeaps are adopted only by WebCore's
RenderObject.
Note that despite the use of GC concepts, it's not a goal to make this code directly sharable
with GC. The GC will probably have to do isolated heaps its own way (likely a special
Subspace or something like that).
* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/Algorithm.h:
(bmalloc::findBitInWord):
* bmalloc/AllIsoHeaps.cpp: Added.
(bmalloc::AllIsoHeaps::AllIsoHeaps):
(bmalloc::AllIsoHeaps::add):
(bmalloc::AllIsoHeaps::head):
* bmalloc/AllIsoHeaps.h: Added.
* bmalloc/AllIsoHeapsInlines.h: Added.
(bmalloc::AllIsoHeaps::forEach):
* bmalloc/BMalloced.h: Added.
* bmalloc/Bits.h: Added.
(bmalloc::bitsArrayLength):
(bmalloc::BitsWordView::BitsWordView):
(bmalloc::BitsWordView::numBits const):
(bmalloc::BitsWordView::word const):
(bmalloc::BitsWordOwner::BitsWordOwner):
(bmalloc::BitsWordOwner::view const):
(bmalloc::BitsWordOwner::operator=):
(bmalloc::BitsWordOwner::setAll):
(bmalloc::BitsWordOwner::clearAll):
(bmalloc::BitsWordOwner::set):
(bmalloc::BitsWordOwner::numBits const):
(bmalloc::BitsWordOwner::arrayLength const):
(bmalloc::BitsWordOwner::word const):
(bmalloc::BitsWordOwner::word):
(bmalloc::BitsWordOwner::words const):
(bmalloc::BitsWordOwner::words):
(bmalloc::BitsAndWords::BitsAndWords):
(bmalloc::BitsAndWords::view const):
(bmalloc::BitsAndWords::numBits const):
(bmalloc::BitsAndWords::word const):
(bmalloc::BitsOrWords::BitsOrWords):
(bmalloc::BitsOrWords::view const):
(bmalloc::BitsOrWords::numBits const):
(bmalloc::BitsOrWords::word const):
(bmalloc::BitsNotWords::BitsNotWords):
(bmalloc::BitsNotWords::view const):
(bmalloc::BitsNotWords::numBits const):
(bmalloc::BitsNotWords::word const):
(bmalloc::BitsImpl::BitsImpl):
(bmalloc::BitsImpl::numBits const):
(bmalloc::BitsImpl::size const):
(bmalloc::BitsImpl::arrayLength const):
(bmalloc::BitsImpl::operator== const):
(bmalloc::BitsImpl::operator!= const):
(bmalloc::BitsImpl::at const):
(bmalloc::BitsImpl::operator[] const):
(bmalloc::BitsImpl::isEmpty const):
(bmalloc::BitsImpl::operator& const):
(bmalloc::BitsImpl::operator| const):
(bmalloc::BitsImpl::operator~ const):
(bmalloc::BitsImpl::forEachSetBit const):
(bmalloc::BitsImpl::forEachClearBit const):
(bmalloc::BitsImpl::forEachBit const):
(bmalloc::BitsImpl::findBit const):
(bmalloc::BitsImpl::findSetBit const):
(bmalloc::BitsImpl::findClearBit const):
(bmalloc::BitsImpl::wordView const):
(bmalloc::BitsImpl::atImpl const):
(bmalloc::Bits::Bits):
(bmalloc::Bits::operator=):
(bmalloc::Bits::resize):
(bmalloc::Bits::setAll):
(bmalloc::Bits::clearAll):
(bmalloc::Bits::setAndCheck):
(bmalloc::Bits::operator|=):
(bmalloc::Bits::operator&=):
(bmalloc::Bits::at const):
(bmalloc::Bits::operator[] const):
(bmalloc::Bits::BitReference::BitReference):
(bmalloc::Bits::BitReference::operator bool const):
(bmalloc::Bits::BitReference::operator=):
(bmalloc::Bits::at):
(bmalloc::Bits::operator[]):
* bmalloc/CryptoRandom.cpp: Replaced with Source/bmalloc/bmalloc/CryptoRandom.cpp.
(bmalloc::cryptoRandom):
* bmalloc/CryptoRandom.h: Replaced with Source/bmalloc/bmalloc/CryptoRandom.h.
* bmalloc/DeferredDecommit.h: Added.
* bmalloc/DeferredDecommitInlines.h: Added.
(bmalloc::DeferredDecommit::DeferredDecommit):
* bmalloc/DeferredTrigger.h: Added.
(bmalloc::DeferredTrigger::DeferredTrigger):
* bmalloc/DeferredTriggerInlines.h: Added.
(bmalloc::DeferredTrigger<trigger>::didBecome):
(bmalloc::DeferredTrigger<trigger>::handleDeferral):
* bmalloc/EligibilityResult.h: Added.
(bmalloc::EligibilityResult::EligibilityResult):
* bmalloc/EligibilityResultInlines.h: Added.
(bmalloc::EligibilityResult<Config>::EligibilityResult):
* bmalloc/FixedVector.h:
* bmalloc/FreeList.cpp: Added.
(bmalloc::FreeList::FreeList):
(bmalloc::FreeList::~FreeList):
(bmalloc::FreeList::clear):
(bmalloc::FreeList::initializeList):
(bmalloc::FreeList::initializeBump):
(bmalloc::FreeList::contains const):
* bmalloc/FreeList.h: Added.
(bmalloc::FreeCell::scramble):
(bmalloc::FreeCell::descramble):
(bmalloc::FreeCell::setNext):
(bmalloc::FreeCell::next const):
(bmalloc::FreeList::allocationWillFail const):
(bmalloc::FreeList::allocationWillSucceed const):
(bmalloc::FreeList::originalSize const):
(bmalloc::FreeList::head const):
* bmalloc/FreeListInlines.h: Added.
(bmalloc::FreeList::allocate):
(bmalloc::FreeList::forEach const):
* bmalloc/IsoAllocator.h: Added.
* bmalloc/IsoAllocatorInlines.h: Added.
(bmalloc::IsoAllocator<Config>::IsoAllocator):
(bmalloc::IsoAllocator<Config>::~IsoAllocator):
(bmalloc::IsoAllocator<Config>::allocate):
(bmalloc::IsoAllocator<Config>::allocateSlow):
(bmalloc::IsoAllocator<Config>::scavenge):
* bmalloc/IsoConfig.h: Added.
* bmalloc/IsoDeallocator.h: Added.
* bmalloc/IsoDeallocatorInlines.h: Added.
(bmalloc::IsoDeallocator<Config>::IsoDeallocator):
(bmalloc::IsoDeallocator<Config>::~IsoDeallocator):
(bmalloc::IsoDeallocator<Config>::deallocate):
(bmalloc::IsoDeallocator<Config>::scavenge):
* bmalloc/IsoDirectory.h: Added.
(bmalloc::IsoDirectoryBaseBase::IsoDirectoryBaseBase):
(bmalloc::IsoDirectoryBaseBase::~IsoDirectoryBaseBase):
(bmalloc::IsoDirectoryBase::heap):
* bmalloc/IsoDirectoryInlines.h: Added.
(bmalloc::IsoDirectoryBase<Config>::IsoDirectoryBase):
(bmalloc::passedNumPages>::IsoDirectory):
(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::didBecome):
(bmalloc::passedNumPages>::didDecommit):
(bmalloc::passedNumPages>::scavenge):
(bmalloc::passedNumPages>::forEachCommittedPage):
* bmalloc/IsoDirectoryPage.h: Added.
(bmalloc::IsoDirectoryPage::index const):
* bmalloc/IsoDirectoryPageInlines.h: Added.
(bmalloc::IsoDirectoryPage<Config>::IsoDirectoryPage):
(bmalloc::IsoDirectoryPage<Config>::pageFor):
* bmalloc/IsoHeap.h: Added.
(bmalloc::api::IsoHeap::allocatorOffset):
(bmalloc::api::IsoHeap::setAllocatorOffset):
(bmalloc::api::IsoHeap::deallocatorOffset):
(bmalloc::api::IsoHeap::setDeallocatorOffset):
* bmalloc/IsoHeapImpl.cpp: Added.
(bmalloc::IsoHeapImplBase::IsoHeapImplBase):
(bmalloc::IsoHeapImplBase::~IsoHeapImplBase):
(bmalloc::IsoHeapImplBase::scavengeNow):
(bmalloc::IsoHeapImplBase::finishScavenging):
* bmalloc/IsoHeapImpl.h: Added.
* bmalloc/IsoHeapImplInlines.h: Added.
(bmalloc::IsoHeapImpl<Config>::IsoHeapImpl):
(bmalloc::IsoHeapImpl<Config>::takeFirstEligible):
(bmalloc::IsoHeapImpl<Config>::didBecomeEligible):
(bmalloc::IsoHeapImpl<Config>::scavenge):
(bmalloc::IsoHeapImpl<Config>::allocatorOffset):
(bmalloc::IsoHeapImpl<Config>::deallocatorOffset):
(bmalloc::IsoHeapImpl<Config>::numLiveObjects):
(bmalloc::IsoHeapImpl<Config>::numCommittedPages):
(bmalloc::IsoHeapImpl<Config>::forEachDirectory):
(bmalloc::IsoHeapImpl<Config>::forEachCommittedPage):
(bmalloc::IsoHeapImpl<Config>::forEachLiveObject):
* bmalloc/IsoHeapInlines.h: Added.
(bmalloc::api::IsoHeap<Type>::allocate):
(bmalloc::api::IsoHeap<Type>::tryAllocate):
(bmalloc::api::IsoHeap<Type>::deallocate):
(bmalloc::api::IsoHeap<Type>::scavenge):
(bmalloc::api::IsoHeap<Type>::isInitialized):
(bmalloc::api::IsoHeap<Type>::impl):
* bmalloc/IsoPage.h: Added.
(bmalloc::IsoPage::index const):
(bmalloc::IsoPage::directory):
(bmalloc::IsoPage::isInUseForAllocation const):
(bmalloc::IsoPage::indexOfFirstObject):
* bmalloc/IsoPageInlines.h: Added.
(bmalloc::IsoPage<Config>::tryCreate):
(bmalloc::IsoPage<Config>::IsoPage):
(bmalloc::IsoPage<Config>::free):
(bmalloc::IsoPage<Config>::startAllocating):
(bmalloc::IsoPage<Config>::stopAllocating):
(bmalloc::IsoPage<Config>::forEachLiveObject):
* bmalloc/IsoPageTrigger.h: Added.
* bmalloc/IsoTLS.cpp: Added.
(bmalloc::IsoTLS::scavenge):
(bmalloc::IsoTLS::IsoTLS):
(bmalloc::IsoTLS::ensureEntries):
(bmalloc::IsoTLS::destructor):
(bmalloc::IsoTLS::sizeForCapacity):
(bmalloc::IsoTLS::capacityForSize):
(bmalloc::IsoTLS::size):
(bmalloc::IsoTLS::forEachEntry):
* bmalloc/IsoTLS.h: Added.
* bmalloc/IsoTLSAllocatorEntry.h: Added.
* bmalloc/IsoTLSAllocatorEntryInlines.h: Added.
(bmalloc::IsoTLSAllocatorEntry<Config>::IsoTLSAllocatorEntry):
(bmalloc::IsoTLSAllocatorEntry<Config>::~IsoTLSAllocatorEntry):
(bmalloc::IsoTLSAllocatorEntry<Config>::construct):
* bmalloc/IsoTLSDeallocatorEntry.h: Added.
* bmalloc/IsoTLSDeallocatorEntryInlines.h: Added.
(bmalloc::IsoTLSDeallocatorEntry<Config>::IsoTLSDeallocatorEntry):
(bmalloc::IsoTLSDeallocatorEntry<Config>::~IsoTLSDeallocatorEntry):
(bmalloc::IsoTLSDeallocatorEntry<Config>::construct):
* bmalloc/IsoTLSEntry.cpp: Added.
(bmalloc::IsoTLSEntry::IsoTLSEntry):
(bmalloc::IsoTLSEntry::~IsoTLSEntry):
* bmalloc/IsoTLSEntry.h: Added.
(bmalloc::IsoTLSEntry::offset const):
(bmalloc::IsoTLSEntry::alignment const):
(bmalloc::IsoTLSEntry::size const):
(bmalloc::IsoTLSEntry::extent const):
* bmalloc/IsoTLSEntryInlines.h: Added.
(bmalloc::IsoTLSEntry::walkUpToInclusive):
(bmalloc::DefaultIsoTLSEntry<EntryType>::DefaultIsoTLSEntry):
(bmalloc::DefaultIsoTLSEntry<EntryType>::~DefaultIsoTLSEntry):
(bmalloc::DefaultIsoTLSEntry<EntryType>::move):
(bmalloc::DefaultIsoTLSEntry<EntryType>::destruct):
(bmalloc::DefaultIsoTLSEntry<EntryType>::scavenge):
* bmalloc/IsoTLSInlines.h: Added.
(bmalloc::IsoTLS::allocate):
(bmalloc::IsoTLS::deallocate):
(bmalloc::IsoTLS::scavenge):
(bmalloc::IsoTLS::allocator):
(bmalloc::IsoTLS::deallocator):
(bmalloc::IsoTLS::get):
(bmalloc::IsoTLS::set):
(bmalloc::IsoTLS::ensureHeap):
(bmalloc::IsoTLS::ensureHeapAndEntries):
* bmalloc/IsoTLSLayout.cpp: Added.
(bmalloc::IsoTLSLayout::IsoTLSLayout):
(bmalloc::IsoTLSLayout::add):
* bmalloc/IsoTLSLayout.h: Added.
(bmalloc::IsoTLSLayout::head const):
* bmalloc/PerHeapKind.h:
* bmalloc/PerProcess.h:
(bmalloc::PerProcess<T>::getFastCase):
* bmalloc/Scavenger.cpp:
(bmalloc::Scavenger::scavenge):
* bmalloc/Scavenger.h:
* bmalloc/bmalloc.h:
(bmalloc::api::scavengeThisThread):
* test: Added.
* test/testbmalloc.cpp: Added.
(hiddenTruthBecauseNoReturnIsStupid):
(usage):
(assertEmptyPointerSet):
(assertHasObjects):
(assertHasOnlyObjects):
(assertClean):
(testIsoSimple):
(testIsoSimpleScavengeBeforeDealloc):
(testIsoFlipFlopFragmentedPages):
(testIsoFlipFlopFragmentedPagesScavengeInMiddle):
(BisoMalloced::BisoMalloced):
(testBisoMalloced):
(BisoMallocedInline::BisoMallocedInline):
(testBisoMallocedInline):
(run):
(main):
Source/WebCore:
No new tests because no new change in behavior. Though, the bmalloc change has a unit test.
Adopting IsoHeap means dropping in macros in both the .h and .cpp file of each class that we
opt in. It's not pretty, but it helps ensure speedy allocation since it means that we never
have to do any kind of switch or dynamic lookup to find the right allocator for a type.
This change is perf-neutral on MotionMark, PLT3, and membuster.
* Sources.txt:
* html/shadow/SliderThumbElement.cpp:
* html/shadow/SliderThumbElement.h:
* html/shadow/mac/ImageControlsButtonElementMac.cpp:
* html/shadow/mac/ImageControlsRootElementMac.cpp:
* rendering/RenderAttachment.cpp:
* rendering/RenderAttachment.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderBoxModelObject.h:
* rendering/RenderButton.cpp:
* rendering/RenderButton.h:
* rendering/RenderCombineText.cpp:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.cpp:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderDetailsMarker.cpp:
* rendering/RenderDetailsMarker.h:
* rendering/RenderElement.cpp:
* rendering/RenderElement.h:
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFileUploadControl.cpp:
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.cpp:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFragmentContainer.cpp:
* rendering/RenderFragmentContainer.h:
* rendering/RenderFragmentContainerSet.cpp:
* rendering/RenderFragmentContainerSet.h:
* rendering/RenderFragmentedFlow.cpp:
* rendering/RenderFragmentedFlow.h:
* rendering/RenderFrameBase.cpp:
* rendering/RenderFrameBase.h:
* rendering/RenderFrameSet.cpp:
* rendering/RenderFrameSet.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.cpp:
* rendering/RenderGrid.h:
* rendering/RenderHTMLCanvas.cpp:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderImage.cpp:
* rendering/RenderImage.h:
* rendering/RenderImageResourceStyleImage.cpp:
* rendering/RenderImageResourceStyleImage.h:
* rendering/RenderInline.cpp:
* rendering/RenderInline.h:
* rendering/RenderLayerModelObject.cpp:
* rendering/RenderLayerModelObject.h:
* rendering/RenderLineBreak.cpp:
* rendering/RenderLineBreak.h:
* rendering/RenderListBox.cpp:
* rendering/RenderListBox.h:
* rendering/RenderListItem.cpp:
* rendering/RenderListItem.h:
* rendering/RenderListMarker.cpp:
* rendering/RenderListMarker.h:
* rendering/RenderMedia.cpp:
* rendering/RenderMedia.h:
* rendering/RenderMediaControlElements.cpp:
* rendering/RenderMediaControlElements.h:
* rendering/RenderMenuList.cpp:
* rendering/RenderMenuList.h:
* rendering/RenderMeter.cpp:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnFlow.cpp:
* rendering/RenderMultiColumnFlow.h:
* rendering/RenderMultiColumnSet.cpp:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.cpp:
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
* rendering/RenderProgress.cpp:
* rendering/RenderProgress.h:
* rendering/RenderQuote.cpp:
* rendering/RenderQuote.h:
* rendering/RenderReplaced.cpp:
* rendering/RenderReplaced.h:
* rendering/RenderReplica.cpp:
* rendering/RenderReplica.h:
* rendering/RenderRuby.cpp:
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.cpp:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.cpp:
* rendering/RenderRubyText.h:
* rendering/RenderScrollbarPart.cpp:
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.cpp:
* rendering/RenderSearchField.h:
* rendering/RenderSlider.cpp:
* rendering/RenderSlider.h:
* rendering/RenderTable.cpp:
* rendering/RenderTable.h:
* rendering/RenderTableCaption.cpp:
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.cpp:
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.cpp:
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.cpp:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.cpp:
* rendering/RenderTableSection.h:
* rendering/RenderText.cpp:
* rendering/RenderText.h:
* rendering/RenderTextControl.cpp:
* rendering/RenderTextControl.h:
* rendering/RenderTextControlMultiLine.cpp:
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.cpp:
* rendering/RenderTextControlSingleLine.h:
* rendering/RenderTextFragment.cpp:
* rendering/RenderTextFragment.h:
* rendering/RenderVTTCue.cpp:
* rendering/RenderVTTCue.h:
* rendering/RenderVideo.cpp:
* rendering/RenderVideo.h:
* rendering/RenderView.cpp:
* rendering/RenderView.h:
* rendering/RenderWidget.cpp:
* rendering/RenderWidget.h:
* rendering/mathml/RenderMathMLBlock.cpp:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFenced.cpp:
* rendering/mathml/RenderMathMLFenced.h:
* rendering/mathml/RenderMathMLFencedOperator.cpp:
* rendering/mathml/RenderMathMLFencedOperator.h:
* rendering/mathml/RenderMathMLFraction.cpp:
* rendering/mathml/RenderMathMLFraction.h:
* rendering/mathml/RenderMathMLMath.cpp:
* rendering/mathml/RenderMathMLMath.h:
* rendering/mathml/RenderMathMLMenclose.cpp:
* rendering/mathml/RenderMathMLMenclose.h:
* rendering/mathml/RenderMathMLOperator.cpp:
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLPadded.cpp:
* rendering/mathml/RenderMathMLPadded.h:
* rendering/mathml/RenderMathMLRoot.cpp:
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.cpp:
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLScripts.cpp:
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLSpace.cpp:
* rendering/mathml/RenderMathMLSpace.h:
* rendering/mathml/RenderMathMLToken.cpp:
* rendering/mathml/RenderMathMLToken.h:
* rendering/mathml/RenderMathMLUnderOver.cpp:
* rendering/mathml/RenderMathMLUnderOver.h:
* rendering/svg/RenderSVGBlock.cpp:
* rendering/svg/RenderSVGBlock.h:
* rendering/svg/RenderSVGContainer.cpp:
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGEllipse.cpp:
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.cpp:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGGradientStop.cpp:
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGHiddenContainer.cpp:
* rendering/svg/RenderSVGHiddenContainer.h:
* rendering/svg/RenderSVGImage.cpp:
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInline.cpp:
* rendering/svg/RenderSVGInline.h:
* rendering/svg/RenderSVGInlineText.cpp:
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGModelObject.cpp:
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGPath.cpp:
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.cpp:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceGradient.cpp:
* rendering/svg/RenderSVGResourceGradient.h:
* rendering/svg/RenderSVGResourceLinearGradient.cpp:
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.cpp:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.cpp:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.cpp:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.cpp:
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGTSpan.cpp: Added.
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.cpp:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTextPath.cpp:
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGTransformableContainer.cpp:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.cpp:
* rendering/svg/RenderSVGViewportContainer.h:
Source/WTF:
This just adds an easy way of using the bmalloc IsoHeap API in WebKit. If bmalloc is not
enabled, these macros will just make the object FastMalloced.
* WTF.xcodeproj/project.pbxproj:
* wtf/FastTLS.h:
* wtf/IsoMalloc.h: Added.
* wtf/IsoMallocInlines.h: Added.
Canonical link: https://commits.webkit.org/195445@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-07 19:21:52 +00:00
|
|
|
rendering/svg/RenderSVGTSpan.cpp
|
2017-10-26 04:57:44 +00:00
|
|
|
rendering/svg/RenderSVGText.cpp
|
|
|
|
rendering/svg/RenderSVGTextPath.cpp
|
|
|
|
rendering/svg/RenderSVGTransformableContainer.cpp
|
|
|
|
rendering/svg/RenderSVGViewportContainer.cpp
|
|
|
|
rendering/svg/SVGInlineFlowBox.cpp
|
|
|
|
rendering/svg/SVGInlineTextBox.cpp
|
|
|
|
rendering/svg/SVGPathData.cpp
|
|
|
|
rendering/svg/SVGRenderSupport.cpp
|
|
|
|
rendering/svg/SVGRenderTreeAsText.cpp
|
|
|
|
rendering/svg/SVGRenderingContext.cpp
|
|
|
|
rendering/svg/SVGResources.cpp
|
|
|
|
rendering/svg/SVGResourcesCache.cpp
|
|
|
|
rendering/svg/SVGResourcesCycleSolver.cpp
|
|
|
|
rendering/svg/SVGRootInlineBox.cpp
|
|
|
|
rendering/svg/SVGTextChunk.cpp
|
|
|
|
rendering/svg/SVGTextChunkBuilder.cpp
|
|
|
|
rendering/svg/SVGTextLayoutAttributes.cpp
|
|
|
|
rendering/svg/SVGTextLayoutAttributesBuilder.cpp
|
|
|
|
rendering/svg/SVGTextLayoutEngine.cpp
|
|
|
|
rendering/svg/SVGTextLayoutEngineBaseline.cpp
|
|
|
|
rendering/svg/SVGTextLayoutEngineSpacing.cpp
|
|
|
|
rendering/svg/SVGTextMetrics.cpp
|
|
|
|
rendering/svg/SVGTextMetricsBuilder.cpp
|
|
|
|
rendering/svg/SVGTextQuery.cpp
|
2017-12-17 21:11:27 +00:00
|
|
|
rendering/updating/RenderTreeBuilder.cpp
|
2018-01-08 17:40:21 +00:00
|
|
|
rendering/updating/RenderTreeBuilderBlock.cpp
|
2018-01-08 22:04:02 +00:00
|
|
|
rendering/updating/RenderTreeBuilderBlockFlow.cpp
|
2018-02-21 22:27:00 +00:00
|
|
|
rendering/updating/RenderTreeBuilderContinuation.cpp
|
2017-12-20 01:44:37 +00:00
|
|
|
rendering/updating/RenderTreeBuilderFirstLetter.cpp
|
2017-12-22 20:43:35 +00:00
|
|
|
rendering/updating/RenderTreeBuilderFormControls.cpp
|
2018-02-21 08:25:39 +00:00
|
|
|
rendering/updating/RenderTreeBuilderFullScreen.cpp
|
2018-01-08 18:38:31 +00:00
|
|
|
rendering/updating/RenderTreeBuilderInline.cpp
|
2017-12-20 16:33:36 +00:00
|
|
|
rendering/updating/RenderTreeBuilderList.cpp
|
2018-01-09 20:15:19 +00:00
|
|
|
rendering/updating/RenderTreeBuilderMathML.cpp
|
2017-12-20 16:33:36 +00:00
|
|
|
rendering/updating/RenderTreeBuilderMultiColumn.cpp
|
2017-12-21 15:13:26 +00:00
|
|
|
rendering/updating/RenderTreeBuilderRuby.cpp
|
2018-01-08 23:14:11 +00:00
|
|
|
rendering/updating/RenderTreeBuilderSVG.cpp
|
2017-12-19 18:56:47 +00:00
|
|
|
rendering/updating/RenderTreeBuilderTable.cpp
|
2017-12-17 21:11:27 +00:00
|
|
|
rendering/updating/RenderTreePosition.cpp
|
|
|
|
rendering/updating/RenderTreeUpdater.cpp
|
|
|
|
rendering/updating/RenderTreeUpdaterGeneratedContent.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
replay/UserInputBridge.cpp
|
|
|
|
storage/Storage.cpp
|
|
|
|
storage/StorageEvent.cpp
|
|
|
|
storage/StorageEventDispatcher.cpp
|
|
|
|
storage/StorageMap.cpp
|
|
|
|
storage/StorageNamespaceProvider.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
storage/StorageQuotaManager.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
style/AttributeChangeInvalidation.cpp
|
|
|
|
style/ClassChangeInvalidation.cpp
|
2019-11-19 15:34:28 +00:00
|
|
|
style/ElementRuleCollector.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
style/IdChangeInvalidation.cpp
|
|
|
|
style/InlineTextBoxStyle.cpp
|
2019-11-19 19:04:38 +00:00
|
|
|
style/InspectorCSSOMWrappers.cpp
|
2019-11-07 23:01:20 +00:00
|
|
|
style/MatchedDeclarationsCache.cpp
|
2019-11-19 15:34:28 +00:00
|
|
|
style/PageRuleCollector.cpp
|
2019-10-24 16:06:56 +00:00
|
|
|
style/PropertyCascade.cpp
|
2020-03-12 13:30:10 +00:00
|
|
|
style/PseudoClassChangeInvalidation.cpp
|
2019-11-19 16:10:40 +00:00
|
|
|
style/RuleData.cpp
|
2019-11-18 23:21:15 +00:00
|
|
|
style/RuleFeature.cpp
|
|
|
|
style/RuleSet.cpp
|
2019-11-09 17:09:02 +00:00
|
|
|
style/StyleAdjuster.cpp
|
2019-10-31 18:55:34 +00:00
|
|
|
style/StyleBuilder.cpp
|
2019-10-30 20:13:30 +00:00
|
|
|
style/StyleBuilderState.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
style/StyleChange.cpp
|
|
|
|
style/StyleFontSizeFunctions.cpp
|
|
|
|
style/StyleInvalidator.cpp
|
|
|
|
style/StylePendingResources.cpp
|
|
|
|
style/StyleRelations.cpp
|
|
|
|
style/StyleResolveForDocument.cpp
|
2020-11-18 16:03:50 +00:00
|
|
|
style/StyleResolveForFontRaw.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
style/StyleResolver.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
style/StyleScope.cpp
|
2019-11-18 19:13:05 +00:00
|
|
|
style/StyleScopeRuleSets.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
style/StyleSharingResolver.cpp
|
|
|
|
style/StyleTreeResolver.cpp
|
|
|
|
style/StyleUpdate.cpp
|
2021-04-01 06:33:21 +00:00
|
|
|
style/Styleable.cpp
|
2019-11-19 19:04:38 +00:00
|
|
|
style/UserAgentStyle.cpp
|
2020-09-23 00:20:14 +00:00
|
|
|
svg/DocumentSVG.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
svg/SVGAElement.cpp
|
|
|
|
svg/SVGAltGlyphDefElement.cpp
|
|
|
|
svg/SVGAltGlyphElement.cpp
|
|
|
|
svg/SVGAltGlyphItemElement.cpp
|
|
|
|
svg/SVGAngleValue.cpp
|
|
|
|
svg/SVGAnimateColorElement.cpp
|
|
|
|
svg/SVGAnimateElement.cpp
|
|
|
|
svg/SVGAnimateElementBase.cpp
|
|
|
|
svg/SVGAnimateMotionElement.cpp
|
|
|
|
svg/SVGAnimateTransformElement.cpp
|
|
|
|
svg/SVGAnimationElement.cpp
|
|
|
|
svg/SVGCircleElement.cpp
|
|
|
|
svg/SVGClipPathElement.cpp
|
|
|
|
svg/SVGComponentTransferFunctionElement.cpp
|
|
|
|
svg/SVGCursorElement.cpp
|
|
|
|
svg/SVGDefsElement.cpp
|
|
|
|
svg/SVGDescElement.cpp
|
|
|
|
svg/SVGDocument.cpp
|
|
|
|
svg/SVGDocumentExtensions.cpp
|
|
|
|
svg/SVGElement.cpp
|
|
|
|
svg/SVGEllipseElement.cpp
|
|
|
|
svg/SVGFEBlendElement.cpp
|
|
|
|
svg/SVGFEColorMatrixElement.cpp
|
|
|
|
svg/SVGFEComponentTransferElement.cpp
|
|
|
|
svg/SVGFECompositeElement.cpp
|
|
|
|
svg/SVGFEConvolveMatrixElement.cpp
|
|
|
|
svg/SVGFEDiffuseLightingElement.cpp
|
|
|
|
svg/SVGFEDisplacementMapElement.cpp
|
|
|
|
svg/SVGFEDistantLightElement.cpp
|
|
|
|
svg/SVGFEDropShadowElement.cpp
|
|
|
|
svg/SVGFEFloodElement.cpp
|
|
|
|
svg/SVGFEFuncAElement.cpp
|
|
|
|
svg/SVGFEFuncBElement.cpp
|
|
|
|
svg/SVGFEFuncGElement.cpp
|
|
|
|
svg/SVGFEFuncRElement.cpp
|
|
|
|
svg/SVGFEGaussianBlurElement.cpp
|
|
|
|
svg/SVGFEImageElement.cpp
|
|
|
|
svg/SVGFELightElement.cpp
|
|
|
|
svg/SVGFEMergeElement.cpp
|
|
|
|
svg/SVGFEMergeNodeElement.cpp
|
|
|
|
svg/SVGFEMorphologyElement.cpp
|
|
|
|
svg/SVGFEOffsetElement.cpp
|
|
|
|
svg/SVGFEPointLightElement.cpp
|
|
|
|
svg/SVGFESpecularLightingElement.cpp
|
|
|
|
svg/SVGFESpotLightElement.cpp
|
|
|
|
svg/SVGFETileElement.cpp
|
|
|
|
svg/SVGFETurbulenceElement.cpp
|
|
|
|
svg/SVGFilterElement.cpp
|
|
|
|
svg/SVGFilterPrimitiveStandardAttributes.cpp
|
|
|
|
svg/SVGFitToViewBox.cpp
|
|
|
|
svg/SVGFontElement.cpp
|
|
|
|
svg/SVGFontFaceElement.cpp
|
|
|
|
svg/SVGFontFaceFormatElement.cpp
|
|
|
|
svg/SVGFontFaceNameElement.cpp
|
|
|
|
svg/SVGFontFaceSrcElement.cpp
|
|
|
|
svg/SVGFontFaceUriElement.cpp
|
|
|
|
svg/SVGForeignObjectElement.cpp
|
|
|
|
svg/SVGGElement.cpp
|
2018-04-20 01:00:40 +00:00
|
|
|
svg/SVGGeometryElement.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
svg/SVGGlyphElement.cpp
|
|
|
|
svg/SVGGlyphRefElement.cpp
|
|
|
|
svg/SVGGradientElement.cpp
|
|
|
|
svg/SVGGraphicsElement.cpp
|
|
|
|
svg/SVGHKernElement.cpp
|
|
|
|
svg/SVGImageElement.cpp
|
|
|
|
svg/SVGImageLoader.cpp
|
|
|
|
svg/SVGLengthContext.cpp
|
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
|
|
|
svg/SVGLengthList.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
svg/SVGLengthValue.cpp
|
|
|
|
svg/SVGLineElement.cpp
|
|
|
|
svg/SVGLinearGradientElement.cpp
|
|
|
|
svg/SVGLocatable.cpp
|
|
|
|
svg/SVGMPathElement.cpp
|
|
|
|
svg/SVGMarkerElement.cpp
|
|
|
|
svg/SVGMaskElement.cpp
|
|
|
|
svg/SVGMetadataElement.cpp
|
|
|
|
svg/SVGMissingGlyphElement.cpp
|
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
|
|
|
svg/SVGNumberList.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
svg/SVGParserUtilities.cpp
|
|
|
|
svg/SVGPathBlender.cpp
|
|
|
|
svg/SVGPathBuilder.cpp
|
|
|
|
svg/SVGPathByteStreamBuilder.cpp
|
|
|
|
svg/SVGPathByteStreamSource.cpp
|
|
|
|
svg/SVGPathElement.cpp
|
|
|
|
svg/SVGPathParser.cpp
|
|
|
|
svg/SVGPathSegListBuilder.cpp
|
|
|
|
svg/SVGPathSegListSource.cpp
|
|
|
|
svg/SVGPathStringBuilder.cpp
|
|
|
|
svg/SVGPathStringSource.cpp
|
|
|
|
svg/SVGPathTraversalStateBuilder.cpp
|
|
|
|
svg/SVGPathUtilities.cpp
|
|
|
|
svg/SVGPatternElement.cpp
|
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
|
|
|
svg/SVGPointList.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
svg/SVGPolyElement.cpp
|
|
|
|
svg/SVGPolygonElement.cpp
|
|
|
|
svg/SVGPolylineElement.cpp
|
|
|
|
svg/SVGPreserveAspectRatioValue.cpp
|
|
|
|
svg/SVGRadialGradientElement.cpp
|
|
|
|
svg/SVGRectElement.cpp
|
|
|
|
svg/SVGSVGElement.cpp
|
|
|
|
svg/SVGScriptElement.cpp
|
|
|
|
svg/SVGSetElement.cpp
|
|
|
|
svg/SVGStopElement.cpp
|
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
|
|
|
svg/SVGStringList.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
svg/SVGStyleElement.cpp
|
|
|
|
svg/SVGSwitchElement.cpp
|
|
|
|
svg/SVGSymbolElement.cpp
|
|
|
|
svg/SVGTRefElement.cpp
|
|
|
|
svg/SVGTSpanElement.cpp
|
|
|
|
svg/SVGTests.cpp
|
|
|
|
svg/SVGTextContentElement.cpp
|
|
|
|
svg/SVGTextElement.cpp
|
|
|
|
svg/SVGTextPathElement.cpp
|
|
|
|
svg/SVGTextPositioningElement.cpp
|
|
|
|
svg/SVGTitleElement.cpp
|
|
|
|
svg/SVGToOTFFontConversion.cpp
|
|
|
|
svg/SVGTransformDistance.cpp
|
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
|
|
|
svg/SVGTransformList.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
svg/SVGTransformable.cpp
|
|
|
|
svg/SVGURIReference.cpp
|
2018-03-17 06:11:00 +00:00
|
|
|
svg/SVGUnknownElement.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
svg/SVGUseElement.cpp
|
|
|
|
svg/SVGVKernElement.cpp
|
|
|
|
svg/SVGViewElement.cpp
|
|
|
|
svg/SVGViewSpec.cpp
|
|
|
|
svg/SVGZoomAndPan.cpp
|
|
|
|
svg/SVGZoomEvent.cpp
|
|
|
|
svg/animation/SMILTime.cpp
|
|
|
|
svg/animation/SMILTimeContainer.cpp
|
|
|
|
svg/animation/SVGSMILElement.cpp
|
|
|
|
svg/graphics/SVGImage.cpp
|
|
|
|
svg/graphics/SVGImageCache.cpp
|
|
|
|
svg/graphics/SVGImageForContainer.cpp
|
|
|
|
svg/graphics/filters/SVGFEImage.cpp
|
|
|
|
svg/graphics/filters/SVGFilter.cpp
|
|
|
|
svg/graphics/filters/SVGFilterBuilder.cpp
|
2019-03-16 07:42:41 +00:00
|
|
|
svg/properties/SVGAnimatedProperty.cpp
|
2019-03-20 23:51:47 +00:00
|
|
|
svg/properties/SVGAnimationAdditiveValueFunctionImpl.cpp
|
2019-03-16 07:42:41 +00:00
|
|
|
svg/properties/SVGAttributeAnimator.cpp
|
2021-05-09 18:22:23 +00:00
|
|
|
svg/properties/SVGPropertyTraits.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/AbstractWorker.cpp
|
|
|
|
workers/DedicatedWorkerGlobalScope.cpp
|
|
|
|
workers/DedicatedWorkerThread.cpp
|
2021-04-02 21:53:30 +00:00
|
|
|
workers/ScriptBuffer.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/Worker.cpp
|
2020-03-31 17:35:30 +00:00
|
|
|
workers/WorkerAnimationController.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/WorkerConsoleClient.cpp
|
2019-10-30 19:37:55 +00:00
|
|
|
workers/WorkerEventLoop.cpp
|
2021-04-22 18:44:49 +00:00
|
|
|
workers/WorkerFontLoadRequest.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/WorkerGlobalScope.cpp
|
|
|
|
workers/WorkerInspectorProxy.cpp
|
|
|
|
workers/WorkerLocation.cpp
|
|
|
|
workers/WorkerMessagingProxy.cpp
|
2020-10-21 00:00:44 +00:00
|
|
|
workers/WorkerOrWorkletGlobalScope.cpp
|
|
|
|
workers/WorkerOrWorkletScriptController.cpp
|
2020-10-22 22:25:44 +00:00
|
|
|
workers/WorkerOrWorkletThread.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/WorkerRunLoop.cpp
|
|
|
|
workers/WorkerScriptLoader.cpp
|
|
|
|
workers/WorkerThread.cpp
|
|
|
|
workers/service/ExtendableEvent.cpp
|
|
|
|
workers/service/ExtendableMessageEvent.cpp
|
|
|
|
workers/service/FetchEvent.cpp
|
2017-11-30 23:06:34 +00:00
|
|
|
workers/service/SWClientConnection.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/service/ServiceWorker.cpp
|
|
|
|
workers/service/ServiceWorkerClient.cpp
|
2017-11-15 18:00:24 +00:00
|
|
|
workers/service/ServiceWorkerClientData.cpp
|
2021-05-09 18:22:23 +00:00
|
|
|
workers/service/ServiceWorkerClientIdentifier.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/service/ServiceWorkerClients.cpp
|
|
|
|
workers/service/ServiceWorkerContainer.cpp
|
|
|
|
workers/service/ServiceWorkerContextData.cpp
|
2017-11-14 06:21:43 +00:00
|
|
|
workers/service/ServiceWorkerData.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/service/ServiceWorkerGlobalScope.cpp
|
|
|
|
workers/service/ServiceWorkerJob.cpp
|
|
|
|
workers/service/ServiceWorkerJobData.cpp
|
|
|
|
workers/service/ServiceWorkerProvider.cpp
|
|
|
|
workers/service/ServiceWorkerRegistration.cpp
|
|
|
|
workers/service/ServiceWorkerRegistrationData.cpp
|
|
|
|
workers/service/ServiceWorkerRegistrationKey.cpp
|
|
|
|
workers/service/ServiceWorkerRegistrationOptions.cpp
|
|
|
|
workers/service/ServiceWorkerWindowClient.cpp
|
2019-09-05 09:01:51 +00:00
|
|
|
workers/service/WorkerSWClientConnection.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
workers/service/context/SWContextManager.cpp
|
2017-11-03 01:30:01 +00:00
|
|
|
workers/service/context/ServiceWorkerDebuggable.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/service/context/ServiceWorkerFetch.cpp
|
2017-11-03 01:30:01 +00:00
|
|
|
workers/service/context/ServiceWorkerInspectorProxy.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/service/context/ServiceWorkerThread.cpp
|
|
|
|
workers/service/context/ServiceWorkerThreadProxy.cpp
|
2017-12-07 00:41:14 +00:00
|
|
|
workers/service/server/RegistrationDatabase.cpp
|
|
|
|
workers/service/server/RegistrationStore.cpp
|
2017-11-14 00:20:25 +00:00
|
|
|
workers/service/server/SWOriginStore.cpp
|
Service Worker scripts use too much memory in the network process
https://bugs.webkit.org/show_bug.cgi?id=223808
<rdar://75637093>
Reviewed by Geoff Garen.
Source/WebCore:
Previously, the network process would store service worker scripts in a SQLite database.
When starting to use service workers, we would load all those scripts from the database
into memory. This would use a decent amount of memory in the network process.
To address the issue, the approach is this patch is to store the scripts as separate
files on the filesystem instead. This when, when loading them, we can simply mmap() them
and greatly reduce dirty memory usage.
Note that the service worker process (which may be the WebContent process) also keeps a
copy of the imported service worker scripts for the service workers it is running. More
work will be needed in a follow-up but we should be able to extend the approach so that
the service worker process would only have a mmap'd version of those scripts. This would
reduce dirty memory usage on the WebContent/ServiceWorker process side as well. I am
doing this separately though to reduce patch size and facilitate review.
No new tests, there should be no Web-facing behavior change, just a decreased
dirty memory usage in the network process when service workers are used.
I did manual memory testing with a very large service worker that had one ~100MB main
script, importing another ~100MB script.
Here are the memory results without my change:
- Networking (Dirty): 238MB (cold) / 331MB (warm)
- WebContent (Dirty): 441MB (cold) / 857MB (warm)
Here are the memory results with my change:
- Networking (Dirty): 22MB (cold) / 14MB (warm)
- WebContent (Dirty): 440MB (cold) / 438MB (warm)
This shows that ALL memory from the scripts in the network process is no longer marked
as dirty. We also see a significant progression in the WebProcess in the warm case, since
the scripts are coming from the network process as shared memory in this case. There is
no progression in the WebProcess in the cold case yet, since the script were just
downloaded and are coming from the WebProcess to the NetworkProcess. In a follow-up, the
network process could send shared memory back to the WebProcess, after saving the scripts
to disk, so that the WebProcess can replace the copies of its scripts and save more memory.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new SWScriptStorage class to the project.
* inspector/agents/worker/ServiceWorkerAgent.cpp:
(WebCore::ServiceWorkerAgent::getInitializationInfo):
Convert the script type from SharedBuffer to String.
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::operator== const):
Fix assertions that were hitting when comparing to empty SharedBuffers (offset would be 0
and size would be 0). This was caught by API tests since we have some service worker API
tests that use empty worker scripts.
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
Add some conversion from String to SharedBuffer to the script, and vice-versa, in the
service worker case.
* workers/service/ServiceWorkerContextData.cpp:
(WebCore::ServiceWorkerContextData::isolatedCopy const):
(WebCore::scriptBufferToString):
(WebCore::stringToScriptBuffer):
* workers/service/ServiceWorkerContextData.h:
(WebCore::ServiceWorkerContextData::ImportedScript::isolatedCopy const):
(WebCore::ServiceWorkerContextData::ImportedScript::decode):
(WebCore::ServiceWorkerContextData::decode):
- Store scripts as SharedBuffer instead of String, so that they can hold
mmap'd data.
- Add scriptBufferToString() / stringToScriptBuffer() utility functions to
convert script sources between String and SharedBuffer.
* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::ServiceWorkerThread):
Convert from script from SharedBuffer to String.
* workers/service/server/RegistrationDatabase.cpp:
(WebCore::recordsTableSchema):
Update database schema and bump version now that we no longer store the
service worker script inside the SQLite database. Instead, those scripts
are stored separately on the filesystem via SWScriptStorage.
(WebCore::ImportedScriptAttributes::encode const):
(WebCore::ImportedScriptAttributes::decode):
Introduce new ImportedScriptAttributes struct which contains all the data
members of ServiceWorkerContextData::ImportedScript, except for the actual
script source. We now save a HashMap of ImportedScriptAttributes in the
databasae instead of HashMap of ImportedScript since we no longer want to
store imported script sources in the database, but rather store them
separately on the file system.
(WebCore::stripScriptSources):
Utility function to convert a HashMap of ServiceWorkerContextData::ImportedScript
into a HashMap of ImportedScriptAttributes (identical but without the script
source), ready to save in the SQLite database.
(WebCore::populateScriptSourcesFromDisk):
Utility function to construct a HashMap of ServiceWorkerContextData::ImportedScript
from a HasMap of ImportedScriptAttributes, coming from the SQLiteDatabase. The
missing script sources are fetched from the disk via SWScriptStorage.
(WebCore::RegistrationDatabase::~RegistrationDatabase):
Make sure we destroy the SWScriptStorage on the background queue for thread-safety.
(WebCore::RegistrationDatabase::scriptStorageDirectory const):
Returns the path on the filesystem where service worker scripts are stored.
(WebCore::RegistrationDatabase::scriptStorage):
Constructs (if necessary) a SWScriptStorage and return it.
(WebCore::RegistrationDatabase::clearAll):
Make sure we clear all the service worker scripts on disk in addition to the database,
now that they are stored separately.
(WebCore::RegistrationDatabase::doPushChanges):
- Stop storing the script sources in the SQLite database, and instead store them as separate
files on the file system via SWScriptStorage.
- Improve logging
- When done storing the scripts to disk, send these new mmap'd versions back to the
SWServerWorker on the main thread, so that it can replace it's heavy script sources with
these ones. This helps reduce memory usage.
(WebCore::RegistrationDatabase::importRecords):
- Load the script sources from the disk via SWScriptStorage, now that they are no longer
stored in the SQLite database.
- Improve logging.
* workers/service/server/RegistrationDatabase.h:
* workers/service/server/RegistrationStore.cpp:
(WebCore::RegistrationStore::didSaveWorkerScriptsToDisk):
* workers/service/server/RegistrationStore.h:
Pass scripts that were saved to disk from the store to the SWServerWorker so that it
can replace its scripts sources with those new mmap'd version, in order to save memory.
* workers/service/server/SWScriptStorage.cpp: Added.
(WebCore::hashURL):
(WebCore::SWScriptStorage::SWScriptStorage):
(WebCore::SWScriptStorage::registrationDirectory const):
(WebCore::SWScriptStorage::scriptPath const):
(WebCore::SWScriptStorage::store):
(WebCore::SWScriptStorage::retrieve):
(WebCore::SWScriptStorage::clear):
* workers/service/server/SWScriptStorage.h: Added.
Add SWScriptStorage to deal with the storage / retrieval of Service
Worker scripts to / from disk, as files on the file system. When
going a retrieval, we return a script as a SharedBuffer which usually contains
mmap'd() data (we don't use mmap() for files that are smaller than the PAGE_SIZE).
The scripts reside in a Scripts/ folder, beside the database. The scripts are separated
by origin (using SHA256 of the origin as folder name with salt), and then by registration (by
using SHA256 of the registration scope as subfolder name with salt). The file name for the script
is a SHA256 of the script URL with salt.
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::didSaveWorkerScriptsToDisk):
Pass scripts that were saved to disk from the store to the SWServerWorker so that it
can replace its scripts sources with those new mmap'd version, in order to save memory.
(WebCore::SWServer::updateWorker):
Convert script from String to SharedBuffer.
* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::scriptFetchFinished):
Convert script from SharedBuffer to String.
* workers/service/server/SWServerToContextConnection.cpp:
(WebCore::SWServerToContextConnection::setScriptResource):
* workers/service/server/SWServerToContextConnection.h:
Take in a ServiceWorkerContextData::ImportedScript for convenience, instead of taking
all its data members as separate parameters.
* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::SWServerWorker):
* workers/service/server/SWServerWorker.h:
(WebCore::SWServerWorker::script const):
Use SharedBuffer type for script instead of String type, so that we can hold on the
mmap'd data and reduce memory usage.
Source/WebKit:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
Pass a ServiceWorkerContextData::ImportedScript struct in the SetScriptResource IPC
for convenience. We used to pass the ImportedScript data members separately.
* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::clearAllCachesFromDisk):
(WebKit::CacheStorage::Engine::clearCachesForOriginFromDirectories):
(WebKit::CacheStorage::Engine::deleteNonEmptyDirectoryOnBackgroundThread):
* NetworkProcess/cache/CacheStorageEngine.h:
* NetworkProcess/cache/NetworkCacheFileSystem.cpp:
* NetworkProcess/cache/NetworkCacheFileSystem.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::deleteOldVersions):
Drop deleteDirectoryRecursively() implementation and use the existing
FileSystem::deleteNonEmptyDirectory() in wtf instead.
* NetworkProcess/cache/NetworkCacheData.cpp:
(WebKit::NetworkCache::Data::mapToFile const):
Moved some of the mapToFile() logic to WTF, so that it can be reused.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeSharedBuffer):
(IPC::decodeSharedBuffer):
Update SharedBuffer's IPC argument coder to distinguish a null SharedBuffer
and an empty one. We now use SharedBuffer to store service worker script sources
and it is possible for the script sources to be empty (and they are in some of
our API tests).
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::setScriptResource):
Pass a ServiceWorkerContextData::ImportedScript struct in the SetScriptResource IPC
for convenience. We used to pass the ImportedScript data members separately.
Source/WTF:
* wtf/FileSystem.cpp:
(WTF::FileSystemImpl::deleteNonEmptyDirectory):
Add an implementation of FileSystem::deleteNonEmptyDirectory() on all supported platforms.
We previously only had implemetations for Cocoa and Windows.
(WTF::FileSystemImpl::mapToFile):
Moved most of the mapToFile() logic from NetworkCacheData::mapToFile() to FileSystem, so that
it can be reused by the new SWScriptStorage class. It creates the destination file, mmap's it,
writes the provided data to it and then returns the mmap'd file.
(WTF::FileSystemImpl::readOrMakeSalt):
Move readOrMakeSalt() from NetworkCacheData to FileSystem so that it can be reused by the new
SWScriptStorage.
* wtf/FileSystem.h:
Tools:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-4.sqlite3: Removed.
Drop outdated pre-baked service worker registration database as it is no longer
needed and it is a pain to keep up to date.
* TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::TEST_F):
Add API test coverage for FileSystem::deleteNonEmptyDirectory(). It is not a new API but it
had no tests, it used more in this patch and we now have an implementation on all supported
platforms.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
- Tweak service worker tests so that they expect a version 6 database instead of version 5,
since I updated the database scheme and bumped the version.
- Update test that was relying on a pre-baked service worker database file (with old schema) and
have it dynamically generate the database instead by loading a page that registers a service
worker.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Canonical link: https://commits.webkit.org/235952@main
2021-03-31 04:25:00 +00:00
|
|
|
workers/service/server/SWScriptStorage.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/service/server/SWServer.cpp
|
2017-11-01 22:32:42 +00:00
|
|
|
workers/service/server/SWServerJobQueue.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/service/server/SWServerRegistration.cpp
|
2017-11-14 03:58:01 +00:00
|
|
|
workers/service/server/SWServerToContextConnection.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
workers/service/server/SWServerWorker.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
worklets/PaintWorkletGlobalScope.cpp
|
2018-11-03 04:01:29 +00:00
|
|
|
worklets/Worklet.cpp
|
|
|
|
worklets/WorkletGlobalScope.cpp
|
Add basic infrastructure for AudioWorklet
https://bugs.webkit.org/show_bug.cgi?id=217153
Reviewed by Sam Weinig.
Source/WebCore:
Add basic infrastructure for AudioWorklet:
- https://www.w3.org/TR/webaudio/#audioworklet
In particular, this adds a partial but spec-compliant implementation of
Worklet.addModule(), as per:
- https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule
When Worklet.addModule() is called, we create a AudioWorket thread and
a AudioWorkletGlobalScope with its VM. We then ask the AudioWorkletGlobalScope
to fetch and invoke the worklet script. Note that AudioWorkletGlobalScope
does NOT fetch or invoke the worklet script yet to reduce patch size.
Calling Worklet.addModule() activates the AudioWorklet and causes audio rendering
to occur on the AudioWorkletThread.
A few important things that are still missing in this patch:
- Fetching & invoking worklet scripts
- Pretty much all API exposed to AudioWorkletGlobalScopes
- AudioWorkletProcessor support
No new tests, no Web-facing behavior change yet.
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new files to projets.
* Modules/webaudio/AudioWorklet.cpp:
(WebCore::AudioWorklet::create):
(WebCore::AudioWorklet::AudioWorklet):
(WebCore::AudioWorklet::createGlobalScopes):
(WebCore::AudioWorklet::proxy const):
* Modules/webaudio/AudioWorklet.h:
When the Worklet needs to create a GlobalScope, AudioWorklet takes care of creating a AudioWorkletMessagingProxy.
The AudioWorkletMessagingProxy starts the AudioWorkletThread, which creates the AudioWorkletGlobalScope.
AudioWorkletMessagingProxy takes care of posting tasks from the main thread to the AudioWorkletThread as well.
* Modules/webaudio/AudioWorkletGlobalScope.cpp: Added.
* Modules/webaudio/AudioWorkletGlobalScope.h: Added.
* Modules/webaudio/AudioWorkletGlobalScope.idl: Added.
Add basic implementation for AudioWorkletGlobalScope:
- https://www.w3.org/TR/webaudio/#audioworkletglobalscope
None of the Web API is exposed on the AudioWorkletGlobalScope yet.
* Modules/webaudio/AudioWorkletMessagingProxy.cpp: Added.
* Modules/webaudio/AudioWorkletMessagingProxy.h: Added.
Add new AudioWorkletMessagingProxy class (Similar to WorkerMessagingProxy) which starts to AudioWorkletThread
(which constructs the AudioWorkletGlobalScope on that thread) and takes care of posting tasks from the main
thread to the AudioWorkletThread.
* Modules/webaudio/AudioWorkletThread.cpp: Added.
* Modules/webaudio/AudioWorkletThread.h: Added.
Add new class which wraps the AudioThread used by AudioWorkets.
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::BaseAudioContext):
Pass document when constructing the AudioWorklet since it is now an ActiveDOMObject.
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::enableInput):
(WebCore::Function<void):
(WebCore::DefaultAudioDestinationNode::startRendering):
(WebCore::DefaultAudioDestinationNode::resume):
(WebCore::DefaultAudioDestinationNode::setChannelCount):
* Modules/webaudio/DefaultAudioDestinationNode.h:
If AudioWorklet is active, pass a function to AudioDestination::start() that dispatches to the
AudioWorkletThread, so that the AudioDestination can do rendering on the AudioWorkletThead instead
of the device's rendering thread.
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::startRendering):
If AudioWorklet is active, use the AudioWorklet's AudioWorkletThread instead of a new audio thread
to do the offline rendering.
* bindings/js/WebCoreBuiltinNames.h:
Add AudioWorkletGlobalScope since it is exposed conditionally at runtime to AudioWorkets.
* bindings/js/WebCoreJSClientData.cpp:
(WebCore::JSVMClientData::JSVMClientData):
* bindings/js/WebCoreJSClientData.h:
Add code to support AudioWorkletGlobalScope as a GlobalScope in our JS bindings.
* bindings/js/WorkerScriptController.h:
We now subclass WorkerOrWorkletScriptController interface. This allows WorkletScriptController
to reuse WorkerRunLoop.
* bindings/scripts/CodeGeneratorJS.pm:
(ShouldUseGlobalObjectPrototype):
* bindings/scripts/preprocess-idls.pl:
Add support for AudioWorkletGlobalScope as global scope in our JS bindings.
* css/DOMCSSPaintWorklet.cpp:
(WebCore::PaintWorklet::addModule):
(WebCore::PaintWorklet::createGlobalScopes):
* css/DOMCSSPaintWorklet.h:
* dom/Document.cpp:
(WebCore::Document::ensurePaintWorklet):
Update PaintWorklet code so that it keeps building.
* platform/MediaStrategy.h:
* platform/audio/AudioDestination.h:
Make AudioDestination ThreadSafeRefCounted so that it can keep itself alive
when dispatching to the AudioWorkletThread for rendering.
* platform/audio/cocoa/AudioDestinationCocoa.cpp:
(WebCore::AudioDestination::create):
(WebCore::AudioDestinationCocoa::start):
(WebCore::AudioDestinationCocoa::stop):
(WebCore::AudioDestinationCocoa::setIsPlaying):
(WebCore::AudioDestinationCocoa::render):
(WebCore::AudioDestinationCocoa::renderOnRenderingThead):
* platform/audio/cocoa/AudioDestinationCocoa.h:
When we get a request to render audio, we now use the function provided by
the DefaultAudioDestinationNode to dispatch to the AudioWorkletThread when
needed (AudioWorklet is active) before doing the rendering.
* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::start):
* platform/audio/gstreamer/AudioDestinationGStreamer.h:
* platform/mock/MockAudioDestinationCocoa.cpp:
(WebCore::MockAudioDestinationCocoa::start):
* platform/mock/MockAudioDestinationCocoa.h:
Update code so that it keeps building.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::underlyingThread const):
* workers/WorkerGlobalScope.h:
* workers/WorkerOrWorkletGlobalScope.h: Added.
* workers/WorkerOrWorkletScriptController.h: Added.
Add new interfaces that are subclassed by Worker and Worklet implementation
classes in order to promote code sharing.
* workers/WorkerRunLoop.cpp:
* workers/WorkerRunLoop.h:
Update WorkerRunLoop to use WorkerOrWorkletGlobalScope so that it can be
reused by AudioWorkletThread.
* worklets/Worklet.cpp:
(WebCore::Worklet::Worklet):
(WebCore::Worklet::document):
(WebCore::Worklet::addModule):
(WebCore::Worklet::finishPendingTasks):
(WebCore::Worklet::activeDOMObjectName const):
* worklets/Worklet.h:
(WebCore::Worklet::proxies const):
* worklets/Worklet.idl:
Add initial implementation for addModule():
- https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule
Make Worklet an ActiveDOMObject since it needs to resolve a JS promise asynchronously.
* worklets/WorkletGlobalScope.cpp:
(WebCore::WorkletGlobalScope::WorkletGlobalScope):
(WebCore::WorkletGlobalScope::evaluate):
(WebCore::WorkletGlobalScope::completeURL const):
(WebCore::WorkletGlobalScope::fetchAndInvokeScript):
* worklets/WorkletGlobalScope.h:
(WebCore::WorkletGlobalScope::isAudioWorkletGlobalScope const):
* worklets/WorkletGlobalScope.idl:
Update WorkletGlobalScope so that it can be subclassed by AudioWorkletGlobalScope and not
be PaintWorklet-specific.
* worklets/WorkletGlobalScopeProxy.h: Added.
Add WorkletGlobalScopeProxy interface to interact with the WorkletGlobalScope interface.
The purpose of this class is to post tasks to the WorkletGlobalScope, abstracting away
potential threading complexity. Note that AudioWorkets use threading while PaintWorklets
do not.
* worklets/WorkletPendingTasks.cpp: Added.
(WebCore::WorkletPendingTasks::WorkletPendingTasks):
(WebCore::WorkletPendingTasks::abort):
(WebCore::WorkletPendingTasks::decrementCounter):
* worklets/WorkletPendingTasks.h: Added.
(WebCore::WorkletPendingTasks::create):
Add implementation for:
- https://drafts.css-houdini.org/worklets/#pending-tasks-struct
While it is not strictly needed right for AudioWorklet (because there is always a single
WorkletGlobalScope), it will be needed once we have proper support for PaintWorklets.
PaintWorklets can have several WorkletGlobalScopes. In the mean time, it allows us to
have code that matches the specification text more closely.
* worklets/WorkletScriptController.cpp:
(WebCore::WorkletScriptController::WorkletScriptController):
(WebCore::WorkletScriptController::initScript):
(WebCore::WorkletScriptController::releaseHeapAccess):
(WebCore::WorkletScriptController::acquireHeapAccess):
(WebCore::WorkletScriptController::addTimerSetNotification):
(WebCore::WorkletScriptController::removeTimerSetNotification):
(WebCore::WorkletScriptController::scheduleExecutionTermination):
(WebCore::WorkletScriptController::isTerminatingExecution const):
* worklets/WorkletScriptController.h:
Update WorkletScriptController so that it can be used by AudioWorklets and not just
PaintWorklets.
Source/WebKit:
Update RemoteAudioDestinationProxy to match what was done in AudioDestinationCocoa.
RemoteAudioDestinationProxy is used when the GPU process is enabled.
* GPUProcess/media/RemoteAudioDestinationManager.cpp:
(WebKit::RemoteAudioDestination::start):
* WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::create):
(WebKit::RemoteAudioDestinationProxy::start):
(WebKit::RemoteAudioDestinationProxy::stop):
(WebKit::RemoteAudioDestinationProxy::renderBuffer):
* WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
* WebProcess/GPU/media/WebMediaStrategy.cpp:
(WebKit::WebMediaStrategy::createAudioDestination):
* WebProcess/GPU/media/WebMediaStrategy.h:
Source/WebKitLegacy/mac:
* WebCoreSupport/WebPlatformStrategies.mm:
Source/WebKitLegacy/win:
* WebCoreSupport/WebPlatformStrategies.cpp:
Canonical link: https://commits.webkit.org/229978@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-01 23:21:07 +00:00
|
|
|
worklets/WorkletPendingTasks.cpp
|
2020-08-07 19:27:56 +00:00
|
|
|
xml/CustomXPathNSResolver.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
xml/DOMParser.cpp
|
|
|
|
xml/NativeXPathNSResolver.cpp
|
|
|
|
xml/XMLErrors.cpp
|
|
|
|
xml/XMLHttpRequest.cpp
|
2019-09-18 22:10:00 +00:00
|
|
|
xml/XMLHttpRequestProgressEvent.cpp
|
2017-10-26 05:23:12 +00:00
|
|
|
xml/XMLHttpRequestProgressEventThrottle.cpp
|
|
|
|
xml/XMLHttpRequestUpload.cpp
|
|
|
|
xml/XMLSerializer.cpp
|
|
|
|
xml/XMLTreeViewer.cpp
|
|
|
|
xml/XPathEvaluator.cpp
|
|
|
|
xml/XPathExpression.cpp
|
|
|
|
xml/XPathExpressionNode.cpp
|
|
|
|
xml/XPathFunctions.cpp
|
|
|
|
xml/XPathGrammar.cpp
|
|
|
|
xml/XPathNSResolver.cpp
|
|
|
|
xml/XPathNodeSet.cpp
|
|
|
|
xml/XPathParser.cpp
|
|
|
|
xml/XPathPath.cpp
|
|
|
|
xml/XPathPredicate.cpp
|
|
|
|
xml/XPathResult.cpp
|
|
|
|
xml/XPathStep.cpp
|
|
|
|
xml/XPathUtil.cpp
|
|
|
|
xml/XPathValue.cpp
|
|
|
|
xml/XPathVariableReference.cpp
|
|
|
|
xml/XSLImportRule.cpp
|
|
|
|
xml/XSLStyleSheetLibxslt.cpp
|
|
|
|
xml/XSLTExtensions.cpp
|
|
|
|
xml/XSLTProcessor.cpp
|
|
|
|
xml/XSLTProcessorLibxslt.cpp
|
|
|
|
xml/XSLTUnicodeSort.cpp
|
|
|
|
xml/parser/XMLDocumentParser.cpp
|
|
|
|
xml/parser/XMLDocumentParserLibxml2.cpp
|
|
|
|
xml/parser/XMLDocumentParserScope.cpp
|
|
|
|
|
2017-10-20 07:50:29 +00:00
|
|
|
// Derived Sources
|
|
|
|
|
|
|
|
CSSValueKeywords.cpp
|
|
|
|
ColorData.cpp
|
2018-07-02 22:54:32 +00:00
|
|
|
EventFactory.cpp
|
|
|
|
EventTargetFactory.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
HTMLElementFactory.cpp
|
|
|
|
HTMLEntityTable.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSHTMLElementWrapperFactory.cpp
|
|
|
|
JSMathMLElementWrapperFactory.cpp
|
|
|
|
JSSVGElementWrapperFactory.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
MathMLElementFactory.cpp
|
|
|
|
PlugInsResourcesData.cpp
|
|
|
|
SVGElementFactory.cpp
|
2019-10-31 14:28:27 +00:00
|
|
|
StyleBuilderGenerated.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
StylePropertyShorthandFunctions.cpp
|
|
|
|
UserAgentStyleSheetsData.cpp
|
|
|
|
WebCoreJSBuiltinInternals.cpp
|
|
|
|
WebCoreJSBuiltins.cpp
|
|
|
|
|
|
|
|
// IDL bindings
|
|
|
|
// FIXME: We should probably move these into ${DerivedSources}/bindings/js/ so they get bundled with the custom bindings.
|
|
|
|
|
2020-07-04 02:33:58 +00:00
|
|
|
JSANGLEInstancedArrays.cpp
|
2020-08-26 18:07:35 +00:00
|
|
|
JSAbortAlgorithm.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSAbortController.cpp
|
|
|
|
JSAbortSignal.cpp
|
2020-10-17 20:33:53 +00:00
|
|
|
JSAbstractRange.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSAbstractWorker.cpp
|
2018-09-04 03:36:22 +00:00
|
|
|
JSAddressErrors.cpp
|
2021-01-25 20:06:25 +00:00
|
|
|
JSAddEventListenerOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSAesCbcCfbParams.cpp
|
|
|
|
JSAesCtrParams.cpp
|
|
|
|
JSAesGcmParams.cpp
|
|
|
|
JSAesKeyParams.cpp
|
|
|
|
JSAnalyserNode.cpp
|
2020-08-03 15:51:42 +00:00
|
|
|
JSAnalyserOptions.cpp
|
2018-11-06 11:15:15 +00:00
|
|
|
JSAnimationEffect.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSAnimationEvent.cpp
|
2017-12-11 18:02:37 +00:00
|
|
|
JSAnimationPlaybackEvent.cpp
|
|
|
|
JSAnimationPlaybackEventInit.cpp
|
2017-10-21 14:11:44 +00:00
|
|
|
JSAnimationTimeline.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSAttestationConveyancePreference.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSAttr.cpp
|
|
|
|
JSAudioBuffer.cpp
|
|
|
|
JSAudioBufferCallback.cpp
|
2020-08-03 19:22:58 +00:00
|
|
|
JSAudioBufferOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSAudioBufferSourceNode.cpp
|
2020-08-04 00:31:57 +00:00
|
|
|
JSAudioBufferSourceOptions.cpp
|
2017-12-21 18:28:21 +00:00
|
|
|
JSAudioConfiguration.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSAudioContext.cpp
|
2020-07-14 15:51:18 +00:00
|
|
|
JSAudioContextLatencyCategory.cpp
|
|
|
|
JSAudioContextOptions.cpp
|
2020-06-18 04:14:13 +00:00
|
|
|
JSAudioContextState.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSAudioDestinationNode.cpp
|
|
|
|
JSAudioListener.cpp
|
|
|
|
JSAudioNode.cpp
|
2020-07-06 21:24:00 +00:00
|
|
|
JSAudioNodeOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSAudioParam.cpp
|
2020-10-07 00:36:21 +00:00
|
|
|
JSAudioParamDescriptor.cpp
|
2020-09-29 16:47:37 +00:00
|
|
|
JSAudioParamMap.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSAudioProcessingEvent.cpp
|
2020-08-10 19:39:26 +00:00
|
|
|
JSAudioProcessingEventInit.cpp
|
2020-07-17 22:18:06 +00:00
|
|
|
JSAudioScheduledSourceNode.cpp
|
2020-08-18 02:16:13 +00:00
|
|
|
JSAudioTimestamp.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSAudioTrack.cpp
|
|
|
|
JSAudioTrackList.cpp
|
2020-09-29 16:47:37 +00:00
|
|
|
JSAudioWorklet.cpp
|
Add basic infrastructure for AudioWorklet
https://bugs.webkit.org/show_bug.cgi?id=217153
Reviewed by Sam Weinig.
Source/WebCore:
Add basic infrastructure for AudioWorklet:
- https://www.w3.org/TR/webaudio/#audioworklet
In particular, this adds a partial but spec-compliant implementation of
Worklet.addModule(), as per:
- https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule
When Worklet.addModule() is called, we create a AudioWorket thread and
a AudioWorkletGlobalScope with its VM. We then ask the AudioWorkletGlobalScope
to fetch and invoke the worklet script. Note that AudioWorkletGlobalScope
does NOT fetch or invoke the worklet script yet to reduce patch size.
Calling Worklet.addModule() activates the AudioWorklet and causes audio rendering
to occur on the AudioWorkletThread.
A few important things that are still missing in this patch:
- Fetching & invoking worklet scripts
- Pretty much all API exposed to AudioWorkletGlobalScopes
- AudioWorkletProcessor support
No new tests, no Web-facing behavior change yet.
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new files to projets.
* Modules/webaudio/AudioWorklet.cpp:
(WebCore::AudioWorklet::create):
(WebCore::AudioWorklet::AudioWorklet):
(WebCore::AudioWorklet::createGlobalScopes):
(WebCore::AudioWorklet::proxy const):
* Modules/webaudio/AudioWorklet.h:
When the Worklet needs to create a GlobalScope, AudioWorklet takes care of creating a AudioWorkletMessagingProxy.
The AudioWorkletMessagingProxy starts the AudioWorkletThread, which creates the AudioWorkletGlobalScope.
AudioWorkletMessagingProxy takes care of posting tasks from the main thread to the AudioWorkletThread as well.
* Modules/webaudio/AudioWorkletGlobalScope.cpp: Added.
* Modules/webaudio/AudioWorkletGlobalScope.h: Added.
* Modules/webaudio/AudioWorkletGlobalScope.idl: Added.
Add basic implementation for AudioWorkletGlobalScope:
- https://www.w3.org/TR/webaudio/#audioworkletglobalscope
None of the Web API is exposed on the AudioWorkletGlobalScope yet.
* Modules/webaudio/AudioWorkletMessagingProxy.cpp: Added.
* Modules/webaudio/AudioWorkletMessagingProxy.h: Added.
Add new AudioWorkletMessagingProxy class (Similar to WorkerMessagingProxy) which starts to AudioWorkletThread
(which constructs the AudioWorkletGlobalScope on that thread) and takes care of posting tasks from the main
thread to the AudioWorkletThread.
* Modules/webaudio/AudioWorkletThread.cpp: Added.
* Modules/webaudio/AudioWorkletThread.h: Added.
Add new class which wraps the AudioThread used by AudioWorkets.
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::BaseAudioContext):
Pass document when constructing the AudioWorklet since it is now an ActiveDOMObject.
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::enableInput):
(WebCore::Function<void):
(WebCore::DefaultAudioDestinationNode::startRendering):
(WebCore::DefaultAudioDestinationNode::resume):
(WebCore::DefaultAudioDestinationNode::setChannelCount):
* Modules/webaudio/DefaultAudioDestinationNode.h:
If AudioWorklet is active, pass a function to AudioDestination::start() that dispatches to the
AudioWorkletThread, so that the AudioDestination can do rendering on the AudioWorkletThead instead
of the device's rendering thread.
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::startRendering):
If AudioWorklet is active, use the AudioWorklet's AudioWorkletThread instead of a new audio thread
to do the offline rendering.
* bindings/js/WebCoreBuiltinNames.h:
Add AudioWorkletGlobalScope since it is exposed conditionally at runtime to AudioWorkets.
* bindings/js/WebCoreJSClientData.cpp:
(WebCore::JSVMClientData::JSVMClientData):
* bindings/js/WebCoreJSClientData.h:
Add code to support AudioWorkletGlobalScope as a GlobalScope in our JS bindings.
* bindings/js/WorkerScriptController.h:
We now subclass WorkerOrWorkletScriptController interface. This allows WorkletScriptController
to reuse WorkerRunLoop.
* bindings/scripts/CodeGeneratorJS.pm:
(ShouldUseGlobalObjectPrototype):
* bindings/scripts/preprocess-idls.pl:
Add support for AudioWorkletGlobalScope as global scope in our JS bindings.
* css/DOMCSSPaintWorklet.cpp:
(WebCore::PaintWorklet::addModule):
(WebCore::PaintWorklet::createGlobalScopes):
* css/DOMCSSPaintWorklet.h:
* dom/Document.cpp:
(WebCore::Document::ensurePaintWorklet):
Update PaintWorklet code so that it keeps building.
* platform/MediaStrategy.h:
* platform/audio/AudioDestination.h:
Make AudioDestination ThreadSafeRefCounted so that it can keep itself alive
when dispatching to the AudioWorkletThread for rendering.
* platform/audio/cocoa/AudioDestinationCocoa.cpp:
(WebCore::AudioDestination::create):
(WebCore::AudioDestinationCocoa::start):
(WebCore::AudioDestinationCocoa::stop):
(WebCore::AudioDestinationCocoa::setIsPlaying):
(WebCore::AudioDestinationCocoa::render):
(WebCore::AudioDestinationCocoa::renderOnRenderingThead):
* platform/audio/cocoa/AudioDestinationCocoa.h:
When we get a request to render audio, we now use the function provided by
the DefaultAudioDestinationNode to dispatch to the AudioWorkletThread when
needed (AudioWorklet is active) before doing the rendering.
* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::start):
* platform/audio/gstreamer/AudioDestinationGStreamer.h:
* platform/mock/MockAudioDestinationCocoa.cpp:
(WebCore::MockAudioDestinationCocoa::start):
* platform/mock/MockAudioDestinationCocoa.h:
Update code so that it keeps building.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::underlyingThread const):
* workers/WorkerGlobalScope.h:
* workers/WorkerOrWorkletGlobalScope.h: Added.
* workers/WorkerOrWorkletScriptController.h: Added.
Add new interfaces that are subclassed by Worker and Worklet implementation
classes in order to promote code sharing.
* workers/WorkerRunLoop.cpp:
* workers/WorkerRunLoop.h:
Update WorkerRunLoop to use WorkerOrWorkletGlobalScope so that it can be
reused by AudioWorkletThread.
* worklets/Worklet.cpp:
(WebCore::Worklet::Worklet):
(WebCore::Worklet::document):
(WebCore::Worklet::addModule):
(WebCore::Worklet::finishPendingTasks):
(WebCore::Worklet::activeDOMObjectName const):
* worklets/Worklet.h:
(WebCore::Worklet::proxies const):
* worklets/Worklet.idl:
Add initial implementation for addModule():
- https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule
Make Worklet an ActiveDOMObject since it needs to resolve a JS promise asynchronously.
* worklets/WorkletGlobalScope.cpp:
(WebCore::WorkletGlobalScope::WorkletGlobalScope):
(WebCore::WorkletGlobalScope::evaluate):
(WebCore::WorkletGlobalScope::completeURL const):
(WebCore::WorkletGlobalScope::fetchAndInvokeScript):
* worklets/WorkletGlobalScope.h:
(WebCore::WorkletGlobalScope::isAudioWorkletGlobalScope const):
* worklets/WorkletGlobalScope.idl:
Update WorkletGlobalScope so that it can be subclassed by AudioWorkletGlobalScope and not
be PaintWorklet-specific.
* worklets/WorkletGlobalScopeProxy.h: Added.
Add WorkletGlobalScopeProxy interface to interact with the WorkletGlobalScope interface.
The purpose of this class is to post tasks to the WorkletGlobalScope, abstracting away
potential threading complexity. Note that AudioWorkets use threading while PaintWorklets
do not.
* worklets/WorkletPendingTasks.cpp: Added.
(WebCore::WorkletPendingTasks::WorkletPendingTasks):
(WebCore::WorkletPendingTasks::abort):
(WebCore::WorkletPendingTasks::decrementCounter):
* worklets/WorkletPendingTasks.h: Added.
(WebCore::WorkletPendingTasks::create):
Add implementation for:
- https://drafts.css-houdini.org/worklets/#pending-tasks-struct
While it is not strictly needed right for AudioWorklet (because there is always a single
WorkletGlobalScope), it will be needed once we have proper support for PaintWorklets.
PaintWorklets can have several WorkletGlobalScopes. In the mean time, it allows us to
have code that matches the specification text more closely.
* worklets/WorkletScriptController.cpp:
(WebCore::WorkletScriptController::WorkletScriptController):
(WebCore::WorkletScriptController::initScript):
(WebCore::WorkletScriptController::releaseHeapAccess):
(WebCore::WorkletScriptController::acquireHeapAccess):
(WebCore::WorkletScriptController::addTimerSetNotification):
(WebCore::WorkletScriptController::removeTimerSetNotification):
(WebCore::WorkletScriptController::scheduleExecutionTermination):
(WebCore::WorkletScriptController::isTerminatingExecution const):
* worklets/WorkletScriptController.h:
Update WorkletScriptController so that it can be used by AudioWorklets and not just
PaintWorklets.
Source/WebKit:
Update RemoteAudioDestinationProxy to match what was done in AudioDestinationCocoa.
RemoteAudioDestinationProxy is used when the GPU process is enabled.
* GPUProcess/media/RemoteAudioDestinationManager.cpp:
(WebKit::RemoteAudioDestination::start):
* WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::create):
(WebKit::RemoteAudioDestinationProxy::start):
(WebKit::RemoteAudioDestinationProxy::stop):
(WebKit::RemoteAudioDestinationProxy::renderBuffer):
* WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
* WebProcess/GPU/media/WebMediaStrategy.cpp:
(WebKit::WebMediaStrategy::createAudioDestination):
* WebProcess/GPU/media/WebMediaStrategy.h:
Source/WebKitLegacy/mac:
* WebCoreSupport/WebPlatformStrategies.mm:
Source/WebKitLegacy/win:
* WebCoreSupport/WebPlatformStrategies.cpp:
Canonical link: https://commits.webkit.org/229978@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-01 23:21:07 +00:00
|
|
|
JSAudioWorkletGlobalScope.cpp
|
2020-09-29 16:47:37 +00:00
|
|
|
JSAudioWorkletNode.cpp
|
|
|
|
JSAudioWorkletNodeOptions.cpp
|
2020-10-02 19:21:03 +00:00
|
|
|
JSAudioWorkletProcessor.cpp
|
|
|
|
JSAudioWorkletProcessorConstructor.cpp
|
2019-03-20 06:11:57 +00:00
|
|
|
JSAuthenticationExtensionsClientInputs.cpp
|
[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
|
|
|
JSAuthenticationExtensionsClientOutputs.cpp
|
2018-01-16 23:08:44 +00:00
|
|
|
JSAuthenticatorAssertionResponse.cpp
|
2021-03-23 20:00:50 +00:00
|
|
|
JSAuthenticatorAttachment.cpp
|
2018-01-16 23:08:44 +00:00
|
|
|
JSAuthenticatorAttestationResponse.cpp
|
|
|
|
JSAuthenticatorResponse.cpp
|
[WebAuthN] Make AuthenticatorManager
https://bugs.webkit.org/show_bug.cgi?id=189279
<rdar://problem/44116792>
Reviewed by Chris Dumez.
Source/WebCore:
This patch does the following things in WebCore in order to support AuthenticatorManager:
1) It separates AuthenticatorTransport from PublicKeyCredentialDescriptor such that the enum
can be queried from WebKit directly.
2) It adds AuthenticatorAttachment to PublicKeyCredentialCreationOptions such that relying parties
could express their interests in cross platform authenticators.
3) It enhances IPC encoder/decoder of a few such that Vectors and empty objects can be correctly coded.
4) It moves the LocalAuthenticator implementation to WebKit to better integrate with AuthenticatorManager.
5) It moves linking to LocalAuthentication.framework to WebKit as well.
6) It temporarily bans old mock test mechanism in Internals so we could enable the new mock test mechanism in
WebKitTestRunner which we will have a better coverage of codes in UI Process. Those tests will be either
removed or ported to the new mechanism in Bug 189283.
7) It also removes "using namespace WebCore" from the top namespace in some .mm files as they are reordered
to where they could introduce name confusions.
Tests: http/wpt/webauthn/public-key-credential-create-failure-local.https.html
http/wpt/webauthn/public-key-credential-create-success-local.https.html
http/wpt/webauthn/public-key-credential-get-failure-local.https.html
http/wpt/webauthn/public-key-credential-get-success-local.https.html
http/wpt/webauthn/public-key-credential-is-user-verifying-platform-authenticator-available.html
* CMakeLists.txt:
* Configurations/WebCore.xcconfig:
* DerivedSources.make:
* Modules/webauthn/AuthenticatorTransport.h: Copied from Source/WebCore/platform/cocoa/LocalAuthenticationSoftLink.h.
* Modules/webauthn/AuthenticatorTransport.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredentialDescriptor.idl.
* Modules/webauthn/PublicKeyCredentialCreationOptions.h:
(WebCore::PublicKeyCredentialCreationOptions::encode const):
(WebCore::PublicKeyCredentialCreationOptions::decode):
* Modules/webauthn/PublicKeyCredentialCreationOptions.idl:
* Modules/webauthn/PublicKeyCredentialData.h:
(WebCore::PublicKeyCredentialData::encode const):
(WebCore::PublicKeyCredentialData::decode):
* Modules/webauthn/PublicKeyCredentialDescriptor.h:
(WebCore::PublicKeyCredentialDescriptor::encode const):
* Modules/webauthn/PublicKeyCredentialDescriptor.idl:
* Modules/webauthn/cocoa/LocalAuthenticator.mm: Removed.
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/ExceptionData.h:
* platform/cocoa/LocalAuthenticationSoftLink.mm: Removed.
* platform/cocoa/SharedBufferCocoa.mm:
(-[WebCoreSharedBufferData initWithSharedBufferDataSegment:]):
* platform/cocoa/VideoFullscreenModelVideoElement.mm:
(VideoFullscreenModelVideoElement::VideoFullscreenModelVideoElement): Deleted.
(VideoFullscreenModelVideoElement::~VideoFullscreenModelVideoElement): Deleted.
(VideoFullscreenModelVideoElement::setVideoElement): Deleted.
(VideoFullscreenModelVideoElement::handleEvent): Deleted.
(VideoFullscreenModelVideoElement::updateForEventName): Deleted.
(VideoFullscreenModelVideoElement::willExitFullscreen): Deleted.
(VideoFullscreenModelVideoElement::setVideoFullscreenLayer): Deleted.
(VideoFullscreenModelVideoElement::waitForPreparedForInlineThen): Deleted.
(VideoFullscreenModelVideoElement::requestFullscreenMode): Deleted.
(VideoFullscreenModelVideoElement::setVideoLayerFrame): Deleted.
(VideoFullscreenModelVideoElement::setVideoLayerGravity): Deleted.
(VideoFullscreenModelVideoElement::observedEventNames): Deleted.
(VideoFullscreenModelVideoElement::eventNameAll): Deleted.
(VideoFullscreenModelVideoElement::fullscreenModeChanged): Deleted.
(VideoFullscreenModelVideoElement::addClient): Deleted.
(VideoFullscreenModelVideoElement::removeClient): Deleted.
(VideoFullscreenModelVideoElement::isVisible const): Deleted.
(VideoFullscreenModelVideoElement::setHasVideo): Deleted.
(VideoFullscreenModelVideoElement::setVideoDimensions): Deleted.
(VideoFullscreenModelVideoElement::willEnterPictureInPicture): Deleted.
(VideoFullscreenModelVideoElement::didEnterPictureInPicture): Deleted.
(VideoFullscreenModelVideoElement::failedToEnterPictureInPicture): Deleted.
(VideoFullscreenModelVideoElement::willExitPictureInPicture): Deleted.
(VideoFullscreenModelVideoElement::didExitPictureInPicture): Deleted.
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
(WebCore::hasExplicitBeginTime):
(WebCore::setHasExplicitBeginTime):
(WebCore::toCAFillModeType):
(WebCore::toCAValueFunctionType):
(WebCore::toCAMediaTimingFunction):
(WebCore::PlatformCAAnimationCocoa::setFromValue):
(WebCore::PlatformCAAnimationCocoa::setToValue):
(WebCore::PlatformCAAnimationCocoa::setValues):
(fromCAFillModeType): Deleted.
(fromCAValueFunctionType): Deleted.
(PlatformCAAnimationCocoa::create): Deleted.
(PlatformCAAnimationCocoa::PlatformCAAnimationCocoa): Deleted.
(PlatformCAAnimationCocoa::~PlatformCAAnimationCocoa): Deleted.
(PlatformCAAnimationCocoa::copy const): Deleted.
(PlatformCAAnimationCocoa::platformAnimation const): Deleted.
(PlatformCAAnimationCocoa::keyPath const): Deleted.
(PlatformCAAnimationCocoa::beginTime const): Deleted.
(PlatformCAAnimationCocoa::setBeginTime): Deleted.
(PlatformCAAnimationCocoa::duration const): Deleted.
(PlatformCAAnimationCocoa::setDuration): Deleted.
(PlatformCAAnimationCocoa::speed const): Deleted.
(PlatformCAAnimationCocoa::setSpeed): Deleted.
(PlatformCAAnimationCocoa::timeOffset const): Deleted.
(PlatformCAAnimationCocoa::setTimeOffset): Deleted.
(PlatformCAAnimationCocoa::repeatCount const): Deleted.
(PlatformCAAnimationCocoa::setRepeatCount): Deleted.
(PlatformCAAnimationCocoa::autoreverses const): Deleted.
(PlatformCAAnimationCocoa::setAutoreverses): Deleted.
(PlatformCAAnimationCocoa::fillMode const): Deleted.
(PlatformCAAnimationCocoa::setFillMode): Deleted.
(PlatformCAAnimationCocoa::setTimingFunction): Deleted.
(PlatformCAAnimationCocoa::copyTimingFunctionFrom): Deleted.
(PlatformCAAnimationCocoa::isRemovedOnCompletion const): Deleted.
(PlatformCAAnimationCocoa::setRemovedOnCompletion): Deleted.
(PlatformCAAnimationCocoa::isAdditive const): Deleted.
(PlatformCAAnimationCocoa::setAdditive): Deleted.
(PlatformCAAnimationCocoa::valueFunction const): Deleted.
(PlatformCAAnimationCocoa::setValueFunction): Deleted.
(PlatformCAAnimationCocoa::setFromValue): Deleted.
(PlatformCAAnimationCocoa::copyFromValueFrom): Deleted.
(PlatformCAAnimationCocoa::setToValue): Deleted.
(PlatformCAAnimationCocoa::copyToValueFrom): Deleted.
(PlatformCAAnimationCocoa::setValues): Deleted.
(PlatformCAAnimationCocoa::copyValuesFrom): Deleted.
(PlatformCAAnimationCocoa::setKeyTimes): Deleted.
(PlatformCAAnimationCocoa::copyKeyTimesFrom): Deleted.
(PlatformCAAnimationCocoa::setTimingFunctions): Deleted.
(PlatformCAAnimationCocoa::copyTimingFunctionsFrom): Deleted.
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(PlatformCAFilters::filterValueForOperation): Deleted.
(PlatformCAFilters::colorMatrixValueForFilter): Deleted.
(PlatformCAFilters::setBlendingFiltersOnLayer): Deleted.
(PlatformCAFilters::numAnimatedFilterProperties): Deleted.
(PlatformCAFilters::animatedFilterPropertyName): Deleted.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(-[WebAnimationDelegate animationDidStart:]):
(-[WebAnimationDelegate animationDidStop:finished:]):
(-[WebAnimationDelegate setOwner:]):
(PlatformCALayerCocoa::create): Deleted.
(PlatformCALayer::platformCALayer): Deleted.
(mediaTimeToCurrentTime): Deleted.
(PlatformCALayerCocoa::setOwner): Deleted.
(toCAFilterType): Deleted.
(PlatformCALayerCocoa::layerTypeForPlatformLayer): Deleted.
(PlatformCALayerCocoa::PlatformCALayerCocoa): Deleted.
(PlatformCALayerCocoa::commonInit): Deleted.
(PlatformCALayerCocoa::clone const): Deleted.
(PlatformCALayerCocoa::~PlatformCALayerCocoa): Deleted.
(PlatformCALayerCocoa::animationStarted): Deleted.
(PlatformCALayerCocoa::animationEnded): Deleted.
(PlatformCALayerCocoa::setNeedsDisplay): Deleted.
(PlatformCALayerCocoa::setNeedsDisplayInRect): Deleted.
(PlatformCALayerCocoa::copyContentsFromLayer): Deleted.
(PlatformCALayerCocoa::superlayer const): Deleted.
(PlatformCALayerCocoa::removeFromSuperlayer): Deleted.
(PlatformCALayerCocoa::setSublayers): Deleted.
(PlatformCALayerCocoa::removeAllSublayers): Deleted.
(PlatformCALayerCocoa::appendSublayer): Deleted.
(PlatformCALayerCocoa::insertSublayer): Deleted.
(PlatformCALayerCocoa::replaceSublayer): Deleted.
(PlatformCALayerCocoa::adoptSublayers): Deleted.
(PlatformCALayerCocoa::addAnimationForKey): Deleted.
(PlatformCALayerCocoa::removeAnimationForKey): Deleted.
(PlatformCALayerCocoa::animationForKey): Deleted.
(PlatformCALayerCocoa::setMask): Deleted.
(PlatformCALayerCocoa::isOpaque const): Deleted.
(PlatformCALayerCocoa::setOpaque): Deleted.
(PlatformCALayerCocoa::bounds const): Deleted.
(PlatformCALayerCocoa::setBounds): Deleted.
(PlatformCALayerCocoa::position const): Deleted.
(PlatformCALayerCocoa::setPosition): Deleted.
(PlatformCALayerCocoa::anchorPoint const): Deleted.
(PlatformCALayerCocoa::setAnchorPoint): Deleted.
(PlatformCALayerCocoa::transform const): Deleted.
(PlatformCALayerCocoa::setTransform): Deleted.
(PlatformCALayerCocoa::sublayerTransform const): Deleted.
(PlatformCALayerCocoa::setSublayerTransform): Deleted.
(PlatformCALayerCocoa::isHidden const): Deleted.
(PlatformCALayerCocoa::setHidden): Deleted.
(PlatformCALayerCocoa::contentsHidden const): Deleted.
(PlatformCALayerCocoa::setContentsHidden): Deleted.
(PlatformCALayerCocoa::userInteractionEnabled const): Deleted.
(PlatformCALayerCocoa::setUserInteractionEnabled): Deleted.
(PlatformCALayerCocoa::setBackingStoreAttached): Deleted.
(PlatformCALayerCocoa::backingStoreAttached const): Deleted.
(PlatformCALayerCocoa::geometryFlipped const): Deleted.
(PlatformCALayerCocoa::setGeometryFlipped): Deleted.
(PlatformCALayerCocoa::isDoubleSided const): Deleted.
(PlatformCALayerCocoa::setDoubleSided): Deleted.
(PlatformCALayerCocoa::masksToBounds const): Deleted.
(PlatformCALayerCocoa::setMasksToBounds): Deleted.
(PlatformCALayerCocoa::acceleratesDrawing const): Deleted.
(PlatformCALayerCocoa::setAcceleratesDrawing): Deleted.
(PlatformCALayerCocoa::wantsDeepColorBackingStore const): Deleted.
(PlatformCALayerCocoa::setWantsDeepColorBackingStore): Deleted.
(PlatformCALayerCocoa::supportsSubpixelAntialiasedText const): Deleted.
(PlatformCALayerCocoa::setSupportsSubpixelAntialiasedText): Deleted.
(PlatformCALayerCocoa::hasContents const): Deleted.
(PlatformCALayerCocoa::contents const): Deleted.
(PlatformCALayerCocoa::setContents): Deleted.
(PlatformCALayerCocoa::setContentsRect): Deleted.
(PlatformCALayerCocoa::setMinificationFilter): Deleted.
(PlatformCALayerCocoa::setMagnificationFilter): Deleted.
(PlatformCALayerCocoa::backgroundColor const): Deleted.
(PlatformCALayerCocoa::setBackgroundColor): Deleted.
(PlatformCALayerCocoa::setBorderWidth): Deleted.
(PlatformCALayerCocoa::setBorderColor): Deleted.
(PlatformCALayerCocoa::opacity const): Deleted.
(PlatformCALayerCocoa::setOpacity): Deleted.
(PlatformCALayerCocoa::setFilters): Deleted.
(PlatformCALayerCocoa::copyFiltersFrom): Deleted.
(PlatformCALayerCocoa::filtersCanBeComposited): Deleted.
(PlatformCALayerCocoa::setBlendMode): Deleted.
(PlatformCALayerCocoa::setName): Deleted.
(PlatformCALayerCocoa::setSpeed): Deleted.
(PlatformCALayerCocoa::setTimeOffset): Deleted.
(PlatformCALayerCocoa::contentsScale const): Deleted.
(PlatformCALayerCocoa::setContentsScale): Deleted.
(PlatformCALayerCocoa::cornerRadius const): Deleted.
(PlatformCALayerCocoa::setCornerRadius): Deleted.
(PlatformCALayerCocoa::setEdgeAntialiasingMask): Deleted.
(PlatformCALayerCocoa::shapeRoundedRect const): Deleted.
(PlatformCALayerCocoa::setShapeRoundedRect): Deleted.
(PlatformCALayerCocoa::shapeWindRule const): Deleted.
(PlatformCALayerCocoa::setShapeWindRule): Deleted.
(PlatformCALayerCocoa::shapePath const): Deleted.
(PlatformCALayerCocoa::setShapePath): Deleted.
(PlatformCALayerCocoa::requiresCustomAppearanceUpdateOnBoundsChange const): Deleted.
(PlatformCALayerCocoa::updateCustomAppearance): Deleted.
(layerContentsFormat): Deleted.
(PlatformCALayerCocoa::updateContentsFormat): Deleted.
(PlatformCALayerCocoa::tiledBacking): Deleted.
(PlatformCALayer::isWebLayer): Deleted.
(PlatformCALayer::setBoundsOnMainThread): Deleted.
(PlatformCALayer::setPositionOnMainThread): Deleted.
(PlatformCALayer::setAnchorPointOnMainThread): Deleted.
(PlatformCALayer::collectRectsToPaint): Deleted.
(PlatformCALayer::drawLayerContents): Deleted.
(PlatformCALayer::frameForLayer): Deleted.
(PlatformCALayerCocoa::createCompatibleLayer const): Deleted.
(PlatformCALayerCocoa::enumerateRectsBeingDrawn): Deleted.
(PlatformCALayerCocoa::backingStoreBytesPerPixel const): Deleted.
(PlatformCALayerCocoa::avPlayerLayer const): Deleted.
* platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm:
(-[WebLightSystemBackdropLayer init]):
(-[WebDarkSystemBackdropLayer init]):
* platform/graphics/ca/cocoa/WebTiledBackingLayer.mm:
(-[WebTiledBackingLayer createTileController:]):
(-[WebTiledBackingLayer setNeedsDisplayInRect:]):
(-[WebTiledBackingLayer setBorderColor:]):
* testing/Internals.cpp:
(WebCore::Internals::Internals):
Source/WebCore/PAL:
It moves linking to DeviceIdentity.framework to WebKit.
* PAL.xcodeproj/project.pbxproj:
Source/WebKit:
This patch introduces AuthenticatorManager which is the central of WebAuthentication that 1) handles
web requests, 2) discovers authenticators, 3) manages authetnicators and 4) in the future interacts with UI.
The lifetime of the AuthenticatorManager is managed by WebsiteDataStore such that it is almost a singleton
per UI Process.
1) Requests come from WebAuthenticatorCoordinatorProxy and then cached in AuthenticatorManager which will
then distribute requests whenever a new authenticator is discovered.
2) An ABC AuthenticatorTransportService is provided as an interface for AuthenticatorManager to invoke
startDiscovery. Actual work will be done in corresponding derived classes, say, LocalService. LocalService
is the one that discover attached platform authenticators, for example, TouchID or FaceID.
Eache service is unique per AuthetnicatorManager, which means we will have at most 4 services, Local, USB,
NFC, and BLE. The latter three will be implemented soon. Also, AuthenticatorManager serves as an observer to
*Service, so the latter can inform the former whenever an authenticator is added or removed.
When a new authenticator is discovered, the corresponding service will create an Authetnicator object that
binds to the physical authenticator device through a *Connection object. There is no ABC for connection for
now as I forsee every *Connection will be quite different. The *Connection object is the one that send/receive
messages from the physicla device. So far, a LocalConnection is provided even though normally local authenticators
are attached. This class is provided solely for separating UI and network traffic from LocalAuthenticator's
request handling process. So we can override them in a mock test environment. I will talk about this in the
next section.
3) An ABC Authenticator is provided as an interface for AuthenticatorManager to distribute requests on. Requests
will then be handled by the derived classes, say, LocalAuthenticator. Each authenticator object is a FSM that
works asynchronously.
For LocalAuthenticator, it has 4 states for MakeCredential: Init => RequestReceived => UserConsented => Attested => End,
and 3 states for GetAssertion: Init => RequestReceived => UserConsented => End. In the transit from RequestReceived to
UserConsented, it will invoke LocalConnection to talk to LocalAuthentication.framework that prompt users for TouchID
or FaceID. And then the transit from UserConsented => Attested, it will invoke LocalConnection to talk to
DeviceIdentity.framework that does Apple attestation. Most of the work are from the original LocalAuthenticator
implementation, and this patch converts it to a FSM and simplify the callback and threading model.
When a respond is ready, each authenticator will notify their observer which is the AuthenticatorManager.
AuthenticatorManager will only reply to Web Process whenever there is a valid respond or a terminating error. Otherwise,
the request will time out. I will explore the time out mechanism in a more detailed manner in Bug 189642.
The above is a briefing of the AuthetnicatorManager architecture in functional. The asynchronous model is explained here:
1) Since most discovery and request handling processes are asynchronous, I enforced them to be executed asyncrhonous in
the interface of the ABC.
2) There is no dedicated secondary threads here. However, underlying framework might decide to perform works on a dedicated
thread and then execute the provided callback. Whenever such situation happens, the policy here is to wrap the actual callback
into a callback that will post the actual callback back to the main thread and pass the wrapping callback to the APIs. Hence,
weak pointers in the actual callback are guaranteed to work.
3) Callbacks are used only if it is one way, and they are CompletionHandlers.
4) Potential multi ways asynchronous operations are encapsulated in regarding Observer interfaces.
Finally, let me explain how the mock test works:
1) Mock testing is done in WebKitTestRunner instead of Internals because a considerable large portion of work is in UIProcess
instead of WebProcess, says, the AuthenticatorManager.
2) The basic idea is to override functionality of *Connection classes and then make them thin such that we can get the best
possible coverage in auto tests.
3) In order to enable layout tests to configure the Mock*Connection classes, a MockWebAuthenticationConfiguration struct is
provided. A corresponding JS dictionary will be created by each test and passed from the TestRunner to the connection object.
4) To bridge the above tunnel, a MockAuthenticatorManager is constructed. It is instrumented to return every error.
5) Also, Mock*Service classes are made to mock the discovery process as well.
6) Noted, every mock overrided methods are made thin.
* CMakeLists.txt:
* Configurations/WebKit.xcconfig:
* Platform/spi/Cocoa/DeviceIdentitySPI.h: Copied from Source/WebCore/PAL/pal/spi/cocoa/DeviceIdentitySPI.h.
* SourcesCocoa.txt:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):
* UIProcess/API/C/WKWebsiteDataStoreRef.h:
* UIProcess/WebAuthentication/Authenticator.cpp: Copied from Source/WebCore/platform/cocoa/LocalAuthenticationSoftLink.h.
(WebKit::Authenticator::handleRequest):
(WebKit::Authenticator::receiveRespond const):
* UIProcess/WebAuthentication/Authenticator.h: Renamed from Source/WebCore/Modules/webauthn/cocoa/LocalAuthenticator.h.
(WebKit::Authenticator::setObserver):
(WebKit::Authenticator::observer const):
(WebKit::Authenticator::requestData const):
* UIProcess/WebAuthentication/AuthenticatorManager.cpp: Added.
(WebKit::AuthenticatorManagerInternal::collectTransports):
(WebKit::AuthenticatorManager::makeCredential):
(WebKit::AuthenticatorManager::getAssertion):
(WebKit::AuthenticatorManager::clearState):
(WebKit::AuthenticatorManager::authenticatorAdded):
(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::createService const):
(WebKit::AuthenticatorManager::respondReceivedInternal):
(WebKit::AuthenticatorManager::startDiscovery):
* UIProcess/WebAuthentication/AuthenticatorManager.h: Added.
(WebKit::AuthenticatorManager::pendingCompletionHandler):
* UIProcess/WebAuthentication/AuthenticatorTransportService.cpp: Copied from Source/WebCore/PAL/pal/spi/cocoa/DeviceIdentitySPI.h.
(WebKit::AuthenticatorTransportService::create):
(WebKit::AuthenticatorTransportService::createMock):
(WebKit::AuthenticatorTransportService::AuthenticatorTransportService):
(WebKit::AuthenticatorTransportService::startDiscovery const):
* UIProcess/WebAuthentication/AuthenticatorTransportService.h: Copied from Source/WebCore/PAL/pal/spi/cocoa/DeviceIdentitySPI.h.
(WebKit::AuthenticatorTransportService::observer const):
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.h: Copied from Source/WebCore/platform/cocoa/LocalAuthenticationSoftLink.h.
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.h: Copied from Source/WebCore/PAL/pal/spi/cocoa/DeviceIdentitySPI.h.
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: Added.
(WebKit::LocalAuthenticatorInternal::buildAuthData):
(WebKit::LocalAuthenticatorInternal::transportsContain):
(WebKit::LocalAuthenticatorInternal::produceHashSet):
(WebKit::LocalAuthenticatorInternal::toVector):
(WebKit::LocalAuthenticator::LocalAuthenticator):
(WebKit::LocalAuthenticator::makeCredential):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterUserConsented):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):
(WebKit::LocalAuthenticator::getAssertion):
(WebKit::LocalAuthenticator::continueGetAssertionAfterUserConsented):
* UIProcess/WebAuthentication/Cocoa/LocalConnection.h: Copied from Source/WebCore/PAL/pal/spi/cocoa/DeviceIdentitySPI.h.
* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm: Added.
(WebKit::LocalConnection::getUserConsent const):
(WebKit::LocalConnection::getAttestation const):
* UIProcess/WebAuthentication/Cocoa/LocalService.h: Copied from Source/WebCore/platform/cocoa/LocalAuthenticationSoftLink.h.
* UIProcess/WebAuthentication/Cocoa/LocalService.mm: Renamed from Source/WebCore/PAL/pal/spi/cocoa/DeviceIdentitySPI.h.
(WebKit::LocalService::LocalService):
(WebKit::LocalService::isAvailable):
(WebKit::LocalService::startDiscoveryInternal const):
(WebKit::LocalService::platformStartDiscovery const):
(WebKit::LocalService::createLocalConnection const):
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp: Copied from Source/WebCore/platform/cocoa/LocalAuthenticationSoftLink.h.
(WebKit::MockAuthenticatorManager::MockAuthenticatorManager):
(WebKit::MockAuthenticatorManager::createService const):
(WebKit::MockAuthenticatorManager::respondReceivedInternal):
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.h: Copied from Source/WebCore/platform/cocoa/LocalAuthenticationSoftLink.h.
* UIProcess/WebAuthentication/Mock/MockLocalConnection.h: Copied from Source/WebCore/platform/cocoa/LocalAuthenticationSoftLink.h.
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm: Added.
(WebKit::MockLocalConnection::MockLocalConnection):
(WebKit::MockLocalConnection::getUserConsent const):
(WebKit::MockLocalConnection::getAttestation const):
* UIProcess/WebAuthentication/Mock/MockLocalService.cpp: Copied from Source/WebCore/platform/cocoa/LocalAuthenticationSoftLink.h.
(WebKit::MockLocalService::MockLocalService):
(WebKit::MockLocalService::platformStartDiscovery const):
(WebKit::MockLocalService::createLocalConnection const):
* UIProcess/WebAuthentication/Mock/MockLocalService.h: Copied from Source/WebCore/platform/cocoa/LocalAuthenticationSoftLink.h.
* UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h: Copied from Source/WebCore/platform/cocoa/LocalAuthenticationSoftLink.h.
* UIProcess/WebAuthentication/WebAuthenticationRequestData.h: Renamed from Source/WebCore/platform/cocoa/LocalAuthenticationSoftLink.h.
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
(WebKit::WebAuthenticatorCoordinatorProxy::WebAuthenticatorCoordinatorProxy):
(WebKit::WebAuthenticatorCoordinatorProxy::makeCredential):
(WebKit::WebAuthenticatorCoordinatorProxy::getAssertion):
(WebKit::WebAuthenticatorCoordinatorProxy::isUserVerifyingPlatformAuthenticatorAvailable):
(WebKit::WebAuthenticatorCoordinatorProxy::isUserVerifyingPlatformAuthenticatorAvailableReply): Deleted.
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::setMockWebAuthenticationConfiguration):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::authenticatorManager):
* WebKit.xcodeproj/project.pbxproj:
Tools:
Besides the functionality to set the WebAuthenticationMockConfiguration. Three operations are
added to manipulate Keychain: addTestKeyToKeychain, cleanUpKeychain and keyExistedInKeychain.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/LocalAuthenticator.mm: Removed.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebAuthenticationMockConfiguration):
(WTR::TestRunner::addTestKeyToKeychain):
(WTR::TestRunner::cleanUpKeychain):
(WTR::TestRunner::isKeyExisted):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::addTestKeyToKeychain):
(WTR::TestController::cleanUpKeychain):
(WTR::TestController::isKeyExisted):
(WTR::TestController::setWebAuthenticationMockConfiguration):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::addTestKeyToKeychain):
(WTR::TestController::cleanUpKeychain):
(WTR::TestController::keyExistedInKeychain):
LayoutTests:
Most of the new tests are rewritten from the LocalAuthenticator API tests. Old mock tests are temporarily skipped
for the new mock tests.
* TestExpectations:
* http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-failure-local.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-success-local.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-success.https.html:
* http/wpt/webauthn/public-key-credential-get-failure-local.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-failure-local.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-success-local.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-success.https.html:
* http/wpt/webauthn/public-key-credential-is-user-verifying-platform-authenticator-available-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-is-user-verifying-platform-authenticator-available.html: Added.
* http/wpt/webauthn/public-key-is-user-verifying-platform-authenticator-available-expected.txt: Removed.
* http/wpt/webauthn/public-key-is-user-verifying-platform-authenticator-available.html: Removed.
* http/wpt/webauthn/resources/util.js:
* platform/mac-wk2/TestExpectations:
Canonical link: https://commits.webkit.org/204931@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-25 22:22:36 +00:00
|
|
|
JSAuthenticatorTransport.cpp
|
2020-10-07 00:36:21 +00:00
|
|
|
JSAutomationRate.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSBarProp.cpp
|
2020-06-23 03:25:56 +00:00
|
|
|
JSBaseAudioContext.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSBasicCredential.cpp
|
|
|
|
JSBeforeLoadEvent.cpp
|
|
|
|
JSBeforeUnloadEvent.cpp
|
|
|
|
JSBiquadFilterNode.cpp
|
2020-08-05 16:52:17 +00:00
|
|
|
JSBiquadFilterOptions.cpp
|
|
|
|
JSBiquadFilterType.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSBlob.cpp
|
|
|
|
JSBlobCallback.cpp
|
2018-10-04 19:27:10 +00:00
|
|
|
JSBlobEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSBlobPropertyBag.cpp
|
2021-07-16 00:36:39 +00:00
|
|
|
JSBroadcastChannel.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSByteLengthQueuingStrategy.cpp
|
|
|
|
JSCDATASection.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSCSSAnimation.cpp
|
2020-09-25 17:19:48 +00:00
|
|
|
JSCSSConditionRule.cpp
|
[css-counter-styles] Parse and add feature flag for @counter-style
https://bugs.webkit.org/show_bug.cgi?id=223150
Patch by Tyler Wilcock <twilco.o@protonmail.com> on 2021-04-16
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
@counter-style and its descriptors are now exposed behind a feature
flag, so pass some tests and fail others for a different reason
because this patch doesn't actually implement descriptor parsing and
setting yet.
* web-platform-tests/css/css-counter-styles/counter-style-additive-symbols-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-fallback-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-name-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-negative-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-pad-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-prefix-suffix-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-range-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-speak-as-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-symbols-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-system-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/idlharness-expected.txt:
* web-platform-tests/css/cssom/CSSCounterStyleRule-expected.txt:
Source/WebCore:
Parse @counter-style (without implementing descriptor parsing) behind
a new feature flag, CSSCounterStyleAtRulesEnabled. A separate feature
flag for @counter-style <image> symbol values has also been added, as
image symbols have extra complexities that we won't want to hold the
entire feature back on.
https://www.w3.org/TR/css-counter-styles-3
The CSSCounterStyleRule IDL interface is also added and implemented,
and similarly feature flagged.
https://www.w3.org/TR/css-counter-styles-3/#apis
Test: webexposed/counter-style-is-not-exposed.html and existing WPTs.
* CMakeLists.txt:
Add CSSCounterStyleRule.idl.
* DerivedSources-input.xcfilelist:
Add CSSCounterStyleRule.idl.
* DerivedSources-output.xcfilelist:
Add JSCSSCounterStyleRule.h and JSCSSCounterStyleRule.cpp.
* DerivedSources.make:
Add CSSCounterStyleRule.idl.
* Sources.txt:
Add CSSCounterStyleRule.cpp and JSCSSCounterStyleRule.cpp.
* WebCore.xcodeproj/project.pbxproj:
Add CounterStyle.h, CounterStyle.cpp, and CounterStyle.idl.
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
Support CSSCounterStyleRule.
* bindings/js/WebCoreBuiltinNames.h:
Add macro(CSSCounterStyleRule) to generate counter-style built-in
names.
* css/CSSCounterStyleRule.cpp: Added.
(WebCore::StyleRuleCounterStyle::StyleRuleCounterStyle):
(WebCore::StyleRuleCounterStyle::create):
(WebCore::StyleRuleCounterStyle::mutableProperties):
(WebCore::CSSCounterStyleRule::CSSCounterStyleRule):
(WebCore::CSSCounterStyleRule::reattach):
(WebCore::CSSCounterStyleRule::cssText const):
* css/CSSCounterStyleRule.h: Added.
(isType): Add specialized rule.isCounterStyleRule() implementation.
* css/CSSCounterStyleRule.idl: Added.
* css/CSSRule.cpp: Add new StyleRuleType::CounterStyle COMPILE_ASSERT.
* css/CSSRule.h:
Add COUNTER_STYLE_RULE constant. Also add comment `// WebIDL enum` to
disable enum_casing lint, since these values are named to match IDL
attributes.
* css/CSSRule.idl: Add COUNTER_STYLE_RULE constant behind flag.
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy const):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
Handle newly added StyleRuleType::CounterStyle.
* css/StyleRule.h:
(WebCore::StyleRuleBase::isCounterStyleRule const): Added.
* css/StyleRuleType.h: Add StyleRuleType::CounterStyle
* css/StyleSheetContents.cpp:
(WebCore::traverseRulesInVector):
(WebCore::StyleSheetContents::traverseSubresources const):
If @counter-style image symbols flag is enabled, do traverse
subresources.
* css/parser/CSSAtRuleID.cpp:
If the @counter-style feature flag is enabled, return newly added
CSSAtRuleCounterStyle ID.
(WebCore::cssAtRuleID):
* css/parser/CSSAtRuleID.h:
Add CSSAtRuleCounterStyle ID.
* css/parser/CSSParserContext.cpp:
(WebCore::operator==):
* css/parser/CSSParserContext.h:
(WebCore::CSSParserContextHash::hash):
Add cssCounterStyleAtRulesEnabled and
cssCounterStyleAtRuleImageSymbolsEnabled flags.
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
Refactor to use new CSSPropertyParserHelpers::isPredefinedCounterStyle
method.
* css/parser/CSSParserImpl.cpp:
(WebCore::computeNewAllowedRules):
(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeCounterStyleRule): Added.
(WebCore::CSSParserImpl::consumeDeclarationList):
(WebCore::CSSParserImpl::consumeDeclaration):
* css/parser/CSSParserImpl.h:
Handle new @counter-style rule.
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseValue): Handle
StyleRuleType::CounterStyle.
(WebCore::consumeCounterContent):
Refactor to use new CSSPropertyParserHelpers::isPredefinedCounterStyle
method.
(WebCore::CSSPropertyParser::parseCounterStyleDescriptor):
Add placeholder for future @counter-style descriptor parsing work.
* css/parser/CSSPropertyParser.h:
Add parseCounterStyleDescriptor method
* css/parser/CSSPropertyParserHelpers.h:
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
Add new flag that allows consumed custom ident values to be lowercased
on-parse. This is necessary for some <counter-style-name> values.
(WebCore::CSSPropertyParserHelpers::isPredefinedCounterStyle): Added.
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleName):
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleNameInPrelude):
Parse @counter-style names, both in-prelude names and non-prelude
names (e.g. as part of the `extends` descriptor).
Source/WTF:
* Scripts/Preferences/WebPreferencesExperimental.yaml:
Add CSSCounterStyleAtRulesEnabled and CSSCounterStyleAtRuleImageSymbolsEnabled flags.
Tools:
* DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):
Add `false` defaults for CSSCounterStyleAtRulesEnabled and
CSSCounterStyleAtRuleImageSymbolsEnabled flags.
LayoutTests:
Add tests ensuring @counter-style is not exposed when feature flag is
disabled.
* webexposed/counter-style-is-not-exposed-expected.txt: Added.
* webexposed/counter-style-is-not-exposed.html: Added.
Canonical link: https://commits.webkit.org/236643@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-16 19:19:04 +00:00
|
|
|
JSCSSCounterStyleRule.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSCSSFontFaceRule.cpp
|
2020-09-25 17:19:48 +00:00
|
|
|
JSCSSGroupingRule.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSCSSImportRule.cpp
|
|
|
|
JSCSSKeyframeRule.cpp
|
|
|
|
JSCSSKeyframesRule.cpp
|
|
|
|
JSCSSMediaRule.cpp
|
|
|
|
JSCSSNamespaceRule.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSCSSPageRule.cpp
|
2018-10-16 18:04:43 +00:00
|
|
|
JSCSSPaintCallback.cpp
|
2018-11-08 05:29:59 +00:00
|
|
|
JSCSSPaintSize.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSCSSRule.cpp
|
|
|
|
JSCSSRuleList.cpp
|
|
|
|
JSCSSStyleDeclaration.cpp
|
|
|
|
JSCSSStyleRule.cpp
|
|
|
|
JSCSSStyleSheet.cpp
|
|
|
|
JSCSSSupportsRule.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSCSSTransition.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSCSSUnknownRule.cpp
|
|
|
|
JSCacheQueryOptions.cpp
|
|
|
|
JSCanvasCaptureMediaStreamTrack.cpp
|
|
|
|
JSCanvasCompositing.cpp
|
|
|
|
JSCanvasDirection.cpp
|
|
|
|
JSCanvasDrawImage.cpp
|
|
|
|
JSCanvasDrawPath.cpp
|
|
|
|
JSCanvasFillRule.cpp
|
|
|
|
JSCanvasFillStrokeStyles.cpp
|
|
|
|
JSCanvasFilters.cpp
|
|
|
|
JSCanvasGradient.cpp
|
|
|
|
JSCanvasImageData.cpp
|
|
|
|
JSCanvasImageSmoothing.cpp
|
|
|
|
JSCanvasLineCap.cpp
|
|
|
|
JSCanvasLineJoin.cpp
|
|
|
|
JSCanvasPath.cpp
|
|
|
|
JSCanvasPathDrawingStyles.cpp
|
|
|
|
JSCanvasPattern.cpp
|
|
|
|
JSCanvasRect.cpp
|
|
|
|
JSCanvasRenderingContext2D.cpp
|
2021-04-29 16:09:17 +00:00
|
|
|
JSCanvasRenderingContext2DSettings.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSCanvasShadowStyles.cpp
|
|
|
|
JSCanvasState.cpp
|
|
|
|
JSCanvasText.cpp
|
|
|
|
JSCanvasTextAlign.cpp
|
|
|
|
JSCanvasTextBaseline.cpp
|
|
|
|
JSCanvasTextDrawingStyles.cpp
|
|
|
|
JSCanvasTransform.cpp
|
|
|
|
JSCanvasUserInterface.cpp
|
2020-07-09 16:31:33 +00:00
|
|
|
JSChannelCountMode.cpp
|
|
|
|
JSChannelInterpretation.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSChannelMergerNode.cpp
|
2020-07-29 23:29:48 +00:00
|
|
|
JSChannelMergerOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSChannelSplitterNode.cpp
|
2020-07-29 23:29:48 +00:00
|
|
|
JSChannelSplitterOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSCharacterData.cpp
|
|
|
|
JSChildNode.cpp
|
2019-10-08 14:50:27 +00:00
|
|
|
JSClipboard.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSClipboardEvent.cpp
|
2019-10-08 14:50:27 +00:00
|
|
|
JSClipboardItem.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSCloseEvent.cpp
|
2019-10-18 22:00:48 +00:00
|
|
|
JSColorGamut.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSCommandLineAPIHost.cpp
|
|
|
|
JSComment.cpp
|
[Web Animations] Implement Element.animate()
https://bugs.webkit.org/show_bug.cgi?id=180402
<rdar://problem/35851353>
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Rebaselining a few tests using Element.animate(). They still fail, but no longer on
the Element.animate() calls.
* web-platform-tests/css-timing-1/cubic-bezier-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/frames-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/step-timing-functions-output-expected.txt:
Source/WebCore:
Now that we have added support for play() (webkit.org/b/178932) on Animation and parsing of multiple keyframes
(webkit.org/b/179708), we can add support Element.animate(). To support this simple task, we must add a series
of new IDL interfaces to support option parameters for Element.animate() (KeyframeAnimationOptions),
AnimationEffect (AnimationEffectTimingProperties), KeyframeEffect (KeyframeEffectOptions) and supporting
types CompositeOperation, FillMode, IterationCompositeOperation and PlaybackDirection. While we do not support
most parameters of those types, we at least define them for future support.
To support the most used form of the Element.animate() constructor across the WPT tests, we add support for
specifying the duration of an animation when constructing both a KeyframeEffect and calling Element.animate(),
either via a property on an options dictionary or as a double value.
The implementation of Element.animate() itself is relatively straightforward, we just need to create a supporting
KeyframeEffect based on the options provided, then an Animation with that effect set on it, and finally call play().
We also fix one crash that came up in WPT tests where we would try to access the DOMWindow when none was available
in http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context.html.
* CMakeLists.txt: Add new IDL files.
* DerivedSources.make: Add new IDL files.
* Sources.txt: Add new generated JS bindings.
* WebCore.xcodeproj/project.pbxproj: Add new IDL, header and C++ files.
* animation/Animatable.idl: Expose the animate() method.
* animation/AnimationEffectTiming.cpp:
(WebCore::AnimationEffectTiming::setBindingsDuration): Make the duration property spec-compliant and expect the right
kind of type (unrestricted double or DOMString).
* animation/AnimationEffectTiming.h:
* animation/AnimationEffectTiming.idl:
* animation/AnimationEffectTimingProperties.h: Added.
* animation/AnimationEffectTimingProperties.idl: Added.
* animation/CompositeOperation.h: Added.
* animation/CompositeOperation.idl: Added.
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::currentTime): Check that there is DOMWindow before proceeding to querying the current time
through it, fixes a newly-apparent crash.
* animation/FillMode.h: Added.
* animation/FillMode.idl: Added.
* animation/IterationCompositeOperation.h: Added.
* animation/IterationCompositeOperation.idl: Added.
* animation/KeyframeAnimationOptions.h: Added.
* animation/KeyframeAnimationOptions.idl: Added.
* animation/KeyframeEffect.cpp: Update types that are no longer defined under KeyframeEffect.
(WebCore::processIterableKeyframes):
(WebCore::processPropertyIndexedKeyframes):
(WebCore::KeyframeEffect::create): Add support for duration provided either directly as a double or through KeyframeEffectOptions.
* animation/KeyframeEffect.h:
* animation/KeyframeEffect.idl:
* animation/KeyframeEffectOptions.h: Added.
* animation/KeyframeEffectOptions.idl: Added.
* animation/PlaybackDirection.h: Added.
* animation/PlaybackDirection.idl: Added.
* dom/Element.cpp:
(WebCore::Element::animate): Implement Element.animate().
* dom/Element.h:
LayoutTests:
Turning on Element.animate() means that a ton of WPT tests that would immediately fail when Element.animate()
was used now progressed to either PASS, FAIL or TIMEOUT. We update the output to match the updated behavior
and TestExpectations for some cases of flaky outputs due to incomplete implementations that had not surfaced
until now.
We're also removing a Blink test that uses Web Animations to animate a bogus "rotate" property.
* TestExpectations:
* http/wpt/web-animations/animation-model/animation-types/discrete-animation-expected.txt:
* http/wpt/web-animations/animation-model/combining-effects/effect-composition-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-transformed-distance-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-visibility-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/Animation/cancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/effect-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finished-expected.txt:
* http/wpt/web-animations/interfaces/Animation/id-expected.txt:
* http/wpt/web-animations/interfaces/Animation/oncancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/onfinish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/pause-expected.txt:
* http/wpt/web-animations/interfaces/Animation/play-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playState-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playbackRate-expected.txt:
* http/wpt/web-animations/interfaces/Animation/ready-expected.txt:
* http/wpt/web-animations/interfaces/Animation/startTime-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/delay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/direction-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/duration-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/easing-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/fill-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getComputedStyle-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationTimeline/document-timeline-expected.txt:
* http/wpt/web-animations/interfaces/Document/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/composite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/iterationComposite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/setTarget-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/active-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/current-iteration-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/local-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/phases-and-states-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt:
* http/wpt/web-animations/timing-model/animations/canceling-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/finishing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/pausing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/playing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/reversing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:
* http/wpt/web-animations/timing-model/time-transformations/transformed-progress-expected.txt:
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees-expected.html: Removed.
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees.html: Removed.
Canonical link: https://commits.webkit.org/197013@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-24 13:57:42 +00:00
|
|
|
JSCompositeOperation.cpp
|
2018-11-06 11:15:43 +00:00
|
|
|
JSCompositeOperationOrAuto.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSCompositionEvent.cpp
|
2018-11-06 11:15:15 +00:00
|
|
|
JSComputedEffectTiming.cpp
|
2020-08-14 18:56:54 +00:00
|
|
|
JSConstantSourceNode.cpp
|
|
|
|
JSConstantSourceOptions.cpp
|
2020-10-05 18:56:12 +00:00
|
|
|
JSContactInfo.cpp
|
|
|
|
JSContactProperty.cpp
|
|
|
|
JSContactsManager.cpp
|
|
|
|
JSContactsSelectOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSConvolverNode.cpp
|
2020-08-05 19:23:06 +00:00
|
|
|
JSConvolverOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSCountQueuingStrategy.cpp
|
|
|
|
JSCredentialCreationOptions.cpp
|
|
|
|
JSCredentialRequestOptions.cpp
|
|
|
|
JSCredentialsContainer.cpp
|
|
|
|
JSCrypto.cpp
|
|
|
|
JSCryptoAesKeyAlgorithm.cpp
|
|
|
|
JSCryptoAlgorithmParameters.cpp
|
|
|
|
JSCryptoEcKeyAlgorithm.cpp
|
|
|
|
JSCryptoHmacKeyAlgorithm.cpp
|
|
|
|
JSCryptoKey.cpp
|
|
|
|
JSCryptoKeyAlgorithm.cpp
|
|
|
|
JSCryptoKeyPair.cpp
|
|
|
|
JSCryptoKeyUsage.cpp
|
|
|
|
JSCryptoRsaHashedKeyAlgorithm.cpp
|
|
|
|
JSCryptoRsaKeyAlgorithm.cpp
|
|
|
|
JSCustomElementRegistry.cpp
|
|
|
|
JSCustomEvent.cpp
|
|
|
|
JSDOMApplicationCache.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSDOMCSSCustomPropertyDescriptor.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSDOMCSSNamespace.cpp
|
|
|
|
JSDOMCache.cpp
|
|
|
|
JSDOMCacheStorage.cpp
|
|
|
|
JSDOMException.cpp
|
|
|
|
JSDOMFileSystem.cpp
|
|
|
|
JSDOMFormData.cpp
|
|
|
|
JSDOMImplementation.cpp
|
|
|
|
JSDOMMatrix.cpp
|
|
|
|
JSDOMMatrix2DInit.cpp
|
|
|
|
JSDOMMatrixInit.cpp
|
|
|
|
JSDOMMatrixReadOnly.cpp
|
|
|
|
JSDOMMimeType.cpp
|
|
|
|
JSDOMMimeTypeArray.cpp
|
|
|
|
JSDOMParser.cpp
|
|
|
|
JSDOMPlugin.cpp
|
|
|
|
JSDOMPluginArray.cpp
|
|
|
|
JSDOMPoint.cpp
|
|
|
|
JSDOMPointInit.cpp
|
|
|
|
JSDOMPointReadOnly.cpp
|
|
|
|
JSDOMQuad.cpp
|
|
|
|
JSDOMQuadInit.cpp
|
|
|
|
JSDOMRect.cpp
|
|
|
|
JSDOMRectInit.cpp
|
|
|
|
JSDOMRectList.cpp
|
|
|
|
JSDOMRectReadOnly.cpp
|
|
|
|
JSDOMSelection.cpp
|
|
|
|
JSDOMStringList.cpp
|
|
|
|
JSDOMStringMap.cpp
|
|
|
|
JSDOMTokenList.cpp
|
|
|
|
JSDOMURL.cpp
|
|
|
|
JSDOMWindow.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSDataCue.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSDataTransfer.cpp
|
|
|
|
JSDataTransferItem.cpp
|
|
|
|
JSDataTransferItemList.cpp
|
|
|
|
JSDatabase.cpp
|
|
|
|
JSDatabaseCallback.cpp
|
|
|
|
JSDedicatedWorkerGlobalScope.cpp
|
|
|
|
JSDelayNode.cpp
|
2020-08-03 21:49:41 +00:00
|
|
|
JSDelayOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSDeprecatedCSSOMCounter.cpp
|
|
|
|
JSDeprecatedCSSOMPrimitiveValue.cpp
|
|
|
|
JSDeprecatedCSSOMRGBColor.cpp
|
|
|
|
JSDeprecatedCSSOMRect.cpp
|
|
|
|
JSDeprecatedCSSOMValue.cpp
|
|
|
|
JSDeprecatedCSSOMValueList.cpp
|
|
|
|
JSDeviceMotionEvent.cpp
|
|
|
|
JSDeviceOrientationEvent.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSDeviceOrientationOrMotionPermissionState.cpp
|
2020-06-18 04:14:13 +00:00
|
|
|
JSDistanceModelType.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSDocument.cpp
|
|
|
|
JSDocumentAndElementEventHandlers.cpp
|
|
|
|
JSDocumentFragment.cpp
|
|
|
|
JSDocumentOrShadowRoot.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSDocumentTimeline.cpp
|
|
|
|
JSDocumentTimelineOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSDocumentType.cpp
|
|
|
|
JSDoubleRange.cpp
|
2020-01-04 07:05:25 +00:00
|
|
|
JSDragEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSDynamicsCompressorNode.cpp
|
2020-08-05 22:18:28 +00:00
|
|
|
JSDynamicsCompressorOptions.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSEXTBlendMinMax.cpp
|
|
|
|
JSEXTColorBufferFloat.cpp
|
|
|
|
JSEXTColorBufferHalfFloat.cpp
|
2020-09-25 22:41:27 +00:00
|
|
|
JSEXTFloatBlend.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSEXTFragDepth.cpp
|
|
|
|
JSEXTShaderTextureLOD.cpp
|
2020-10-09 00:24:42 +00:00
|
|
|
JSEXTTextureCompressionRGTC.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSEXTTextureFilterAnisotropic.cpp
|
|
|
|
JSEXTsRGB.cpp
|
2020-11-30 20:29:35 +00:00
|
|
|
JSKHRParallelShaderCompile.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSEcKeyParams.cpp
|
|
|
|
JSEcdhKeyDeriveParams.cpp
|
|
|
|
JSEcdsaParams.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSEffectTiming.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSElement.cpp
|
|
|
|
JSElementCSSInlineStyle.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSEndingType.cpp
|
2019-10-15 22:06:23 +00:00
|
|
|
JSEnterPictureInPictureEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSErrorCallback.cpp
|
|
|
|
JSErrorEvent.cpp
|
|
|
|
JSEvent.cpp
|
|
|
|
JSEventInit.cpp
|
2021-01-25 20:06:25 +00:00
|
|
|
JSEventListenerOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSEventModifierInit.cpp
|
|
|
|
JSEventSource.cpp
|
|
|
|
JSEventTarget.cpp
|
|
|
|
JSExtendableEvent.cpp
|
|
|
|
JSExtendableEventInit.cpp
|
2017-10-24 21:22:54 +00:00
|
|
|
JSExtendableMessageEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSFetchBody.cpp
|
|
|
|
JSFetchEvent.cpp
|
|
|
|
JSFetchHeaders.cpp
|
|
|
|
JSFetchReferrerPolicy.cpp
|
|
|
|
JSFetchRequest.cpp
|
|
|
|
JSFetchRequestCache.cpp
|
|
|
|
JSFetchRequestCredentials.cpp
|
|
|
|
JSFetchRequestInit.cpp
|
|
|
|
JSFetchRequestMode.cpp
|
|
|
|
JSFetchRequestRedirect.cpp
|
|
|
|
JSFetchResponse.cpp
|
|
|
|
JSFile.cpp
|
|
|
|
JSFileCallback.cpp
|
|
|
|
JSFileList.cpp
|
|
|
|
JSFileReader.cpp
|
|
|
|
JSFileReaderSync.cpp
|
|
|
|
JSFileSystemDirectoryEntry.cpp
|
|
|
|
JSFileSystemDirectoryReader.cpp
|
|
|
|
JSFileSystemEntriesCallback.cpp
|
|
|
|
JSFileSystemEntry.cpp
|
|
|
|
JSFileSystemEntryCallback.cpp
|
|
|
|
JSFileSystemFileEntry.cpp
|
[Web Animations] Implement Element.animate()
https://bugs.webkit.org/show_bug.cgi?id=180402
<rdar://problem/35851353>
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Rebaselining a few tests using Element.animate(). They still fail, but no longer on
the Element.animate() calls.
* web-platform-tests/css-timing-1/cubic-bezier-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/frames-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/step-timing-functions-output-expected.txt:
Source/WebCore:
Now that we have added support for play() (webkit.org/b/178932) on Animation and parsing of multiple keyframes
(webkit.org/b/179708), we can add support Element.animate(). To support this simple task, we must add a series
of new IDL interfaces to support option parameters for Element.animate() (KeyframeAnimationOptions),
AnimationEffect (AnimationEffectTimingProperties), KeyframeEffect (KeyframeEffectOptions) and supporting
types CompositeOperation, FillMode, IterationCompositeOperation and PlaybackDirection. While we do not support
most parameters of those types, we at least define them for future support.
To support the most used form of the Element.animate() constructor across the WPT tests, we add support for
specifying the duration of an animation when constructing both a KeyframeEffect and calling Element.animate(),
either via a property on an options dictionary or as a double value.
The implementation of Element.animate() itself is relatively straightforward, we just need to create a supporting
KeyframeEffect based on the options provided, then an Animation with that effect set on it, and finally call play().
We also fix one crash that came up in WPT tests where we would try to access the DOMWindow when none was available
in http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context.html.
* CMakeLists.txt: Add new IDL files.
* DerivedSources.make: Add new IDL files.
* Sources.txt: Add new generated JS bindings.
* WebCore.xcodeproj/project.pbxproj: Add new IDL, header and C++ files.
* animation/Animatable.idl: Expose the animate() method.
* animation/AnimationEffectTiming.cpp:
(WebCore::AnimationEffectTiming::setBindingsDuration): Make the duration property spec-compliant and expect the right
kind of type (unrestricted double or DOMString).
* animation/AnimationEffectTiming.h:
* animation/AnimationEffectTiming.idl:
* animation/AnimationEffectTimingProperties.h: Added.
* animation/AnimationEffectTimingProperties.idl: Added.
* animation/CompositeOperation.h: Added.
* animation/CompositeOperation.idl: Added.
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::currentTime): Check that there is DOMWindow before proceeding to querying the current time
through it, fixes a newly-apparent crash.
* animation/FillMode.h: Added.
* animation/FillMode.idl: Added.
* animation/IterationCompositeOperation.h: Added.
* animation/IterationCompositeOperation.idl: Added.
* animation/KeyframeAnimationOptions.h: Added.
* animation/KeyframeAnimationOptions.idl: Added.
* animation/KeyframeEffect.cpp: Update types that are no longer defined under KeyframeEffect.
(WebCore::processIterableKeyframes):
(WebCore::processPropertyIndexedKeyframes):
(WebCore::KeyframeEffect::create): Add support for duration provided either directly as a double or through KeyframeEffectOptions.
* animation/KeyframeEffect.h:
* animation/KeyframeEffect.idl:
* animation/KeyframeEffectOptions.h: Added.
* animation/KeyframeEffectOptions.idl: Added.
* animation/PlaybackDirection.h: Added.
* animation/PlaybackDirection.idl: Added.
* dom/Element.cpp:
(WebCore::Element::animate): Implement Element.animate().
* dom/Element.h:
LayoutTests:
Turning on Element.animate() means that a ton of WPT tests that would immediately fail when Element.animate()
was used now progressed to either PASS, FAIL or TIMEOUT. We update the output to match the updated behavior
and TestExpectations for some cases of flaky outputs due to incomplete implementations that had not surfaced
until now.
We're also removing a Blink test that uses Web Animations to animate a bogus "rotate" property.
* TestExpectations:
* http/wpt/web-animations/animation-model/animation-types/discrete-animation-expected.txt:
* http/wpt/web-animations/animation-model/combining-effects/effect-composition-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-transformed-distance-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-visibility-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/Animation/cancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/effect-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finished-expected.txt:
* http/wpt/web-animations/interfaces/Animation/id-expected.txt:
* http/wpt/web-animations/interfaces/Animation/oncancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/onfinish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/pause-expected.txt:
* http/wpt/web-animations/interfaces/Animation/play-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playState-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playbackRate-expected.txt:
* http/wpt/web-animations/interfaces/Animation/ready-expected.txt:
* http/wpt/web-animations/interfaces/Animation/startTime-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/delay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/direction-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/duration-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/easing-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/fill-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getComputedStyle-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationTimeline/document-timeline-expected.txt:
* http/wpt/web-animations/interfaces/Document/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/composite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/iterationComposite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/setTarget-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/active-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/current-iteration-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/local-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/phases-and-states-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt:
* http/wpt/web-animations/timing-model/animations/canceling-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/finishing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/pausing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/playing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/reversing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:
* http/wpt/web-animations/timing-model/time-transformations/transformed-progress-expected.txt:
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees-expected.html: Removed.
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees.html: Removed.
Canonical link: https://commits.webkit.org/197013@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-24 13:57:42 +00:00
|
|
|
JSFillMode.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSFocusEvent.cpp
|
2021-03-22 22:29:52 +00:00
|
|
|
JSFocusOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSFontFace.cpp
|
|
|
|
JSFontFaceSet.cpp
|
2021-07-26 20:15:49 +00:00
|
|
|
JSFormDataEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSGainNode.cpp
|
2020-08-03 22:41:32 +00:00
|
|
|
JSGainOptions.cpp
|
2020-07-03 21:43:59 +00:00
|
|
|
JSGamepad.cpp
|
|
|
|
JSGamepadButton.cpp
|
|
|
|
JSGamepadEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSGeolocation.cpp
|
2019-08-23 20:58:49 +00:00
|
|
|
JSGeolocationCoordinates.cpp
|
|
|
|
JSGeolocationPosition.cpp
|
|
|
|
JSGeolocationPositionError.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSGetAnimationsOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSHTMLAllCollection.cpp
|
|
|
|
JSHTMLAnchorElement.cpp
|
|
|
|
JSHTMLAreaElement.cpp
|
|
|
|
JSHTMLAttachmentElement.cpp
|
|
|
|
JSHTMLAudioElement.cpp
|
|
|
|
JSHTMLBRElement.cpp
|
|
|
|
JSHTMLBaseElement.cpp
|
|
|
|
JSHTMLBodyElement.cpp
|
|
|
|
JSHTMLButtonElement.cpp
|
|
|
|
JSHTMLCanvasElement.cpp
|
|
|
|
JSHTMLCollection.cpp
|
|
|
|
JSHTMLDListElement.cpp
|
|
|
|
JSHTMLDataElement.cpp
|
|
|
|
JSHTMLDataListElement.cpp
|
|
|
|
JSHTMLDetailsElement.cpp
|
2019-07-17 18:58:14 +00:00
|
|
|
JSHTMLDialogElement.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSHTMLDirectoryElement.cpp
|
|
|
|
JSHTMLDivElement.cpp
|
|
|
|
JSHTMLDocument.cpp
|
|
|
|
JSHTMLElement.cpp
|
|
|
|
JSHTMLEmbedElement.cpp
|
|
|
|
JSHTMLFieldSetElement.cpp
|
|
|
|
JSHTMLFontElement.cpp
|
|
|
|
JSHTMLFormControlsCollection.cpp
|
|
|
|
JSHTMLFormElement.cpp
|
|
|
|
JSHTMLFrameElement.cpp
|
|
|
|
JSHTMLFrameSetElement.cpp
|
|
|
|
JSHTMLHRElement.cpp
|
|
|
|
JSHTMLHeadElement.cpp
|
|
|
|
JSHTMLHeadingElement.cpp
|
|
|
|
JSHTMLHtmlElement.cpp
|
|
|
|
JSHTMLHyperlinkElementUtils.cpp
|
|
|
|
JSHTMLIFrameElement.cpp
|
|
|
|
JSHTMLImageElement.cpp
|
|
|
|
JSHTMLInputElement.cpp
|
|
|
|
JSHTMLKeygenElement.cpp
|
|
|
|
JSHTMLLIElement.cpp
|
|
|
|
JSHTMLLabelElement.cpp
|
|
|
|
JSHTMLLegendElement.cpp
|
|
|
|
JSHTMLLinkElement.cpp
|
|
|
|
JSHTMLMapElement.cpp
|
|
|
|
JSHTMLMarqueeElement.cpp
|
|
|
|
JSHTMLMediaElement.cpp
|
|
|
|
JSHTMLMenuElement.cpp
|
2017-11-04 08:20:03 +00:00
|
|
|
JSHTMLMenuItemElement.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSHTMLMetaElement.cpp
|
|
|
|
JSHTMLMeterElement.cpp
|
|
|
|
JSHTMLModElement.cpp
|
2020-11-16 22:40:26 +00:00
|
|
|
JSHTMLModelElement.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSHTMLOListElement.cpp
|
|
|
|
JSHTMLObjectElement.cpp
|
|
|
|
JSHTMLOptGroupElement.cpp
|
|
|
|
JSHTMLOptionElement.cpp
|
|
|
|
JSHTMLOptionsCollection.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSHTMLOrForeignElement.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSHTMLOutputElement.cpp
|
|
|
|
JSHTMLParagraphElement.cpp
|
|
|
|
JSHTMLParamElement.cpp
|
|
|
|
JSHTMLPictureElement.cpp
|
|
|
|
JSHTMLPreElement.cpp
|
|
|
|
JSHTMLProgressElement.cpp
|
|
|
|
JSHTMLQuoteElement.cpp
|
|
|
|
JSHTMLScriptElement.cpp
|
|
|
|
JSHTMLSelectElement.cpp
|
|
|
|
JSHTMLSlotElement.cpp
|
|
|
|
JSHTMLSourceElement.cpp
|
|
|
|
JSHTMLSpanElement.cpp
|
|
|
|
JSHTMLStyleElement.cpp
|
|
|
|
JSHTMLTableCaptionElement.cpp
|
|
|
|
JSHTMLTableCellElement.cpp
|
|
|
|
JSHTMLTableColElement.cpp
|
|
|
|
JSHTMLTableElement.cpp
|
|
|
|
JSHTMLTableRowElement.cpp
|
|
|
|
JSHTMLTableSectionElement.cpp
|
|
|
|
JSHTMLTemplateElement.cpp
|
|
|
|
JSHTMLTextAreaElement.cpp
|
|
|
|
JSHTMLTimeElement.cpp
|
|
|
|
JSHTMLTitleElement.cpp
|
|
|
|
JSHTMLTrackElement.cpp
|
|
|
|
JSHTMLUListElement.cpp
|
|
|
|
JSHTMLUnknownElement.cpp
|
|
|
|
JSHTMLVideoElement.cpp
|
|
|
|
JSHashChangeEvent.cpp
|
2019-10-18 22:00:48 +00:00
|
|
|
JSHdrMetadataType.cpp
|
2020-10-20 23:58:03 +00:00
|
|
|
JSHighlightRegister.cpp
|
|
|
|
JSHighlight.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSHistory.cpp
|
|
|
|
JSHkdfParams.cpp
|
|
|
|
JSHmacKeyParams.cpp
|
|
|
|
JSIDBCursor.cpp
|
|
|
|
JSIDBCursorDirection.cpp
|
|
|
|
JSIDBCursorWithValue.cpp
|
|
|
|
JSIDBDatabase.cpp
|
|
|
|
JSIDBFactory.cpp
|
|
|
|
JSIDBIndex.cpp
|
|
|
|
JSIDBKeyRange.cpp
|
|
|
|
JSIDBObjectStore.cpp
|
|
|
|
JSIDBOpenDBRequest.cpp
|
|
|
|
JSIDBRequest.cpp
|
|
|
|
JSIDBTransaction.cpp
|
2021-07-29 04:04:18 +00:00
|
|
|
JSIDBTransactionDurability.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSIDBTransactionMode.cpp
|
|
|
|
JSIDBVersionChangeEvent.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSIdleDeadline.cpp
|
2019-10-08 06:22:46 +00:00
|
|
|
JSIdleRequestCallback.cpp
|
|
|
|
JSIdleRequestOptions.cpp
|
2020-08-26 20:09:39 +00:00
|
|
|
JSIIRFilterNode.cpp
|
|
|
|
JSIIRFilterOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSImageBitmap.cpp
|
|
|
|
JSImageBitmapOptions.cpp
|
|
|
|
JSImageBitmapRenderingContext.cpp
|
2017-12-14 00:57:35 +00:00
|
|
|
JSImageBitmapRenderingContextSettings.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSImageData.cpp
|
Add support for creating/accessing/setting non-sRGB ImageData via canvas
https://bugs.webkit.org/show_bug.cgi?id=225841
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
* web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3-expected.txt:
Update result to passing.
Source/WebCore:
Test: fast/canvas/canvas-color-space-display-p3-ImageData.html
Add support for accessing non-sRGB (only DisplayP3 for now due
to the specification, but the support is general) pixel data in
HTML canvas.
Updates ImageData constructors and CanvasImageData operations to
take optional ImageDataSettings dictionaries, which contain an
optional color space (otherwise defaulting back to sRGB).
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* html/ImageDataSettings.h: Added.
* html/ImageDataSettings.idl: Added.
Add new ImageDataSettings.idl and related files.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readImageBitmap):
Fixes FIXME and uses PixelBuffer directly rather than allocating
an unnecessary ImageData. This was done now since the relevent
ImageData constructor has gone away.
* html/ImageData.cpp:
(WebCore::computeDataSize):
(WebCore::ImageData::computeColorSpace):
(WebCore::ImageData::create):
(WebCore::ImageData::createUninitialized):
(WebCore::ImageData::ImageData):
(WebCore::ImageData::pixelBuffer const):
(WebCore::ImageData::dataSize): Deleted.
(WebCore::ImageData::deepClone const): Deleted.
* 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::pixelBuffer const): Deleted.
- Reworked ImageData to no longer store a PixelBuffer, which has
extraneous information in it, but rather to store just what it
needs IntSize, Ref<JSC::Uint8ClampedArray>, and now PredefinedColorSpace.
- Updates create functions for new optional ImageDataSettings.
- Adds createUninitialized which follows spec language for ImageData creation
and is used by CanvasRenderingContext2D to create ImageData objects of with
the right color spaces, allowing for fallback to the canvas' own color space
when no ImageDataSettings color space is provided. It is uninitialized and
therefore requires the client to initialize the data to allow for support for
no alpha support in the future, which requires a non-zero initialization pattern.
* html/ImageData.idl:
Add optional ImageDataSettings parameters and the new colorSpace attribute.
* html/canvas/CanvasImageData.idl:
Add optional ImageDataSettings parameters.
* html/canvas/CanvasRenderingContext2DBase.h:
* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::initializeEmptyImageData):
Add helper to initialize the ImageData buffer. Right now it always calls
zeroFill(), but in the future it will need to do more.
(WebCore::CanvasRenderingContext2DBase::createImageData const):
Update to account for this function being able to throw an exception (when
out of memory) and use the new createUninitialized/initializeEmptyImageData
to create a correctly color spaced ImageData.
(WebCore::CanvasRenderingContext2DBase::createImageData const):
Update for new optional ImageDataSettings and use the new createUninitialized
initializeEmptyImageData to create a correctly color spaced ImageData.
(WebCore::CanvasRenderingContext2DBase::getImageData const):
Moves parameter checks to the begining to match the spec, and uses new
createUninitialized/initializeEmptyImageData to create a correctly color
spaced ImageData. Also, use the ImageData's color space when getting
the pixel buffer to actually return the right data!
* html/canvas/PredefinedColorSpace.cpp:
(WebCore::toPredefinedColorSpace):
* html/canvas/PredefinedColorSpace.h:
Add conversion function from DestinationColorSpace to PredefinedColorSpace.
Since DestinationColorSpace is a superset of PredefinedColorSpace, this can
fail, so this conversion returns an Optional.
* inspector/InspectorCanvas.cpp:
* inspector/InspectorCanvasCallTracer.cpp:
* inspector/InspectorCanvasCallTracer.h:
Stub out inspector support for ImageDataSettings.
* platform/graphics/ImageBufferBackend.cpp:
(WebCore::ImageBufferBackend::getPixelBuffer const):
Use the ImageBuffer's actual color space as the source color space
rather than hard coding sRGB. This allows the color space conversion
to take place. Also remove some unnecessary temporary variables.
(WebCore::ImageBufferBackend::putPixelBuffer):
Use the ImageBuffer's actual color space as the destination color space
rather than hard coding sRGB. This allows the color space conversion
to take place. Also remove some unnecessary temporary variables.
* platform/graphics/PixelBuffer.cpp:
(WebCore::PixelBuffer::tryCreate):
(WebCore::PixelBuffer::PixelBuffer):
* platform/graphics/PixelBuffer.h:
(WebCore::PixelBuffer::takeData):
Add a few helpers to allow creationg to/from PixelBuffer
a bit easier.
* platform/graphics/PixelBufferConversion.cpp:
(WebCore::convertImagePixelsAccelerated):
Fix incorrect assertion. We want to assert that there is no error, not that
there is one.
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::convertImageBufferToColorSpace):
(WebCore::FilterEffect::copyUnmultipliedResult):
(WebCore::FilterEffect::copyPremultipliedResult):
(WebCore::FilterEffect::createUnmultipliedImageResult):
(WebCore::FilterEffect::createPremultipliedImageResult):
Stop hard coding SRGB for PixelBuffer color spaces and use the appropriate
color space for the task. We still do color space conversion through ImageBuffer
so we should come back and simplify code here to not always require that.
* testing/Internals.cpp:
(WebCore::Internals::videoSampleAvailable):
(WebCore::Internals::loadArtworkImage):
Update to specify a color space to maintain existing behavior.
Source/WebKitLegacy/win:
Add support for tests enabling the CanvasColorSpaceEnabled preference.
* WebPreferences.cpp:
(WebPreferences::canvasColorSpaceEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):
LayoutTests:
* TestExpectations:
Remove wide-gamut-canvas now that they should pass.
* fast/canvas/canvas-color-space-display-p3-ImageData-expected.txt: Added.
* fast/canvas/canvas-color-space-display-p3-ImageData.html: Added.
Add new test exercising getImageData and putImageData with non-sRGB canvases
and non-sRGB ImageData.
* fast/canvas/canvas-imageData-expected.txt:
Update results for updated error messages, which are a bit worse due additional
ambiguity in signatures.
* platform/glib/TestExpectations:
Mark new test as failing on glib due to lack of display-p3 support.
* platform/win/TestExpectations:
Mark new test as failing on Windows due to lack of display-p3 support.
Unskip CanvasRenderingContext2DSettings-colorSpace-enabled.html which
should now pass due to adding manual preferences support in WebKitLegacy/win.
* storage/indexeddb/modern/objectstore-autoincrement-types-expected.txt:
Update results due to new attribute in ImageData that is auto printed.
Canonical link: https://commits.webkit.org/237797@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-16 15:21:34 +00:00
|
|
|
JSImageDataSettings.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSImageSmoothingQuality.cpp
|
|
|
|
JSInputEvent.cpp
|
2019-01-15 08:25:33 +00:00
|
|
|
JSInspectorAuditAccessibilityObject.cpp
|
|
|
|
JSInspectorAuditDOMObject.cpp
|
2019-03-14 10:13:57 +00:00
|
|
|
JSInspectorAuditResourcesObject.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSInspectorFrontendHost.cpp
|
|
|
|
JSIntersectionObserver.cpp
|
|
|
|
JSIntersectionObserverCallback.cpp
|
|
|
|
JSIntersectionObserverEntry.cpp
|
[Web Animations] Implement Element.animate()
https://bugs.webkit.org/show_bug.cgi?id=180402
<rdar://problem/35851353>
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Rebaselining a few tests using Element.animate(). They still fail, but no longer on
the Element.animate() calls.
* web-platform-tests/css-timing-1/cubic-bezier-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/frames-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/step-timing-functions-output-expected.txt:
Source/WebCore:
Now that we have added support for play() (webkit.org/b/178932) on Animation and parsing of multiple keyframes
(webkit.org/b/179708), we can add support Element.animate(). To support this simple task, we must add a series
of new IDL interfaces to support option parameters for Element.animate() (KeyframeAnimationOptions),
AnimationEffect (AnimationEffectTimingProperties), KeyframeEffect (KeyframeEffectOptions) and supporting
types CompositeOperation, FillMode, IterationCompositeOperation and PlaybackDirection. While we do not support
most parameters of those types, we at least define them for future support.
To support the most used form of the Element.animate() constructor across the WPT tests, we add support for
specifying the duration of an animation when constructing both a KeyframeEffect and calling Element.animate(),
either via a property on an options dictionary or as a double value.
The implementation of Element.animate() itself is relatively straightforward, we just need to create a supporting
KeyframeEffect based on the options provided, then an Animation with that effect set on it, and finally call play().
We also fix one crash that came up in WPT tests where we would try to access the DOMWindow when none was available
in http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context.html.
* CMakeLists.txt: Add new IDL files.
* DerivedSources.make: Add new IDL files.
* Sources.txt: Add new generated JS bindings.
* WebCore.xcodeproj/project.pbxproj: Add new IDL, header and C++ files.
* animation/Animatable.idl: Expose the animate() method.
* animation/AnimationEffectTiming.cpp:
(WebCore::AnimationEffectTiming::setBindingsDuration): Make the duration property spec-compliant and expect the right
kind of type (unrestricted double or DOMString).
* animation/AnimationEffectTiming.h:
* animation/AnimationEffectTiming.idl:
* animation/AnimationEffectTimingProperties.h: Added.
* animation/AnimationEffectTimingProperties.idl: Added.
* animation/CompositeOperation.h: Added.
* animation/CompositeOperation.idl: Added.
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::currentTime): Check that there is DOMWindow before proceeding to querying the current time
through it, fixes a newly-apparent crash.
* animation/FillMode.h: Added.
* animation/FillMode.idl: Added.
* animation/IterationCompositeOperation.h: Added.
* animation/IterationCompositeOperation.idl: Added.
* animation/KeyframeAnimationOptions.h: Added.
* animation/KeyframeAnimationOptions.idl: Added.
* animation/KeyframeEffect.cpp: Update types that are no longer defined under KeyframeEffect.
(WebCore::processIterableKeyframes):
(WebCore::processPropertyIndexedKeyframes):
(WebCore::KeyframeEffect::create): Add support for duration provided either directly as a double or through KeyframeEffectOptions.
* animation/KeyframeEffect.h:
* animation/KeyframeEffect.idl:
* animation/KeyframeEffectOptions.h: Added.
* animation/KeyframeEffectOptions.idl: Added.
* animation/PlaybackDirection.h: Added.
* animation/PlaybackDirection.idl: Added.
* dom/Element.cpp:
(WebCore::Element::animate): Implement Element.animate().
* dom/Element.h:
LayoutTests:
Turning on Element.animate() means that a ton of WPT tests that would immediately fail when Element.animate()
was used now progressed to either PASS, FAIL or TIMEOUT. We update the output to match the updated behavior
and TestExpectations for some cases of flaky outputs due to incomplete implementations that had not surfaced
until now.
We're also removing a Blink test that uses Web Animations to animate a bogus "rotate" property.
* TestExpectations:
* http/wpt/web-animations/animation-model/animation-types/discrete-animation-expected.txt:
* http/wpt/web-animations/animation-model/combining-effects/effect-composition-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-transformed-distance-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-visibility-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/Animation/cancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/effect-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finished-expected.txt:
* http/wpt/web-animations/interfaces/Animation/id-expected.txt:
* http/wpt/web-animations/interfaces/Animation/oncancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/onfinish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/pause-expected.txt:
* http/wpt/web-animations/interfaces/Animation/play-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playState-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playbackRate-expected.txt:
* http/wpt/web-animations/interfaces/Animation/ready-expected.txt:
* http/wpt/web-animations/interfaces/Animation/startTime-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/delay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/direction-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/duration-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/easing-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/fill-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getComputedStyle-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationTimeline/document-timeline-expected.txt:
* http/wpt/web-animations/interfaces/Document/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/composite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/iterationComposite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/setTarget-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/active-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/current-iteration-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/local-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/phases-and-states-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt:
* http/wpt/web-animations/timing-model/animations/canceling-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/finishing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/pausing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/playing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/reversing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:
* http/wpt/web-animations/timing-model/time-transformations/transformed-progress-expected.txt:
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees-expected.html: Removed.
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees.html: Removed.
Canonical link: https://commits.webkit.org/197013@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-24 13:57:42 +00:00
|
|
|
JSIterationCompositeOperation.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSJsonWebKey.cpp
|
|
|
|
JSKeyboardEvent.cpp
|
[Web Animations] Implement Element.animate()
https://bugs.webkit.org/show_bug.cgi?id=180402
<rdar://problem/35851353>
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Rebaselining a few tests using Element.animate(). They still fail, but no longer on
the Element.animate() calls.
* web-platform-tests/css-timing-1/cubic-bezier-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/frames-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/step-timing-functions-output-expected.txt:
Source/WebCore:
Now that we have added support for play() (webkit.org/b/178932) on Animation and parsing of multiple keyframes
(webkit.org/b/179708), we can add support Element.animate(). To support this simple task, we must add a series
of new IDL interfaces to support option parameters for Element.animate() (KeyframeAnimationOptions),
AnimationEffect (AnimationEffectTimingProperties), KeyframeEffect (KeyframeEffectOptions) and supporting
types CompositeOperation, FillMode, IterationCompositeOperation and PlaybackDirection. While we do not support
most parameters of those types, we at least define them for future support.
To support the most used form of the Element.animate() constructor across the WPT tests, we add support for
specifying the duration of an animation when constructing both a KeyframeEffect and calling Element.animate(),
either via a property on an options dictionary or as a double value.
The implementation of Element.animate() itself is relatively straightforward, we just need to create a supporting
KeyframeEffect based on the options provided, then an Animation with that effect set on it, and finally call play().
We also fix one crash that came up in WPT tests where we would try to access the DOMWindow when none was available
in http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context.html.
* CMakeLists.txt: Add new IDL files.
* DerivedSources.make: Add new IDL files.
* Sources.txt: Add new generated JS bindings.
* WebCore.xcodeproj/project.pbxproj: Add new IDL, header and C++ files.
* animation/Animatable.idl: Expose the animate() method.
* animation/AnimationEffectTiming.cpp:
(WebCore::AnimationEffectTiming::setBindingsDuration): Make the duration property spec-compliant and expect the right
kind of type (unrestricted double or DOMString).
* animation/AnimationEffectTiming.h:
* animation/AnimationEffectTiming.idl:
* animation/AnimationEffectTimingProperties.h: Added.
* animation/AnimationEffectTimingProperties.idl: Added.
* animation/CompositeOperation.h: Added.
* animation/CompositeOperation.idl: Added.
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::currentTime): Check that there is DOMWindow before proceeding to querying the current time
through it, fixes a newly-apparent crash.
* animation/FillMode.h: Added.
* animation/FillMode.idl: Added.
* animation/IterationCompositeOperation.h: Added.
* animation/IterationCompositeOperation.idl: Added.
* animation/KeyframeAnimationOptions.h: Added.
* animation/KeyframeAnimationOptions.idl: Added.
* animation/KeyframeEffect.cpp: Update types that are no longer defined under KeyframeEffect.
(WebCore::processIterableKeyframes):
(WebCore::processPropertyIndexedKeyframes):
(WebCore::KeyframeEffect::create): Add support for duration provided either directly as a double or through KeyframeEffectOptions.
* animation/KeyframeEffect.h:
* animation/KeyframeEffect.idl:
* animation/KeyframeEffectOptions.h: Added.
* animation/KeyframeEffectOptions.idl: Added.
* animation/PlaybackDirection.h: Added.
* animation/PlaybackDirection.idl: Added.
* dom/Element.cpp:
(WebCore::Element::animate): Implement Element.animate().
* dom/Element.h:
LayoutTests:
Turning on Element.animate() means that a ton of WPT tests that would immediately fail when Element.animate()
was used now progressed to either PASS, FAIL or TIMEOUT. We update the output to match the updated behavior
and TestExpectations for some cases of flaky outputs due to incomplete implementations that had not surfaced
until now.
We're also removing a Blink test that uses Web Animations to animate a bogus "rotate" property.
* TestExpectations:
* http/wpt/web-animations/animation-model/animation-types/discrete-animation-expected.txt:
* http/wpt/web-animations/animation-model/combining-effects/effect-composition-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-transformed-distance-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-visibility-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/Animation/cancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/effect-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finished-expected.txt:
* http/wpt/web-animations/interfaces/Animation/id-expected.txt:
* http/wpt/web-animations/interfaces/Animation/oncancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/onfinish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/pause-expected.txt:
* http/wpt/web-animations/interfaces/Animation/play-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playState-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playbackRate-expected.txt:
* http/wpt/web-animations/interfaces/Animation/ready-expected.txt:
* http/wpt/web-animations/interfaces/Animation/startTime-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/delay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/direction-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/duration-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/easing-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/fill-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getComputedStyle-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationTimeline/document-timeline-expected.txt:
* http/wpt/web-animations/interfaces/Document/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/composite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/iterationComposite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/setTarget-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/active-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/current-iteration-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/local-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/phases-and-states-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt:
* http/wpt/web-animations/timing-model/animations/canceling-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/finishing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/pausing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/playing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/reversing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:
* http/wpt/web-animations/timing-model/time-transformations/transformed-progress-expected.txt:
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees-expected.html: Removed.
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees.html: Removed.
Canonical link: https://commits.webkit.org/197013@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-24 13:57:42 +00:00
|
|
|
JSKeyframeAnimationOptions.cpp
|
2017-10-24 07:51:59 +00:00
|
|
|
JSKeyframeEffect.cpp
|
[Web Animations] Implement Element.animate()
https://bugs.webkit.org/show_bug.cgi?id=180402
<rdar://problem/35851353>
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Rebaselining a few tests using Element.animate(). They still fail, but no longer on
the Element.animate() calls.
* web-platform-tests/css-timing-1/cubic-bezier-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/frames-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/step-timing-functions-output-expected.txt:
Source/WebCore:
Now that we have added support for play() (webkit.org/b/178932) on Animation and parsing of multiple keyframes
(webkit.org/b/179708), we can add support Element.animate(). To support this simple task, we must add a series
of new IDL interfaces to support option parameters for Element.animate() (KeyframeAnimationOptions),
AnimationEffect (AnimationEffectTimingProperties), KeyframeEffect (KeyframeEffectOptions) and supporting
types CompositeOperation, FillMode, IterationCompositeOperation and PlaybackDirection. While we do not support
most parameters of those types, we at least define them for future support.
To support the most used form of the Element.animate() constructor across the WPT tests, we add support for
specifying the duration of an animation when constructing both a KeyframeEffect and calling Element.animate(),
either via a property on an options dictionary or as a double value.
The implementation of Element.animate() itself is relatively straightforward, we just need to create a supporting
KeyframeEffect based on the options provided, then an Animation with that effect set on it, and finally call play().
We also fix one crash that came up in WPT tests where we would try to access the DOMWindow when none was available
in http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context.html.
* CMakeLists.txt: Add new IDL files.
* DerivedSources.make: Add new IDL files.
* Sources.txt: Add new generated JS bindings.
* WebCore.xcodeproj/project.pbxproj: Add new IDL, header and C++ files.
* animation/Animatable.idl: Expose the animate() method.
* animation/AnimationEffectTiming.cpp:
(WebCore::AnimationEffectTiming::setBindingsDuration): Make the duration property spec-compliant and expect the right
kind of type (unrestricted double or DOMString).
* animation/AnimationEffectTiming.h:
* animation/AnimationEffectTiming.idl:
* animation/AnimationEffectTimingProperties.h: Added.
* animation/AnimationEffectTimingProperties.idl: Added.
* animation/CompositeOperation.h: Added.
* animation/CompositeOperation.idl: Added.
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::currentTime): Check that there is DOMWindow before proceeding to querying the current time
through it, fixes a newly-apparent crash.
* animation/FillMode.h: Added.
* animation/FillMode.idl: Added.
* animation/IterationCompositeOperation.h: Added.
* animation/IterationCompositeOperation.idl: Added.
* animation/KeyframeAnimationOptions.h: Added.
* animation/KeyframeAnimationOptions.idl: Added.
* animation/KeyframeEffect.cpp: Update types that are no longer defined under KeyframeEffect.
(WebCore::processIterableKeyframes):
(WebCore::processPropertyIndexedKeyframes):
(WebCore::KeyframeEffect::create): Add support for duration provided either directly as a double or through KeyframeEffectOptions.
* animation/KeyframeEffect.h:
* animation/KeyframeEffect.idl:
* animation/KeyframeEffectOptions.h: Added.
* animation/KeyframeEffectOptions.idl: Added.
* animation/PlaybackDirection.h: Added.
* animation/PlaybackDirection.idl: Added.
* dom/Element.cpp:
(WebCore::Element::animate): Implement Element.animate().
* dom/Element.h:
LayoutTests:
Turning on Element.animate() means that a ton of WPT tests that would immediately fail when Element.animate()
was used now progressed to either PASS, FAIL or TIMEOUT. We update the output to match the updated behavior
and TestExpectations for some cases of flaky outputs due to incomplete implementations that had not surfaced
until now.
We're also removing a Blink test that uses Web Animations to animate a bogus "rotate" property.
* TestExpectations:
* http/wpt/web-animations/animation-model/animation-types/discrete-animation-expected.txt:
* http/wpt/web-animations/animation-model/combining-effects/effect-composition-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-transformed-distance-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-visibility-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/Animation/cancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/effect-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finished-expected.txt:
* http/wpt/web-animations/interfaces/Animation/id-expected.txt:
* http/wpt/web-animations/interfaces/Animation/oncancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/onfinish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/pause-expected.txt:
* http/wpt/web-animations/interfaces/Animation/play-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playState-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playbackRate-expected.txt:
* http/wpt/web-animations/interfaces/Animation/ready-expected.txt:
* http/wpt/web-animations/interfaces/Animation/startTime-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/delay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/direction-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/duration-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/easing-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/fill-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getComputedStyle-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationTimeline/document-timeline-expected.txt:
* http/wpt/web-animations/interfaces/Document/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/composite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/iterationComposite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/setTarget-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/active-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/current-iteration-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/local-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/phases-and-states-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt:
* http/wpt/web-animations/timing-model/animations/canceling-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/finishing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/pausing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/playing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/reversing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:
* http/wpt/web-animations/timing-model/time-transformations/transformed-progress-expected.txt:
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees-expected.html: Removed.
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees.html: Removed.
Canonical link: https://commits.webkit.org/197013@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-24 13:57:42 +00:00
|
|
|
JSKeyframeEffectOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSLocation.cpp
|
|
|
|
JSLongRange.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSMathMLElement.cpp
|
|
|
|
JSMathMLMathElement.cpp
|
2017-12-21 18:28:21 +00:00
|
|
|
JSMediaCapabilities.cpp
|
2019-03-15 22:02:02 +00:00
|
|
|
JSMediaCapabilitiesDecodingInfo.cpp
|
|
|
|
JSMediaCapabilitiesEncodingInfo.cpp
|
2017-12-21 18:28:21 +00:00
|
|
|
JSMediaCapabilitiesInfo.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSMediaController.cpp
|
|
|
|
JSMediaControlsHost.cpp
|
2017-12-21 18:28:21 +00:00
|
|
|
JSMediaDecodingConfiguration.cpp
|
|
|
|
JSMediaDecodingType.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSMediaDeviceInfo.cpp
|
|
|
|
JSMediaDevices.cpp
|
|
|
|
JSMediaElementAudioSourceNode.cpp
|
2020-08-06 16:18:03 +00:00
|
|
|
JSMediaElementAudioSourceOptions.cpp
|
2017-12-21 18:28:21 +00:00
|
|
|
JSMediaEncodingConfiguration.cpp
|
|
|
|
JSMediaEncodingType.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSMediaEncryptedEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSMediaError.cpp
|
2020-10-20 16:20:16 +00:00
|
|
|
JSMediaImage.cpp
|
2020-07-03 22:17:45 +00:00
|
|
|
JSMediaKeyEncryptionScheme.cpp
|
|
|
|
JSMediaKeyMessageEvent.cpp
|
|
|
|
JSMediaKeySession.cpp
|
|
|
|
JSMediaKeySessionType.cpp
|
|
|
|
JSMediaKeyStatusMap.cpp
|
|
|
|
JSMediaKeySystemAccess.cpp
|
|
|
|
JSMediaKeySystemConfiguration.cpp
|
|
|
|
JSMediaKeySystemMediaCapability.cpp
|
|
|
|
JSMediaKeys.cpp
|
|
|
|
JSMediaKeysRequirement.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSMediaList.cpp
|
2020-10-20 16:20:16 +00:00
|
|
|
JSMediaMetadata.cpp
|
2021-03-24 23:14:51 +00:00
|
|
|
JSMediaSessionCoordinator.cpp
|
2021-03-31 23:11:14 +00:00
|
|
|
JSMediaSessionCoordinatorState.cpp
|
2020-10-20 16:20:16 +00:00
|
|
|
JSMediaMetadataInit.cpp
|
|
|
|
JSMediaPositionState.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSMediaQueryList.cpp
|
2020-04-17 10:16:36 +00:00
|
|
|
JSMediaQueryListEvent.cpp
|
2018-10-04 19:27:10 +00:00
|
|
|
JSMediaRecorder.cpp
|
2018-10-15 14:56:03 +00:00
|
|
|
JSMediaRecorderErrorEvent.cpp
|
2020-10-20 16:20:16 +00:00
|
|
|
JSMediaSessionActionDetails.cpp
|
|
|
|
JSMediaSessionActionHandler.cpp
|
|
|
|
JSMediaSessionAction.cpp
|
|
|
|
JSMediaSessionPlaybackState.cpp
|
2021-03-24 23:14:51 +00:00
|
|
|
JSMediaSessionReadyState.cpp
|
2020-10-20 16:20:16 +00:00
|
|
|
JSMediaSession.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSMediaSource.cpp
|
|
|
|
JSMediaStream.cpp
|
|
|
|
JSMediaStreamAudioDestinationNode.cpp
|
|
|
|
JSMediaStreamAudioSourceNode.cpp
|
2020-08-06 20:01:30 +00:00
|
|
|
JSMediaStreamAudioSourceOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSMediaStreamTrack.cpp
|
|
|
|
JSMediaStreamTrackEvent.cpp
|
|
|
|
JSMediaTrackConstraints.cpp
|
|
|
|
JSMediaTrackSupportedConstraints.cpp
|
2018-02-15 19:47:46 +00:00
|
|
|
JSMerchantValidationEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSMessageChannel.cpp
|
|
|
|
JSMessageEvent.cpp
|
|
|
|
JSMessagePort.cpp
|
|
|
|
JSMouseEvent.cpp
|
|
|
|
JSMouseEventInit.cpp
|
|
|
|
JSMutationCallback.cpp
|
|
|
|
JSMutationEvent.cpp
|
|
|
|
JSMutationObserver.cpp
|
|
|
|
JSMutationRecord.cpp
|
|
|
|
JSNamedNodeMap.cpp
|
|
|
|
JSNavigator.cpp
|
|
|
|
JSNode.cpp
|
|
|
|
JSNodeFilter.cpp
|
2020-08-07 19:27:56 +00:00
|
|
|
JSCustomXPathNSResolver.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSNodeIterator.cpp
|
|
|
|
JSNodeList.cpp
|
|
|
|
JSNonDocumentTypeChildNode.cpp
|
|
|
|
JSNonElementParentNode.cpp
|
|
|
|
JSNotification.cpp
|
|
|
|
JSNotificationPermission.cpp
|
|
|
|
JSNotificationPermissionCallback.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSOESElementIndexUint.cpp
|
2020-09-26 00:41:37 +00:00
|
|
|
JSOESFBORenderMipmap.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSOESStandardDerivatives.cpp
|
|
|
|
JSOESTextureFloat.cpp
|
|
|
|
JSOESTextureFloatLinear.cpp
|
|
|
|
JSOESTextureHalfFloat.cpp
|
|
|
|
JSOESTextureHalfFloatLinear.cpp
|
|
|
|
JSOESVertexArrayObject.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSOfflineAudioCompletionEvent.cpp
|
2020-07-31 23:41:39 +00:00
|
|
|
JSOfflineAudioCompletionEventInit.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSOfflineAudioContext.cpp
|
2020-07-21 16:13:47 +00:00
|
|
|
JSOfflineAudioContextOptions.cpp
|
2017-11-03 18:05:13 +00:00
|
|
|
JSOffscreenCanvas.cpp
|
2017-12-12 23:35:51 +00:00
|
|
|
JSOffscreenCanvasRenderingContext2D.cpp
|
2018-11-06 11:15:30 +00:00
|
|
|
JSOptionalEffectTiming.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSOscillatorNode.cpp
|
2020-07-27 20:25:05 +00:00
|
|
|
JSOscillatorOptions.cpp
|
|
|
|
JSOscillatorType.cpp
|
2020-07-31 18:47:49 +00:00
|
|
|
JSOverSampleType.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSOverconstrainedError.cpp
|
|
|
|
JSOverconstrainedErrorEvent.cpp
|
|
|
|
JSOverflowEvent.cpp
|
|
|
|
JSPageTransitionEvent.cpp
|
2018-11-06 11:15:30 +00:00
|
|
|
JSPaintRenderingContext2D.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSPaintWorkletGlobalScope.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSPannerNode.cpp
|
2020-07-06 21:24:00 +00:00
|
|
|
JSPannerOptions.cpp
|
2020-06-18 04:14:13 +00:00
|
|
|
JSPanningModelType.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSParentNode.cpp
|
|
|
|
JSPath2D.cpp
|
2018-09-04 03:36:22 +00:00
|
|
|
JSPayerErrorFields.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSPaymentAddress.cpp
|
|
|
|
JSPaymentComplete.cpp
|
|
|
|
JSPaymentCurrencyAmount.cpp
|
|
|
|
JSPaymentDetailsBase.cpp
|
|
|
|
JSPaymentDetailsInit.cpp
|
|
|
|
JSPaymentDetailsModifier.cpp
|
|
|
|
JSPaymentDetailsUpdate.cpp
|
|
|
|
JSPaymentItem.cpp
|
2018-08-30 19:57:19 +00:00
|
|
|
JSPaymentMethodChangeEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSPaymentMethodData.cpp
|
|
|
|
JSPaymentOptions.cpp
|
|
|
|
JSPaymentRequest.cpp
|
|
|
|
JSPaymentRequestUpdateEvent.cpp
|
|
|
|
JSPaymentRequestUpdateEventInit.cpp
|
|
|
|
JSPaymentResponse.cpp
|
|
|
|
JSPaymentShippingOption.cpp
|
|
|
|
JSPaymentShippingType.cpp
|
2018-09-04 03:36:22 +00:00
|
|
|
JSPaymentValidationErrors.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSPbkdf2Params.cpp
|
|
|
|
JSPerformance.cpp
|
|
|
|
JSPerformanceEntry.cpp
|
|
|
|
JSPerformanceMark.cpp
|
Update User Timing interfaces to User Timing Level 3
https://bugs.webkit.org/show_bug.cgi?id=216787
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
Import missing case-sensitivity test case from upstream and update the results
of User Timing tests now that we support Level 3.
* web-platform-tests/user-timing/case-sensitivity.any-expected.txt: Added.
* web-platform-tests/user-timing/case-sensitivity.any.html: Added.
* web-platform-tests/user-timing/case-sensitivity.any.js: Added.
* web-platform-tests/user-timing/case-sensitivity.any.worker-expected.txt: Added.
* web-platform-tests/user-timing/case-sensitivity.any.worker.html: Added.
* web-platform-tests/user-timing/idlharness.any-expected.txt:
* web-platform-tests/user-timing/idlharness.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-entry-constructor.any-expected.txt:
* web-platform-tests/user-timing/mark-entry-constructor.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-errors.any-expected.txt:
* web-platform-tests/user-timing/mark-errors.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-l3.any-expected.txt:
* web-platform-tests/user-timing/mark-l3.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-measure-return-objects.any-expected.txt:
* web-platform-tests/user-timing/mark-measure-return-objects.any.worker-expected.txt:
* web-platform-tests/user-timing/measure-l3.any-expected.txt:
* web-platform-tests/user-timing/measure-l3.any.worker-expected.txt:
* web-platform-tests/user-timing/measure-with-dict.any-expected.txt:
* web-platform-tests/user-timing/measure-with-dict.any.worker-expected.txt:
* web-platform-tests/user-timing/measure_exception-expected.txt:
* web-platform-tests/user-timing/performance-measure-invalid.worker-expected.txt:
* web-platform-tests/user-timing/structured-serialize-detail.any-expected.txt:
* web-platform-tests/user-timing/structured-serialize-detail.any.worker-expected.txt:
Source/WebCore:
Adds support for User Timing Level 3 which adds more flexibility in how PerformanceMarks
and PerformanceMeasures are created via synthetic start/end times and associate 'details'
values serialized with events themselves.
Updates results to existing WPT and standalone tests.
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new files.
* page/Performance.cpp:
(WebCore::Performance::mark):
(WebCore::Performance::clearMarks):
(WebCore::Performance::measure):
(WebCore::Performance::clearMeasures):
* page/Performance.h:
* page/Performance.idl:
Update for new signatures for mark and measure, and rename of UserTiming to PerformanceUserTiming.
* page/PerformanceMark.cpp: Added.
(WebCore::peformanceNow):
(WebCore::PerformanceMark::create):
(WebCore::PerformanceMark::PerformanceMark):
(WebCore::PerformanceMark::detail):
* page/PerformanceMark.h:
* page/PerformanceMark.idl:
Add support for PerformanceMark's constructor `detail` getter. While the spec says to
serialize and the deserialize in the constructor, we only serialize, and delay deserialization
until the first access, which is a non-observable difference. We also utilize [CachedAttribute]
to only ever deserialize once per wrapper world (and also greatly simplify the GC shenanigans).
* page/PerformanceMarkOptions.h: Added.
* page/PerformanceMarkOptions.idl: Added.
Import and bind PerformanceMarkOptions dictionary to a new struct.
* page/PerformanceMeasure.cpp: Added.
(WebCore::PerformanceMeasure::create):
(WebCore::PerformanceMeasure::PerformanceMeasure):
(WebCore::PerformanceMeasure::detail):
* page/PerformanceMeasure.h:
* page/PerformanceMeasure.idl:
Like with PerformanceMark, but there is no constructor here, so we only need to handle adding
support for the detail getter.
* page/PerformanceMeasureOptions.h: Added.
* page/PerformanceMeasureOptions.idl: Added.
Import and bind PerformanceMeasureOptions dictionary to a new struct.
* page/PerformanceUserTiming.cpp:
(WebCore::restrictedMarkNamesToNavigationTimingFunctionMap):
(WebCore::restrictedMarkFunction):
(WebCore::isRestrictedMarkNameNonMainThread):
(WebCore::PerformanceUserTiming::isRestrictedMarkName):
Split up existing map to enable accessing it safely from a worker using conservative
callOnMainThreadAndWait approach, though since the map is immutable after initialization,
we can probably optimize this to allow concurrent querying in the future.
(WebCore::addPerformanceEntry):
Add helper, mirroring clearPerformanceEntries, to add entries.
(WebCore::PerformanceUserTiming::mark):
Matching the spec language, utilize the new PerformanceMark constructor to create
the mark.
(WebCore::PerformanceUserTiming::convertMarkToTimestamp const):
(WebCore::isNonEmptyDictionary):
(WebCore::PerformanceUserTiming::measure):
Implement measure support by dispatching various combinations of arguments to
overloads manually by inspecting the Variant.
* page/PerformanceUserTiming.h:
Renames class from UserTiming to PerformanceUserTiming to match file names.
LayoutTests:
Update error text due to some changes in which exceptions are thrown due to
new support for User Timing Level 3.
* performance-api/performance-measure-name-expected.txt:
* performance-api/performance-now-api-expected.txt:
* performance-api/user-timing-apis-expected.txt:
Canonical link: https://commits.webkit.org/229612@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-22 08:46:36 +00:00
|
|
|
JSPerformanceMarkOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSPerformanceMeasure.cpp
|
Update User Timing interfaces to User Timing Level 3
https://bugs.webkit.org/show_bug.cgi?id=216787
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
Import missing case-sensitivity test case from upstream and update the results
of User Timing tests now that we support Level 3.
* web-platform-tests/user-timing/case-sensitivity.any-expected.txt: Added.
* web-platform-tests/user-timing/case-sensitivity.any.html: Added.
* web-platform-tests/user-timing/case-sensitivity.any.js: Added.
* web-platform-tests/user-timing/case-sensitivity.any.worker-expected.txt: Added.
* web-platform-tests/user-timing/case-sensitivity.any.worker.html: Added.
* web-platform-tests/user-timing/idlharness.any-expected.txt:
* web-platform-tests/user-timing/idlharness.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-entry-constructor.any-expected.txt:
* web-platform-tests/user-timing/mark-entry-constructor.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-errors.any-expected.txt:
* web-platform-tests/user-timing/mark-errors.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-l3.any-expected.txt:
* web-platform-tests/user-timing/mark-l3.any.worker-expected.txt:
* web-platform-tests/user-timing/mark-measure-return-objects.any-expected.txt:
* web-platform-tests/user-timing/mark-measure-return-objects.any.worker-expected.txt:
* web-platform-tests/user-timing/measure-l3.any-expected.txt:
* web-platform-tests/user-timing/measure-l3.any.worker-expected.txt:
* web-platform-tests/user-timing/measure-with-dict.any-expected.txt:
* web-platform-tests/user-timing/measure-with-dict.any.worker-expected.txt:
* web-platform-tests/user-timing/measure_exception-expected.txt:
* web-platform-tests/user-timing/performance-measure-invalid.worker-expected.txt:
* web-platform-tests/user-timing/structured-serialize-detail.any-expected.txt:
* web-platform-tests/user-timing/structured-serialize-detail.any.worker-expected.txt:
Source/WebCore:
Adds support for User Timing Level 3 which adds more flexibility in how PerformanceMarks
and PerformanceMeasures are created via synthetic start/end times and associate 'details'
values serialized with events themselves.
Updates results to existing WPT and standalone tests.
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new files.
* page/Performance.cpp:
(WebCore::Performance::mark):
(WebCore::Performance::clearMarks):
(WebCore::Performance::measure):
(WebCore::Performance::clearMeasures):
* page/Performance.h:
* page/Performance.idl:
Update for new signatures for mark and measure, and rename of UserTiming to PerformanceUserTiming.
* page/PerformanceMark.cpp: Added.
(WebCore::peformanceNow):
(WebCore::PerformanceMark::create):
(WebCore::PerformanceMark::PerformanceMark):
(WebCore::PerformanceMark::detail):
* page/PerformanceMark.h:
* page/PerformanceMark.idl:
Add support for PerformanceMark's constructor `detail` getter. While the spec says to
serialize and the deserialize in the constructor, we only serialize, and delay deserialization
until the first access, which is a non-observable difference. We also utilize [CachedAttribute]
to only ever deserialize once per wrapper world (and also greatly simplify the GC shenanigans).
* page/PerformanceMarkOptions.h: Added.
* page/PerformanceMarkOptions.idl: Added.
Import and bind PerformanceMarkOptions dictionary to a new struct.
* page/PerformanceMeasure.cpp: Added.
(WebCore::PerformanceMeasure::create):
(WebCore::PerformanceMeasure::PerformanceMeasure):
(WebCore::PerformanceMeasure::detail):
* page/PerformanceMeasure.h:
* page/PerformanceMeasure.idl:
Like with PerformanceMark, but there is no constructor here, so we only need to handle adding
support for the detail getter.
* page/PerformanceMeasureOptions.h: Added.
* page/PerformanceMeasureOptions.idl: Added.
Import and bind PerformanceMeasureOptions dictionary to a new struct.
* page/PerformanceUserTiming.cpp:
(WebCore::restrictedMarkNamesToNavigationTimingFunctionMap):
(WebCore::restrictedMarkFunction):
(WebCore::isRestrictedMarkNameNonMainThread):
(WebCore::PerformanceUserTiming::isRestrictedMarkName):
Split up existing map to enable accessing it safely from a worker using conservative
callOnMainThreadAndWait approach, though since the map is immutable after initialization,
we can probably optimize this to allow concurrent querying in the future.
(WebCore::addPerformanceEntry):
Add helper, mirroring clearPerformanceEntries, to add entries.
(WebCore::PerformanceUserTiming::mark):
Matching the spec language, utilize the new PerformanceMark constructor to create
the mark.
(WebCore::PerformanceUserTiming::convertMarkToTimestamp const):
(WebCore::isNonEmptyDictionary):
(WebCore::PerformanceUserTiming::measure):
Implement measure support by dispatching various combinations of arguments to
overloads manually by inspecting the Variant.
* page/PerformanceUserTiming.h:
Renames class from UserTiming to PerformanceUserTiming to match file names.
LayoutTests:
Update error text due to some changes in which exceptions are thrown due to
new support for User Timing Level 3.
* performance-api/performance-measure-name-expected.txt:
* performance-api/performance-now-api-expected.txt:
* performance-api/user-timing-apis-expected.txt:
Canonical link: https://commits.webkit.org/229612@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-22 08:46:36 +00:00
|
|
|
JSPerformanceMeasureOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSPerformanceNavigation.cpp
|
Add support for Navigation Timing Level 2
https://bugs.webkit.org/show_bug.cgi?id=184363
Reviewed by Ryosuke Niwa.
LayoutTests/imported/w3c:
* web-platform-tests/navigation-timing/META.yml: Added.
* web-platform-tests/navigation-timing/dom_interactive_image_document-expected.txt: Added.
* web-platform-tests/navigation-timing/dom_interactive_image_document.html: Added.
* web-platform-tests/navigation-timing/dom_interactive_media_document-expected.txt: Added.
* web-platform-tests/navigation-timing/dom_interactive_media_document.html: Added.
* web-platform-tests/navigation-timing/idlharness.window.js:
* web-platform-tests/navigation-timing/nav2_test_attributes_exist-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_attributes_exist.html: Added.
This test fails because we have not implemented transferSize, encodedBodySize, and decodedBodySize as noted in PerformanceResourceTiming.idl
* web-platform-tests/navigation-timing/nav2_test_attributes_values-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_attributes_values.html: Added.
This test fails because we have not implemented transferSize, encodedBodySize, and decodedBodySize as noted in PerformanceResourceTiming.idl
* web-platform-tests/navigation-timing/nav2_test_document_open-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_document_open.html:
* web-platform-tests/navigation-timing/nav2_test_document_replaced-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_document_replaced.html:
* web-platform-tests/navigation-timing/nav2_test_frame_removed-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_instance_accessible_from_the_start-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_instance_accessible_from_the_start.html:
* web-platform-tests/navigation-timing/nav2_test_instance_accessors-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_instance_accessors.html: Added.
* web-platform-tests/navigation-timing/nav2_test_navigate_iframe-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_navigate_iframe.html: Added.
* web-platform-tests/navigation-timing/nav2_test_navigate_within_document-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_navigate_within_document.html:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_backforward-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_backforward.html:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_navigate-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_navigation_type_navigate.html: Added.
* web-platform-tests/navigation-timing/nav2_test_navigation_type_reload-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_reload.html:
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin-expected.txt: Added.
This test fails because our test infrastructure doesn't support loading from www.localhost.
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin.html: Copied from LayoutTests/imported/w3c/web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html.
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in-expected.txt:
This test fails because our test infrastructure doesn't support loading from www.localhost.
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html:
* web-platform-tests/navigation-timing/nav2_test_redirect_none-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_redirect_none.html: Added.
* web-platform-tests/navigation-timing/nav2_test_redirect_server-expected.txt:
This test failure needs further investigation.
* web-platform-tests/navigation-timing/nav2_test_redirect_server.html:
* web-platform-tests/navigation-timing/nav2_test_redirect_xserver-expected.txt:
This test fails because our test infrastructure doesn't support loading from www.localhost.
* web-platform-tests/navigation-timing/nav2_test_redirect_xserver.html:
* web-platform-tests/navigation-timing/nav2_test_unique_nav_instances-expected.txt: Added.
This test failure needs further investigation.
* web-platform-tests/navigation-timing/nav2_test_unique_nav_instances.html: Added.
* web-platform-tests/navigation-timing/po-navigation-expected.txt: Added.
* web-platform-tests/navigation-timing/po-navigation.html: Added.
* web-platform-tests/navigation-timing/resources/webperftestharness.js:
(test_namespace):
(test_attribute_exists):
(test_enum):
* web-platform-tests/navigation-timing/secure-connection-start-reuse.https-expected.txt: Added.
* web-platform-tests/navigation-timing/secure-connection-start-reuse.https.html: Added.
* web-platform-tests/navigation-timing/secure_connection_start_non_zero.https-expected.txt:
This test has been marked as flaky. It needs to be fixed to not rely on no initial connection reuse.
* web-platform-tests/navigation-timing/supported_navigation_type.any-expected.txt:
* web-platform-tests/navigation-timing/supported_navigation_type.any.worker-expected.txt:
* web-platform-tests/navigation-timing/test_document_onload-expected.txt: Added.
* web-platform-tests/navigation-timing/test_document_onload.html: Added.
This test failure needs further investigation.
* web-platform-tests/navigation-timing/unload-event-same-origin-check-expected.txt:
* web-platform-tests/navigation-timing/unload-event-same-origin-check.html:
* web-platform-tests/performance-timeline/META.yml: Added.
* web-platform-tests/performance-timeline/buffered-flag-after-timeout.any.js: Added.
(async_test.t.t.step_timeout):
* web-platform-tests/performance-timeline/buffered-flag-observer.any.js: Added.
* web-platform-tests/performance-timeline/get-invalid-entries-expected.txt: Added.
* web-platform-tests/performance-timeline/get-invalid-entries.html: Added.
* web-platform-tests/performance-timeline/idlharness.any.js: Added.
(async idl_array):
* web-platform-tests/performance-timeline/multiple-buffered-flag-observers.any.js: Added.
(promise_test):
* web-platform-tests/performance-timeline/not-clonable-expected.txt: Added.
* web-platform-tests/performance-timeline/not-clonable.html: Added.
* web-platform-tests/performance-timeline/observer-buffered-false.any.js: Added.
(async_test.t.t.step_timeout):
* web-platform-tests/performance-timeline/performanceentry-tojson.any.js: Added.
(test):
* web-platform-tests/performance-timeline/po-callback-mutate.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-disconnect-removes-observed-types.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-disconnect.any.js: Added.
(async_test):
(test):
* web-platform-tests/performance-timeline/po-entries-sort.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-getentries.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-mark-measure.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-observe-expected.txt: Added.
* web-platform-tests/performance-timeline/po-observe-repeated-type.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-observe.html: Added.
* web-platform-tests/performance-timeline/po-resource-expected.txt: Added.
* web-platform-tests/performance-timeline/po-resource.html: Added.
* web-platform-tests/performance-timeline/po-takeRecords.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/resources/postmessage-entry.html: Added.
* web-platform-tests/performance-timeline/resources/worker-invalid-entries.js: Added.
* web-platform-tests/performance-timeline/resources/worker-with-performance-observer.js: Added.
(catch):
* web-platform-tests/performance-timeline/supportedEntryTypes.any-expected.txt:
This test failure needs further investigation. It's a bindings generation problem I've unsuccessfully looked into before.
* web-platform-tests/performance-timeline/supportedEntryTypes.any.js:
(test):
* web-platform-tests/performance-timeline/supportedEntryTypes.any.worker-expected.txt:
* web-platform-tests/performance-timeline/webtiming-resolution.any.js: Added.
(testTimeResolution):
(timeByUserTiming):
* web-platform-tests/performance-timeline/worker-with-performance-observer-expected.txt: Added.
* web-platform-tests/performance-timeline/worker-with-performance-observer.html: Added.
* web-platform-tests/service-workers/service-worker/navigation-timing.https-expected.txt:
This existing test failure needs more investigation. We are probably close to a fix after this patch.
Source/WebCore:
This is basically just a new shape for exposing the same data as window.performance.navigation, but with a shape that fits better into the rest of the
performance timeline measurements that have been added to the web platform since performance.navigation.
I noted that exposing transfer size is problematic, and some of the tests for reading transfer size still fail.
There are still a few relatively minor test failures to fix in future patches. Each one is annotated in the LayoutTests ChangeLogs.
Tests: imported/w3c/web-platform-tests/navigation-timing/dom_interactive_image_document.html
imported/w3c/web-platform-tests/navigation-timing/dom_interactive_media_document.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_exist.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_values.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_instance_accessors.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_navigate_iframe.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_navigation_type_navigate.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_redirect_none.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_unique_nav_instances.html
imported/w3c/web-platform-tests/navigation-timing/po-navigation.html
imported/w3c/web-platform-tests/navigation-timing/secure-connection-start-reuse.https.html
imported/w3c/web-platform-tests/navigation-timing/test_document_onload.html
imported/w3c/web-platform-tests/performance-timeline/get-invalid-entries.html
imported/w3c/web-platform-tests/performance-timeline/not-clonable.html
imported/w3c/web-platform-tests/performance-timeline/po-observe.html
imported/w3c/web-platform-tests/performance-timeline/po-resource.html
imported/w3c/web-platform-tests/performance-timeline/worker-with-performance-observer.html
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSPerformanceEntryCustom.cpp:
(WebCore::toJSNewlyCreated):
* dom/Document.cpp:
(WebCore::Document::setReadyState):
Sometimes the ready state jumps right to Complete without hitting Interactive along the way.
When this happens, we want to mark both m_documentTiming.domComplete and m_documentTiming.domInteractive.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::notifyFinished):
Call addNavigationTiming in notifyFinished to create the navigation timing object when we are done navigating
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didFinishLoading):
* loader/ResourceLoader.h:
* loader/ResourceTiming.cpp:
(WebCore::ResourceTiming::fromLoad):
Add a URL parameter. Sometimes we need to use the request's URL and sometimes the response's. Different specs written at different times.
(WebCore::ResourceTiming::populateServerTiming const):
(WebCore::ResourceTiming::populateServerTiming): Deleted.
* loader/ResourceTiming.h:
(WebCore::ResourceTiming::url const):
(WebCore::ResourceTiming::initiator const):
(WebCore::ResourceTiming::loadTiming const):
(WebCore::ResourceTiming::networkLoadMetrics const):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::reportResourceTiming):
* page/Performance.cpp:
(WebCore::Performance::getEntries const):
(WebCore::Performance::getEntriesByType const):
(WebCore::Performance::getEntriesByName const):
(WebCore::Performance::appendBufferedEntriesByType const):
(WebCore::Performance::addNavigationTiming):
(WebCore::Performance::registerPerformanceObserver):
(WebCore::Performance::queueEntry):
(WebCore::Performance::scheduleTaskIfNeeded):
* page/Performance.h:
* page/PerformanceEntry.h:
(WebCore::PerformanceEntry::startTime const):
(WebCore::PerformanceEntry::duration const):
(WebCore::PerformanceEntry::isResource const): Deleted.
(WebCore::PerformanceEntry::isMark const): Deleted.
(WebCore::PerformanceEntry::isMeasure const): Deleted.
(WebCore::PerformanceEntry::isPaint const): Deleted.
* page/PerformanceMark.h:
(isType): Deleted.
SPECIALIZE_TYPE_TRAITS_BEGIN/END doesn't work well with PerformanceNavigationTiming which inherits from PerformanceResourceTiming which both have distinct types.
is<PerformanceResourceTiming> doesn't give us the info we need. I replaced that with "switch (entry->performanceEntryType())" in the one place it's used, and it works like a charm.
Also renamed type to performanceEntryType so it doesn't conflict with PerformanceNavigationTiming::type, which is specified in the idl.
* page/PerformanceMeasure.h:
(isType): Deleted.
* page/PerformanceNavigationTiming.cpp: Added.
(WebCore::toPerformanceNavigationTimingNavigationType):
(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::type const):
(WebCore::PerformanceNavigationTiming::redirectCount const):
(WebCore::PerformanceNavigationTiming::startTime const):
(WebCore::PerformanceNavigationTiming::duration const):
* page/PerformanceNavigationTiming.h: Added.
* page/PerformanceNavigationTiming.idl: Copied from Source/WebCore/page/PerformanceObserver.idl.
* page/PerformanceObserver.cpp:
(WebCore::PerformanceObserver::takeRecords):
(WebCore::PerformanceObserver::disconnect):
(WebCore::PerformanceObserver::deliver):
(WebCore::PerformanceObserver::supportedEntryTypes):
* page/PerformanceObserver.h:
* page/PerformanceObserver.idl:
* page/PerformanceObserverEntryList.cpp:
(WebCore::PerformanceObserverEntryList::getEntriesByName const):
* page/PerformancePaintTiming.h:
(isType): Deleted.
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::nextHopProtocol const):
(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::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp const):
* page/PerformanceResourceTiming.h:
(WebCore::PerformanceResourceTiming::initiatorType const):
(isType): Deleted.
* page/PerformanceResourceTiming.idl:
* platform/network/BlobResourceHandle.cpp:
(WebCore::doNotifyFinish):
* platform/network/NetworkLoadMetrics.h:
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::didFinishLoading):
* platform/network/SynchronousLoaderClient.cpp:
(WebCore::SynchronousLoaderClient::didFinishLoading):
* platform/network/SynchronousLoaderClient.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
Pass metrics including the response end time from NSURLConnection so we don't assert in WebKitLegacy.
* platform/network/cocoa/NetworkLoadMetrics.mm:
(WebCore::copyTimingData):
Use currentRequest instead of passing in the response so we can call it from didFinishLoading, where we don't have a response stored anywhere.
We're just looking for whether it's http or https, so the currentRequest (which is the request after all the redirects) fits our purpose.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::handleDataURL):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]):
Source/WebKit:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
Mark reused TLS connections in complete metrics like I did in incomplete metrics in r277493.
Source/WebKitLegacy:
* WebCoreSupport/PingHandle.h:
Source/WTF:
* Scripts/Preferences/WebPreferencesExperimental.yaml:
LayoutTests:
* TestExpectations:
Annoyingly secure_connection_start_non_zero.https.html becomes flaky with a correct implementation because it assumes
that no connection is reused. However, when running this test after other tests, another connection is often reused.
* performance-api/paint-timing/performance-observer-first-contentful-paint-expected.txt:
* performance-api/paint-timing/performance-observer-first-contentful-paint.html:
* performance-api/performance-observer-api-expected.txt:
* performance-api/performance-timeline-api-expected.txt:
* performance-api/resources/timeline-api.js:
* platform/mac-wk1/imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_values-expected.txt:
Next hop protocol isn't implemented in ResourceHandle. That's probably no big deal because WebKitLegacy is deprecated and not used by Safari.
Canonical link: https://commits.webkit.org/237930@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-20 00:33:02 +00:00
|
|
|
JSPerformanceNavigationTiming.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSPerformanceObserver.cpp
|
|
|
|
JSPerformanceObserverCallback.cpp
|
|
|
|
JSPerformanceObserverEntryList.cpp
|
Implement FCP (first contentful paint)
https://bugs.webkit.org/show_bug.cgi?id=208499
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
Imported paint timing tests that don't require first-paint.
* resources/import-expectations.json:
* web-platform-tests/paint-timing: Added.
* web-platform-tests/paint-timing/fcp-only: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-background-size-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-background-size.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-canvas-context-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-gradient-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-gradient.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-text-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-invisible-text.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-opacity-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-opacity.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-svg-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-svg.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-text-input-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-text-input.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-video-frame-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-video-poster-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-whitespace-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-whitespace.html: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-with-rtl-expected.txt: Added.
* web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html: Added.
* web-platform-tests/paint-timing/resources: Added.
* web-platform-tests/paint-timing/resources/circle.svg: Added.
* web-platform-tests/paint-timing/resources/circles.png: Added.
* web-platform-tests/paint-timing/resources/subframe-painting.html: Added.
* web-platform-tests/paint-timing/resources/subframe-sending-paint.html: Added.
* web-platform-tests/paint-timing/resources/utils.js: Added.
(waitForAnimationFrames):
(async assertNoFirstContentfulPaint):
(async assertFirstContentfulPaint.return.new.Promise):
(async assertFirstContentfulPaint):
(async test_fcp):
Source/WebCore:
Added the necessary interface, extensions to the performance interface and observer, new runtime flag.
Detecting contentfulness after layout and before actual paint, by running a "dummy" paint, similar to
invalidateControlTints() / invalidateImagesWithAsyncDecodes(). Save the result to the GraphicsContext and then to the document.
This would run for every paint until we detect a contentful one.
Note that it paints the entire frame contents, as FCP is not viewport-dependent.
Also, paint timing is currently disabled for LFC (layout formatting context), and will be dealt with later.
Tests: http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars.html
http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-background-size.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-gradient.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-text.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-opacity.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-svg.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-text-input.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-whitespace.html
imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html
performance-api/paint-timing/paint-timing-apis.html
performance-api/paint-timing/paint-timing-frames.html
performance-api/paint-timing/paint-timing-with-worker.html
performance-api/paint-timing/performance-observer-first-contentful-paint.html
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSPerformanceEntryCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/WebCoreBuiltinNames.h:
Add PerformancePaintTiming interface. https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
* dom/Document.cpp:
* dom/Document.h:
(WebCore::Document::supportsPaintTiming const):
We only report paint timing for document that can access the top level security origin, to avoid leakage of information to sandboxed iframes.
(WebCore::Document::enqueuePaintTimingEntryIfNeeded):
Enqueue a paint timing entry, according to https://w3c.github.io/paint-timing/#sec-reporting-paint-timing
* page/FrameView.cpp:
(WebCore::FrameView::paintContents):
Disable FCP fake-paint in LFC mode.
* page/Page.cpp:
(WebCore::Page::doAfterUpdateRendering):
* page/Performance.cpp:
(WebCore::Performance::getEntries const):
(WebCore::Performance::getEntriesByType const):
(WebCore::Performance::getEntriesByName const):
(WebCore::Performance::reportFirstContentfulPaint):
* page/Performance.h:
Support first-contentful-paint reporting.
* page/PerformanceEntry.cpp:
(WebCore::PerformanceEntry::parseEntryTypeString):
* page/PerformanceEntry.h:
(WebCore::PerformanceEntry::isPaint const):
* page/PerformanceObserver.cpp:
(WebCore::PerformanceObserver::supportedEntryTypes):
* page/PerformanceObserver.h:
* page/PerformanceObserver.idl:
* page/PerformancePaintTiming.h: Added.
(isType):
* page/PerformancePaintTiming.idl: Added.
Add paint performance entry type.
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setPaintTimingEnabled):
(WebCore::RuntimeEnabledFeatures::paintTimingEnabled const):
New runtime flag for paint timing.
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::detectingContentfulPaint const):
(WebCore::GraphicsContext::setContentfulPaintDetected):
(WebCore::GraphicsContext::contenfulPaintDetected const):
Add a flag in GraphicsContext where different render operations can report if they're contentful.
* rendering/ContentfulPaintChecker.cpp: Added.
(WebCore::ContentfulPaintChecker::qualifiesForContentfulPaint):
* rendering/ContentfulPaintChecker.h: Added.
Run a "dummy" paint of the FrameView, to detect contentful elements.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::paintReplaced):
* rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextOrEmphasisMarks):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
Report contentfulness when we reach anything that qualifies as contentful,
based on https://w3c.github.io/paint-timing/#contentful.
Source/WebKit:
Add an experimental runtime flag for paint-timing (paintTimingEnabled).
* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPaintTimingEnabled):
(WKPreferencesGetPaintTimingEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::updatePreferencesStore):
LayoutTests:
Added tests for some first-contentful-paint (FCP) use-cases.
Ensure that FCP works well with VNE (first paint delay until contents are visually non-empty).
* platform/win/TestExpectations:
* platform/mac-wk1/TestExpectations:
Disable paint timing for WebKit1.
* TestExpectations:
Disable of the WPT tests.
* http/tests/performance/paint-timing: Added.
* http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars-expected.txt: Added.
* http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars.html: Added.
If VNE due to number of characters blocks painting, make sure FCP is reported only after painting is unblocked.
* http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style-expected.txt: Added.
* http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style.html: Added.
If a pending stylesheet blocks painting, make sure FCP is reported only after stylesheet has loaded.
* http/tests/performance/paint-timing/resources: Added.
* http/tests/performance/paint-timing/resources/slowscript.php: Added.
* http/tests/performance/paint-timing/resources/slowstyle.php: Added.
* http/tests/performance/paint-timing/resources/style.css: Added.
(body):
* performance-api/paint-timing: Added.
* performance-api/paint-timing/paint-timing-apis-expected.txt: Added.
* performance-api/paint-timing/paint-timing-apis.html: Added.
* performance-api/paint-timing/paint-timing-frames-expected.txt: Added.
* performance-api/paint-timing/paint-timing-frames.html: Added.
* performance-api/paint-timing/paint-timing-with-worker-expected.txt: Added.
* performance-api/paint-timing/paint-timing-with-worker.html: Added.
Test that FCP is not available for cross-origin frames and workers.
* performance-api/paint-timing/performance-observer-first-contentful-paint-expected.txt: Added.
* performance-api/paint-timing/performance-observer-first-contentful-paint.html: Added.
Test that performance observers are called for FCP.
* performance-api/paint-timing/resources: Added.
* performance-api/paint-timing/resources/fcp-subframe.html: Added.
* performance-api/paint-timing/resources/paint-api-utils.js: Added.
(async waitForFCP):
* performance-api/paint-timing/resources/paint-timing-api.js: Added.
* performance-api/paint-timing/resources/worker.html: Added.
Canonical link: https://commits.webkit.org/224044@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-28 22:34:52 +00:00
|
|
|
JSPerformancePaintTiming.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSPerformanceResourceTiming.cpp
|
2018-05-11 18:33:43 +00:00
|
|
|
JSPerformanceServerTiming.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSPerformanceTiming.cpp
|
|
|
|
JSPeriodicWave.cpp
|
2020-07-23 19:22:39 +00:00
|
|
|
JSPeriodicWaveConstraints.cpp
|
|
|
|
JSPeriodicWaveOptions.cpp
|
2019-10-15 22:06:23 +00:00
|
|
|
JSPictureInPictureWindow.cpp
|
[Web Animations] Implement Element.animate()
https://bugs.webkit.org/show_bug.cgi?id=180402
<rdar://problem/35851353>
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Rebaselining a few tests using Element.animate(). They still fail, but no longer on
the Element.animate() calls.
* web-platform-tests/css-timing-1/cubic-bezier-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/frames-timing-functions-output-expected.txt:
* web-platform-tests/css-timing-1/step-timing-functions-output-expected.txt:
Source/WebCore:
Now that we have added support for play() (webkit.org/b/178932) on Animation and parsing of multiple keyframes
(webkit.org/b/179708), we can add support Element.animate(). To support this simple task, we must add a series
of new IDL interfaces to support option parameters for Element.animate() (KeyframeAnimationOptions),
AnimationEffect (AnimationEffectTimingProperties), KeyframeEffect (KeyframeEffectOptions) and supporting
types CompositeOperation, FillMode, IterationCompositeOperation and PlaybackDirection. While we do not support
most parameters of those types, we at least define them for future support.
To support the most used form of the Element.animate() constructor across the WPT tests, we add support for
specifying the duration of an animation when constructing both a KeyframeEffect and calling Element.animate(),
either via a property on an options dictionary or as a double value.
The implementation of Element.animate() itself is relatively straightforward, we just need to create a supporting
KeyframeEffect based on the options provided, then an Animation with that effect set on it, and finally call play().
We also fix one crash that came up in WPT tests where we would try to access the DOMWindow when none was available
in http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context.html.
* CMakeLists.txt: Add new IDL files.
* DerivedSources.make: Add new IDL files.
* Sources.txt: Add new generated JS bindings.
* WebCore.xcodeproj/project.pbxproj: Add new IDL, header and C++ files.
* animation/Animatable.idl: Expose the animate() method.
* animation/AnimationEffectTiming.cpp:
(WebCore::AnimationEffectTiming::setBindingsDuration): Make the duration property spec-compliant and expect the right
kind of type (unrestricted double or DOMString).
* animation/AnimationEffectTiming.h:
* animation/AnimationEffectTiming.idl:
* animation/AnimationEffectTimingProperties.h: Added.
* animation/AnimationEffectTimingProperties.idl: Added.
* animation/CompositeOperation.h: Added.
* animation/CompositeOperation.idl: Added.
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::currentTime): Check that there is DOMWindow before proceeding to querying the current time
through it, fixes a newly-apparent crash.
* animation/FillMode.h: Added.
* animation/FillMode.idl: Added.
* animation/IterationCompositeOperation.h: Added.
* animation/IterationCompositeOperation.idl: Added.
* animation/KeyframeAnimationOptions.h: Added.
* animation/KeyframeAnimationOptions.idl: Added.
* animation/KeyframeEffect.cpp: Update types that are no longer defined under KeyframeEffect.
(WebCore::processIterableKeyframes):
(WebCore::processPropertyIndexedKeyframes):
(WebCore::KeyframeEffect::create): Add support for duration provided either directly as a double or through KeyframeEffectOptions.
* animation/KeyframeEffect.h:
* animation/KeyframeEffect.idl:
* animation/KeyframeEffectOptions.h: Added.
* animation/KeyframeEffectOptions.idl: Added.
* animation/PlaybackDirection.h: Added.
* animation/PlaybackDirection.idl: Added.
* dom/Element.cpp:
(WebCore::Element::animate): Implement Element.animate().
* dom/Element.h:
LayoutTests:
Turning on Element.animate() means that a ton of WPT tests that would immediately fail when Element.animate()
was used now progressed to either PASS, FAIL or TIMEOUT. We update the output to match the updated behavior
and TestExpectations for some cases of flaky outputs due to incomplete implementations that had not surfaced
until now.
We're also removing a Blink test that uses Web Animations to animate a bogus "rotate" property.
* TestExpectations:
* http/wpt/web-animations/animation-model/animation-types/discrete-animation-expected.txt:
* http/wpt/web-animations/animation-model/combining-effects/effect-composition-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-transformed-distance-expected.txt:
* http/wpt/web-animations/animation-model/keyframe-effects/effect-value-visibility-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-no-browsing-context-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/Animation/cancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/effect-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finished-expected.txt:
* http/wpt/web-animations/interfaces/Animation/id-expected.txt:
* http/wpt/web-animations/interfaces/Animation/oncancel-expected.txt:
* http/wpt/web-animations/interfaces/Animation/onfinish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/pause-expected.txt:
* http/wpt/web-animations/interfaces/Animation/play-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playState-expected.txt:
* http/wpt/web-animations/interfaces/Animation/playbackRate-expected.txt:
* http/wpt/web-animations/interfaces/Animation/ready-expected.txt:
* http/wpt/web-animations/interfaces/Animation/startTime-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/delay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/direction-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/duration-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/easing-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/fill-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/getComputedStyle-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationTimeline/document-timeline-expected.txt:
* http/wpt/web-animations/interfaces/Document/getAnimations-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/composite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/iterationComposite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/setTarget-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/active-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/current-iteration-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/local-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/phases-and-states-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt:
* http/wpt/web-animations/timing-model/animations/canceling-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/finishing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/pausing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/playing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/reversing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:
* http/wpt/web-animations/timing-model/time-transformations/transformed-progress-expected.txt:
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees-expected.html: Removed.
* imported/blink/virtual/threaded/animations/compositor-rotate-zero-degrees.html: Removed.
Canonical link: https://commits.webkit.org/197013@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-24 13:57:42 +00:00
|
|
|
JSPlaybackDirection.cpp
|
2018-09-22 00:51:47 +00:00
|
|
|
JSPointerEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSPopStateEvent.cpp
|
|
|
|
JSPositionCallback.cpp
|
|
|
|
JSPositionErrorCallback.cpp
|
|
|
|
JSPositionOptions.cpp
|
2019-12-13 21:36:25 +00:00
|
|
|
JSPostMessageOptions.cpp
|
2021-05-05 16:36:55 +00:00
|
|
|
JSPredefinedColorSpace.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSProcessingInstruction.cpp
|
|
|
|
JSProgressEvent.cpp
|
|
|
|
JSPromiseRejectionEvent.cpp
|
2018-01-02 20:28:31 +00:00
|
|
|
JSPublicKeyCredential.cpp
|
2018-01-16 23:08:44 +00:00
|
|
|
JSPublicKeyCredentialCreationOptions.cpp
|
|
|
|
JSPublicKeyCredentialDescriptor.cpp
|
|
|
|
JSPublicKeyCredentialRequestOptions.cpp
|
|
|
|
JSPublicKeyCredentialType.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCAnswerOptions.cpp
|
2018-10-15 20:52:15 +00:00
|
|
|
JSRTCCertificate.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCConfiguration.cpp
|
|
|
|
JSRTCDTMFSender.cpp
|
|
|
|
JSRTCDTMFToneChangeEvent.cpp
|
|
|
|
JSRTCDataChannel.cpp
|
|
|
|
JSRTCDataChannelEvent.cpp
|
2018-09-12 19:23:49 +00:00
|
|
|
JSRTCDegradationPreference.cpp
|
|
|
|
JSRTCDtxStatus.cpp
|
2021-08-19 07:36:49 +00:00
|
|
|
JSRTCDtlsTransport.cpp
|
|
|
|
JSRTCDtlsTransportState.cpp
|
2020-11-20 12:25:32 +00:00
|
|
|
JSRTCEncodedAudioFrame.cpp
|
|
|
|
JSRTCEncodedVideoFrame.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCIceCandidate.cpp
|
2020-09-02 16:19:52 +00:00
|
|
|
JSRTCIceCandidateInit.cpp
|
2020-09-07 12:37:37 +00:00
|
|
|
JSRTCIceCandidateType.cpp
|
|
|
|
JSRTCIceComponent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCIceConnectionState.cpp
|
|
|
|
JSRTCIceGatheringState.cpp
|
2020-09-07 12:37:37 +00:00
|
|
|
JSRTCIceProtocol.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCIceServer.cpp
|
2020-09-07 12:37:37 +00:00
|
|
|
JSRTCIceTcpCandidateType.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCIceTransport.cpp
|
|
|
|
JSRTCIceTransportState.cpp
|
|
|
|
JSRTCOfferAnswerOptions.cpp
|
|
|
|
JSRTCOfferOptions.cpp
|
|
|
|
JSRTCPeerConnection.cpp
|
|
|
|
JSRTCPeerConnectionIceEvent.cpp
|
2020-11-20 11:05:32 +00:00
|
|
|
JSRTCPeerConnectionIceErrorEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCPeerConnectionState.cpp
|
2018-09-12 19:23:49 +00:00
|
|
|
JSRTCPriorityType.cpp
|
2021-01-27 08:36:19 +00:00
|
|
|
JSRTCRtcpParameters.cpp
|
2018-11-07 04:01:49 +00:00
|
|
|
JSRTCRtpCapabilities.cpp
|
2020-01-01 12:55:46 +00:00
|
|
|
JSRTCRtpCodecCapability.cpp
|
2018-09-12 19:23:49 +00:00
|
|
|
JSRTCRtpCodecParameters.cpp
|
2018-09-18 18:29:06 +00:00
|
|
|
JSRTCRtpContributingSource.cpp
|
2018-09-12 19:23:49 +00:00
|
|
|
JSRTCRtpEncodingParameters.cpp
|
|
|
|
JSRTCRtpFecParameters.cpp
|
|
|
|
JSRTCRtpHeaderExtensionParameters.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCRtpParameters.cpp
|
|
|
|
JSRTCRtpReceiver.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSRTCRtpRtxParameters.cpp
|
2020-11-15 17:59:54 +00:00
|
|
|
JSRTCRtpSFrameTransform.cpp
|
2021-08-12 09:37:05 +00:00
|
|
|
JSRTCRtpSFrameTransformErrorEvent.cpp
|
2020-11-20 12:25:32 +00:00
|
|
|
JSRTCRtpScriptTransform.cpp
|
|
|
|
JSRTCRtpScriptTransformer.cpp
|
2018-09-13 15:31:04 +00:00
|
|
|
JSRTCRtpSendParameters.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCRtpSender.cpp
|
2018-09-18 18:29:06 +00:00
|
|
|
JSRTCRtpSynchronizationSource.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCRtpTransceiver.cpp
|
|
|
|
JSRTCRtpTransceiverDirection.cpp
|
2020-09-02 16:19:52 +00:00
|
|
|
JSRTCSdpType.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCSessionDescription.cpp
|
2020-09-02 16:19:52 +00:00
|
|
|
JSRTCSessionDescriptionInit.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRTCSignalingState.cpp
|
|
|
|
JSRTCStatsReport.cpp
|
|
|
|
JSRTCTrackEvent.cpp
|
2021-03-13 11:11:28 +00:00
|
|
|
JSRTCTransformEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRadioNodeList.cpp
|
|
|
|
JSRange.cpp
|
|
|
|
JSReadableByteStreamController.cpp
|
|
|
|
JSReadableStream.cpp
|
|
|
|
JSReadableStreamBYOBReader.cpp
|
|
|
|
JSReadableStreamBYOBRequest.cpp
|
|
|
|
JSReadableStreamDefaultController.cpp
|
|
|
|
JSReadableStreamDefaultReader.cpp
|
|
|
|
JSReadableStreamSink.cpp
|
|
|
|
JSReadableStreamSource.cpp
|
2018-04-17 16:59:34 +00:00
|
|
|
JSRemoteDOMWindow.cpp
|
2020-07-03 23:56:31 +00:00
|
|
|
JSRemotePlayback.cpp
|
|
|
|
JSRemotePlaybackAvailabilityCallback.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRequestAnimationFrameCallback.cpp
|
2019-03-29 08:37:46 +00:00
|
|
|
JSResizeObserver.cpp
|
|
|
|
JSResizeObserverCallback.cpp
|
|
|
|
JSResizeObserverEntry.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSRsaHashedImportParams.cpp
|
|
|
|
JSRsaHashedKeyGenParams.cpp
|
|
|
|
JSRsaKeyGenParams.cpp
|
|
|
|
JSRsaOaepParams.cpp
|
|
|
|
JSRsaOtherPrimesInfo.cpp
|
|
|
|
JSRsaPssParams.cpp
|
|
|
|
JSSQLError.cpp
|
|
|
|
JSSQLResultSet.cpp
|
|
|
|
JSSQLResultSetRowList.cpp
|
|
|
|
JSSQLStatementCallback.cpp
|
|
|
|
JSSQLStatementErrorCallback.cpp
|
|
|
|
JSSQLTransaction.cpp
|
|
|
|
JSSQLTransactionCallback.cpp
|
|
|
|
JSSQLTransactionErrorCallback.cpp
|
|
|
|
JSSVGAElement.cpp
|
|
|
|
JSSVGAltGlyphDefElement.cpp
|
|
|
|
JSSVGAltGlyphElement.cpp
|
|
|
|
JSSVGAltGlyphItemElement.cpp
|
|
|
|
JSSVGAngle.cpp
|
|
|
|
JSSVGAnimateColorElement.cpp
|
|
|
|
JSSVGAnimateElement.cpp
|
|
|
|
JSSVGAnimateMotionElement.cpp
|
|
|
|
JSSVGAnimateTransformElement.cpp
|
|
|
|
JSSVGAnimatedAngle.cpp
|
|
|
|
JSSVGAnimatedBoolean.cpp
|
|
|
|
JSSVGAnimatedEnumeration.cpp
|
|
|
|
JSSVGAnimatedInteger.cpp
|
|
|
|
JSSVGAnimatedLength.cpp
|
|
|
|
JSSVGAnimatedLengthList.cpp
|
|
|
|
JSSVGAnimatedNumber.cpp
|
|
|
|
JSSVGAnimatedNumberList.cpp
|
|
|
|
JSSVGAnimatedPreserveAspectRatio.cpp
|
|
|
|
JSSVGAnimatedRect.cpp
|
|
|
|
JSSVGAnimatedString.cpp
|
|
|
|
JSSVGAnimatedTransformList.cpp
|
|
|
|
JSSVGAnimationElement.cpp
|
|
|
|
JSSVGCircleElement.cpp
|
|
|
|
JSSVGClipPathElement.cpp
|
|
|
|
JSSVGComponentTransferFunctionElement.cpp
|
|
|
|
JSSVGCursorElement.cpp
|
|
|
|
JSSVGDefsElement.cpp
|
|
|
|
JSSVGDescElement.cpp
|
|
|
|
JSSVGElement.cpp
|
|
|
|
JSSVGEllipseElement.cpp
|
|
|
|
JSSVGFEBlendElement.cpp
|
|
|
|
JSSVGFEColorMatrixElement.cpp
|
|
|
|
JSSVGFEComponentTransferElement.cpp
|
|
|
|
JSSVGFECompositeElement.cpp
|
|
|
|
JSSVGFEConvolveMatrixElement.cpp
|
|
|
|
JSSVGFEDiffuseLightingElement.cpp
|
|
|
|
JSSVGFEDisplacementMapElement.cpp
|
|
|
|
JSSVGFEDistantLightElement.cpp
|
|
|
|
JSSVGFEDropShadowElement.cpp
|
|
|
|
JSSVGFEFloodElement.cpp
|
|
|
|
JSSVGFEFuncAElement.cpp
|
|
|
|
JSSVGFEFuncBElement.cpp
|
|
|
|
JSSVGFEFuncGElement.cpp
|
|
|
|
JSSVGFEFuncRElement.cpp
|
|
|
|
JSSVGFEGaussianBlurElement.cpp
|
|
|
|
JSSVGFEImageElement.cpp
|
|
|
|
JSSVGFEMergeElement.cpp
|
|
|
|
JSSVGFEMergeNodeElement.cpp
|
|
|
|
JSSVGFEMorphologyElement.cpp
|
|
|
|
JSSVGFEOffsetElement.cpp
|
|
|
|
JSSVGFEPointLightElement.cpp
|
|
|
|
JSSVGFESpecularLightingElement.cpp
|
|
|
|
JSSVGFESpotLightElement.cpp
|
|
|
|
JSSVGFETileElement.cpp
|
|
|
|
JSSVGFETurbulenceElement.cpp
|
|
|
|
JSSVGFilterElement.cpp
|
|
|
|
JSSVGFilterPrimitiveStandardAttributes.cpp
|
|
|
|
JSSVGFitToViewBox.cpp
|
|
|
|
JSSVGFontElement.cpp
|
|
|
|
JSSVGFontFaceElement.cpp
|
|
|
|
JSSVGFontFaceFormatElement.cpp
|
|
|
|
JSSVGFontFaceNameElement.cpp
|
|
|
|
JSSVGFontFaceSrcElement.cpp
|
|
|
|
JSSVGFontFaceUriElement.cpp
|
|
|
|
JSSVGForeignObjectElement.cpp
|
|
|
|
JSSVGGElement.cpp
|
2018-04-20 01:00:40 +00:00
|
|
|
JSSVGGeometryElement.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSSVGGlyphElement.cpp
|
|
|
|
JSSVGGlyphRefElement.cpp
|
|
|
|
JSSVGGradientElement.cpp
|
|
|
|
JSSVGGraphicsElement.cpp
|
|
|
|
JSSVGHKernElement.cpp
|
|
|
|
JSSVGImageElement.cpp
|
|
|
|
JSSVGLength.cpp
|
|
|
|
JSSVGLengthList.cpp
|
|
|
|
JSSVGLineElement.cpp
|
|
|
|
JSSVGLinearGradientElement.cpp
|
|
|
|
JSSVGMPathElement.cpp
|
|
|
|
JSSVGMarkerElement.cpp
|
|
|
|
JSSVGMaskElement.cpp
|
|
|
|
JSSVGMatrix.cpp
|
|
|
|
JSSVGMetadataElement.cpp
|
|
|
|
JSSVGMissingGlyphElement.cpp
|
|
|
|
JSSVGNumber.cpp
|
|
|
|
JSSVGNumberList.cpp
|
|
|
|
JSSVGPathElement.cpp
|
|
|
|
JSSVGPathSeg.cpp
|
|
|
|
JSSVGPathSegArcAbs.cpp
|
|
|
|
JSSVGPathSegArcRel.cpp
|
|
|
|
JSSVGPathSegClosePath.cpp
|
|
|
|
JSSVGPathSegCurvetoCubicAbs.cpp
|
|
|
|
JSSVGPathSegCurvetoCubicRel.cpp
|
|
|
|
JSSVGPathSegCurvetoCubicSmoothAbs.cpp
|
|
|
|
JSSVGPathSegCurvetoCubicSmoothRel.cpp
|
|
|
|
JSSVGPathSegCurvetoQuadraticAbs.cpp
|
|
|
|
JSSVGPathSegCurvetoQuadraticRel.cpp
|
|
|
|
JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp
|
|
|
|
JSSVGPathSegCurvetoQuadraticSmoothRel.cpp
|
|
|
|
JSSVGPathSegLinetoAbs.cpp
|
|
|
|
JSSVGPathSegLinetoHorizontalAbs.cpp
|
|
|
|
JSSVGPathSegLinetoHorizontalRel.cpp
|
|
|
|
JSSVGPathSegLinetoRel.cpp
|
|
|
|
JSSVGPathSegLinetoVerticalAbs.cpp
|
|
|
|
JSSVGPathSegLinetoVerticalRel.cpp
|
|
|
|
JSSVGPathSegList.cpp
|
|
|
|
JSSVGPathSegMovetoAbs.cpp
|
|
|
|
JSSVGPathSegMovetoRel.cpp
|
|
|
|
JSSVGPatternElement.cpp
|
|
|
|
JSSVGPoint.cpp
|
|
|
|
JSSVGPointList.cpp
|
|
|
|
JSSVGPolygonElement.cpp
|
|
|
|
JSSVGPolylineElement.cpp
|
|
|
|
JSSVGPreserveAspectRatio.cpp
|
|
|
|
JSSVGRadialGradientElement.cpp
|
|
|
|
JSSVGRect.cpp
|
|
|
|
JSSVGRectElement.cpp
|
|
|
|
JSSVGRenderingIntent.cpp
|
|
|
|
JSSVGSVGElement.cpp
|
|
|
|
JSSVGScriptElement.cpp
|
|
|
|
JSSVGSetElement.cpp
|
|
|
|
JSSVGStopElement.cpp
|
|
|
|
JSSVGStringList.cpp
|
|
|
|
JSSVGStyleElement.cpp
|
|
|
|
JSSVGSwitchElement.cpp
|
|
|
|
JSSVGSymbolElement.cpp
|
|
|
|
JSSVGTRefElement.cpp
|
|
|
|
JSSVGTSpanElement.cpp
|
|
|
|
JSSVGTests.cpp
|
|
|
|
JSSVGTextContentElement.cpp
|
|
|
|
JSSVGTextElement.cpp
|
|
|
|
JSSVGTextPathElement.cpp
|
|
|
|
JSSVGTextPositioningElement.cpp
|
|
|
|
JSSVGTitleElement.cpp
|
|
|
|
JSSVGTransform.cpp
|
|
|
|
JSSVGTransformList.cpp
|
|
|
|
JSSVGURIReference.cpp
|
|
|
|
JSSVGUnitTypes.cpp
|
|
|
|
JSSVGUseElement.cpp
|
|
|
|
JSSVGVKernElement.cpp
|
|
|
|
JSSVGViewElement.cpp
|
|
|
|
JSSVGViewSpec.cpp
|
|
|
|
JSSVGZoomAndPan.cpp
|
|
|
|
JSSVGZoomEvent.cpp
|
|
|
|
JSScreen.cpp
|
|
|
|
JSScriptProcessorNode.cpp
|
2020-01-18 05:49:24 +00:00
|
|
|
JSScrollBehavior.cpp
|
2018-09-05 05:19:58 +00:00
|
|
|
JSScrollIntoViewOptions.cpp
|
|
|
|
JSScrollLogicalPosition.cpp
|
2020-01-18 05:49:24 +00:00
|
|
|
JSScrollOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSScrollToOptions.cpp
|
|
|
|
JSSecurityPolicyViolationEvent.cpp
|
|
|
|
JSServiceWorker.cpp
|
|
|
|
JSServiceWorkerClient.cpp
|
2017-10-25 19:36:08 +00:00
|
|
|
JSServiceWorkerClientType.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSServiceWorkerClients.cpp
|
|
|
|
JSServiceWorkerContainer.cpp
|
|
|
|
JSServiceWorkerGlobalScope.cpp
|
|
|
|
JSServiceWorkerRegistration.cpp
|
|
|
|
JSServiceWorkerUpdateViaCache.cpp
|
|
|
|
JSServiceWorkerWindowClient.cpp
|
|
|
|
JSShadowRoot.cpp
|
2020-12-01 15:21:33 +00:00
|
|
|
JSShadowRootInit.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSShadowRootMode.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSShareData.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSSlotable.cpp
|
|
|
|
JSSourceBuffer.cpp
|
|
|
|
JSSourceBufferList.cpp
|
2020-10-20 21:54:36 +00:00
|
|
|
JSSpeechRecognition.cpp
|
|
|
|
JSSpeechRecognitionAlternative.cpp
|
|
|
|
JSSpeechRecognitionErrorCode.cpp
|
|
|
|
JSSpeechRecognitionErrorEvent.cpp
|
|
|
|
JSSpeechRecognitionEvent.cpp
|
|
|
|
JSSpeechRecognitionResult.cpp
|
|
|
|
JSSpeechRecognitionResultList.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSSpeechSynthesis.cpp
|
|
|
|
JSSpeechSynthesisEvent.cpp
|
|
|
|
JSSpeechSynthesisUtterance.cpp
|
|
|
|
JSSpeechSynthesisVoice.cpp
|
2020-08-20 20:44:25 +00:00
|
|
|
JSStereoPannerNode.cpp
|
|
|
|
JSStereoPannerOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSStaticRange.cpp
|
|
|
|
JSStorage.cpp
|
|
|
|
JSStorageEvent.cpp
|
|
|
|
JSStringCallback.cpp
|
|
|
|
JSStyleMedia.cpp
|
2018-12-18 18:51:05 +00:00
|
|
|
JSStylePropertyMap.cpp
|
2018-11-08 05:29:59 +00:00
|
|
|
JSStylePropertyMapReadOnly.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSStyleSheet.cpp
|
|
|
|
JSStyleSheetList.cpp
|
2021-07-16 06:52:15 +00:00
|
|
|
JSSubmitEvent.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSSubtleCrypto.cpp
|
|
|
|
JSText.cpp
|
|
|
|
JSTextDecoder.cpp
|
2020-08-31 09:01:55 +00:00
|
|
|
JSTextDecoderStream.cpp
|
|
|
|
JSTextDecoderStreamDecoder.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSTextEncoder.cpp
|
2020-08-30 09:53:17 +00:00
|
|
|
JSTextEncoderStream.cpp
|
|
|
|
JSTextEncoderStreamEncoder.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSTextEvent.cpp
|
|
|
|
JSTextMetrics.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSTextTrack.cpp
|
|
|
|
JSTextTrackCue.cpp
|
|
|
|
JSTextTrackCueGeneric.cpp
|
|
|
|
JSTextTrackCueList.cpp
|
|
|
|
JSTextTrackList.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSTimeRanges.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSTrackEvent.cpp
|
2019-10-18 22:00:48 +00:00
|
|
|
JSTransferFunction.cpp
|
2020-08-27 10:00:20 +00:00
|
|
|
JSTransformStream.cpp
|
|
|
|
JSTransformStreamDefaultController.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSTransitionEvent.cpp
|
|
|
|
JSTreeWalker.cpp
|
2021-08-12 15:47:18 +00:00
|
|
|
JSCSSStyleImageValue.cpp
|
|
|
|
JSCSSNumericValue.cpp
|
|
|
|
JSCSSStyleValue.cpp
|
|
|
|
JSCSSUnitValue.cpp
|
|
|
|
JSCSSUnparsedValue.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSUIEvent.cpp
|
|
|
|
JSUIEventInit.cpp
|
|
|
|
JSURLSearchParams.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSUndoItem.cpp
|
|
|
|
JSUndoManager.cpp
|
2020-07-03 23:25:25 +00:00
|
|
|
JSUserMessageHandler.cpp
|
|
|
|
JSUserMessageHandlersNamespace.cpp
|
2018-11-08 10:29:58 +00:00
|
|
|
JSUserVerificationRequirement.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSVTTCue.cpp
|
|
|
|
JSVTTRegion.cpp
|
|
|
|
JSVTTRegionList.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSValidityState.cpp
|
2017-12-21 18:28:21 +00:00
|
|
|
JSVideoConfiguration.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSVideoPlaybackQuality.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSVideoTrack.cpp
|
|
|
|
JSVideoTrackList.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSVisibilityState.cpp
|
2017-11-22 22:20:26 +00:00
|
|
|
JSVisualViewport.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSVoidCallback.cpp
|
|
|
|
JSWaveShaperNode.cpp
|
2020-07-31 18:47:49 +00:00
|
|
|
JSWaveShaperOptions.cpp
|
2017-10-21 14:11:44 +00:00
|
|
|
JSWebAnimation.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSWebGL2RenderingContext.cpp
|
|
|
|
JSWebGLActiveInfo.cpp
|
|
|
|
JSWebGLBuffer.cpp
|
|
|
|
JSWebGLColorBufferFloat.cpp
|
|
|
|
JSWebGLCompressedTextureASTC.cpp
|
|
|
|
JSWebGLCompressedTextureATC.cpp
|
|
|
|
JSWebGLCompressedTextureETC.cpp
|
|
|
|
JSWebGLCompressedTextureETC1.cpp
|
|
|
|
JSWebGLCompressedTexturePVRTC.cpp
|
|
|
|
JSWebGLCompressedTextureS3TC.cpp
|
2020-08-31 18:59:08 +00:00
|
|
|
JSWebGLCompressedTextureS3TCsRGB.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSWebGLContextAttributes.cpp
|
|
|
|
JSWebGLContextEvent.cpp
|
|
|
|
JSWebGLDebugRendererInfo.cpp
|
|
|
|
JSWebGLDebugShaders.cpp
|
|
|
|
JSWebGLDepthTexture.cpp
|
|
|
|
JSWebGLDrawBuffers.cpp
|
|
|
|
JSWebGLFramebuffer.cpp
|
|
|
|
JSWebGLLoseContext.cpp
|
2021-01-21 01:42:45 +00:00
|
|
|
JSWebGLMultiDraw.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSWebGLProgram.cpp
|
|
|
|
JSWebGLQuery.cpp
|
|
|
|
JSWebGLRenderbuffer.cpp
|
|
|
|
JSWebGLRenderingContext.cpp
|
|
|
|
JSWebGLRenderingContextBase.cpp
|
|
|
|
JSWebGLSampler.cpp
|
|
|
|
JSWebGLShader.cpp
|
|
|
|
JSWebGLShaderPrecisionFormat.cpp
|
|
|
|
JSWebGLSync.cpp
|
|
|
|
JSWebGLTexture.cpp
|
|
|
|
JSWebGLTransformFeedback.cpp
|
|
|
|
JSWebGLUniformLocation.cpp
|
|
|
|
JSWebGLVertexArrayObject.cpp
|
|
|
|
JSWebGLVertexArrayObjectOES.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSWebKitAnimationEvent.cpp
|
2020-07-03 21:50:58 +00:00
|
|
|
JSWebKitMediaKeyError.cpp
|
|
|
|
JSWebKitMediaKeyMessageEvent.cpp
|
|
|
|
JSWebKitMediaKeyNeededEvent.cpp
|
|
|
|
JSWebKitMediaKeySession.cpp
|
|
|
|
JSWebKitMediaKeys.cpp
|
2020-07-03 23:25:25 +00:00
|
|
|
JSWebKitNamespace.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSWebKitPlaybackTargetAvailabilityEvent.cpp
|
|
|
|
JSWebKitPoint.cpp
|
|
|
|
JSWebKitTransitionEvent.cpp
|
|
|
|
JSWebSocket.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSWebXRBoundedReferenceSpace.cpp
|
|
|
|
JSWebXRFrame.cpp
|
|
|
|
JSWebXRInputSource.cpp
|
|
|
|
JSWebXRInputSourceArray.cpp
|
|
|
|
JSWebXRLayer.cpp
|
|
|
|
JSWebXRPose.cpp
|
|
|
|
JSWebXRReferenceSpace.cpp
|
|
|
|
JSWebXRRenderState.cpp
|
|
|
|
JSWebXRRigidTransform.cpp
|
|
|
|
JSWebXRSession.cpp
|
|
|
|
JSWebXRSpace.cpp
|
|
|
|
JSWebXRSystem.cpp
|
|
|
|
JSWebXRView.cpp
|
|
|
|
JSWebXRViewerPose.cpp
|
|
|
|
JSWebXRViewport.cpp
|
|
|
|
JSWebXRWebGLLayer.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSWheelEvent.cpp
|
|
|
|
JSWindowEventHandlers.cpp
|
|
|
|
JSWindowOrWorkerGlobalScope.cpp
|
|
|
|
JSWorker.cpp
|
|
|
|
JSWorkerGlobalScope.cpp
|
|
|
|
JSWorkerLocation.cpp
|
|
|
|
JSWorkerNavigator.cpp
|
|
|
|
JSWorkerType.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSWorklet.cpp
|
|
|
|
JSWorkletGlobalScope.cpp
|
2020-09-29 16:47:37 +00:00
|
|
|
JSWorkletOptions.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSWritableStream.cpp
|
2020-08-12 12:25:49 +00:00
|
|
|
JSWritableStreamDefaultController.cpp
|
|
|
|
JSWritableStreamDefaultWriter.cpp
|
2020-11-20 12:25:32 +00:00
|
|
|
JSWritableStreamSink.cpp
|
2017-10-20 07:50:29 +00:00
|
|
|
JSXMLDocument.cpp
|
|
|
|
JSXMLHttpRequest.cpp
|
|
|
|
JSXMLHttpRequestEventTarget.cpp
|
|
|
|
JSXMLHttpRequestProgressEvent.cpp
|
|
|
|
JSXMLHttpRequestUpload.cpp
|
|
|
|
JSXMLSerializer.cpp
|
|
|
|
JSXPathEvaluator.cpp
|
|
|
|
JSXPathExpression.cpp
|
|
|
|
JSXPathNSResolver.cpp
|
|
|
|
JSXPathResult.cpp
|
2020-03-16 15:49:47 +00:00
|
|
|
JSXREnvironmentBlendMode.cpp
|
|
|
|
JSXREye.cpp
|
|
|
|
JSXRFrameRequestCallback.cpp
|
|
|
|
JSXRHandedness.cpp
|
|
|
|
JSXRInputSourceEvent.cpp
|
|
|
|
JSXRInputSourcesChangeEvent.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSXRInteractionMode.cpp
|
2020-03-16 15:49:47 +00:00
|
|
|
JSXRReferenceSpaceEvent.cpp
|
|
|
|
JSXRReferenceSpaceType.cpp
|
|
|
|
JSXRRenderStateInit.cpp
|
|
|
|
JSXRSessionEvent.cpp
|
|
|
|
JSXRSessionInit.cpp
|
|
|
|
JSXRSessionMode.cpp
|
|
|
|
JSXRTargetRayMode.cpp
|
|
|
|
JSXRVisibilityState.cpp
|
|
|
|
JSXRWebGLLayerInit.cpp
|
2020-07-04 02:33:58 +00:00
|
|
|
JSXSLTProcessor.cpp
|