2020-07-03 23:23:48 +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-26 06:21:35 +00:00
|
|
|
|
2020-07-03 23:23:48 +00:00
|
|
|
JSApplePayCancelEvent.cpp
|
|
|
|
JSApplePayContactField.cpp
|
2021-06-08 22:15:18 +00:00
|
|
|
JSApplePayCouponCodeChangedEvent.cpp
|
|
|
|
JSApplePayCouponCodeDetails.cpp
|
|
|
|
JSApplePayCouponCodeUpdate.cpp
|
|
|
|
JSApplePayDateComponents.cpp
|
|
|
|
JSApplePayDateComponentsRange.cpp
|
2021-02-19 17:38:37 +00:00
|
|
|
JSApplePayDetailsUpdateBase.cpp
|
|
|
|
JSApplePayDetailsUpdateData.cpp
|
2020-07-03 23:23:48 +00:00
|
|
|
JSApplePayError.cpp
|
|
|
|
JSApplePayErrorCode.cpp
|
|
|
|
JSApplePayErrorContactField.cpp
|
|
|
|
JSApplePayInstallmentConfiguration.cpp
|
|
|
|
JSApplePayInstallmentItem.cpp
|
|
|
|
JSApplePayInstallmentItemType.cpp
|
|
|
|
JSApplePayInstallmentRetailChannel.cpp
|
|
|
|
JSApplePayLineItem.cpp
|
|
|
|
JSApplePayMerchantCapability.cpp
|
|
|
|
JSApplePayModifier.cpp
|
|
|
|
JSApplePayPayment.cpp
|
|
|
|
JSApplePayPaymentAuthorizationResult.cpp
|
|
|
|
JSApplePayPaymentAuthorizedEvent.cpp
|
|
|
|
JSApplePayPaymentContact.cpp
|
|
|
|
JSApplePayPaymentMethod.cpp
|
|
|
|
JSApplePayPaymentMethodSelectedEvent.cpp
|
|
|
|
JSApplePayPaymentMethodType.cpp
|
|
|
|
JSApplePayPaymentMethodUpdate.cpp
|
|
|
|
JSApplePayPaymentPass.cpp
|
|
|
|
JSApplePayPaymentRequest.cpp
|
2021-06-08 22:15:18 +00:00
|
|
|
JSApplePayPaymentTiming.cpp
|
|
|
|
JSApplePayRecurringPaymentDateUnit.cpp
|
2020-07-03 23:23:48 +00:00
|
|
|
JSApplePayRequest.cpp
|
|
|
|
JSApplePayRequestBase.cpp
|
|
|
|
JSApplePaySession.cpp
|
|
|
|
JSApplePaySessionError.cpp
|
|
|
|
JSApplePaySetup.cpp
|
|
|
|
JSApplePaySetupConfiguration.cpp
|
|
|
|
JSApplePaySetupFeature.cpp
|
|
|
|
JSApplePaySetupFeatureState.cpp
|
|
|
|
JSApplePaySetupFeatureType.cpp
|
2021-06-08 22:15:18 +00:00
|
|
|
JSApplePayShippingContactEditingMode.cpp
|
2020-07-03 23:23:48 +00:00
|
|
|
JSApplePayShippingContactSelectedEvent.cpp
|
|
|
|
JSApplePayShippingContactUpdate.cpp
|
|
|
|
JSApplePayShippingMethod.cpp
|
|
|
|
JSApplePayShippingMethodSelectedEvent.cpp
|
|
|
|
JSApplePayShippingMethodUpdate.cpp
|
|
|
|
JSApplePayValidateMerchantEvent.cpp
|
2020-10-02 16:39:47 +00:00
|
|
|
Modules/airplay/WebMediaSessionManager.cpp
|
2021-06-08 22:15:18 +00:00
|
|
|
Modules/applepay/ApplePayCouponCodeChangedEvent.cpp
|
2020-07-03 23:23:48 +00:00
|
|
|
Modules/applepay/ApplePayCancelEvent.cpp
|
|
|
|
Modules/applepay/ApplePayContactField.cpp
|
|
|
|
Modules/applepay/ApplePayMerchantCapability.cpp
|
|
|
|
Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp
|
|
|
|
Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp
|
|
|
|
Modules/applepay/ApplePayRequestBase.cpp
|
|
|
|
Modules/applepay/ApplePaySession.cpp
|
|
|
|
Modules/applepay/ApplePaySessionPaymentRequest.cpp
|
|
|
|
Modules/applepay/ApplePaySetup.cpp
|
|
|
|
Modules/applepay/ApplePaySetupFeature.mm
|
|
|
|
Modules/applepay/ApplePayShippingContactSelectedEvent.cpp
|
|
|
|
Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp
|
|
|
|
Modules/applepay/ApplePayValidateMerchantEvent.cpp
|
|
|
|
Modules/applepay/PaymentCoordinator.cpp
|
|
|
|
Modules/applepay/PaymentCoordinatorClient.cpp
|
|
|
|
Modules/applepay/PaymentInstallmentConfiguration.mm
|
|
|
|
Modules/applepay/PaymentRequestValidator.mm
|
|
|
|
Modules/applepay/PaymentSession.cpp
|
|
|
|
Modules/applepay/cocoa/PaymentAPIVersionCocoa.mm
|
|
|
|
Modules/applepay/cocoa/PaymentCocoa.mm
|
|
|
|
Modules/applepay/cocoa/PaymentContactCocoa.mm
|
|
|
|
Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm
|
|
|
|
Modules/applepay/cocoa/PaymentMethodCocoa.mm
|
|
|
|
Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm
|
|
|
|
Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm
|
|
|
|
Modules/applepay/paymentrequest/ApplePayPaymentHandler.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/ios/ClipboardImageReaderIOS.mm
|
|
|
|
Modules/async-clipboard/mac/ClipboardImageReaderMac.mm
|
2020-11-15 17:59:54 +00:00
|
|
|
Modules/mediastream/RTCRtpSFrameTransformerCocoa.cpp
|
[Model] [macOS] Add support for rendering model resources
https://bugs.webkit.org/show_bug.cgi?id=227530
<rdar://problem/79968206>
Reviewed by Dean Jackson.
Source/WebCore:
On macOS, ASVInlinePreview requires an instance in both the WebProcess and the UIProcess to exist with a matching UUID.
On the WebCore side, in the WebProcess, after writing the model resource as a file to disk, we create an instance when a
<model> element is created and message the UIProcess through the ChromeClient providing the UUID generated for it. When
the UIProcess is done processing this message, it will reply with another message which calls into
HTMLModelElement::inlinePreviewDidObtainContextId() with the matching UUID and a context ID for the remote context.
We can then set that remote context ID on our ASVInlinePreview instance.
We also introduce a HTMLModelElement::platformLayer() method such that RenderLayerBacking::updateConfiguration() can call
it to host the ASVInlinePreview layer.
* Modules/model-element/HTMLModelElement.cpp:
(WebCore::HTMLModelElement::~HTMLModelElement):
(WebCore::HTMLModelElement::setSourceURL):
(WebCore::HTMLModelElement::notifyFinished):
* Modules/model-element/HTMLModelElement.h:
* Modules/model-element/HTMLModelElementCocoa.mm: Added.
(WebCore::HTMLModelElement::createFile):
(WebCore::HTMLModelElement::clearFile):
(WebCore::HTMLModelElement::modelDidChange):
(WebCore::HTMLModelElement::inlinePreviewDidObtainContextId):
(WebCore::HTMLModelElement::platformLayer const):
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.cpp:
(WebCore::EmptyChromeClient::modelElementDidCreatePreview const):
* loader/EmptyClients.h:
* page/ChromeClient.h:
(WebCore::ChromeClient::modelElementDidCreatePreview const):
* platform/Logging.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
Source/WebCore/PAL:
Declare the ASVInlinePreview class for macOS.
* PAL.xcodeproj/project.pbxproj:
* pal/spi/mac/SystemPreviewSPI.h: Added.
Source/WebKit:
On macOS, ASVInlinePreview requires an instance in both the WebProcess and the UIProcess to exist with a matching UUID.
On the WebKit side, in the UIProcess, we receive a message from the WebProcess when the ASVInlinePreview in that process
was created with its generated UUID. We provide this to the ModelElementController, set the remote connection up and load
the file. When those tasks complete successfully we message back the WebProcess with the UUID and the provided ElementContext
to talk back to the HTMLModelElement instance that initiated the message to the UIProcess in the first place.
* UIProcess/Cocoa/ModelElementControllerCocoa.mm:
(WebKit::ModelElementController::modelElementDidCreatePreview):
* UIProcess/ModelElementController.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::modelElementDidCreatePreview):
(WebKit::WebPageProxy::modelElementPreviewDidObtainContextId):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::modelElementDidCreatePreview const):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::modelElementDidCreatePreview):
(WebKit::WebPage::modelElementPreviewDidObtainContextId):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Source/WTF:
Add a new compile-time flag indicating the availability of the ASVInlinePreview SPI on macOS.
We only define it when the header itself is present for now to avoid issues with older macOS
12 SDKs, but ultimately we will only use the macOS version check.
* wtf/PlatformHave.h:
Canonical link: https://commits.webkit.org/239307@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-01 06:32:12 +00:00
|
|
|
Modules/model-element/HTMLModelElementCocoa.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
Modules/plugins/QuickTimePluginReplacement.mm
|
|
|
|
Modules/plugins/YouTubePluginReplacement.cpp
|
2020-12-14 17:45:54 +00:00
|
|
|
Modules/speech/cocoa/SpeechRecognizerCocoa.mm
|
|
|
|
Modules/speech/cocoa/WebSpeechRecognizerTask.mm
|
|
|
|
Modules/speech/cocoa/WebSpeechRecognizerTaskMock.mm
|
2018-07-03 23:54:46 +00:00
|
|
|
Modules/webdatabase/cocoa/DatabaseManagerCocoa.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
accessibility/ios/AXObjectCacheIOS.mm
|
2020-07-03 23:23:48 +00:00
|
|
|
accessibility/ios/AccessibilityObjectIOS.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
|
2020-01-27 21:31:01 +00:00
|
|
|
accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
accessibility/mac/AXObjectCacheMac.mm
|
2019-02-12 22:55:33 +00:00
|
|
|
accessibility/mac/AccessibilityObjectBase.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
accessibility/mac/AccessibilityObjectMac.mm
|
2017-10-26 22:25:06 +00:00
|
|
|
accessibility/mac/WebAccessibilityObjectWrapperBase.mm @no-unify
|
2020-07-03 23:23:48 +00:00
|
|
|
accessibility/mac/WebAccessibilityObjectWrapperMac.mm @no-unify
|
2017-10-26 06:21:35 +00:00
|
|
|
bindings/js/ScriptControllerMac.mm
|
|
|
|
bridge/objc/ObjCRuntimeObject.mm @no-unify
|
|
|
|
bridge/objc/WebScriptObject.mm @no-unify
|
|
|
|
bridge/objc/objc_class.mm @no-unify
|
|
|
|
bridge/objc/objc_instance.mm @no-unify
|
|
|
|
bridge/objc/objc_runtime.mm @no-unify
|
|
|
|
bridge/objc/objc_utility.mm @no-unify
|
|
|
|
crypto/CommonCryptoUtilities.cpp
|
|
|
|
crypto/mac/CommonCryptoDERUtilities.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmAES_CBCMac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmAES_CFBMac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmAES_CTRMac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmAES_GCMMac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmAES_KWMac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmECDHMac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmECDSAMac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmHKDFMac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmHMACMac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp
|
|
|
|
crypto/mac/CryptoAlgorithmRegistryMac.cpp
|
|
|
|
crypto/mac/CryptoKeyECMac.cpp
|
|
|
|
crypto/mac/CryptoKeyMac.cpp
|
|
|
|
crypto/mac/CryptoKeyRSAMac.cpp
|
2020-11-15 17:59:54 +00:00
|
|
|
crypto/mac/CryptoUtilitiesCocoa.cpp
|
2017-10-26 06:21:35 +00:00
|
|
|
crypto/mac/SerializedCryptoKeyWrapMac.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
dom/DataTransferMac.mm
|
2019-02-13 13:34:43 +00:00
|
|
|
dom/ios/MouseEventIOS.cpp
|
2018-11-05 18:37:43 +00:00
|
|
|
dom/ios/PointerEventIOS.cpp
|
2018-02-22 03:49:05 +00:00
|
|
|
dom/ios/TouchEvents.cpp
|
[macOS] ImageOverlayController should paint selection quads instead of bounding rects
https://bugs.webkit.org/show_bug.cgi?id=225585
<rdar://problem/77725745>
Reviewed by Tim Horton.
Source/WebCore:
Teach `SelectionRectGatherer` (now renamed to `SelectionGeometryGatherer`) to emit quads, rather than bounding
rects around each quad. We use these quads in `ImageOverlayController` to render selection quads via page
overlay (i.e., in the case where the image containing the overlay is transparent).
Test: fast/images/image-extraction/mac/select-rotated-transparent-image-overlay.html
* Headers.cmake:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* editing/SelectionGeometryGatherer.cpp: Renamed from Source/WebCore/editing/SelectionRectGatherer.cpp.
Rename `SelectionRectGatherer` to `SelectionGeometryGatherer`, to reflect the fact that this helper class now
aggregates both selection quads and gap rects.
(WebCore::SelectionGeometryGatherer::SelectionGeometryGatherer):
(WebCore::SelectionGeometryGatherer::addQuad):
Rename `addRect` to `addQuad`, and make it take a `FloatQuad` instead.
(WebCore::SelectionGeometryGatherer::addGapRects):
(WebCore::SelectionGeometryGatherer::Notifier::Notifier):
(WebCore::SelectionGeometryGatherer::Notifier::~Notifier):
(WebCore::SelectionGeometryGatherer::boundingRects const):
(WebCore::SelectionGeometryGatherer::clearAndCreateNotifier):
* editing/SelectionGeometryGatherer.h: Renamed from Source/WebCore/editing/SelectionRectGatherer.h.
(WebCore::SelectionGeometryGatherer::setTextOnly):
(WebCore::SelectionGeometryGatherer::isTextOnly const):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::updateWithImageExtractionResult):
Minor tweak - don't add any margin around the word when the line only contains a single word.
* page/ImageOverlayController.cpp:
(WebCore::ImageOverlayController::selectionQuadsDidChange):
Rename `selectionRectsDidChange` to `selectionQuadsDidChange`, and take a `FloatQuad` in absolute coordinates
instead of a `LayoutRect`. Store these quads in `m_overlaySelectionQuads` (also renamed from
`m_overlaySelectionRects`).
(WebCore::ImageOverlayController::uninstallPageOverlayIfNeeded):
(WebCore::ImageOverlayController::drawRect):
Make a few changes when painting selections using the `ImageOverlayController`:
1. Instead of painting with `fillRect()`, coalesce all of the collected selection quads into a single `Path`
object, and pass that `Path` into `fillPath()`. This allows us to render each piece of selected content as a
quad instead of a bounding rect, and additionally prevents us from rendering overlapping selections
when using `ImageOverlayController`.
2. Clip selections to the absolute bounds of the image overlay host element's renderer, which prevents the new
selection quads from spilling out of the host element.
(WebCore::ImageOverlayController::selectionRectsDidChange): Deleted.
* page/ImageOverlayController.h:
* rendering/RenderSelectionInfo.cpp:
(WebCore::RenderSelectionInfo::RenderSelectionInfo):
* rendering/RenderSelectionInfo.h:
(WebCore::RenderSelectionInfo::collectedSelectionQuads const):
(WebCore::RenderSelectionInfo::collectedSelectionRects const): Deleted.
More minor refactoring: rename `collectedSelectionRects` to `collectedSelectionQuads`, and make it take the
original `FloatQuad` instead of the quad's bounding box.
* rendering/RenderText.cpp:
(WebCore::RenderText::collectSelectionGeometriesForLineBoxes):
* rendering/RenderText.h:
* rendering/SelectionRangeData.cpp:
(WebCore::SelectionRangeData::SelectionRangeData):
(WebCore::SelectionRangeData::set):
(WebCore::SelectionRangeData::apply):
* rendering/SelectionRangeData.h:
LayoutTests:
Add a new layout test to cover the change. Currently, the below test case renders a visible selection rect in
the image overlay since we render the bounding rect of the overlay text quad, which intersects with the image
overlay's bounds. However, the text quad is positioned outside of the image overlay, so there shouldn't be any
visible selection rect. As such, this test is expected to render the same content as a plain image (even without
an image overlay).
Unfortunately, I couldn't write a matching ref-test for the case where the selection rect is inside the bounds
of the image overlay, since doing so led to tiny subpixel differences between the transparent image case (using
`ImageOverlayController`) and the regular image overlay selection case.
* fast/images/image-extraction/mac/select-rotated-transparent-image-overlay-expected.html: Added.
* fast/images/image-extraction/mac/select-rotated-transparent-image-overlay.html: Added.
Canonical link: https://commits.webkit.org/237541@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-10 18:10:03 +00:00
|
|
|
editing/SelectionGeometryGatherer.cpp
|
2017-10-26 06:21:35 +00:00
|
|
|
editing/SmartReplaceCF.cpp
|
2020-03-08 00:26:17 +00:00
|
|
|
editing/cocoa/AlternativeTextContextController.mm
|
|
|
|
editing/cocoa/AlternativeTextUIController.mm
|
2019-07-09 21:30:05 +00:00
|
|
|
editing/cocoa/AutofillElements.cpp
|
2017-10-26 06:21:35 +00:00
|
|
|
editing/cocoa/DataDetection.mm
|
2018-11-29 22:59:07 +00:00
|
|
|
editing/cocoa/DictionaryLookup.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
editing/cocoa/EditorCocoa.mm
|
[macOS] Cannot change font size at selection until font panel is shown
https://bugs.webkit.org/show_bug.cgi?id=189295
<rdar://problem/35593389>
Reviewed by Ryosuke Niwa.
Source/WebCore:
Currently, attempting to alter the font size of currently selected editable text in WKWebView via menu items
will fail if the font panel has never been shown. This is because WebViewImpl::changeFontFromFontPanel, which is
responsible for converting the current font at the selection to the new font using -[NSFontManager convertFont:]
bails as a result of NSFontManager's currently selected font always being nil.
WKWebView is responsible for keeping NSFontManager up-to-date with the currently selected font; in fact, this
was initially the case in r180465, which introduced NSFontManager support in WebKit2 by propagating EditorState
updates that contained font information for the current selection. However, this regressed performance due to
selected font computation triggering extra layout passes; r180768 addressed this by introducing a mechanism for
requesting the font at the current selection, and only updating NSFontManager with the new selected font when
the shared font panel is visible (determined by KVO on NSFontPanel). However, this again regressed WKWebView
launch performance, due to KVO registration always forcing the shared NSFontPanel to be created. r182037
addressed this by only registering for KVO on the font panel if the WKWebView has been made editable (SPI on
WKWebView).
This leads to two issues when attempting to alter font attributes using macOS UI: (1) in web views that have not
been made editable using SPI, showing the font panel and attempting to change the font fails due to the selected
font staying nil, because we've never begun registering for KVO notifications on the font panel so we don't try
to keep the font manager up to date. (2) Even if the web view is made editable, if the font panel is never
shown, then the font manager still won't be kept up to date with the current selection, so changing fonts using
menu items still does not work.
We fix both of these problems by refactoring font manager support on WebKit2 such that an up-to-date selected
font in the UI process is no longer necessary in order to alter the font at the current selection. To do this,
we figure out what changes the NSFontManager would've made to the currently selected font in the UI process, and
then propagate this information to the web process, where we convert this information into an EditingStyle which
we apply to the current selection.
The code to both determine the attributes changed by NSFontManager and to convert these attributes into editing
styles to be applied via Editor already exists in WebKitLegacy, in WebHTMLView.mm. This patch moves this
existing logic into WebCore and teases it apart into two portions: the first portion probes NSFontManager to
determine which aspects of the font changed and constructs FontChanges, which captures these differences. The
second portion maps FontChanges to an EditingStyle, which can then be applied to the current selection. In
WebKitLegacy, we construct FontChanges using the font manager, and then immediately use it to create and apply
an EditingStyle. In WebKit, we construct FontChanges in the UI process using the font manager, and then send
this over to the web process via WebPage::changeFont, which then creates and applies the EditingStyle.
Note that this patch also introduces FontAttributeChanges, which is similar in concept to FontChanges, but
captures a broader range of changes possible via NSFontPanel. This was done so that we can eliminate all of the
font manager probing code (along with the two specimen fonts) from WebHTMLView, but is also necessary in order
to allow changing font shadow, strikethrough, and underlines via the font panel to work in WebKit2. This will be
fixed in a followup, by making FontAttributeChanges IPC encodable and by making WKWebView/WKView respond to the
-changeAttributes: selector.
Changes in behavior to WebKit2 are covered by new API tests; legacy WebKit behavior should remain unchanged.
Tests: FontManagerTests.ChangeFontSizeWithMenuItems
FontManagerTests.ChangeFontWithPanel
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* editing/Editor.h:
Remove applyFontStyles.
* editing/FontAttributeChanges.cpp: Added.
(WebCore::FontChanges::platformFontFamilyNameForCSS const):
Given a font family name and a font name, returns the string to use as the "font-family" style property value.
Originally from WebHTMLView.mm.
(WebCore::FontChanges::createEditingStyle const):
Converts font changes to an EditingStyle that can be used to apply these changes.
(WebCore::FontChanges::createStyleProperties const):
Introduce FontChanges, which encapsulates changes which are to be applied to the font in the current selection.
(WebCore::cssValueListForShadow):
(WebCore::FontAttributeChanges::createEditingStyle const):
Converts font attribute changes to an EditingStyle that can be used to apply these changes.
* editing/FontAttributeChanges.h: Added.
Introduce FontAttributeChanges, which encapsulates changes which are to be applied to the font attributes in the
current selection. This includes a set of FontChanges, as well as additional attributes such as strike-through
and underlines.
(WebCore::FontChanges::setFontName):
(WebCore::FontChanges::setFontFamily):
(WebCore::FontChanges::setFontSize):
(WebCore::FontChanges::setFontSizeDelta):
(WebCore::FontChanges::setBold):
(WebCore::FontChanges::setItalic):
(WebCore::FontAttributeChanges::setVerticalAlign):
(WebCore::FontAttributeChanges::setBackgroundColor):
(WebCore::FontAttributeChanges::setForegroundColor):
(WebCore::FontAttributeChanges::setShadow):
(WebCore::FontAttributeChanges::setStrikeThrough):
(WebCore::FontAttributeChanges::setUnderline):
(WebCore::FontAttributeChanges::setFontChanges):
Setters for FontChanges and FontAttributeChanges. Initially, most of these values are optional, indicating that
there should be no change.
(WebCore::FontChanges::encode const):
(WebCore::FontChanges::decode):
Add encoding/decoding support to FontChanges, so that it can be sent over IPC for WebKit2.
* editing/cocoa/FontAttributeChangesCocoa.mm: Added.
(WebCore::FontChanges::platformFontFamilyNameForCSS const):
Helper method to determine whether the font family or the font name should be used, by looking up the PostScript
font name using a FontDescriptor and comparing it against the result of -[NSFont fontName]. This logic was
originally in WebHTMLView.mm.
* editing/mac/EditorMac.mm:
(WebCore::Editor::applyFontStyles): Deleted.
* platform/mac/WebCoreNSFontManagerExtras.h: Added.
* platform/mac/WebCoreNSFontManagerExtras.mm: Added.
Add helper functions to compute FontChanges and FontAttributeChanges from NSFontManager.
(WebCore::firstFontConversionSpecimen):
(WebCore::secondFontConversionSpecimen):
Two "specimen fonts" used to determine what changes NSFontManager or NSFontPanel makes when performing font or
font attribute conversion. Moved from WebHTMLView.mm.
(WebCore::computedFontChanges):
(WebCore::computedFontAttributeChanges):
Moved here from WebHTMLView.mm. Instead of converting font attributes to NSStrings and setting properties on
DOMCSSStyleDeclaration, we instead specify properties on MutableStyleProperties using CSSValues.
Source/WebKit:
Refactors NSFontManager support in WebKit2. See WebCore ChangeLog for more details.
* Scripts/webkit/messages.py:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView changeFont:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView changeFont:]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::changeFontFromFontManager):
(WebKit::WebViewImpl::changeFontFromFontPanel): Deleted.
Renamed this from changeFontFromFontPanel to changeFontFromFontManager. This new name is more accurate in the
case where a menu item is used to alter the font, which doesn't involve NSFontPanel at all.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::changeFont):
(WebKit::WebPageProxy::setFont): Deleted.
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::changeFont):
(WebKit::WebPage::setFont): Deleted.
Source/WebKitLegacy/mac:
Remove code in WebKitLegacy for diffing NSFonts to figure out which style properties need to be changed. See
WebCore ChangeLog for more details.
* WebView/WebHTMLView.mm:
(-[WebHTMLView changeFont:]):
(-[WebHTMLView changeAttributes:]):
(-[WebHTMLView _originalFontA]): Deleted.
(-[WebHTMLView _originalFontB]): Deleted.
(fontNameForDescription): Deleted.
(-[WebHTMLView _addToStyle:fontA:fontB:]): Deleted.
(-[WebHTMLView _styleFromFontManagerOperation]): Deleted.
(-[WebHTMLView _styleForAttributeChange:]): Deleted.
Tools:
Add API tests to simulate using menu items to increase or decrease font size, and also simulate using
NSFontPanel to specify the font family, font size, and other traits.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/FontManagerTests.mm: Added.
(-[TestWKWebView selectedText]):
(-[TestWKWebView selectNextWord]):
(-[TestWKWebView stylePropertyAtSelectionStart:]):
(-[TestWKWebView stylePropertyAtSelectionEnd:]):
(webViewForFontManagerTesting):
(menuItemCellForFontAction):
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/204355@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-06 19:46:38 +00:00
|
|
|
editing/cocoa/FontAttributeChangesCocoa.mm
|
2018-09-25 00:17:29 +00:00
|
|
|
editing/cocoa/FontAttributesCocoa.mm
|
|
|
|
editing/cocoa/FontShadowCocoa.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
editing/cocoa/HTMLConverter.mm @no-unify
|
|
|
|
editing/cocoa/WebArchiveResourceFromNSAttributedString.mm
|
|
|
|
editing/cocoa/WebArchiveResourceWebResourceHandler.mm
|
|
|
|
editing/cocoa/WebContentReaderCocoa.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
editing/ios/DictationCommandIOS.cpp
|
|
|
|
editing/ios/EditorIOS.mm
|
2018-11-09 01:59:10 +00:00
|
|
|
editing/mac/DictionaryLookupLegacy.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
editing/mac/EditorMac.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
editing/mac/FrameSelectionMac.mm
|
2020-03-08 00:30:28 +00:00
|
|
|
editing/mac/TextAlternativeWithRange.mm @no-unify
|
2018-02-22 03:49:05 +00:00
|
|
|
editing/mac/TextUndoInsertionMarkupMac.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
fileapi/FileCocoa.mm
|
2020-07-03 23:23:48 +00:00
|
|
|
history/mac/HistoryItemMac.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
html/shadow/YouTubeEmbedShadowElement.cpp
|
2020-08-24 18:40:30 +00:00
|
|
|
inspector/mac/PageDebuggerMac.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
loader/archive/cf/LegacyWebArchive.cpp
|
|
|
|
loader/archive/cf/LegacyWebArchiveMac.mm
|
|
|
|
loader/cocoa/DiskCacheMonitorCocoa.mm
|
2021-02-19 23:15:22 +00:00
|
|
|
loader/cocoa/PrivateClickMeasurementCocoa.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
loader/cocoa/SubresourceLoaderCocoa.mm
|
2019-10-23 19:34:32 +00:00
|
|
|
loader/ios/LegacyPreviewLoader.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
loader/mac/DocumentLoaderMac.cpp
|
|
|
|
loader/mac/LoaderNSURLExtras.mm
|
|
|
|
loader/mac/ResourceLoaderMac.mm
|
|
|
|
page/CaptionUserPreferencesMediaAF.cpp
|
|
|
|
page/cocoa/MemoryReleaseCocoa.mm
|
|
|
|
page/cocoa/PerformanceLoggingCocoa.mm
|
|
|
|
page/cocoa/ResourceUsageOverlayCocoa.mm
|
|
|
|
page/cocoa/ResourceUsageThreadCocoa.mm
|
|
|
|
page/cocoa/SettingsBaseCocoa.mm
|
2021-05-11 17:46:40 +00:00
|
|
|
page/cocoa/WebTextIndicatorLayer.mm
|
2019-02-28 04:39:22 +00:00
|
|
|
page/ios/ContentChangeObserver.cpp
|
Typing into a cell in a Google Sheet lags behind by one character
https://bugs.webkit.org/show_bug.cgi?id=199587
<rdar://problem/51616845>
Reviewed by Brent Fulgham.
Source/WebCore:
Add a Google Sheets quirk. Put all DOM timers scheduled from keydown and keypress event listeners
into a holding tank. The timers continue to tick, but are barred from executing their action until
the next text insertion or deletion or 32 ms (on device) have elapsed, whichever is sooner. We only
allocate a holding tank once per document, only if the quirk is active, and this allocation is done
when the document schedules a timer on keydown or keypress. The holding tank lives for the lifetime
of the document.
The story behind the quirk:
On keypress Google Sheets schedules timers and expects that a DOM update will occur (i.e. text
will be inserted or deleted) within the same event loop iteration as the dispatched keypress. The
UI Events spec. [1] makes no such guarantee of when a DOM update must occur in relation to the keypress
event. It could happen in the same event loop iteration as the key press (as Google expects), the
next iteration, 500ms later, 2 minutes later, etc. What the spec does guarantee is that by the time
a DOM input event is dispatched that the DOM will be updated. And this is the solution to the problem
Google Sheets is trying to solve, but is doing so using pre-IE 9 technology (though similar
functionality was available via onpropertychange in IE < 9).
See also <https://github.com/w3c/uievents/issues/238>, which is tracking a spec. text update for
this quirk.
Test: fast/events/ios/dom-update-on-keydown-quirk.html
[1] <https://w3c.github.io/uievents/> (Editor's Draft, 14 October 2018)
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
Add some files to the project.
* dom/Document.cpp:
(WebCore::Document::domTimerHoldingTank): Added.
* dom/Document.h:
(WebCore::Document::domTimerHoldingTankIfExists): Added.
* page/DOMTimer.cpp:
(WebCore::DOMTimer::install): Put the newly instantiated timer into the holding tank.
(WebCore::DOMTimer::removeById): Remove the timer from the holding tank.
(WebCore::DOMTimer::fired): Check if the timer is in the holding tank. If it is and it is a one-
shot timer then schedule it for the next event loop iteration. If it's a repeating timer just
let it continue ticking. Otherwise, do what we no now and execute the timer's action. The reason
we do not suspend timers in the holding tank is because:
1. Far out timers (Google Sheets registers timers as far out as 5 minutes!) are not penalized.
Though smart supension logic could avoid this. See (3).
2. Empirical observations indicate that the keyboard will perform the insertion or deletion
reasonably quickly (not the same event loop iteration as the keydown, but within two iterations out).
So, the timers in the holding tank are short-lived.
3. Simplifies the code. There is no need to keep additional bookkeeping to track multiple timer
suspension reasons (timers currently can only have one suspension reason) or alternatively defer
scheduling a timer until a later time and computing a new "fair" firing time when scheduled.
* page/EventHandler.cpp:
(WebCore::EventHandler::internalKeyEvent): Place a token on the stack to put all DOM timers
scheduled on keydown and keypress into the holding tank if the quirk is enabled.
* page/Quirks.cpp:
(WebCore::Quirks::needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand const): Added.
* page/Quirks.h:
* page/Settings.yaml: Added setting so that this quirk can be enabled from a layout test. This setting
also lets us enable the quirk for all sites or for certain third-party apps if desired.
* page/ios/DOMTimerHoldingTank.cpp: Added.
(WebCore::DOMTimerHoldingTank::DOMTimerHoldingTank):
(WebCore::DOMTimerHoldingTank::add):
(WebCore::DOMTimerHoldingTank::remove):
(WebCore::DOMTimerHoldingTank::contains):
(WebCore::DOMTimerHoldingTank::removeAll):
(WebCore::DOMTimerHoldingTank::stopExceededMaximumHoldTimer):
* page/ios/DOMTimerHoldingTank.h: Added.
(WebCore::DeferDOMTimersForScope::DeferDOMTimersForScope):
(WebCore::DeferDOMTimersForScope::~DeferDOMTimersForScope):
(WebCore::DeferDOMTimersForScope::isDeferring):
Source/WebKit:
Remove all timers from the holding tank on text insertion or deletion (represented as an
editing command). Timers that were in the holding tank never stopped ticking and will now
be able to execute their action.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::executeEditingCommand):
(WebKit::WebPage::insertTextAsync):
(WebKit::WebPage::setCompositionAsync):
(WebKit::WebPage::confirmCompositionAsync):
Call platformWillPerformEditingCommand().
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::platformWillPerformEditingCommand): Added.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformWillPerformEditingCommand): Remove all the timers from the holding
tank if we have a holding tank.
LayoutTests:
Add a test that enables the quirk and ensures that the DOM is up-to-date on expiration of a
zero timer scheduled from keydown, keypress, keyup, and input.
* fast/events/ios/dom-update-on-keydown-quirk-expected.txt: Added.
* fast/events/ios/dom-update-on-keydown-quirk.html: Added.
Canonical link: https://commits.webkit.org/213750@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-17 20:06:04 +00:00
|
|
|
page/ios/DOMTimerHoldingTank.cpp
|
2018-02-22 03:49:05 +00:00
|
|
|
page/ios/EventHandlerIOS.mm
|
|
|
|
page/ios/FrameIOS.mm
|
|
|
|
page/ios/WebEventRegion.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
page/mac/ChromeMac.mm
|
|
|
|
page/mac/DragControllerMac.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
page/mac/EventHandlerMac.mm
|
2021-05-26 20:06:32 +00:00
|
|
|
page/mac/ImageOverlayControllerMac.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
page/mac/PageMac.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
page/mac/ServicesOverlayController.mm
|
|
|
|
page/mac/TextIndicatorWindow.mm
|
|
|
|
page/mac/WheelEventDeltaFilterMac.mm
|
2017-10-26 06:21:35 +00:00
|
|
|
page/scrolling/cocoa/ScrollingStateNode.mm
|
2019-02-05 04:34:56 +00:00
|
|
|
page/scrolling/cocoa/ScrollingTreeFixedNode.mm
|
2019-06-23 19:34:44 +00:00
|
|
|
page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm
|
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/cocoa/ScrollingTreePositionedNode.mm
|
2019-02-05 04:34:56 +00:00
|
|
|
page/scrolling/cocoa/ScrollingTreeStickyNode.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
page/scrolling/mac/ScrollingCoordinatorMac.mm
|
|
|
|
page/scrolling/mac/ScrollingMomentumCalculatorMac.mm
|
2019-03-04 16:57:38 +00:00
|
|
|
page/scrolling/mac/ScrollingStateScrollingNodeMac.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
|
2020-07-03 23:23:48 +00:00
|
|
|
page/scrolling/mac/ScrollingTreeMac.mm
|
2019-01-17 07:46:10 +00:00
|
|
|
page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm
|
2019-01-31 23:26:38 +00:00
|
|
|
page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/audio/AudioSession.cpp
|
2019-10-21 16:29:06 +00:00
|
|
|
platform/audio/cocoa/AudioDestinationCocoa.cpp
|
2021-02-10 20:34:18 +00:00
|
|
|
platform/audio/cocoa/AudioFileReaderCocoa.cpp
|
[Media in GPU Process] Use CARingBuffer to transfer audio data of an audio destination from a web process to the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=217715
Reviewed by Jer Noble.
Source/WebCore:
Decouple the audio output unit management from AudioDestinationCocoa so that
we can run it remotely in other processes, like the GPU process.
No new tests, no behavior change.
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/audio/AudioDestination.h: Export hardwareSampleRate().
* platform/audio/cocoa/AudioDestinationCocoa.cpp:
(WebCore::AudioDestination::create): Remove an unnecessary function call.
(WebCore::AudioDestinationCocoa::AudioDestinationCocoa): Add a parameter
configureAudioOutputUnit so that we can disable the AudioOutputUnitAdaptor in
AudioDestinationCocoa when we need to run the AudioOutputUnitAdaptor in another process.
(WebCore::AudioDestinationCocoa::start):
(WebCore::AudioDestinationCocoa::stop):
(WebCore::AudioDestinationCocoa::getAudioStreamBasicDescription):
Rename setAudioStreamBasicDescription() to getAudioStreamBasicDescription() because
the function essentially queries the description.
(WebCore::AudioDestinationCocoa::hasEnoughFrames const): Add this function
so that a subclass can check whether the FIFO has enough audio samples to render.
(WebCore::AudioDestinationCocoa::render): Replace the AudioTimeStamp* parameter
because we only need two fields of AudioTimeStamp in this function.
(WebCore::AudioDestinationCocoa::~AudioDestinationCocoa): Deleted.
(WebCore::AudioDestinationCocoa::setAudioStreamBasicDescription): Deleted.
(WebCore::AudioDestinationCocoa::inputProc): Deleted. This function is moved to
AudioOutputUnitAdaptor.
* platform/audio/cocoa/AudioDestinationCocoa.h:
(WebCore::AudioDestinationCocoa::outputUnit): Deleted.
* platform/audio/cocoa/AudioOutputUnitAdaptor.cpp: Added.
(WebCore::AudioOutputUnitAdaptor::AudioOutputUnitAdaptor):
(WebCore::AudioOutputUnitAdaptor::~AudioOutputUnitAdaptor):
(WebCore::AudioOutputUnitAdaptor::start):
(WebCore::AudioOutputUnitAdaptor::stop):
(WebCore::AudioOutputUnitAdaptor::inputProc):
* platform/audio/cocoa/AudioOutputUnitAdaptor.h: Added.
* platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp: Renamed from Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp.
(WebCore::AudioOutputUnitAdaptor::configure):
* platform/audio/mac/AudioOutputUnitAdaptorMac.cpp: Renamed from Source/WebCore/platform/audio/mac/AudioDestinationMac.cpp.
(WebCore::AudioOutputUnitAdaptor::configure):
* platform/mock/MockAudioDestinationCocoa.cpp:
(WebCore::MockAudioDestinationCocoa::tick):
Source/WebKit:
The current implementation of RemoteAudioDestination essentially runs the
AudioDestinationCocoa in the GPU process, which is not good because we are adding
AudioWorklet stuff into AudioDestinationCocoa, but the AudioWorklet stuff is
irrelevant to the GPU process.
What really needs to run in the GPU process (for Cocoa platforms at least) is the
audio output unit. This patch adds WebCore::AudioOutputUnitAdaptor and
WebCore::AudioUnitRenderer to implement that. With this patch, RemoteAudioDestination
in the GPU process is an AudioUnitRenderer and it embeds an AudioOutputUnitAdaptor
like AudioDestinationCocoa does in the Web process. Essentially, we run AudioOutputUnitAdaptor
remotely from the AudioDestinationCocoa's perspective.
Also, in the current implementation, the RemoteAudioDestinationProxy in a Web
process transfers audio data to the RemoteAudioDestination in the GPU process
with IPC messages (RemoteAudioBusData). This is not efficient because of the
large number of IPC messages for audio samples.
With this patch, RemoteAudioDestinationProxy (Web process) transfers audio samples
to RemoteAudioDestination(GPU process) with a CARingBuffer providing shared
buffers for the Web process and the GPU process.
* GPUProcess/media/RemoteAudioDestinationManager.cpp:
(WebKit::RemoteAudioDestination::create):
(WebKit::RemoteAudioDestination::~RemoteAudioDestination):
(WebKit::RemoteAudioDestination::audioSamplesStorageChanged):
(WebKit::RemoteAudioDestination::start):
(WebKit::RemoteAudioDestination::stop):
(WebKit::RemoteAudioDestination::isPlaying const):
(WebKit::RemoteAudioDestination::RemoteAudioDestination):
(WebKit::RemoteAudioDestination::storage):
(WebKit::RemoteAudioDestination::render):
(WebKit::RemoteAudioDestinationManager::createAudioDestination):
(WebKit::RemoteAudioDestinationManager::audioSamplesStorageChanged):
(WebKit::RemoteAudioDestination::isPlaying): Deleted.
(WebKit::RemoteAudioDestination::framesPerBuffer const): Deleted.
* GPUProcess/media/RemoteAudioDestinationManager.h:
(WebKit::RemoteAudioDestinationManager::didReceiveSyncMessageFromWebProcess):
* GPUProcess/media/RemoteAudioDestinationManager.messages.in:
Add a message AudioSamplesStorageChanged to support using CARingBuffer to
transmit audio samples to the GPU process.
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/media/RemoteAudioBusData.h: Removed.
* WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::RemoteAudioDestinationProxy):
(WebKit::RemoteAudioDestinationProxy::start):
(WebKit::RemoteAudioDestinationProxy::stop):
(WebKit::RemoteAudioDestinationProxy::requestBuffer):
(WebKit::RemoteAudioDestinationProxy::renderOnRenderingThead):
(WebKit::RemoteAudioDestinationProxy::storageChanged):
(WebKit::RemoteAudioDestinationProxy::renderBuffer): Deleted.
(WebKit::RemoteAudioDestinationProxy::didChangeIsPlaying): Deleted.
* WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
RemoteAudioDestinationProxy is a subclass of AudioDestinationCocoa. It pulls audio
samples from the WebAudio side and use a CARingBuffer to push audio samples to
the audio output unit (managed by RemoteAudioDestination) in the GPU process.
* WebProcess/GPU/media/RemoteAudioDestinationProxy.messages.in:
Add a message RequestBuffer, which can be used by RemoteAudioDestination to ask
for (pull) audio samples.
* WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp:
(WebKit::AudioMediaStreamTrackRenderer::pushSamples): A minor fix to get rid of
a type conversion.
Canonical link: https://commits.webkit.org/230590@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-17 04:18:37 +00:00
|
|
|
platform/audio/cocoa/AudioOutputUnitAdaptor.cpp
|
2020-10-09 17:10:13 +00:00
|
|
|
platform/audio/cocoa/AudioSampleBufferList.cpp
|
|
|
|
platform/audio/cocoa/AudioSampleDataSource.mm
|
|
|
|
platform/audio/cocoa/CAAudioStreamDescription.cpp
|
|
|
|
platform/audio/cocoa/CARingBuffer.cpp
|
2018-09-17 18:57:53 +00:00
|
|
|
platform/audio/cocoa/MediaSessionManagerCocoa.mm
|
2018-08-31 19:13:04 +00:00
|
|
|
platform/audio/cocoa/WebAudioBufferList.cpp
|
[Media in GPU Process] Use CARingBuffer to transfer audio data of an audio destination from a web process to the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=217715
Reviewed by Jer Noble.
Source/WebCore:
Decouple the audio output unit management from AudioDestinationCocoa so that
we can run it remotely in other processes, like the GPU process.
No new tests, no behavior change.
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/audio/AudioDestination.h: Export hardwareSampleRate().
* platform/audio/cocoa/AudioDestinationCocoa.cpp:
(WebCore::AudioDestination::create): Remove an unnecessary function call.
(WebCore::AudioDestinationCocoa::AudioDestinationCocoa): Add a parameter
configureAudioOutputUnit so that we can disable the AudioOutputUnitAdaptor in
AudioDestinationCocoa when we need to run the AudioOutputUnitAdaptor in another process.
(WebCore::AudioDestinationCocoa::start):
(WebCore::AudioDestinationCocoa::stop):
(WebCore::AudioDestinationCocoa::getAudioStreamBasicDescription):
Rename setAudioStreamBasicDescription() to getAudioStreamBasicDescription() because
the function essentially queries the description.
(WebCore::AudioDestinationCocoa::hasEnoughFrames const): Add this function
so that a subclass can check whether the FIFO has enough audio samples to render.
(WebCore::AudioDestinationCocoa::render): Replace the AudioTimeStamp* parameter
because we only need two fields of AudioTimeStamp in this function.
(WebCore::AudioDestinationCocoa::~AudioDestinationCocoa): Deleted.
(WebCore::AudioDestinationCocoa::setAudioStreamBasicDescription): Deleted.
(WebCore::AudioDestinationCocoa::inputProc): Deleted. This function is moved to
AudioOutputUnitAdaptor.
* platform/audio/cocoa/AudioDestinationCocoa.h:
(WebCore::AudioDestinationCocoa::outputUnit): Deleted.
* platform/audio/cocoa/AudioOutputUnitAdaptor.cpp: Added.
(WebCore::AudioOutputUnitAdaptor::AudioOutputUnitAdaptor):
(WebCore::AudioOutputUnitAdaptor::~AudioOutputUnitAdaptor):
(WebCore::AudioOutputUnitAdaptor::start):
(WebCore::AudioOutputUnitAdaptor::stop):
(WebCore::AudioOutputUnitAdaptor::inputProc):
* platform/audio/cocoa/AudioOutputUnitAdaptor.h: Added.
* platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp: Renamed from Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp.
(WebCore::AudioOutputUnitAdaptor::configure):
* platform/audio/mac/AudioOutputUnitAdaptorMac.cpp: Renamed from Source/WebCore/platform/audio/mac/AudioDestinationMac.cpp.
(WebCore::AudioOutputUnitAdaptor::configure):
* platform/mock/MockAudioDestinationCocoa.cpp:
(WebCore::MockAudioDestinationCocoa::tick):
Source/WebKit:
The current implementation of RemoteAudioDestination essentially runs the
AudioDestinationCocoa in the GPU process, which is not good because we are adding
AudioWorklet stuff into AudioDestinationCocoa, but the AudioWorklet stuff is
irrelevant to the GPU process.
What really needs to run in the GPU process (for Cocoa platforms at least) is the
audio output unit. This patch adds WebCore::AudioOutputUnitAdaptor and
WebCore::AudioUnitRenderer to implement that. With this patch, RemoteAudioDestination
in the GPU process is an AudioUnitRenderer and it embeds an AudioOutputUnitAdaptor
like AudioDestinationCocoa does in the Web process. Essentially, we run AudioOutputUnitAdaptor
remotely from the AudioDestinationCocoa's perspective.
Also, in the current implementation, the RemoteAudioDestinationProxy in a Web
process transfers audio data to the RemoteAudioDestination in the GPU process
with IPC messages (RemoteAudioBusData). This is not efficient because of the
large number of IPC messages for audio samples.
With this patch, RemoteAudioDestinationProxy (Web process) transfers audio samples
to RemoteAudioDestination(GPU process) with a CARingBuffer providing shared
buffers for the Web process and the GPU process.
* GPUProcess/media/RemoteAudioDestinationManager.cpp:
(WebKit::RemoteAudioDestination::create):
(WebKit::RemoteAudioDestination::~RemoteAudioDestination):
(WebKit::RemoteAudioDestination::audioSamplesStorageChanged):
(WebKit::RemoteAudioDestination::start):
(WebKit::RemoteAudioDestination::stop):
(WebKit::RemoteAudioDestination::isPlaying const):
(WebKit::RemoteAudioDestination::RemoteAudioDestination):
(WebKit::RemoteAudioDestination::storage):
(WebKit::RemoteAudioDestination::render):
(WebKit::RemoteAudioDestinationManager::createAudioDestination):
(WebKit::RemoteAudioDestinationManager::audioSamplesStorageChanged):
(WebKit::RemoteAudioDestination::isPlaying): Deleted.
(WebKit::RemoteAudioDestination::framesPerBuffer const): Deleted.
* GPUProcess/media/RemoteAudioDestinationManager.h:
(WebKit::RemoteAudioDestinationManager::didReceiveSyncMessageFromWebProcess):
* GPUProcess/media/RemoteAudioDestinationManager.messages.in:
Add a message AudioSamplesStorageChanged to support using CARingBuffer to
transmit audio samples to the GPU process.
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/media/RemoteAudioBusData.h: Removed.
* WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::RemoteAudioDestinationProxy):
(WebKit::RemoteAudioDestinationProxy::start):
(WebKit::RemoteAudioDestinationProxy::stop):
(WebKit::RemoteAudioDestinationProxy::requestBuffer):
(WebKit::RemoteAudioDestinationProxy::renderOnRenderingThead):
(WebKit::RemoteAudioDestinationProxy::storageChanged):
(WebKit::RemoteAudioDestinationProxy::renderBuffer): Deleted.
(WebKit::RemoteAudioDestinationProxy::didChangeIsPlaying): Deleted.
* WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
RemoteAudioDestinationProxy is a subclass of AudioDestinationCocoa. It pulls audio
samples from the WebAudio side and use a CARingBuffer to push audio samples to
the audio output unit (managed by RemoteAudioDestination) in the GPU process.
* WebProcess/GPU/media/RemoteAudioDestinationProxy.messages.in:
Add a message RequestBuffer, which can be used by RemoteAudioDestination to ask
for (pull) audio samples.
* WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp:
(WebKit::AudioMediaStreamTrackRenderer::pushSamples): A minor fix to get rid of
a type conversion.
Canonical link: https://commits.webkit.org/230590@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-17 04:18:37 +00:00
|
|
|
platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp @no-unify
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/audio/ios/AudioSessionIOS.mm @no-unify
|
2020-03-08 19:22:33 +00:00
|
|
|
platform/audio/ios/MediaSessionHelperIOS.mm @no-unify
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/audio/ios/MediaSessionManagerIOS.mm @no-unify
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/audio/mac/AudioBusMac.mm
|
[Media in GPU Process] Use CARingBuffer to transfer audio data of an audio destination from a web process to the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=217715
Reviewed by Jer Noble.
Source/WebCore:
Decouple the audio output unit management from AudioDestinationCocoa so that
we can run it remotely in other processes, like the GPU process.
No new tests, no behavior change.
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/audio/AudioDestination.h: Export hardwareSampleRate().
* platform/audio/cocoa/AudioDestinationCocoa.cpp:
(WebCore::AudioDestination::create): Remove an unnecessary function call.
(WebCore::AudioDestinationCocoa::AudioDestinationCocoa): Add a parameter
configureAudioOutputUnit so that we can disable the AudioOutputUnitAdaptor in
AudioDestinationCocoa when we need to run the AudioOutputUnitAdaptor in another process.
(WebCore::AudioDestinationCocoa::start):
(WebCore::AudioDestinationCocoa::stop):
(WebCore::AudioDestinationCocoa::getAudioStreamBasicDescription):
Rename setAudioStreamBasicDescription() to getAudioStreamBasicDescription() because
the function essentially queries the description.
(WebCore::AudioDestinationCocoa::hasEnoughFrames const): Add this function
so that a subclass can check whether the FIFO has enough audio samples to render.
(WebCore::AudioDestinationCocoa::render): Replace the AudioTimeStamp* parameter
because we only need two fields of AudioTimeStamp in this function.
(WebCore::AudioDestinationCocoa::~AudioDestinationCocoa): Deleted.
(WebCore::AudioDestinationCocoa::setAudioStreamBasicDescription): Deleted.
(WebCore::AudioDestinationCocoa::inputProc): Deleted. This function is moved to
AudioOutputUnitAdaptor.
* platform/audio/cocoa/AudioDestinationCocoa.h:
(WebCore::AudioDestinationCocoa::outputUnit): Deleted.
* platform/audio/cocoa/AudioOutputUnitAdaptor.cpp: Added.
(WebCore::AudioOutputUnitAdaptor::AudioOutputUnitAdaptor):
(WebCore::AudioOutputUnitAdaptor::~AudioOutputUnitAdaptor):
(WebCore::AudioOutputUnitAdaptor::start):
(WebCore::AudioOutputUnitAdaptor::stop):
(WebCore::AudioOutputUnitAdaptor::inputProc):
* platform/audio/cocoa/AudioOutputUnitAdaptor.h: Added.
* platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp: Renamed from Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp.
(WebCore::AudioOutputUnitAdaptor::configure):
* platform/audio/mac/AudioOutputUnitAdaptorMac.cpp: Renamed from Source/WebCore/platform/audio/mac/AudioDestinationMac.cpp.
(WebCore::AudioOutputUnitAdaptor::configure):
* platform/mock/MockAudioDestinationCocoa.cpp:
(WebCore::MockAudioDestinationCocoa::tick):
Source/WebKit:
The current implementation of RemoteAudioDestination essentially runs the
AudioDestinationCocoa in the GPU process, which is not good because we are adding
AudioWorklet stuff into AudioDestinationCocoa, but the AudioWorklet stuff is
irrelevant to the GPU process.
What really needs to run in the GPU process (for Cocoa platforms at least) is the
audio output unit. This patch adds WebCore::AudioOutputUnitAdaptor and
WebCore::AudioUnitRenderer to implement that. With this patch, RemoteAudioDestination
in the GPU process is an AudioUnitRenderer and it embeds an AudioOutputUnitAdaptor
like AudioDestinationCocoa does in the Web process. Essentially, we run AudioOutputUnitAdaptor
remotely from the AudioDestinationCocoa's perspective.
Also, in the current implementation, the RemoteAudioDestinationProxy in a Web
process transfers audio data to the RemoteAudioDestination in the GPU process
with IPC messages (RemoteAudioBusData). This is not efficient because of the
large number of IPC messages for audio samples.
With this patch, RemoteAudioDestinationProxy (Web process) transfers audio samples
to RemoteAudioDestination(GPU process) with a CARingBuffer providing shared
buffers for the Web process and the GPU process.
* GPUProcess/media/RemoteAudioDestinationManager.cpp:
(WebKit::RemoteAudioDestination::create):
(WebKit::RemoteAudioDestination::~RemoteAudioDestination):
(WebKit::RemoteAudioDestination::audioSamplesStorageChanged):
(WebKit::RemoteAudioDestination::start):
(WebKit::RemoteAudioDestination::stop):
(WebKit::RemoteAudioDestination::isPlaying const):
(WebKit::RemoteAudioDestination::RemoteAudioDestination):
(WebKit::RemoteAudioDestination::storage):
(WebKit::RemoteAudioDestination::render):
(WebKit::RemoteAudioDestinationManager::createAudioDestination):
(WebKit::RemoteAudioDestinationManager::audioSamplesStorageChanged):
(WebKit::RemoteAudioDestination::isPlaying): Deleted.
(WebKit::RemoteAudioDestination::framesPerBuffer const): Deleted.
* GPUProcess/media/RemoteAudioDestinationManager.h:
(WebKit::RemoteAudioDestinationManager::didReceiveSyncMessageFromWebProcess):
* GPUProcess/media/RemoteAudioDestinationManager.messages.in:
Add a message AudioSamplesStorageChanged to support using CARingBuffer to
transmit audio samples to the GPU process.
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/media/RemoteAudioBusData.h: Removed.
* WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::RemoteAudioDestinationProxy):
(WebKit::RemoteAudioDestinationProxy::start):
(WebKit::RemoteAudioDestinationProxy::stop):
(WebKit::RemoteAudioDestinationProxy::requestBuffer):
(WebKit::RemoteAudioDestinationProxy::renderOnRenderingThead):
(WebKit::RemoteAudioDestinationProxy::storageChanged):
(WebKit::RemoteAudioDestinationProxy::renderBuffer): Deleted.
(WebKit::RemoteAudioDestinationProxy::didChangeIsPlaying): Deleted.
* WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
RemoteAudioDestinationProxy is a subclass of AudioDestinationCocoa. It pulls audio
samples from the WebAudio side and use a CARingBuffer to push audio samples to
the audio output unit (managed by RemoteAudioDestination) in the GPU process.
* WebProcess/GPU/media/RemoteAudioDestinationProxy.messages.in:
Add a message RequestBuffer, which can be used by RemoteAudioDestination to ask
for (pull) audio samples.
* WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp:
(WebKit::AudioMediaStreamTrackRenderer::pushSamples): A minor fix to get rid of
a type conversion.
Canonical link: https://commits.webkit.org/230590@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-17 04:18:37 +00:00
|
|
|
platform/audio/mac/AudioOutputUnitAdaptorMac.cpp
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/audio/mac/AudioHardwareListenerMac.cpp
|
2020-04-14 22:35:47 +00:00
|
|
|
platform/audio/mac/AudioSessionMac.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/audio/mac/FFTFrameMac.cpp
|
2021-05-04 23:50:04 +00:00
|
|
|
platform/audio/mac/SharedRoutingArbitrator.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/cf/KeyedDecoderCF.cpp
|
|
|
|
platform/cf/KeyedEncoderCF.cpp
|
|
|
|
platform/cf/MainThreadSharedTimerCF.cpp
|
|
|
|
platform/cf/MediaAccessibilitySoftLink.cpp
|
|
|
|
platform/cf/RunLoopObserver.cpp
|
|
|
|
platform/cf/SharedBufferCF.cpp
|
|
|
|
platform/cocoa/ContentFilterUnblockHandlerCocoa.mm @no-unify
|
|
|
|
platform/cocoa/CoreVideoSoftLink.cpp
|
2020-03-25 01:22:03 +00:00
|
|
|
platform/cocoa/DragDataCocoa.mm
|
|
|
|
platform/cocoa/DragImageCocoa.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/cocoa/FileMonitorCocoa.mm
|
|
|
|
platform/cocoa/KeyEventCocoa.mm
|
|
|
|
platform/cocoa/LocalizedStringsCocoa.mm
|
2020-12-03 21:14:53 +00:00
|
|
|
platform/cocoa/LowPowerModeNotifier.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/cocoa/MIMETypeRegistryCocoa.mm
|
2020-11-22 05:51:10 +00:00
|
|
|
platform/cocoa/MediaUtilities.cpp
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/cocoa/NetworkExtensionContentFilter.mm
|
|
|
|
platform/cocoa/ParentalControlsContentFilter.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/cocoa/PasteboardCocoa.mm
|
[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/cocoa/PasteboardCustomDataCocoa.mm
|
[Clipboard API] Refactor Pasteboard item reading functions to work on both iOS and macOS
https://bugs.webkit.org/show_bug.cgi?id=202647
Reviewed by Tim Horton.
Source/WebCore:
Moves some pasteboard helper functions out of iOS-specific code, and into platform-agnostic code. See below for
more details. There is no change in behavior, as nothing exercises these new pasteboard functions on macOS yet.
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/Pasteboard.cpp:
(WebCore::Pasteboard::allPasteboardItemInfo const):
(WebCore::Pasteboard::pasteboardItemInfo const):
(WebCore::Pasteboard::readString):
(WebCore::Pasteboard::readBuffer):
(WebCore::Pasteboard::readURL):
Add some new helpers on Pasteboard to read Strings, data, and URLs from the platform pasteboard. These forward
to the platform strategy which, in WebKit2, are currently implemented using sync IPC, but could be changed in
the future to be fully asynchronous.
* platform/Pasteboard.h:
(WebCore::Pasteboard::name const):
Expose a cross-platform name() getter on Pasteboard. On non-Cocoa platforms, this simply returns the empty
string, but on macOS and iOS, this returns the platform pasteboard name, which is stored in m_pasteboardName.
* platform/PasteboardItemInfo.h:
(WebCore::PasteboardItemInfo::pathForContentType const):
(WebCore::PasteboardItemInfo::contentTypeForHighestFidelityItem const):
(WebCore::PasteboardItemInfo::encode const):
(WebCore::PasteboardItemInfo::decode):
Adds a couple of new members to PasteboardItemInfo (which represents metadata about a given item in the platform
pasteboard). These are changeCount (which is self explanatory), and webSafeTypesByFidelity, which is a list of
types in fidelity order which contains the list of pasteboard types that are safe to expose to bindings. These
may include types such as "text/plain", "text/html", "text/uri-list", and "image/png".
To distinguish this list from the existing contentTypesByFidelity list, I've also renamed contentTypesByFidelity
to platformTypesByFidelity, to make it more obvious that this other list of types are platform-specific, and not
generally safe to expose to the web.
* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
Move several helpers out into platform-agnostic code.
* platform/cocoa/PasteboardCocoa.mm:
(WebCore::Pasteboard::fileContentState):
* platform/cocoa/PlatformPasteboardCocoa.mm: Added.
Add a new file to contain the implementation of PlatformPasteboard::allPasteboardItemInfo, which is the same
across Cocoa platforms.
(WebCore::PlatformPasteboard::allPasteboardItemInfo):
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::readRespectingUTIFidelities):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::informationForItemAtIndex):
(WebCore::PlatformPasteboard::readBuffer const):
(WebCore::PlatformPasteboard::readString const):
(WebCore::PlatformPasteboard::readURL const):
Additionally refactor all methods on PlatformPasteboard that take pasteboard item indices as signed integers
(`int`) to receive `size_t` values instead.
(WebCore::PlatformPasteboard::allPasteboardItemInfo): Deleted.
* platform/libwpe/PasteboardLibWPE.cpp:
(WebCore::Pasteboard::readString):
(WebCore::Pasteboard::read):
* platform/libwpe/PlatformPasteboardLibWPE.cpp:
(WebCore::PlatformPasteboard::readString const):
Add an implementation stub for WPE.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::modernPasteboardTypeForWebSafeMIMEType):
(WebCore::webSafeMIMETypeForModernPasteboardType):
Add helpers to convert between modern NSPasteboardTypes and web-safe types. While some logic exists today on
macOS to convert between legacy pasteboard types and web-safe types, conversion between the modern pasteboard
types and web-safe types are needed since NSPasteboardItem's types only support NSPasteboardTypes and
dynamically declared types that match the format of a universal type identfier (for instance, "com.foo.bar").
(WebCore::PlatformPasteboard::readBuffer const):
(WebCore::PlatformPasteboard::readString const):
(WebCore::PlatformPasteboard::readURL const):
(WebCore::PlatformPasteboard::count const):
(WebCore::PlatformPasteboard::informationForItemAtIndex):
Implement all of these helpers by looking up the NSPasteboardItem at the given item index and querying it for
data for non-legacy pasteboard types.
(WebCore::PlatformPasteboard::itemAtIndex const):
Source/WebKit:
Refactor iOS-specific pasteboard functions to be platform-agnostic. See WebCore ChangeLog for more details.
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::allPasteboardItemInfo):
(WebKit::WebPasteboardProxy::informationForItemAtIndex):
(WebKit::WebPasteboardProxy::getPasteboardItemsCount):
(WebKit::WebPasteboardProxy::readStringFromPasteboard):
(WebKit::WebPasteboardProxy::readURLFromPasteboard):
(WebKit::WebPasteboardProxy::readBufferFromPasteboard):
(WebKit::WebPasteboardProxy::writeURLToPasteboard):
(WebKit::WebPasteboardProxy::writeWebContentToPasteboard):
(WebKit::WebPasteboardProxy::writeImageToPasteboard):
(WebKit::WebPasteboardProxy::writeStringToPasteboard):
* UIProcess/WebPasteboardProxy.cpp:
(WebKit::WebPasteboardProxy::allPasteboardItemInfo):
(WebKit::WebPasteboardProxy::informationForItemAtIndex):
(WebKit::WebPasteboardProxy::getPasteboardItemsCount):
(WebKit::WebPasteboardProxy::readStringFromPasteboard):
(WebKit::WebPasteboardProxy::readURLFromPasteboard):
(WebKit::WebPasteboardProxy::readBufferFromPasteboard):
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* UIProcess/wpe/WebPasteboardProxyWPE.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::informationForItemAtIndex):
(WebKit::WebPlatformStrategies::readBufferFromPasteboard):
(WebKit::WebPlatformStrategies::readURLFromPasteboard):
(WebKit::WebPlatformStrategies::readStringFromPasteboard):
(WebKit::WebPlatformStrategies::writeToPasteboard):
(WebKit::WebPlatformStrategies::updateSupportedTypeIdentifiers):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
Source/WebKitLegacy/mac:
Refactor iOS-specific pasteboard functions to be platform-agnostic. See WebCore ChangeLog for more details.
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::informationForItemAtIndex):
(WebPlatformStrategies::allPasteboardItemInfo):
(WebPlatformStrategies::getPasteboardItemsCount):
(WebPlatformStrategies::readBufferFromPasteboard):
(WebPlatformStrategies::readURLFromPasteboard):
(WebPlatformStrategies::readStringFromPasteboard):
(WebPlatformStrategies::writeToPasteboard):
(WebPlatformStrategies::updateSupportedTypeIdentifiers):
Canonical link: https://commits.webkit.org/216240@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-10 01:27:14 +00:00
|
|
|
platform/cocoa/PlatformPasteboardCocoa.mm
|
2017-10-27 18:56:11 +00:00
|
|
|
platform/cocoa/PlaybackSessionModelMediaElement.mm
|
2020-07-16 20:49:35 +00:00
|
|
|
platform/cocoa/PowerSourceNotifier.mm
|
2021-03-04 05:59:26 +00:00
|
|
|
platform/cocoa/RemoteCommandListenerCocoa.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/cocoa/RuntimeApplicationChecksCocoa.mm
|
|
|
|
platform/cocoa/SearchPopupMenuCocoa.mm
|
|
|
|
platform/cocoa/SharedBufferCocoa.mm
|
|
|
|
platform/cocoa/SystemVersion.mm
|
|
|
|
platform/cocoa/TelephoneNumberDetectorCocoa.cpp
|
|
|
|
platform/cocoa/ThemeCocoa.mm
|
2018-02-13 02:26:17 +00:00
|
|
|
platform/cocoa/UserAgentCocoa.mm
|
2020-10-05 14:57:53 +00:00
|
|
|
platform/cocoa/VersionChecks.mm
|
2017-10-27 18:56:11 +00:00
|
|
|
platform/cocoa/VideoFullscreenModelVideoElement.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/cocoa/VideoToolboxSoftLink.cpp
|
2018-11-30 17:09:37 +00:00
|
|
|
platform/cocoa/WebCoreAdditions.mm @no-unify
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/cocoa/WebCoreNSErrorExtras.mm
|
2017-10-27 18:56:11 +00:00
|
|
|
platform/gamepad/cocoa/GameControllerGamepad.mm
|
|
|
|
platform/gamepad/cocoa/GameControllerGamepadProvider.mm
|
2020-07-31 19:50:33 +00:00
|
|
|
platform/gamepad/mac/Dualshock3HIDGamepad.cpp
|
2020-07-30 07:21:44 +00:00
|
|
|
platform/gamepad/mac/GenericHIDGamepad.cpp
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/gamepad/mac/HIDGamepad.cpp
|
2020-07-30 07:21:44 +00:00
|
|
|
platform/gamepad/mac/HIDGamepadElement.cpp
|
2020-07-10 01:27:58 +00:00
|
|
|
platform/gamepad/mac/HIDGamepadProvider.mm
|
2020-08-02 02:53:25 +00:00
|
|
|
platform/gamepad/mac/LogitechGamepad.cpp
|
2020-07-10 01:27:58 +00:00
|
|
|
platform/gamepad/mac/MultiGamepadProvider.mm
|
2020-08-01 22:55:47 +00:00
|
|
|
platform/gamepad/mac/StadiaHIDGamepad.cpp
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/MediaPlaybackTargetPicker.cpp
|
|
|
|
platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm @no-unify
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp @no-unify
|
|
|
|
platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp @no-unify
|
[iPad] YouTube does not automatically AirPlay when a route is selected from Control Center
https://bugs.webkit.org/show_bug.cgi?id=206539
Source/WebCore:
Patch by Jer Noble <jer.noble@apple.com> on 2020-01-21
Reviewed by Eric Carlson.
No new tests; change affects an interaction with two platform features (local AirPlay
route picking and actual remote playback over AirPlay routes) that is not testable in
an automated fashion.
The underlying source of the bug is the difference in how the platform communitcates that an
AirPlay route was picked between iOS and macOS. On iOS, route changes are global and are
generally pushed up from AVPlayer notifications. On macOS, route changes are local to the
app and are pushed down from the UIProcess. But when MSE playback was enabled on iPadOS,
there was now a limbo where media playback was no longer using an AVPlayer, but at the same
time, route changes could be initiated globally. The end result is that MSE-based media
elements are never notified that they "should play to playback target", and no remote
playback events are ever fired.
To re-create the same macOS behavior when MSE-backed media elements are used on iPadOS,
re-use the existing route change detection logic in MediaSessionManageriOS to query whether
the newly established route supports AirPlay Video, and if so, send a message to the "now
playing" media element that it should begin AirPlaying, which will fail, but will trigger
the YouTube player to switch to a HLS-backed media element.
This requires renaming MediaPlaybackTargetMac -> MediaPlaybackTargetCocoa.
* SourcesCocoa.txt:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::activeVideoRouteDidChange):
(-[WebMediaSessionHelper activeAudioRouteDidChange:]):
* platform/graphics/avfoundation/MediaPlaybackTargetCocoa.h: Renamed from Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetMac.h.
(WebCore::MediaPlaybackTargetCocoa::outputContext const):
* platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm: Renamed from Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetMac.mm.
(WebCore::MediaPlaybackTargetCocoa::create):
(WebCore::MediaPlaybackTargetCocoa::MediaPlaybackTargetCocoa):
(WebCore::MediaPlaybackTargetCocoa::~MediaPlaybackTargetCocoa):
(WebCore::MediaPlaybackTargetCocoa::targetContext const):
(WebCore::MediaPlaybackTargetCocoa::hasActiveRoute const):
(WebCore::MediaPlaybackTargetCocoa::deviceName const):
(WebCore::toMediaPlaybackTargetCocoa):
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::playbackTarget):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
Source/WebKit:
<rdar://problem/54173689>
Patch by Jer Noble <jer.noble@apple.com> on 2020-01-21
Reviewed by Eric Carlson.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected const):
Canonical link: https://commits.webkit.org/219613@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-21 21:44:00 +00:00
|
|
|
platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm @no-unify
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp @no-unify
|
|
|
|
platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm @no-unify
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp @no-unify
|
2019-05-06 22:22:26 +00:00
|
|
|
platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm @no-unify
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm @no-unify
|
2020-07-21 17:46:28 +00:00
|
|
|
platform/graphics/avfoundation/objc/AVOutputDeviceMenuControllerTargetPicker.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/AVRoutePickerViewTargetPicker.mm @no-unify
|
2019-05-06 22:22:26 +00:00
|
|
|
platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm @no-unify
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm @no-unify
|
2020-01-20 09:19:35 +00:00
|
|
|
platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm @no-unify
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm @no-unify
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm @no-unify
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm @no-unify
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm @no-unify
|
[Cocoa] Add experimental MSE WebM parser
https://bugs.webkit.org/show_bug.cgi?id=214529
Source/ThirdParty/libwebrtc:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
Add the vp9_header_parser from libwebrtc to the project, and add its
symbols to the list of exported symbols. Because this header wants to
be installed to a "common/vp9_header_parser.h" path, split up the default
CopyHeadersInstallPhase into two separate CopyFiles build phases that
put headers into different locations.
* Configurations/libwebm.xcconfig:
* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:
* Source/third_party/libwebm/common/vp9_header_parser.h:
(vp9_parser::Vp9HeaderParser::color_range const):
(vp9_parser::Vp9HeaderParser::subsampling_x const):
(vp9_parser::Vp9HeaderParser::subsampling_y const):
* libwebrtc.xcodeproj/project.pbxproj:
Source/WebCore:
Reviewed by Eric Carlson.
Test: media/media-source/media-source-webm.html
Add an experimental MSE WebM parser to SourceBufferPrivateAVFObjC. This will require extensive refactoring
of SourceBufferPrivateAVFObjC, to extract out the parser into a new, virtualized class. This new parser can
take advantage of new C++>11 features such as lambdas to clean up some problematic existing code. The new
virtualized SourceBufferParser class uses passed-in Function objects, rather than pure-virtual Client classes
to notify it's parent object when the parser encounters initialization- or media-data.
Because SourceBufferPrivateAVFObjC will now have to deal with AudioTrackPrivate and VideoTrackPrivate objects
that are not necessarily Audio- and VideoTrackPrivateMediaSourceAVFObjC subclasses, move those classes notification
features up into Audio- and VideoTrackPrivate, again using a Function object rather than a client class.
Add a new SourceBufferParserWebM and associated AudioTrackPrivateWebM and VideoTrackPrivateWebM classes, which
use libwebm via libwebrtc to parse appended buffers. SourceBufferParserWebM feeds passed-in data into a
libwebm-provided parser of its own. It then builds up tracks and samples based on callbacks from that same parser,
constructing CMSampleBuffers and VideoTrackPrivate objects out of the underlying libwebm primitives.
Because WebM uses a UUID as its track identifier, the representation of a "trackID" inside WebCore must be
increased from an int to a uint64_t, or trackIDs will be truncated or zeroed when passed between classes and
when converted to and from AtomStrings.
This early implementation is not yet able to pass the WebM WPT media-source/ tests, as we only have a VP9 decoder
available, and those tests use both VP8 and Vorbis.
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebMParserEnabled):
(WebCore::RuntimeEnabledFeatures::webMParserEnabled const):
* platform/graphics/AudioTrackPrivate.h:
(WebCore::AudioTrackPrivate::setEnabled):
(WebCore::AudioTrackPrivate::setEnabledChangedCallback):
* platform/graphics/VP9Utilities.cpp:
(WebCore::isValidVPColorPrimaries):
(WebCore::isValidVPTransferCharacteristics):
(WebCore::isValidVPMatrixCoefficients):
(WebCore::parseVPCodecParameters):
* platform/graphics/VP9Utilities.h:
* platform/graphics/VideoTrackPrivate.h:
(WebCore::VideoTrackPrivate::setSelected):
(WebCore::VideoTrackPrivate::setSelectedChangedCallback):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp:
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::setEnabled):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::update):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::update):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
(WebCore::MediaSampleAVFObjC::create):
(WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
* platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.h: Added.
(isType):
* platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.mm: Added.
(-[WebAVStreamDataParserListener initWithParser:parent:]):
(-[WebAVStreamDataParserListener dealloc]):
(-[WebAVStreamDataParserListener invalidate]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):
(-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]):
(-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
(WebCore::SourceBufferParserAVFObjC::isContentTypeSupported):
(WebCore::SourceBufferParserAVFObjC::SourceBufferParserAVFObjC):
(WebCore::SourceBufferParserAVFObjC::~SourceBufferParserAVFObjC):
(WebCore::SourceBufferParserAVFObjC::appendData):
(WebCore::SourceBufferParserAVFObjC::flushPendingMediaData):
(WebCore::SourceBufferParserAVFObjC::setShouldProvideMediaDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::shouldProvideMediadataForTrackID):
(WebCore::SourceBufferParserAVFObjC::resetParserState):
(WebCore::SourceBufferParserAVFObjC::didParseStreamDataAsAsset):
(WebCore::SourceBufferParserAVFObjC::didFailToParseStreamDataWithError):
(WebCore::SourceBufferParserAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::create):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):
(WebCore::SourceBufferPrivateAVFObjC::didEncounterErrorDuringParsing):
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::appendCompleted):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::resetParserState):
(WebCore::SourceBufferPrivateAVFObjC::destroyParser):
(WebCore::SourceBufferPrivateAVFObjC::clearTracks):
(WebCore::SourceBufferPrivateAVFObjC::hasSelectedVideo const):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeSelected):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::parser const):
(WebCore::SourceBufferPrivateAVFObjC::attemptToDecrypt):
(WebCore::SourceBufferPrivateAVFObjC::flush):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::canSetMinimumUpcomingPresentationTime const):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC):
* platform/graphics/cocoa/AudioTrackPrivateWebM.cpp: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
(WebCore::AudioTrackPrivateWebM::create):
(WebCore::AudioTrackPrivateWebM::AudioTrackPrivateWebM):
(WebCore::AudioTrackPrivateWebM::id const):
(WebCore::AudioTrackPrivateWebM::label const):
(WebCore::AudioTrackPrivateWebM::language const):
(WebCore::AudioTrackPrivateWebM::trackIndex const):
* platform/graphics/cocoa/AudioTrackPrivateWebM.h: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
* platform/graphics/cocoa/SourceBufferParser.cpp: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
(WebCore::SourceBufferParser::isContentTypeSupported):
(WebCore::SourceBufferParser::create):
* platform/graphics/cocoa/SourceBufferParser.h: Added.
(WebCore::SourceBufferParser::setDidParseInitializationDataCallback):
(WebCore::SourceBufferParser::setDidEncounterErrorDuringParsingCallback):
(WebCore::SourceBufferParser::setDidProvideMediaDataCallback):
(WebCore::SourceBufferParser::setWillProvideContentKeyRequestInitializationDataForTrackIDCallback):
(WebCore::SourceBufferParser::setDidProvideContentKeyRequestInitializationDataForTrackIDCallback):
* platform/graphics/cocoa/SourceBufferParserWebM.cpp: Added.
(WebCore::isWebmParserAvailable):
(WebCore::SourceBufferParserWebM::isContentTypeSupported):
(WebCore::SourceBufferParserWebM::SourceBufferParserWebM):
(WebCore::SourceBufferParserWebM::appendData):
(WebCore::SourceBufferParserWebM::flushPendingMediaData):
(WebCore::SourceBufferParserWebM::setShouldProvideMediaDataForTrackID):
(WebCore::SourceBufferParserWebM::shouldProvideMediadataForTrackID):
(WebCore::SourceBufferParserWebM::resetParserState):
(WebCore::SourceBufferParserWebM::trackDataForTrackNumber):
(WebCore::SourceBufferParserWebM::OnElementBegin):
(WebCore::SourceBufferParserWebM::OnEbml):
(WebCore::SourceBufferParserWebM::OnSegmentBegin):
(WebCore::SourceBufferParserWebM::OnInfo):
(WebCore::SourceBufferParserWebM::OnClusterBegin):
(WebCore::SourceBufferParserWebM::OnTrackEntry):
(WebCore::SourceBufferParserWebM::OnBlockBegin):
(WebCore::SourceBufferParserWebM::OnBlockEnd):
(WebCore::SourceBufferParserWebM::OnSimpleBlockBegin):
(WebCore::SourceBufferParserWebM::OnSimpleBlockEnd):
(WebCore::SourceBufferParserWebM::OnBlockGroupBegin):
(WebCore::SourceBufferParserWebM::OnBlockGroupEnd):
(WebCore::convertToColorPrimaries):
(WebCore::convertToTransferCharacteristics):
(WebCore::convertToMatrixCoefficients):
(WebCore::convertSubsamplingXYToChromaSubsampling):
(WebCore::createFormatDescriptionFromVP9HeaderParser):
(WebCore::SourceBufferParserWebM::OnFrame):
* platform/graphics/cocoa/SourceBufferParserWebM.h: Added.
(WebCore::SourceBufferParserWebM::status const):
(WebCore::SourceBufferParserWebM::type const):
(isType):
* platform/graphics/cocoa/VP9UtilitiesCocoa.h:
* platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
(WebCore::isVP9DecoderAvailable):
(WebCore::validateVPParameters):
* platform/graphics/cocoa/VideoTrackPrivateWebM.cpp:
(WebCore::VideoTrackPrivateWebM::create):
(WebCore::VideoTrackPrivateWebM::VideoTrackPrivateWebM):
(WebCore::VideoTrackPrivateWebM::id const):
(WebCore::VideoTrackPrivateWebM::label const):
(WebCore::VideoTrackPrivateWebM::language const):
(WebCore::VideoTrackPrivateWebM::trackIndex const):
* platform/graphics/cocoa/VideoTrackPrivateWebM.h:
Source/WebKit:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
Add an Experimental setting to enable the MSE WebM parser (off by default).
* Shared/WebPreferences.yaml:
LayoutTests:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
* media/media-source/content/test-vp9-manifest.json: Added.
* media/media-source/content/test-vp9.webm: Added.
* media/media-source/media-source-webm-expected.txt: Added.
* media/media-source/media-source-webm.html: Added.
Canonical link: https://commits.webkit.org/227430@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-22 00:25:09 +00:00
|
|
|
platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.mm @no-unify
|
2020-02-12 05:11:22 +00:00
|
|
|
platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm @no-unify
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm @no-unify
|
|
|
|
platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm @no-unify
|
|
|
|
platform/graphics/ca/GraphicsLayerCA.cpp
|
|
|
|
platform/graphics/ca/LayerPool.cpp
|
|
|
|
platform/graphics/ca/PlatformCAAnimation.cpp
|
|
|
|
platform/graphics/ca/PlatformCALayer.cpp
|
|
|
|
platform/graphics/ca/TileController.cpp
|
|
|
|
platform/graphics/ca/TileCoverageMap.cpp
|
|
|
|
platform/graphics/ca/TileGrid.cpp
|
|
|
|
platform/graphics/ca/TransformationMatrixCA.cpp
|
|
|
|
platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm
|
|
|
|
platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm
|
|
|
|
platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
|
|
|
|
platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm
|
|
|
|
platform/graphics/ca/cocoa/WebTiledBackingLayer.mm
|
2019-11-12 01:04:57 +00:00
|
|
|
platform/graphics/ca/cocoa/WebVideoContainerLayer.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/cg/ColorCG.cpp
|
Simplify adding new color spaces to WebCore
https://bugs.webkit.org/show_bug.cgi?id=220146
Reviewed by Dean Jackson.
Reduce the number of places one needs to touch when adding new color types to:
- ColorTypes.h
- ColorConversion.h/cpp
- ColorSpace.h/cpp (only needed if support in Color is required).
- ColorSerialization.h (only needed if support in Color is required).
- ColorSpaceCG.h/cpp (only needed if support in Color is required).
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add ColorSpace.cpp, ColorSpaceCG.h and ColorSpaceCG.cpp.
* platform/graphics/Color.cpp:
* platform/graphics/Color.h:
(WebCore::Color::Color):
(WebCore::Color::setColor):
Replace specific overloads of the contructor and setColor with template functions
that do the same things. These are safe to make as if a non-supported color type
(one that doesn't have a colorSpace member) is passed it will fail to compile due
to use beneath ExtendedColor::create().
Also moves WTF::TextStream operator<< overload for ColorSpace out and into
ColorSpace.cpp where it makes more sense.
* platform/graphics/ColorConversion.cpp:
* platform/graphics/ColorConversion.h:
Re-order and explicitly comment conversion functions to be more clear.
As the comment indicates, all color types must implement at least the following
conversions:
XYZA<float> toXYZA(const ColorType<float>&);
ColorType<float> toColorType(const XYZA<float>&);
This allows generic fallback code, inline at the bottom of the header, to
support conversion to and from any set of colors. Additional conversion functions
are useful for the cases where the optimal or base conversion is not through XYZ
such as from SRGBA to LinearSRGBA.
To allow this to work a few additional conversion functions were added which just
combine existing conversions together and one was added for SRGBA to CMYKA which
was missing, though currently unused.
* platform/graphics/ColorSpace.cpp: Added.
(WebCore::operator<<):
* platform/graphics/ColorSpace.h:
Moved from Color.h
* platform/graphics/ColorTypes.h:
(WebCore::callWithColorType):
This is a generalization of ExtendedColor::callOnUnderlyingType() that also
has the benefit of now being in the same file as the color type definitions,
reducing the number of files people need to touch.
* platform/graphics/ColorUtilities.h:
(WebCore::colorByModifingEachNonAlphaComponent):
Update to not assume that colors use the names red/green/blue for non-alpha
components. This makes it work generically for all four component color types.
* platform/graphics/ExtendedColor.h:
(WebCore::ExtendedColor::callOnUnderlyingType const):
Use generalized form, callWithColorType to avoid requiring modiftying this
when new color types are added.
* platform/graphics/cg/ColorCG.cpp:
(WebCore::leakCGColor):
When going to generalize this (we could have simply called
`return CGColorCreate(cachedCGColorSpace(colorSpace), cgFloatComponents))`
I noticed this was not doing the right thing for CG ports that don't support
all the color spaces WebCore requires (such as Windows). For instance,
displayP3ColorSpaceRef() just returns sRGBColorSpaceRef() on windows, meaning
we would be taking some DisplayP3 components and having CG interpret them as
sRGB. To avoid this, we now check if the color space returned is the fallback
color space, sRGB, and do our own conversion to sRGB using ColorConversion
before creating the color.
This also resolves a long standing bug / FIXME around LinearRGB where we were
using sRGBColorSpaceRef() for them. In practice, we don't actually ever create
LinearRGB CGColorRefs right now, but if we ever do in the future, makes sense
to use the right color space.
* platform/graphics/cg/ColorSpaceCG.cpp: Added.
(WebCore::sRGBColorSpaceRef):
(WebCore::linearRGBColorSpaceRef):
(WebCore::displayP3ColorSpaceRef):
(WebCore::extendedSRGBColorSpaceRef):
* platform/graphics/cg/ColorSpaceCG.h: Added.
(WebCore::cachedCGColorSpace):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::sRGBColorSpaceRef): Deleted.
(WebCore::linearRGBColorSpaceRef): Deleted.
(WebCore::extendedSRGBColorSpaceRef): Deleted.
(WebCore::displayP3ColorSpaceRef): Deleted.
* platform/graphics/cg/GraphicsContextCG.h:
(WebCore::cachedCGColorSpace): Deleted.
Moved color space specific CG code to its own files to make it more clear
where to find them.
Canonical link: https://commits.webkit.org/232686@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-26 17:42:33 +00:00
|
|
|
platform/graphics/cg/ColorSpaceCG.cpp
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/cg/FloatPointCG.cpp
|
|
|
|
platform/graphics/cg/FloatRectCG.cpp
|
|
|
|
platform/graphics/cg/FloatSizeCG.cpp
|
|
|
|
platform/graphics/cg/GradientCG.cpp
|
|
|
|
platform/graphics/cg/GraphicsContextCG.cpp
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/graphics/cg/GraphicsContextGLCG.cpp
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/cg/IOSurfacePool.cpp
|
2020-02-19 01:12:47 +00:00
|
|
|
platform/graphics/cg/ImageBufferCGBackend.cpp
|
|
|
|
platform/graphics/cg/ImageBufferCGBitmapBackend.cpp
|
|
|
|
platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
|
2019-01-05 01:12:19 +00:00
|
|
|
platform/graphics/cg/ImageBufferUtilitiesCG.cpp
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/cg/ImageDecoderCG.cpp
|
|
|
|
platform/graphics/cg/ImageSourceCGMac.mm
|
2020-08-10 05:12:35 +00:00
|
|
|
platform/graphics/cg/ImageUtilitiesCG.cpp
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/cg/IntPointCG.cpp
|
|
|
|
platform/graphics/cg/IntRectCG.cpp
|
|
|
|
platform/graphics/cg/IntSizeCG.cpp
|
|
|
|
platform/graphics/cg/NativeImageCG.cpp
|
|
|
|
platform/graphics/cg/PDFDocumentImage.cpp
|
|
|
|
platform/graphics/cg/PathCG.cpp
|
|
|
|
platform/graphics/cg/PatternCG.cpp
|
|
|
|
platform/graphics/cg/SubimageCacheWithTimer.cpp
|
|
|
|
platform/graphics/cg/TransformationMatrixCG.cpp
|
|
|
|
platform/graphics/cg/UTIRegistry.cpp
|
[Cocoa] Add experimental MSE WebM parser
https://bugs.webkit.org/show_bug.cgi?id=214529
Source/ThirdParty/libwebrtc:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
Add the vp9_header_parser from libwebrtc to the project, and add its
symbols to the list of exported symbols. Because this header wants to
be installed to a "common/vp9_header_parser.h" path, split up the default
CopyHeadersInstallPhase into two separate CopyFiles build phases that
put headers into different locations.
* Configurations/libwebm.xcconfig:
* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:
* Source/third_party/libwebm/common/vp9_header_parser.h:
(vp9_parser::Vp9HeaderParser::color_range const):
(vp9_parser::Vp9HeaderParser::subsampling_x const):
(vp9_parser::Vp9HeaderParser::subsampling_y const):
* libwebrtc.xcodeproj/project.pbxproj:
Source/WebCore:
Reviewed by Eric Carlson.
Test: media/media-source/media-source-webm.html
Add an experimental MSE WebM parser to SourceBufferPrivateAVFObjC. This will require extensive refactoring
of SourceBufferPrivateAVFObjC, to extract out the parser into a new, virtualized class. This new parser can
take advantage of new C++>11 features such as lambdas to clean up some problematic existing code. The new
virtualized SourceBufferParser class uses passed-in Function objects, rather than pure-virtual Client classes
to notify it's parent object when the parser encounters initialization- or media-data.
Because SourceBufferPrivateAVFObjC will now have to deal with AudioTrackPrivate and VideoTrackPrivate objects
that are not necessarily Audio- and VideoTrackPrivateMediaSourceAVFObjC subclasses, move those classes notification
features up into Audio- and VideoTrackPrivate, again using a Function object rather than a client class.
Add a new SourceBufferParserWebM and associated AudioTrackPrivateWebM and VideoTrackPrivateWebM classes, which
use libwebm via libwebrtc to parse appended buffers. SourceBufferParserWebM feeds passed-in data into a
libwebm-provided parser of its own. It then builds up tracks and samples based on callbacks from that same parser,
constructing CMSampleBuffers and VideoTrackPrivate objects out of the underlying libwebm primitives.
Because WebM uses a UUID as its track identifier, the representation of a "trackID" inside WebCore must be
increased from an int to a uint64_t, or trackIDs will be truncated or zeroed when passed between classes and
when converted to and from AtomStrings.
This early implementation is not yet able to pass the WebM WPT media-source/ tests, as we only have a VP9 decoder
available, and those tests use both VP8 and Vorbis.
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebMParserEnabled):
(WebCore::RuntimeEnabledFeatures::webMParserEnabled const):
* platform/graphics/AudioTrackPrivate.h:
(WebCore::AudioTrackPrivate::setEnabled):
(WebCore::AudioTrackPrivate::setEnabledChangedCallback):
* platform/graphics/VP9Utilities.cpp:
(WebCore::isValidVPColorPrimaries):
(WebCore::isValidVPTransferCharacteristics):
(WebCore::isValidVPMatrixCoefficients):
(WebCore::parseVPCodecParameters):
* platform/graphics/VP9Utilities.h:
* platform/graphics/VideoTrackPrivate.h:
(WebCore::VideoTrackPrivate::setSelected):
(WebCore::VideoTrackPrivate::setSelectedChangedCallback):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp:
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::setEnabled):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::update):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::update):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
(WebCore::MediaSampleAVFObjC::create):
(WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
* platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.h: Added.
(isType):
* platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.mm: Added.
(-[WebAVStreamDataParserListener initWithParser:parent:]):
(-[WebAVStreamDataParserListener dealloc]):
(-[WebAVStreamDataParserListener invalidate]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):
(-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]):
(-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
(WebCore::SourceBufferParserAVFObjC::isContentTypeSupported):
(WebCore::SourceBufferParserAVFObjC::SourceBufferParserAVFObjC):
(WebCore::SourceBufferParserAVFObjC::~SourceBufferParserAVFObjC):
(WebCore::SourceBufferParserAVFObjC::appendData):
(WebCore::SourceBufferParserAVFObjC::flushPendingMediaData):
(WebCore::SourceBufferParserAVFObjC::setShouldProvideMediaDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::shouldProvideMediadataForTrackID):
(WebCore::SourceBufferParserAVFObjC::resetParserState):
(WebCore::SourceBufferParserAVFObjC::didParseStreamDataAsAsset):
(WebCore::SourceBufferParserAVFObjC::didFailToParseStreamDataWithError):
(WebCore::SourceBufferParserAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::create):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):
(WebCore::SourceBufferPrivateAVFObjC::didEncounterErrorDuringParsing):
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::appendCompleted):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::resetParserState):
(WebCore::SourceBufferPrivateAVFObjC::destroyParser):
(WebCore::SourceBufferPrivateAVFObjC::clearTracks):
(WebCore::SourceBufferPrivateAVFObjC::hasSelectedVideo const):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeSelected):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::parser const):
(WebCore::SourceBufferPrivateAVFObjC::attemptToDecrypt):
(WebCore::SourceBufferPrivateAVFObjC::flush):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::canSetMinimumUpcomingPresentationTime const):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC):
* platform/graphics/cocoa/AudioTrackPrivateWebM.cpp: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
(WebCore::AudioTrackPrivateWebM::create):
(WebCore::AudioTrackPrivateWebM::AudioTrackPrivateWebM):
(WebCore::AudioTrackPrivateWebM::id const):
(WebCore::AudioTrackPrivateWebM::label const):
(WebCore::AudioTrackPrivateWebM::language const):
(WebCore::AudioTrackPrivateWebM::trackIndex const):
* platform/graphics/cocoa/AudioTrackPrivateWebM.h: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
* platform/graphics/cocoa/SourceBufferParser.cpp: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
(WebCore::SourceBufferParser::isContentTypeSupported):
(WebCore::SourceBufferParser::create):
* platform/graphics/cocoa/SourceBufferParser.h: Added.
(WebCore::SourceBufferParser::setDidParseInitializationDataCallback):
(WebCore::SourceBufferParser::setDidEncounterErrorDuringParsingCallback):
(WebCore::SourceBufferParser::setDidProvideMediaDataCallback):
(WebCore::SourceBufferParser::setWillProvideContentKeyRequestInitializationDataForTrackIDCallback):
(WebCore::SourceBufferParser::setDidProvideContentKeyRequestInitializationDataForTrackIDCallback):
* platform/graphics/cocoa/SourceBufferParserWebM.cpp: Added.
(WebCore::isWebmParserAvailable):
(WebCore::SourceBufferParserWebM::isContentTypeSupported):
(WebCore::SourceBufferParserWebM::SourceBufferParserWebM):
(WebCore::SourceBufferParserWebM::appendData):
(WebCore::SourceBufferParserWebM::flushPendingMediaData):
(WebCore::SourceBufferParserWebM::setShouldProvideMediaDataForTrackID):
(WebCore::SourceBufferParserWebM::shouldProvideMediadataForTrackID):
(WebCore::SourceBufferParserWebM::resetParserState):
(WebCore::SourceBufferParserWebM::trackDataForTrackNumber):
(WebCore::SourceBufferParserWebM::OnElementBegin):
(WebCore::SourceBufferParserWebM::OnEbml):
(WebCore::SourceBufferParserWebM::OnSegmentBegin):
(WebCore::SourceBufferParserWebM::OnInfo):
(WebCore::SourceBufferParserWebM::OnClusterBegin):
(WebCore::SourceBufferParserWebM::OnTrackEntry):
(WebCore::SourceBufferParserWebM::OnBlockBegin):
(WebCore::SourceBufferParserWebM::OnBlockEnd):
(WebCore::SourceBufferParserWebM::OnSimpleBlockBegin):
(WebCore::SourceBufferParserWebM::OnSimpleBlockEnd):
(WebCore::SourceBufferParserWebM::OnBlockGroupBegin):
(WebCore::SourceBufferParserWebM::OnBlockGroupEnd):
(WebCore::convertToColorPrimaries):
(WebCore::convertToTransferCharacteristics):
(WebCore::convertToMatrixCoefficients):
(WebCore::convertSubsamplingXYToChromaSubsampling):
(WebCore::createFormatDescriptionFromVP9HeaderParser):
(WebCore::SourceBufferParserWebM::OnFrame):
* platform/graphics/cocoa/SourceBufferParserWebM.h: Added.
(WebCore::SourceBufferParserWebM::status const):
(WebCore::SourceBufferParserWebM::type const):
(isType):
* platform/graphics/cocoa/VP9UtilitiesCocoa.h:
* platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
(WebCore::isVP9DecoderAvailable):
(WebCore::validateVPParameters):
* platform/graphics/cocoa/VideoTrackPrivateWebM.cpp:
(WebCore::VideoTrackPrivateWebM::create):
(WebCore::VideoTrackPrivateWebM::VideoTrackPrivateWebM):
(WebCore::VideoTrackPrivateWebM::id const):
(WebCore::VideoTrackPrivateWebM::label const):
(WebCore::VideoTrackPrivateWebM::language const):
(WebCore::VideoTrackPrivateWebM::trackIndex const):
* platform/graphics/cocoa/VideoTrackPrivateWebM.h:
Source/WebKit:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
Add an Experimental setting to enable the MSE WebM parser (off by default).
* Shared/WebPreferences.yaml:
LayoutTests:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
* media/media-source/content/test-vp9-manifest.json: Added.
* media/media-source/content/test-vp9.webm: Added.
* media/media-source/media-source-webm-expected.txt: Added.
* media/media-source/media-source-webm.html: Added.
Canonical link: https://commits.webkit.org/227430@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-22 00:25:09 +00:00
|
|
|
platform/graphics/cocoa/AudioTrackPrivateWebM.cpp
|
2018-09-25 00:17:29 +00:00
|
|
|
platform/graphics/cocoa/ColorCocoa.mm
|
[Cocoa] Simplify NSArray, NSDictionary, and NSNumber idioms throughout WebKit
https://bugs.webkit.org/show_bug.cgi?id=210138
Reviewed by Alex Christensen.
Source/JavaScriptCore:
* API/JSValue.mm:
(valueToObjectWithoutCopy): Use @().
(valueToNumber): Ditto.
* API/tests/testapi.mm:
(-[TestObject callback:]): Use @[], @(), and @{}.
(-[TextXYZ click]): Ditto.
(testObjectiveCAPIMain): Ditto.
Source/WebCore:
- Added createNSArray and makeVector.
- Use createNSArray and makeVector<String> in many places where we convert
between NSArray and Vector, replacing multiple existing functions that were
doing the same job before; later can use them even more.
- Use @[] many places where we create an autoreleased NSArray.
- Use @{} many places where we create an autoreleased NSDictionary.
- Use @() many places where we create an autoreleased NSNumber.
* PlatformMac.cmake: Moved Float/IntRectMac.mm to Float/IntRectCocoa.mm.
* SourcesCocoa.txt: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AXAttributeStringSetBlockquoteLevel): Use @().
(AXAttributeStringSetHeadingLevel): Use @().
(-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]): Use @[].
(-[WebAccessibilityObjectWrapper _stringFromStartMarker:toEndMarker:attributed:]): Use @[].
(-[WebAccessibilityObjectWrapper elementsForRange:]): Use @[].
(-[WebAccessibilityObjectWrapper textMarkersForRange:]): Use @[].
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::textReplacementChangeDictionary): Use @().
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(makeVectorElement): Aded overload for AccessibilitySearchKey.
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
Use makeVector<AccessibilitySearchKey>.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(accessibilityTextCriteriaForParameterizedAttribute): Use makeVector<String>.
(accessibilitySearchTextCriteriaForParameterizedAttribute): Use makeVector<String>.
(AXAttributeStringSetStyle): Use @().
(AXAttributeStringSetBlockquoteLevel): Use @().
(AXAttributeStringSetHeadingLevel): Use @().
(-[WebAccessibilityObjectWrapper accessibilityActionNames]): Use @[].
(convertStringsToNSArray): Deleted.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Use @(), @[], and createNSArray.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
Ditto.
* bridge/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
Use @().
* editing/cocoa/AlternativeTextUIController.mm:
(WebCore::AlternativeTextUIController::alternativesForContext):
Use makeVector<String>.
* editing/cocoa/HTMLConverter.mm:
(defaultParagraphStyle): Use @[].
(HTMLConverter::computedAttributesForElement): Use @().
(HTMLConverter::_processMetaElementWithName): Use @().
(HTMLConverter::_addTableForElement): Use @().
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot const): Use @[].
* platform/cocoa/MIMETypeRegistryCocoa.mm:
(WebCore::MIMETypeRegistry::getExtensionsForMIMEType): Use makeVector<String>.
* platform/graphics/FloatRect.h: Added makeNSArrayElement overload so we can
convert Vector<FloatRect> into NSArray<NSValue>.
* platform/graphics/IntRect.h: Similarly for IntRect.
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::updateOptions): Use createNSArray.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::mediaDescriptionForKind): Use @[].
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Use @().
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use @().
(WebCore::MediaPlayerPrivateAVFoundationObjC::checkPlayability): Use @[].
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Use @{} and @().
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
(WebCore::PlatformCAAnimationCocoa::valueFunction const):
(WebCore::PlatformCAAnimationCocoa::setFromValue):
(WebCore::PlatformCAAnimationCocoa::copyFromValueFrom):
(WebCore::PlatformCAAnimationCocoa::setToValue):
(WebCore::PlatformCAAnimationCocoa::copyToValueFrom):
(WebCore::PlatformCAAnimationCocoa::setValues):
(WebCore::PlatformCAAnimationCocoa::copyValuesFrom):
(WebCore::PlatformCAAnimationCocoa::setKeyTimes):
(WebCore::PlatformCAAnimationCocoa::copyKeyTimesFrom):
(WebCore::PlatformCAAnimationCocoa::setTimingFunctions):
(WebCore::PlatformCAAnimationCocoa::copyTimingFunctionsFrom):
Use @(), @[], modern for loops, auto, and allocate with capacity.
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::PlatformCAFilters::filterValueForOperation): Use @().
* platform/graphics/cocoa/FloatRectCocoa.mm: Moved from mac/FloatRectMac.mm.
(WebCore::makeNSArrayElement): Added so we can convert Vector<FloatRect>
into NSArray<NSValue>.
* platform/graphics/cocoa/IntRectCocoa.mm: Moved from mac/IntRectMac.mm.
(WebCore::makeNSArrayElement): Similarly for IntRect.
(WebCore::enclosingIntRect): Use clampTo to be consistent with what
enclosingIntRect(FloatRect) does (while fixing check-webkit-style complaint).
* platform/graphics/cocoa/WebGLLayer.mm:
(-[WebGLLayer display]): Add WebCore namespace prefix; needed depending on
how sources get unified (and was affecting my local build when it temporarily
had an additional source file).
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): Ditto.
(-[WebGLLayer bindFramebufferToNextAvailableSurface]): Ditto.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::systemFontModificationAttributes): Use @().
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
(WebCore::createItemProviderRegistrationList): Use createNSArray.
(WebCore::PlatformPasteboard::updateSupportedTypeIdentifiers): Use createNSArray.
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard setItemProviders:]): Use @[].
* platform/ios/wak/WAKView.mm:
(-[WAKView subviews]): Dittto.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
(WebCore::PlatformPasteboard::getPathnamesForType const): Use makeVector<String>.
(WebCore::PlatformPasteboard::addTypes): Use makeVector<String>.
(WebCore::PlatformPasteboard::setTypes): Use makeVector<String>.
* platform/mac/StringUtilities.h: Removed
webCoreStringVectorFromNSStringArray, replaced by makeVector<String>
* platform/mac/StringUtilities.mm:
(WebCore::webCoreStringVectorFromNSStringArray): Deleted.
* platform/mac/WebCoreNSURLExtras.mm: Removed unneeded include.
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(WebCore::MediaRecorderPrivateWriter::setVideoInput): Use @().
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setupCaptureSession): Use @().
* platform/network/cocoa/CookieCocoa.mm:
(WebCore::Cookie::operator NSHTTPCookie * _Nullable const): Use @().
* platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::setCookiesFromDOM const): Use @{}.
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdatePlatformRequest): Use @YES/@NO.
Source/WebKit:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm: Remove uneeded include.
* Platform/mac/StringUtilities.mm: Ditto.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::replacedNSConcreteTask_launch): Use makeVector<String>.
(WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
Ditto.
* Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toSupportedNetworks): Deleted.
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Use createNSArray.
* Shared/mac/PasteboardTypes.mm:
(WebKit::PasteboardTypes::forEditing): Use @[].
(WebKit::PasteboardTypes::forURL): Ditto.
(WebKit::PasteboardTypes::forImages): Ditto.
(WebKit::PasteboardTypes::forImagesWithArchive): Ditto.
(WebKit::PasteboardTypes::forSelection): Ditto.
* UIProcess/API/Cocoa/WKContentRuleListStore.mm:
(-[WKContentRuleListStore getAvailableContentRuleListIdentifiers:]): Use createNSArray.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _getActivePagesOriginsInWebProcessForTesting:completionHandler:]): Ditto.
* UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:deferRunningUntilNotification:]):
Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setupPageConfiguration:]): Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _corsDisablingPatterns]): Use createNSArray.
(-[WKWebViewConfiguration _setCORSDisablingPatterns:]): Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _contentsOfUserInterfaceItem:]): Use @().
* UIProcess/API/Cocoa/_WKContentRuleListAction.mm:
(-[_WKContentRuleListAction notifications]): Use createNSArray.
* UIProcess/API/Cocoa/_WKCustomHeaderFields.mm:
(-[_WKCustomHeaderFields thirdPartyDomains]): Use createNSArray.
(-[_WKCustomHeaderFields setThirdPartyDomains:]): Use makeVector<String>.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]): Use createNSArray.
(-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]): Use makeVector<String>.
(-[_WKProcessPoolConfiguration alwaysRevalidatedURLSchemes]): Use createNSArray.
(-[_WKProcessPoolConfiguration setAlwaysRevalidatedURLSchemes:]): Use makeVector<String>.
* UIProcess/API/Cocoa/_WKUserContentWorldInternal.h:
(API::toStringVector): Deleted.
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
Use makeVector<String>.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::accessibilityAttributeValue): Use @[].
(WebKit::WebViewImpl::performDragOperation): Use makeVector<String>.
(WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination): Use @[].
(WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent): Use @[].
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::launchProcess): Use createNSArray.
(WebKit::isJavaUpdaterURL): Use @[].
(WebKit::PluginProcessProxy::launchApplicationAtURL): Use @{} and createNSArray.
(WebKit::isSilverlightPreferencesURL): Use @[].
* UIProcess/WebAuthentication/Cocoa/HidService.mm:
(WebKit::HidService::HidService): Use @() and fixed an over-release mistake.
This code was doing adoptNS on the result of +[NSNumberWithInt:], which is incorrect.
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
(WebKit::MockLocalConnection::getAttestation const): Use @[].
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textStylingAtPosition:inDirection:]): Use @().
(-[WKContentView requestRectsToEvadeForSelectionCommandsWithCompletionHandler:]): Use createNSArray.
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationLists:stagedDragSource:]):
Fixed a wasteful call to autorelease where we are adding an item to a dictionary. Calling get
is more efficient and still correct.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel imagePickerController:didFinishPickingMediaWithInfo:]): Use @[].
* UIProcess/ios/forms/WKFormColorPicker.mm:
(-[WKColorMatrixView initWithFrame:colorMatrix:]): Removed uneeded RetainPtr
local variable.
* UIProcess/mac/CorrectionPanel.mm:
(WebKit::CorrectionPanel::show): Use createNSArray.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::updateSpellingUIWithGrammarString): Use createNSArray.
(WebKit::TextChecker::getGuessesForWord): Use makeVector<String>.
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): Use @().
* UIProcess/mac/WKTextFinderClient.mm:
(arrayFromRects): Deleted.
(-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): Use createNSArray.
* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
(-[WKDataListSuggestionsController notifyAccessibilityClients:]): Use @{}
and fix a bug where this was creating a backwards dictionary. So this never
could have been working before, making me wonder how we test it.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::searchTheWeb): Use @[].
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: Removed toNSArray.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::toNSArray): Deleted.
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
(-[WKDOMNode textRects]): Use createNSArray.
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange textRects]): Ditto.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::setBundleParameter): Use @{}.
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
(WebKit::makeRenderLayer): Use @[].
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard): Use makeVector<String>.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationDidEnterBackground): Use @().
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::suspendPainting): Use @{}.
(WebKit::TiledCoreAnimationDrawingArea::resumePainting): Use @{}.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
Removed an unneeded include.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Ditto.
(-[WKAccessibilityWebPageObject accessibilityActionNames]): Use @[].
(-[WKAccessibilityWebPageObject accessibilityChildren]): Use @[].
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::getActivePagesOriginsForTesting): Use makeVector<String>.
Source/WebKitLegacy/ios:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::runOpenPanel): Use createNSArray.
* WebCoreSupport/WebVisiblePosition.mm:
(-[WebVisiblePosition enclosingRangeWithDictationPhraseAlternatives:]):
Use createNSArray.
* WebCoreSupport/WebVisiblePositionInternal.h:
Added #if so that this correctly doesn't compile anything on Mac.
* WebView/WebPDFViewIOS.mm:
(+[WebPDFView supportedMIMETypes]): Use @[].
Source/WebKitLegacy/mac:
* DOM/DOM.mm:
(kit): Deleted overload that takes Vector<IntRect>.
(-[DOMNode textRects]): Use createNSArray.
(-[DOMRange textRects]): Ditto.
* DOM/ExceptionHandlers.mm:
(raiseDOMErrorException): Use @().
* History/WebBackForwardList.mm:
(-[WebBackForwardList dictionaryRepresentation]): Use @{}.
* History/WebHistory.mm:
(+[WebHistoryPrivate initialize]): Use @{}.
(-[WebHistory _sendNotification:entries:]): Use @{}.
* History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]): Use makeVector<String>.
(-[WebHistoryItem dictionaryRepresentation:]): Use createNSArray and @().
* History/WebURLsWithTitles.m:
(+[WebURLsWithTitles arrayWithIFURLsWithTitlesPboardType]): Use @[].
(+[WebURLsWithTitles writeURLs:andTitles:toPasteboard:]): Use @[].
* Misc/WebCache.mm:
(+[WebCache statistics]): Use @[], @{}, and @().
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics memoryStatistics]): Ditto.
* Misc/WebKitErrors.m:
(-[NSError _webkit_initWithDomain:code:URL:]): Use @().
(+[NSError _registerWebKitErrors]): Use @().
(-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]): Use @().
* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:]): Use @{}.
(-[NSString _web_widthWithFont:]): Use @{}.
* Misc/WebNSFileManagerExtras.mm: Removed unneeded include.
* Misc/WebNSPasteboardExtras.mm:
(+[NSPasteboard _web_dragTypesForURL]): Use @[].
(-[NSPasteboard _web_writeURL:andTitle:types:]): Use @[].
(+[NSPasteboard _web_setFindPasteboardString:withOwner:]): Use @[].
* Misc/WebNSURLExtras.mm: Removed unneeded include.
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::spawnPluginHost): Use @{}.
* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WKPCIdentifierInfo): Use @().
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::addValueToArray): Use @().
* Plugins/Hosted/WebHostedNetscapePluginView.mm: Removed unneeded include.
* Plugins/WebBasePluginPackage.mm: Ditto.
* Plugins/WebPluginContainerCheck.mm:
(-[WebPluginContainerCheck _actionInformationWithURL:]): Use @{}.
* Plugins/WebPluginDatabase.mm:
(+[WebPluginDatabase _defaultPlugInPaths]): Use @[].
* Storage/WebDatabaseManager.mm:
(-[WebDatabaseManager databasesWithOrigin:]): Use createNSArray.
* WebCoreSupport/CorrectionPanel.mm:
(CorrectionPanel::show): Use createNSArray.
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::addMessageToConsole): Use @().
* WebCoreSupport/WebEditorClient.mm:
(attributesForAttributedStringConversion): Use @().
(WebEditorClient::getGuessesForWord): Use makeVector<String>.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::actionDictionary const): Use @().
(kit): Deleted overload that takes Vector<String>.
(pluginView): Use @{}.
(WebFrameLoaderClient::createPlugin): Use createNSArray, @{}, and @().
(WebFrameLoaderClient::createJavaAppletWidget): Use createNSArray.
* WebCoreSupport/WebOpenPanelResultListener.mm:
(-[WebOpenPanelResultListener chooseFilenames:]): Use makeVector<String>.
(-[WebOpenPanelResultListener chooseFilename:displayString:iconImage:]): Use @[].
(-[WebOpenPanelResultListener chooseFilenames:displayString:iconImage:]): Use makeVector<String>.
* WebCoreSupport/WebSelectionServiceController.mm:
(WebSelectionServiceController::handleSelectionServiceClick):
Comment out an unused argument.
* WebView/WebFrame.mm:
(-[WebFrame _rectsForRange:]): Use createNSArrray.
(-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]): Use createNSArray and @[].
(-[WebFrame childFrames]): Use @[].
* WebView/WebHTMLView.mm:
(+[WebHTMLView _selectionPasteboardTypes]): Use @[].
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Use @[].
(-[WebHTMLView knowsPageRange:]): Use @[].
(-[WebHTMLView accessibilityAttributeValue:]): Use @[].
(-[WebHTMLView copyFont:]): Use @[].
(-[WebHTMLView _interpretKeyEvent:savingCommands:]): Use @[].
(-[WebHTMLView selectionTextRects]): Use createNSArray.
(-[WebHTMLView rectsForTextMatches]): Use createNSArray and @[].
* WebView/WebPDFRepresentation.mm: Removed unneeded include.
(+[WebPDFRepresentation postScriptMIMETypes]): Use @[].
(+[WebPDFRepresentation supportedMIMETypes]): Use @[].
* WebView/WebPDFView.mm:
(-[WebPDFView elementAtPoint:]): Use @{} and @().
(-[WebPDFView viewState]): Use @().
(-[WebPDFView selectionTextRects]): Use @[].
(-[WebPDFView pasteboardTypesForSelection]): Use @[].
(-[WebPDFView _menuItemsFromPDFKitForEvent:]): Use @().
(-[WebPDFView _openWithFinder:]): Use @{} and @().
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Use @().
(-[WebPreferences _setUnsignedIntValue:forKey:]): Use @().
(+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Use @().
(-[WebPreferences setStorageBlockingPolicy:]): Use @{} and @().
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::sourceParsed): Use @().
* WebView/WebTextCompletionController.mm:
(-[WebTextCompletionController _placePopupWindow:]): Use @{}.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Use makeVector<String>.
(-[WebView _contentsOfUserInterfaceItem:]): Use @().
(toStringVector): Deleted.
(+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
Use makeVector<String>.
(+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
Use makeVector<String>.
(-[WebView _elementAtWindowPoint:]): Use @{}.
(-[WebView pasteboardTypesForSelection]): Use @[].
(-[WebView pasteboardTypesForElement:]): Use @[].
(-[WebView rectsForTextMatches]): Use @[].
(-[WebView _searchWithGoogleFromMenu:]): Use @[].
(-[WebView _setFontWhitelist:]): Use makeVector<String>.
Source/WTF:
* WTF.xcodeproj/project.pbxproj: Added VectorCocoa.h.
* wtf/PlatformMac.cmake: Ditto.
* wtf/cocoa/NSURLExtras.mm: Removed unneeded include.
* wtf/cocoa/URLCocoa.mm: Ditto.
* wtf/cocoa/VectorCocoa.h: Added. Contains createNSArray and makeVector
function templates for converting NSArray to and from Vector.
* wtf/text/WTFString.h: Added makeNSArrayElement and makeVectorElement
functions, making createNSArray and makeVector compatible with String.
* wtf/text/cocoa/StringCocoa.mm:
(WTF::makeNSArrayElement): Added.
(WTF::makeVectorElement): Added.
Tools:
* DumpRenderTree/AccessibilityController.h: Remove use of NotificationHandler
type; it's just "id".
* DumpRenderTree/AccessibilityUIElement.cpp:
(convertElementsToObjectArray): Moved this up in the file, removed unneeded
use of JSValueToObject and unused exception argument.
(elementsForRangeCallback): Use convertElementsToObjectArray.
(columnHeadersCallback): Updated for removed exception argument.
(rowHeadersCallback): Ditto.
(uiElementArrayAttributeValueCallback): Ditto.
* DumpRenderTree/AccessibilityUIElement.h: Changed to use RetainPtr.
* DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
(createCoreAnimationLayer): Use @{}.
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::AccessibilityUIElement): Removed some unneeded
code now that we use RetainPtr.
(AccessibilityUIElement::~AccessibilityUIElement): Deleted.
(AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use @[].
(AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
(AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers): Use @[].
* DumpRenderTree/ios/TextInputControllerIOS.m:
(-[TextInputController markedRange]): Use @[].
* DumpRenderTree/mac/AccessibilityCommonMac.mm:
(searchPredicateParameterizedAttributeForSearchCriteria): Tweak a little.
* DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
(-[NSString createJSStringRef]): Deleted. Duplicate of a method already
implemented in anothe file.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(makeVectorElement): Added overloads to make both
makeVector<AccessibilityTextMarkerRange> and
makeVector<AccessibilityUIElement> work.
(AccessibilityUIElement::AccessibilityUIElement): Removed some unneeded
code now that we use RetainPtr.
(convertVectorToObjectArray): Removed unneeded use of JSValueToObject
and unneeded exception argument.
(convertNSArrayToVector): Deleted.
(AccessibilityUIElement::getLinkedUIElements): Use
makeVector<AccessibilityUIElement>.
(AccessibilityUIElement::getDocumentLinks): Ditto.
(AccessibilityUIElement::getChildren): Ditto.
(AccessibilityUIElement::getChildrenWithRange): Ditto.
(AccessibilityUIElement::rowHeaders const): Ditto.
(AccessibilityUIElement::columnHeaders const): Ditto.
(AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto.
(AccessibilityUIElement::role): Updated since m_element is a RetainPtr.
(AccessibilityUIElement::subrole): Ditto.
(AccessibilityUIElement::roleDescription): Ditto.
(AccessibilityUIElement::computedRoleString): Ditto.
(AccessibilityUIElement::title): Ditto.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::orientation const): Ditto.
(AccessibilityUIElement::stringValue): Ditto.
(AccessibilityUIElement::language): Ditto.
(AccessibilityUIElement::helpText const): Ditto.
(AccessibilityUIElement::lineForIndex): Use @().
(AccessibilityUIElement::rangeForLine): Use @().
(AccessibilityUIElement::searchTextWithCriteria): Use
makeVector<AccessibilityTextMarkerRange>.
(AccessibilityUIElement::attributesOfColumnHeaders): Use
makeVector<AccessibilityUIElement>.
(AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(AccessibilityUIElement::attributesOfColumns): Ditto.
(AccessibilityUIElement::attributesOfRows): Ditto.
(AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(AccessibilityUIElement::cellForColumnAndRow): Use @[] and @().
(AccessibilityUIElement::setSelectedChild const): Use @[].
(AccessibilityUIElement::setSelectedChildAtIndex const): Use @[].
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
Use @{}, @YES, and @NO.
(AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
* DumpRenderTree/mac/DumpRenderTree.mm:
(addTestPluginsToPluginSearchPath): Use @[].
(resetWebViewToConsistentStateBeforeTesting): Use @[].
* DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
(-[DumpRenderTreePasteboard declareType:owner:]): Use @[].
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController beginDragWithFiles:]): Use @().
(-[EventSendingController sentTouchEventOfType:]): Use @().
* DumpRenderTree/mac/MockWebNotificationProvider.mm:
(-[MockWebNotificationProvider cancelNotification:]): Use @[].
* DumpRenderTree/mac/ObjCController.m:
(-[ObjCController objectOfClass:]): Use @().
(-[ObjCController arrayOfString]): Use @[].
(-[ObjCController testWrapperRoundTripping:]): Use @().
(-[ObjCController testArray]): Use @[].
* DumpRenderTree/mac/TestRunnerMac.mm:
(originsArrayToJS): Removed unneeded use of JSValueToObject.
* DumpRenderTree/mac/TextInputControllerMac.m:
(-[TextInputController markedRange]): Use @[] and @().
(-[TextInputController selectedRange]): Use @[] and @().
(-[TextInputController firstRectForCharactersFrom:length:]):
Use @[] and @().
(-[TextInputController dictatedStringWithPrimaryString:alternative:alternativeOffset:alternativeLength:]):
Use @[].
(-[TextInputController interpretKeyEvents:withSender:]): Use @[].
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::copyText): Use [].
* DumpRenderTree/win/AccessibilityUIElementWin.cpp: Deleted an
unneeded copy constructor and destructor.
* TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
(-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Use @{}.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(toVector): Deleted.
(-[ContentRuleListNotificationDelegate _webView:contentRuleListWithIdentifier:performedAction:forURL:]):
Use makeVector<String>.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(writeImageDataToPasteboard): Use @[] and @{}.
(writeBundleFileToPasteboard): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(runWebsiteDataStoreCustomPaths): Use @[].
* TestWebKitAPI/Tests/mac/WebViewCanPasteURL.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm:
(-[DidCreateJavaScriptContextFrameLoadDelegate webView:didCreateJavaScriptContext:forFrame:]):
Use @[].
* TestWebKitAPI/ios/mainIOS.mm:
(main): Use @{}.
* TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
(TestWebKitAPI::InjectedBundleController::platformInitialize): Use @{} and @().
* TestWebKitAPI/mac/mainMac.mm:
(main): Use {}.
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
Use id instead of NotificationHandler.
* WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h:
Use id for PlatformTextMarkerRange. Added an overload of makeVectorElement
to make makeVector<RefPtr<AccessibilityTextMarkerRange>> work.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
Use RetainPtr. Added an overload of makeVectorElement to make
makeVector<RefPtr<AccessibilityUIElement>> work.
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
Removed unneeded include.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::convertNSArrayToVector): Deleted.
(WTR::AccessibilityUIElement::AccessibilityUIElement): Simplified
since we use RetainPtr.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Ditto.
(WTR::convertElementsToObjectArray): Removed unneeded use of
JSValueToObject.
(WTR::AccessibilityUIElement::elementsForRange): Use
makeVector<RefPtr<AccessibilityUIElement>>.
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker):
Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers):
* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
(WTR::InjectedBundle::platformInitialize): Use @{}.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::AccessibilityUIElement): Simplified
since we use RetainPtr.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Ditto.
(WTR::convertNSArrayToVector): Deleted.
(WTR::AccessibilityUIElement::getLinkedUIElements): Use
makeVector<RefPtr<AccessibilityUIElement>>.
(WTR::AccessibilityUIElement::getDocumentLinks): Ditto.
(WTR::AccessibilityUIElement::getUIElementsWithAttribute const): Ditto.
(WTR::AccessibilityUIElement::getChildren): Ditto.
(WTR::AccessibilityUIElement::getChildrenWithRange): Ditto.
(WTR::AccessibilityUIElement::rowHeaders const): Ditto.
(WTR::AccessibilityUIElement::columnHeaders const): Ditto.
(WTR::AccessibilityUIElement::allAttributes): Updated since m_element
is a RetainPtr.
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto.
(WTR::AccessibilityUIElement::role): Ditto.
(WTR::AccessibilityUIElement::subrole): Ditto.
(WTR::AccessibilityUIElement::roleDescription): Ditto.
(WTR::AccessibilityUIElement::computedRoleString): Ditto.
(WTR::AccessibilityUIElement::title): Ditto.
(WTR::AccessibilityUIElement::description): Ditto.
(WTR::AccessibilityUIElement::orientation const): Ditto.
(WTR::AccessibilityUIElement::stringValue): Ditto.
(WTR::AccessibilityUIElement::language): Ditto.
(WTR::AccessibilityUIElement::helpText const): Ditto.
(WTR::AccessibilityUIElement::lineForIndex): Use @().
(WTR::AccessibilityUIElement::rangeForLine): Use @().
(WTR::AccessibilityUIElement::searchTextWithCriteria): Use
makeVector<RefPtr<AccessibilityTextMarkerRange>>.
(WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfColumns): Ditto.
(WTR::AccessibilityUIElement::attributesOfRows): Ditto.
(WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(WTR::AccessibilityUIElement::cellForColumnAndRow): Use @[] and @().
(WTR::AccessibilityUIElement::setSelectedChild const): Use @[].
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const): Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveAllStorageAccessEntries): Take Vector&&.
(WTR::TestInvocation::didReceiveWebViewCategory): Take String&&.
* WebKitTestRunner/TestInvocation.h: Updated for the above.
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaPlatformInitialize): Use @{}and @().
(WTR::TestController::getAllStorageAccessEntries): Use makeVector<String>.
(WTR::TestController::loadedThirdPartyDomains): Use makeVector<String>.
(WTR::TestController::getWebViewCategory): Update to pass String&&.
(WTR::TestController::setAllowedMenuActions): Use createNSArray.
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator interpolatedEvents:]): Use @().
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::changeWindowScaleIfNeeded): Use @{} and @().
* WebKitTestRunner/mac/TestControllerMac.mm: Removed unneeded include.
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::copyText): Use @[].
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
(-[WebKitTestRunnerPasteboard declareType:owner:]): Use @[].
Canonical link: https://commits.webkit.org/223199@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-10 02:11:30 +00:00
|
|
|
platform/graphics/cocoa/FloatRectCocoa.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/cocoa/FontCacheCoreText.cpp
|
|
|
|
platform/graphics/cocoa/FontCascadeCocoa.mm
|
2020-09-11 20:27:38 +00:00
|
|
|
platform/graphics/cocoa/FontCocoa.cpp
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/cocoa/FontDescriptionCocoa.cpp
|
|
|
|
platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp
|
|
|
|
platform/graphics/cocoa/FontPlatformDataCocoa.mm
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/graphics/cocoa/GraphicsContextCocoa.mm
|
2020-12-09 18:32:29 +00:00
|
|
|
platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm
|
2019-03-18 22:29:55 +00:00
|
|
|
platform/graphics/cocoa/HEVCUtilitiesCocoa.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/cocoa/IOSurface.mm
|
|
|
|
platform/graphics/cocoa/IOSurfacePoolCocoa.mm
|
[Cocoa] Simplify NSArray, NSDictionary, and NSNumber idioms throughout WebKit
https://bugs.webkit.org/show_bug.cgi?id=210138
Reviewed by Alex Christensen.
Source/JavaScriptCore:
* API/JSValue.mm:
(valueToObjectWithoutCopy): Use @().
(valueToNumber): Ditto.
* API/tests/testapi.mm:
(-[TestObject callback:]): Use @[], @(), and @{}.
(-[TextXYZ click]): Ditto.
(testObjectiveCAPIMain): Ditto.
Source/WebCore:
- Added createNSArray and makeVector.
- Use createNSArray and makeVector<String> in many places where we convert
between NSArray and Vector, replacing multiple existing functions that were
doing the same job before; later can use them even more.
- Use @[] many places where we create an autoreleased NSArray.
- Use @{} many places where we create an autoreleased NSDictionary.
- Use @() many places where we create an autoreleased NSNumber.
* PlatformMac.cmake: Moved Float/IntRectMac.mm to Float/IntRectCocoa.mm.
* SourcesCocoa.txt: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AXAttributeStringSetBlockquoteLevel): Use @().
(AXAttributeStringSetHeadingLevel): Use @().
(-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]): Use @[].
(-[WebAccessibilityObjectWrapper _stringFromStartMarker:toEndMarker:attributed:]): Use @[].
(-[WebAccessibilityObjectWrapper elementsForRange:]): Use @[].
(-[WebAccessibilityObjectWrapper textMarkersForRange:]): Use @[].
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::textReplacementChangeDictionary): Use @().
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(makeVectorElement): Aded overload for AccessibilitySearchKey.
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
Use makeVector<AccessibilitySearchKey>.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(accessibilityTextCriteriaForParameterizedAttribute): Use makeVector<String>.
(accessibilitySearchTextCriteriaForParameterizedAttribute): Use makeVector<String>.
(AXAttributeStringSetStyle): Use @().
(AXAttributeStringSetBlockquoteLevel): Use @().
(AXAttributeStringSetHeadingLevel): Use @().
(-[WebAccessibilityObjectWrapper accessibilityActionNames]): Use @[].
(convertStringsToNSArray): Deleted.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Use @(), @[], and createNSArray.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
Ditto.
* bridge/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
Use @().
* editing/cocoa/AlternativeTextUIController.mm:
(WebCore::AlternativeTextUIController::alternativesForContext):
Use makeVector<String>.
* editing/cocoa/HTMLConverter.mm:
(defaultParagraphStyle): Use @[].
(HTMLConverter::computedAttributesForElement): Use @().
(HTMLConverter::_processMetaElementWithName): Use @().
(HTMLConverter::_addTableForElement): Use @().
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot const): Use @[].
* platform/cocoa/MIMETypeRegistryCocoa.mm:
(WebCore::MIMETypeRegistry::getExtensionsForMIMEType): Use makeVector<String>.
* platform/graphics/FloatRect.h: Added makeNSArrayElement overload so we can
convert Vector<FloatRect> into NSArray<NSValue>.
* platform/graphics/IntRect.h: Similarly for IntRect.
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::updateOptions): Use createNSArray.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::mediaDescriptionForKind): Use @[].
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Use @().
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use @().
(WebCore::MediaPlayerPrivateAVFoundationObjC::checkPlayability): Use @[].
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Use @{} and @().
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
(WebCore::PlatformCAAnimationCocoa::valueFunction const):
(WebCore::PlatformCAAnimationCocoa::setFromValue):
(WebCore::PlatformCAAnimationCocoa::copyFromValueFrom):
(WebCore::PlatformCAAnimationCocoa::setToValue):
(WebCore::PlatformCAAnimationCocoa::copyToValueFrom):
(WebCore::PlatformCAAnimationCocoa::setValues):
(WebCore::PlatformCAAnimationCocoa::copyValuesFrom):
(WebCore::PlatformCAAnimationCocoa::setKeyTimes):
(WebCore::PlatformCAAnimationCocoa::copyKeyTimesFrom):
(WebCore::PlatformCAAnimationCocoa::setTimingFunctions):
(WebCore::PlatformCAAnimationCocoa::copyTimingFunctionsFrom):
Use @(), @[], modern for loops, auto, and allocate with capacity.
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::PlatformCAFilters::filterValueForOperation): Use @().
* platform/graphics/cocoa/FloatRectCocoa.mm: Moved from mac/FloatRectMac.mm.
(WebCore::makeNSArrayElement): Added so we can convert Vector<FloatRect>
into NSArray<NSValue>.
* platform/graphics/cocoa/IntRectCocoa.mm: Moved from mac/IntRectMac.mm.
(WebCore::makeNSArrayElement): Similarly for IntRect.
(WebCore::enclosingIntRect): Use clampTo to be consistent with what
enclosingIntRect(FloatRect) does (while fixing check-webkit-style complaint).
* platform/graphics/cocoa/WebGLLayer.mm:
(-[WebGLLayer display]): Add WebCore namespace prefix; needed depending on
how sources get unified (and was affecting my local build when it temporarily
had an additional source file).
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): Ditto.
(-[WebGLLayer bindFramebufferToNextAvailableSurface]): Ditto.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::systemFontModificationAttributes): Use @().
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
(WebCore::createItemProviderRegistrationList): Use createNSArray.
(WebCore::PlatformPasteboard::updateSupportedTypeIdentifiers): Use createNSArray.
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard setItemProviders:]): Use @[].
* platform/ios/wak/WAKView.mm:
(-[WAKView subviews]): Dittto.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
(WebCore::PlatformPasteboard::getPathnamesForType const): Use makeVector<String>.
(WebCore::PlatformPasteboard::addTypes): Use makeVector<String>.
(WebCore::PlatformPasteboard::setTypes): Use makeVector<String>.
* platform/mac/StringUtilities.h: Removed
webCoreStringVectorFromNSStringArray, replaced by makeVector<String>
* platform/mac/StringUtilities.mm:
(WebCore::webCoreStringVectorFromNSStringArray): Deleted.
* platform/mac/WebCoreNSURLExtras.mm: Removed unneeded include.
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(WebCore::MediaRecorderPrivateWriter::setVideoInput): Use @().
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setupCaptureSession): Use @().
* platform/network/cocoa/CookieCocoa.mm:
(WebCore::Cookie::operator NSHTTPCookie * _Nullable const): Use @().
* platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::setCookiesFromDOM const): Use @{}.
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdatePlatformRequest): Use @YES/@NO.
Source/WebKit:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm: Remove uneeded include.
* Platform/mac/StringUtilities.mm: Ditto.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::replacedNSConcreteTask_launch): Use makeVector<String>.
(WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
Ditto.
* Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toSupportedNetworks): Deleted.
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Use createNSArray.
* Shared/mac/PasteboardTypes.mm:
(WebKit::PasteboardTypes::forEditing): Use @[].
(WebKit::PasteboardTypes::forURL): Ditto.
(WebKit::PasteboardTypes::forImages): Ditto.
(WebKit::PasteboardTypes::forImagesWithArchive): Ditto.
(WebKit::PasteboardTypes::forSelection): Ditto.
* UIProcess/API/Cocoa/WKContentRuleListStore.mm:
(-[WKContentRuleListStore getAvailableContentRuleListIdentifiers:]): Use createNSArray.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _getActivePagesOriginsInWebProcessForTesting:completionHandler:]): Ditto.
* UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:deferRunningUntilNotification:]):
Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setupPageConfiguration:]): Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _corsDisablingPatterns]): Use createNSArray.
(-[WKWebViewConfiguration _setCORSDisablingPatterns:]): Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _contentsOfUserInterfaceItem:]): Use @().
* UIProcess/API/Cocoa/_WKContentRuleListAction.mm:
(-[_WKContentRuleListAction notifications]): Use createNSArray.
* UIProcess/API/Cocoa/_WKCustomHeaderFields.mm:
(-[_WKCustomHeaderFields thirdPartyDomains]): Use createNSArray.
(-[_WKCustomHeaderFields setThirdPartyDomains:]): Use makeVector<String>.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]): Use createNSArray.
(-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]): Use makeVector<String>.
(-[_WKProcessPoolConfiguration alwaysRevalidatedURLSchemes]): Use createNSArray.
(-[_WKProcessPoolConfiguration setAlwaysRevalidatedURLSchemes:]): Use makeVector<String>.
* UIProcess/API/Cocoa/_WKUserContentWorldInternal.h:
(API::toStringVector): Deleted.
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
Use makeVector<String>.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::accessibilityAttributeValue): Use @[].
(WebKit::WebViewImpl::performDragOperation): Use makeVector<String>.
(WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination): Use @[].
(WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent): Use @[].
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::launchProcess): Use createNSArray.
(WebKit::isJavaUpdaterURL): Use @[].
(WebKit::PluginProcessProxy::launchApplicationAtURL): Use @{} and createNSArray.
(WebKit::isSilverlightPreferencesURL): Use @[].
* UIProcess/WebAuthentication/Cocoa/HidService.mm:
(WebKit::HidService::HidService): Use @() and fixed an over-release mistake.
This code was doing adoptNS on the result of +[NSNumberWithInt:], which is incorrect.
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
(WebKit::MockLocalConnection::getAttestation const): Use @[].
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textStylingAtPosition:inDirection:]): Use @().
(-[WKContentView requestRectsToEvadeForSelectionCommandsWithCompletionHandler:]): Use createNSArray.
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationLists:stagedDragSource:]):
Fixed a wasteful call to autorelease where we are adding an item to a dictionary. Calling get
is more efficient and still correct.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel imagePickerController:didFinishPickingMediaWithInfo:]): Use @[].
* UIProcess/ios/forms/WKFormColorPicker.mm:
(-[WKColorMatrixView initWithFrame:colorMatrix:]): Removed uneeded RetainPtr
local variable.
* UIProcess/mac/CorrectionPanel.mm:
(WebKit::CorrectionPanel::show): Use createNSArray.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::updateSpellingUIWithGrammarString): Use createNSArray.
(WebKit::TextChecker::getGuessesForWord): Use makeVector<String>.
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): Use @().
* UIProcess/mac/WKTextFinderClient.mm:
(arrayFromRects): Deleted.
(-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): Use createNSArray.
* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
(-[WKDataListSuggestionsController notifyAccessibilityClients:]): Use @{}
and fix a bug where this was creating a backwards dictionary. So this never
could have been working before, making me wonder how we test it.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::searchTheWeb): Use @[].
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: Removed toNSArray.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::toNSArray): Deleted.
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
(-[WKDOMNode textRects]): Use createNSArray.
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange textRects]): Ditto.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::setBundleParameter): Use @{}.
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
(WebKit::makeRenderLayer): Use @[].
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard): Use makeVector<String>.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationDidEnterBackground): Use @().
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::suspendPainting): Use @{}.
(WebKit::TiledCoreAnimationDrawingArea::resumePainting): Use @{}.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
Removed an unneeded include.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Ditto.
(-[WKAccessibilityWebPageObject accessibilityActionNames]): Use @[].
(-[WKAccessibilityWebPageObject accessibilityChildren]): Use @[].
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::getActivePagesOriginsForTesting): Use makeVector<String>.
Source/WebKitLegacy/ios:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::runOpenPanel): Use createNSArray.
* WebCoreSupport/WebVisiblePosition.mm:
(-[WebVisiblePosition enclosingRangeWithDictationPhraseAlternatives:]):
Use createNSArray.
* WebCoreSupport/WebVisiblePositionInternal.h:
Added #if so that this correctly doesn't compile anything on Mac.
* WebView/WebPDFViewIOS.mm:
(+[WebPDFView supportedMIMETypes]): Use @[].
Source/WebKitLegacy/mac:
* DOM/DOM.mm:
(kit): Deleted overload that takes Vector<IntRect>.
(-[DOMNode textRects]): Use createNSArray.
(-[DOMRange textRects]): Ditto.
* DOM/ExceptionHandlers.mm:
(raiseDOMErrorException): Use @().
* History/WebBackForwardList.mm:
(-[WebBackForwardList dictionaryRepresentation]): Use @{}.
* History/WebHistory.mm:
(+[WebHistoryPrivate initialize]): Use @{}.
(-[WebHistory _sendNotification:entries:]): Use @{}.
* History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]): Use makeVector<String>.
(-[WebHistoryItem dictionaryRepresentation:]): Use createNSArray and @().
* History/WebURLsWithTitles.m:
(+[WebURLsWithTitles arrayWithIFURLsWithTitlesPboardType]): Use @[].
(+[WebURLsWithTitles writeURLs:andTitles:toPasteboard:]): Use @[].
* Misc/WebCache.mm:
(+[WebCache statistics]): Use @[], @{}, and @().
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics memoryStatistics]): Ditto.
* Misc/WebKitErrors.m:
(-[NSError _webkit_initWithDomain:code:URL:]): Use @().
(+[NSError _registerWebKitErrors]): Use @().
(-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]): Use @().
* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:]): Use @{}.
(-[NSString _web_widthWithFont:]): Use @{}.
* Misc/WebNSFileManagerExtras.mm: Removed unneeded include.
* Misc/WebNSPasteboardExtras.mm:
(+[NSPasteboard _web_dragTypesForURL]): Use @[].
(-[NSPasteboard _web_writeURL:andTitle:types:]): Use @[].
(+[NSPasteboard _web_setFindPasteboardString:withOwner:]): Use @[].
* Misc/WebNSURLExtras.mm: Removed unneeded include.
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::spawnPluginHost): Use @{}.
* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WKPCIdentifierInfo): Use @().
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::addValueToArray): Use @().
* Plugins/Hosted/WebHostedNetscapePluginView.mm: Removed unneeded include.
* Plugins/WebBasePluginPackage.mm: Ditto.
* Plugins/WebPluginContainerCheck.mm:
(-[WebPluginContainerCheck _actionInformationWithURL:]): Use @{}.
* Plugins/WebPluginDatabase.mm:
(+[WebPluginDatabase _defaultPlugInPaths]): Use @[].
* Storage/WebDatabaseManager.mm:
(-[WebDatabaseManager databasesWithOrigin:]): Use createNSArray.
* WebCoreSupport/CorrectionPanel.mm:
(CorrectionPanel::show): Use createNSArray.
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::addMessageToConsole): Use @().
* WebCoreSupport/WebEditorClient.mm:
(attributesForAttributedStringConversion): Use @().
(WebEditorClient::getGuessesForWord): Use makeVector<String>.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::actionDictionary const): Use @().
(kit): Deleted overload that takes Vector<String>.
(pluginView): Use @{}.
(WebFrameLoaderClient::createPlugin): Use createNSArray, @{}, and @().
(WebFrameLoaderClient::createJavaAppletWidget): Use createNSArray.
* WebCoreSupport/WebOpenPanelResultListener.mm:
(-[WebOpenPanelResultListener chooseFilenames:]): Use makeVector<String>.
(-[WebOpenPanelResultListener chooseFilename:displayString:iconImage:]): Use @[].
(-[WebOpenPanelResultListener chooseFilenames:displayString:iconImage:]): Use makeVector<String>.
* WebCoreSupport/WebSelectionServiceController.mm:
(WebSelectionServiceController::handleSelectionServiceClick):
Comment out an unused argument.
* WebView/WebFrame.mm:
(-[WebFrame _rectsForRange:]): Use createNSArrray.
(-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]): Use createNSArray and @[].
(-[WebFrame childFrames]): Use @[].
* WebView/WebHTMLView.mm:
(+[WebHTMLView _selectionPasteboardTypes]): Use @[].
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Use @[].
(-[WebHTMLView knowsPageRange:]): Use @[].
(-[WebHTMLView accessibilityAttributeValue:]): Use @[].
(-[WebHTMLView copyFont:]): Use @[].
(-[WebHTMLView _interpretKeyEvent:savingCommands:]): Use @[].
(-[WebHTMLView selectionTextRects]): Use createNSArray.
(-[WebHTMLView rectsForTextMatches]): Use createNSArray and @[].
* WebView/WebPDFRepresentation.mm: Removed unneeded include.
(+[WebPDFRepresentation postScriptMIMETypes]): Use @[].
(+[WebPDFRepresentation supportedMIMETypes]): Use @[].
* WebView/WebPDFView.mm:
(-[WebPDFView elementAtPoint:]): Use @{} and @().
(-[WebPDFView viewState]): Use @().
(-[WebPDFView selectionTextRects]): Use @[].
(-[WebPDFView pasteboardTypesForSelection]): Use @[].
(-[WebPDFView _menuItemsFromPDFKitForEvent:]): Use @().
(-[WebPDFView _openWithFinder:]): Use @{} and @().
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Use @().
(-[WebPreferences _setUnsignedIntValue:forKey:]): Use @().
(+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Use @().
(-[WebPreferences setStorageBlockingPolicy:]): Use @{} and @().
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::sourceParsed): Use @().
* WebView/WebTextCompletionController.mm:
(-[WebTextCompletionController _placePopupWindow:]): Use @{}.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Use makeVector<String>.
(-[WebView _contentsOfUserInterfaceItem:]): Use @().
(toStringVector): Deleted.
(+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
Use makeVector<String>.
(+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
Use makeVector<String>.
(-[WebView _elementAtWindowPoint:]): Use @{}.
(-[WebView pasteboardTypesForSelection]): Use @[].
(-[WebView pasteboardTypesForElement:]): Use @[].
(-[WebView rectsForTextMatches]): Use @[].
(-[WebView _searchWithGoogleFromMenu:]): Use @[].
(-[WebView _setFontWhitelist:]): Use makeVector<String>.
Source/WTF:
* WTF.xcodeproj/project.pbxproj: Added VectorCocoa.h.
* wtf/PlatformMac.cmake: Ditto.
* wtf/cocoa/NSURLExtras.mm: Removed unneeded include.
* wtf/cocoa/URLCocoa.mm: Ditto.
* wtf/cocoa/VectorCocoa.h: Added. Contains createNSArray and makeVector
function templates for converting NSArray to and from Vector.
* wtf/text/WTFString.h: Added makeNSArrayElement and makeVectorElement
functions, making createNSArray and makeVector compatible with String.
* wtf/text/cocoa/StringCocoa.mm:
(WTF::makeNSArrayElement): Added.
(WTF::makeVectorElement): Added.
Tools:
* DumpRenderTree/AccessibilityController.h: Remove use of NotificationHandler
type; it's just "id".
* DumpRenderTree/AccessibilityUIElement.cpp:
(convertElementsToObjectArray): Moved this up in the file, removed unneeded
use of JSValueToObject and unused exception argument.
(elementsForRangeCallback): Use convertElementsToObjectArray.
(columnHeadersCallback): Updated for removed exception argument.
(rowHeadersCallback): Ditto.
(uiElementArrayAttributeValueCallback): Ditto.
* DumpRenderTree/AccessibilityUIElement.h: Changed to use RetainPtr.
* DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
(createCoreAnimationLayer): Use @{}.
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::AccessibilityUIElement): Removed some unneeded
code now that we use RetainPtr.
(AccessibilityUIElement::~AccessibilityUIElement): Deleted.
(AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use @[].
(AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
(AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers): Use @[].
* DumpRenderTree/ios/TextInputControllerIOS.m:
(-[TextInputController markedRange]): Use @[].
* DumpRenderTree/mac/AccessibilityCommonMac.mm:
(searchPredicateParameterizedAttributeForSearchCriteria): Tweak a little.
* DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
(-[NSString createJSStringRef]): Deleted. Duplicate of a method already
implemented in anothe file.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(makeVectorElement): Added overloads to make both
makeVector<AccessibilityTextMarkerRange> and
makeVector<AccessibilityUIElement> work.
(AccessibilityUIElement::AccessibilityUIElement): Removed some unneeded
code now that we use RetainPtr.
(convertVectorToObjectArray): Removed unneeded use of JSValueToObject
and unneeded exception argument.
(convertNSArrayToVector): Deleted.
(AccessibilityUIElement::getLinkedUIElements): Use
makeVector<AccessibilityUIElement>.
(AccessibilityUIElement::getDocumentLinks): Ditto.
(AccessibilityUIElement::getChildren): Ditto.
(AccessibilityUIElement::getChildrenWithRange): Ditto.
(AccessibilityUIElement::rowHeaders const): Ditto.
(AccessibilityUIElement::columnHeaders const): Ditto.
(AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto.
(AccessibilityUIElement::role): Updated since m_element is a RetainPtr.
(AccessibilityUIElement::subrole): Ditto.
(AccessibilityUIElement::roleDescription): Ditto.
(AccessibilityUIElement::computedRoleString): Ditto.
(AccessibilityUIElement::title): Ditto.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::orientation const): Ditto.
(AccessibilityUIElement::stringValue): Ditto.
(AccessibilityUIElement::language): Ditto.
(AccessibilityUIElement::helpText const): Ditto.
(AccessibilityUIElement::lineForIndex): Use @().
(AccessibilityUIElement::rangeForLine): Use @().
(AccessibilityUIElement::searchTextWithCriteria): Use
makeVector<AccessibilityTextMarkerRange>.
(AccessibilityUIElement::attributesOfColumnHeaders): Use
makeVector<AccessibilityUIElement>.
(AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(AccessibilityUIElement::attributesOfColumns): Ditto.
(AccessibilityUIElement::attributesOfRows): Ditto.
(AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(AccessibilityUIElement::cellForColumnAndRow): Use @[] and @().
(AccessibilityUIElement::setSelectedChild const): Use @[].
(AccessibilityUIElement::setSelectedChildAtIndex const): Use @[].
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
Use @{}, @YES, and @NO.
(AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
* DumpRenderTree/mac/DumpRenderTree.mm:
(addTestPluginsToPluginSearchPath): Use @[].
(resetWebViewToConsistentStateBeforeTesting): Use @[].
* DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
(-[DumpRenderTreePasteboard declareType:owner:]): Use @[].
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController beginDragWithFiles:]): Use @().
(-[EventSendingController sentTouchEventOfType:]): Use @().
* DumpRenderTree/mac/MockWebNotificationProvider.mm:
(-[MockWebNotificationProvider cancelNotification:]): Use @[].
* DumpRenderTree/mac/ObjCController.m:
(-[ObjCController objectOfClass:]): Use @().
(-[ObjCController arrayOfString]): Use @[].
(-[ObjCController testWrapperRoundTripping:]): Use @().
(-[ObjCController testArray]): Use @[].
* DumpRenderTree/mac/TestRunnerMac.mm:
(originsArrayToJS): Removed unneeded use of JSValueToObject.
* DumpRenderTree/mac/TextInputControllerMac.m:
(-[TextInputController markedRange]): Use @[] and @().
(-[TextInputController selectedRange]): Use @[] and @().
(-[TextInputController firstRectForCharactersFrom:length:]):
Use @[] and @().
(-[TextInputController dictatedStringWithPrimaryString:alternative:alternativeOffset:alternativeLength:]):
Use @[].
(-[TextInputController interpretKeyEvents:withSender:]): Use @[].
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::copyText): Use [].
* DumpRenderTree/win/AccessibilityUIElementWin.cpp: Deleted an
unneeded copy constructor and destructor.
* TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
(-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Use @{}.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(toVector): Deleted.
(-[ContentRuleListNotificationDelegate _webView:contentRuleListWithIdentifier:performedAction:forURL:]):
Use makeVector<String>.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(writeImageDataToPasteboard): Use @[] and @{}.
(writeBundleFileToPasteboard): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(runWebsiteDataStoreCustomPaths): Use @[].
* TestWebKitAPI/Tests/mac/WebViewCanPasteURL.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm:
(-[DidCreateJavaScriptContextFrameLoadDelegate webView:didCreateJavaScriptContext:forFrame:]):
Use @[].
* TestWebKitAPI/ios/mainIOS.mm:
(main): Use @{}.
* TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
(TestWebKitAPI::InjectedBundleController::platformInitialize): Use @{} and @().
* TestWebKitAPI/mac/mainMac.mm:
(main): Use {}.
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
Use id instead of NotificationHandler.
* WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h:
Use id for PlatformTextMarkerRange. Added an overload of makeVectorElement
to make makeVector<RefPtr<AccessibilityTextMarkerRange>> work.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
Use RetainPtr. Added an overload of makeVectorElement to make
makeVector<RefPtr<AccessibilityUIElement>> work.
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
Removed unneeded include.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::convertNSArrayToVector): Deleted.
(WTR::AccessibilityUIElement::AccessibilityUIElement): Simplified
since we use RetainPtr.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Ditto.
(WTR::convertElementsToObjectArray): Removed unneeded use of
JSValueToObject.
(WTR::AccessibilityUIElement::elementsForRange): Use
makeVector<RefPtr<AccessibilityUIElement>>.
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker):
Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers):
* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
(WTR::InjectedBundle::platformInitialize): Use @{}.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::AccessibilityUIElement): Simplified
since we use RetainPtr.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Ditto.
(WTR::convertNSArrayToVector): Deleted.
(WTR::AccessibilityUIElement::getLinkedUIElements): Use
makeVector<RefPtr<AccessibilityUIElement>>.
(WTR::AccessibilityUIElement::getDocumentLinks): Ditto.
(WTR::AccessibilityUIElement::getUIElementsWithAttribute const): Ditto.
(WTR::AccessibilityUIElement::getChildren): Ditto.
(WTR::AccessibilityUIElement::getChildrenWithRange): Ditto.
(WTR::AccessibilityUIElement::rowHeaders const): Ditto.
(WTR::AccessibilityUIElement::columnHeaders const): Ditto.
(WTR::AccessibilityUIElement::allAttributes): Updated since m_element
is a RetainPtr.
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto.
(WTR::AccessibilityUIElement::role): Ditto.
(WTR::AccessibilityUIElement::subrole): Ditto.
(WTR::AccessibilityUIElement::roleDescription): Ditto.
(WTR::AccessibilityUIElement::computedRoleString): Ditto.
(WTR::AccessibilityUIElement::title): Ditto.
(WTR::AccessibilityUIElement::description): Ditto.
(WTR::AccessibilityUIElement::orientation const): Ditto.
(WTR::AccessibilityUIElement::stringValue): Ditto.
(WTR::AccessibilityUIElement::language): Ditto.
(WTR::AccessibilityUIElement::helpText const): Ditto.
(WTR::AccessibilityUIElement::lineForIndex): Use @().
(WTR::AccessibilityUIElement::rangeForLine): Use @().
(WTR::AccessibilityUIElement::searchTextWithCriteria): Use
makeVector<RefPtr<AccessibilityTextMarkerRange>>.
(WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfColumns): Ditto.
(WTR::AccessibilityUIElement::attributesOfRows): Ditto.
(WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(WTR::AccessibilityUIElement::cellForColumnAndRow): Use @[] and @().
(WTR::AccessibilityUIElement::setSelectedChild const): Use @[].
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const): Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveAllStorageAccessEntries): Take Vector&&.
(WTR::TestInvocation::didReceiveWebViewCategory): Take String&&.
* WebKitTestRunner/TestInvocation.h: Updated for the above.
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaPlatformInitialize): Use @{}and @().
(WTR::TestController::getAllStorageAccessEntries): Use makeVector<String>.
(WTR::TestController::loadedThirdPartyDomains): Use makeVector<String>.
(WTR::TestController::getWebViewCategory): Update to pass String&&.
(WTR::TestController::setAllowedMenuActions): Use createNSArray.
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator interpolatedEvents:]): Use @().
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::changeWindowScaleIfNeeded): Use @{} and @().
* WebKitTestRunner/mac/TestControllerMac.mm: Removed unneeded include.
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::copyText): Use @[].
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
(-[WebKitTestRunnerPasteboard declareType:owner:]): Use @[].
Canonical link: https://commits.webkit.org/223199@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-10 02:11:30 +00:00
|
|
|
platform/graphics/cocoa/IntRectCocoa.mm
|
2018-09-17 23:24:21 +00:00
|
|
|
platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp
|
2021-04-16 22:54:15 +00:00
|
|
|
platform/graphics/cocoa/MediaPlaybackTargetContext.mm
|
2020-12-09 18:32:29 +00:00
|
|
|
platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm
|
[Cocoa] Add experimental MSE WebM parser
https://bugs.webkit.org/show_bug.cgi?id=214529
Source/ThirdParty/libwebrtc:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
Add the vp9_header_parser from libwebrtc to the project, and add its
symbols to the list of exported symbols. Because this header wants to
be installed to a "common/vp9_header_parser.h" path, split up the default
CopyHeadersInstallPhase into two separate CopyFiles build phases that
put headers into different locations.
* Configurations/libwebm.xcconfig:
* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:
* Source/third_party/libwebm/common/vp9_header_parser.h:
(vp9_parser::Vp9HeaderParser::color_range const):
(vp9_parser::Vp9HeaderParser::subsampling_x const):
(vp9_parser::Vp9HeaderParser::subsampling_y const):
* libwebrtc.xcodeproj/project.pbxproj:
Source/WebCore:
Reviewed by Eric Carlson.
Test: media/media-source/media-source-webm.html
Add an experimental MSE WebM parser to SourceBufferPrivateAVFObjC. This will require extensive refactoring
of SourceBufferPrivateAVFObjC, to extract out the parser into a new, virtualized class. This new parser can
take advantage of new C++>11 features such as lambdas to clean up some problematic existing code. The new
virtualized SourceBufferParser class uses passed-in Function objects, rather than pure-virtual Client classes
to notify it's parent object when the parser encounters initialization- or media-data.
Because SourceBufferPrivateAVFObjC will now have to deal with AudioTrackPrivate and VideoTrackPrivate objects
that are not necessarily Audio- and VideoTrackPrivateMediaSourceAVFObjC subclasses, move those classes notification
features up into Audio- and VideoTrackPrivate, again using a Function object rather than a client class.
Add a new SourceBufferParserWebM and associated AudioTrackPrivateWebM and VideoTrackPrivateWebM classes, which
use libwebm via libwebrtc to parse appended buffers. SourceBufferParserWebM feeds passed-in data into a
libwebm-provided parser of its own. It then builds up tracks and samples based on callbacks from that same parser,
constructing CMSampleBuffers and VideoTrackPrivate objects out of the underlying libwebm primitives.
Because WebM uses a UUID as its track identifier, the representation of a "trackID" inside WebCore must be
increased from an int to a uint64_t, or trackIDs will be truncated or zeroed when passed between classes and
when converted to and from AtomStrings.
This early implementation is not yet able to pass the WebM WPT media-source/ tests, as we only have a VP9 decoder
available, and those tests use both VP8 and Vorbis.
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebMParserEnabled):
(WebCore::RuntimeEnabledFeatures::webMParserEnabled const):
* platform/graphics/AudioTrackPrivate.h:
(WebCore::AudioTrackPrivate::setEnabled):
(WebCore::AudioTrackPrivate::setEnabledChangedCallback):
* platform/graphics/VP9Utilities.cpp:
(WebCore::isValidVPColorPrimaries):
(WebCore::isValidVPTransferCharacteristics):
(WebCore::isValidVPMatrixCoefficients):
(WebCore::parseVPCodecParameters):
* platform/graphics/VP9Utilities.h:
* platform/graphics/VideoTrackPrivate.h:
(WebCore::VideoTrackPrivate::setSelected):
(WebCore::VideoTrackPrivate::setSelectedChangedCallback):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp:
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::setEnabled):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::update):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::update):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
(WebCore::MediaSampleAVFObjC::create):
(WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
* platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.h: Added.
(isType):
* platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.mm: Added.
(-[WebAVStreamDataParserListener initWithParser:parent:]):
(-[WebAVStreamDataParserListener dealloc]):
(-[WebAVStreamDataParserListener invalidate]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):
(-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]):
(-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
(WebCore::SourceBufferParserAVFObjC::isContentTypeSupported):
(WebCore::SourceBufferParserAVFObjC::SourceBufferParserAVFObjC):
(WebCore::SourceBufferParserAVFObjC::~SourceBufferParserAVFObjC):
(WebCore::SourceBufferParserAVFObjC::appendData):
(WebCore::SourceBufferParserAVFObjC::flushPendingMediaData):
(WebCore::SourceBufferParserAVFObjC::setShouldProvideMediaDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::shouldProvideMediadataForTrackID):
(WebCore::SourceBufferParserAVFObjC::resetParserState):
(WebCore::SourceBufferParserAVFObjC::didParseStreamDataAsAsset):
(WebCore::SourceBufferParserAVFObjC::didFailToParseStreamDataWithError):
(WebCore::SourceBufferParserAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::create):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):
(WebCore::SourceBufferPrivateAVFObjC::didEncounterErrorDuringParsing):
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::appendCompleted):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::resetParserState):
(WebCore::SourceBufferPrivateAVFObjC::destroyParser):
(WebCore::SourceBufferPrivateAVFObjC::clearTracks):
(WebCore::SourceBufferPrivateAVFObjC::hasSelectedVideo const):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeSelected):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::parser const):
(WebCore::SourceBufferPrivateAVFObjC::attemptToDecrypt):
(WebCore::SourceBufferPrivateAVFObjC::flush):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::canSetMinimumUpcomingPresentationTime const):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC):
* platform/graphics/cocoa/AudioTrackPrivateWebM.cpp: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
(WebCore::AudioTrackPrivateWebM::create):
(WebCore::AudioTrackPrivateWebM::AudioTrackPrivateWebM):
(WebCore::AudioTrackPrivateWebM::id const):
(WebCore::AudioTrackPrivateWebM::label const):
(WebCore::AudioTrackPrivateWebM::language const):
(WebCore::AudioTrackPrivateWebM::trackIndex const):
* platform/graphics/cocoa/AudioTrackPrivateWebM.h: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
* platform/graphics/cocoa/SourceBufferParser.cpp: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
(WebCore::SourceBufferParser::isContentTypeSupported):
(WebCore::SourceBufferParser::create):
* platform/graphics/cocoa/SourceBufferParser.h: Added.
(WebCore::SourceBufferParser::setDidParseInitializationDataCallback):
(WebCore::SourceBufferParser::setDidEncounterErrorDuringParsingCallback):
(WebCore::SourceBufferParser::setDidProvideMediaDataCallback):
(WebCore::SourceBufferParser::setWillProvideContentKeyRequestInitializationDataForTrackIDCallback):
(WebCore::SourceBufferParser::setDidProvideContentKeyRequestInitializationDataForTrackIDCallback):
* platform/graphics/cocoa/SourceBufferParserWebM.cpp: Added.
(WebCore::isWebmParserAvailable):
(WebCore::SourceBufferParserWebM::isContentTypeSupported):
(WebCore::SourceBufferParserWebM::SourceBufferParserWebM):
(WebCore::SourceBufferParserWebM::appendData):
(WebCore::SourceBufferParserWebM::flushPendingMediaData):
(WebCore::SourceBufferParserWebM::setShouldProvideMediaDataForTrackID):
(WebCore::SourceBufferParserWebM::shouldProvideMediadataForTrackID):
(WebCore::SourceBufferParserWebM::resetParserState):
(WebCore::SourceBufferParserWebM::trackDataForTrackNumber):
(WebCore::SourceBufferParserWebM::OnElementBegin):
(WebCore::SourceBufferParserWebM::OnEbml):
(WebCore::SourceBufferParserWebM::OnSegmentBegin):
(WebCore::SourceBufferParserWebM::OnInfo):
(WebCore::SourceBufferParserWebM::OnClusterBegin):
(WebCore::SourceBufferParserWebM::OnTrackEntry):
(WebCore::SourceBufferParserWebM::OnBlockBegin):
(WebCore::SourceBufferParserWebM::OnBlockEnd):
(WebCore::SourceBufferParserWebM::OnSimpleBlockBegin):
(WebCore::SourceBufferParserWebM::OnSimpleBlockEnd):
(WebCore::SourceBufferParserWebM::OnBlockGroupBegin):
(WebCore::SourceBufferParserWebM::OnBlockGroupEnd):
(WebCore::convertToColorPrimaries):
(WebCore::convertToTransferCharacteristics):
(WebCore::convertToMatrixCoefficients):
(WebCore::convertSubsamplingXYToChromaSubsampling):
(WebCore::createFormatDescriptionFromVP9HeaderParser):
(WebCore::SourceBufferParserWebM::OnFrame):
* platform/graphics/cocoa/SourceBufferParserWebM.h: Added.
(WebCore::SourceBufferParserWebM::status const):
(WebCore::SourceBufferParserWebM::type const):
(isType):
* platform/graphics/cocoa/VP9UtilitiesCocoa.h:
* platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
(WebCore::isVP9DecoderAvailable):
(WebCore::validateVPParameters):
* platform/graphics/cocoa/VideoTrackPrivateWebM.cpp:
(WebCore::VideoTrackPrivateWebM::create):
(WebCore::VideoTrackPrivateWebM::VideoTrackPrivateWebM):
(WebCore::VideoTrackPrivateWebM::id const):
(WebCore::VideoTrackPrivateWebM::label const):
(WebCore::VideoTrackPrivateWebM::language const):
(WebCore::VideoTrackPrivateWebM::trackIndex const):
* platform/graphics/cocoa/VideoTrackPrivateWebM.h:
Source/WebKit:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
Add an Experimental setting to enable the MSE WebM parser (off by default).
* Shared/WebPreferences.yaml:
LayoutTests:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
* media/media-source/content/test-vp9-manifest.json: Added.
* media/media-source/content/test-vp9.webm: Added.
* media/media-source/media-source-webm-expected.txt: Added.
* media/media-source/media-source-webm.html: Added.
Canonical link: https://commits.webkit.org/227430@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-22 00:25:09 +00:00
|
|
|
platform/graphics/cocoa/SourceBufferParser.cpp
|
|
|
|
platform/graphics/cocoa/SourceBufferParserWebM.cpp
|
2018-10-08 20:37:26 +00:00
|
|
|
platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/graphics/cocoa/TextTrackRepresentationCocoa.mm
|
2020-07-30 21:28:38 +00:00
|
|
|
platform/graphics/cocoa/VP9UtilitiesCocoa.mm @no-unify
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm
|
|
|
|
platform/graphics/cocoa/WebCoreCALayerExtras.mm
|
|
|
|
platform/graphics/cocoa/WebCoreDecompressionSession.mm
|
|
|
|
platform/graphics/cocoa/WebGLLayer.mm
|
[Cocoa] Add experimental MSE WebM parser
https://bugs.webkit.org/show_bug.cgi?id=214529
Source/ThirdParty/libwebrtc:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
Add the vp9_header_parser from libwebrtc to the project, and add its
symbols to the list of exported symbols. Because this header wants to
be installed to a "common/vp9_header_parser.h" path, split up the default
CopyHeadersInstallPhase into two separate CopyFiles build phases that
put headers into different locations.
* Configurations/libwebm.xcconfig:
* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:
* Source/third_party/libwebm/common/vp9_header_parser.h:
(vp9_parser::Vp9HeaderParser::color_range const):
(vp9_parser::Vp9HeaderParser::subsampling_x const):
(vp9_parser::Vp9HeaderParser::subsampling_y const):
* libwebrtc.xcodeproj/project.pbxproj:
Source/WebCore:
Reviewed by Eric Carlson.
Test: media/media-source/media-source-webm.html
Add an experimental MSE WebM parser to SourceBufferPrivateAVFObjC. This will require extensive refactoring
of SourceBufferPrivateAVFObjC, to extract out the parser into a new, virtualized class. This new parser can
take advantage of new C++>11 features such as lambdas to clean up some problematic existing code. The new
virtualized SourceBufferParser class uses passed-in Function objects, rather than pure-virtual Client classes
to notify it's parent object when the parser encounters initialization- or media-data.
Because SourceBufferPrivateAVFObjC will now have to deal with AudioTrackPrivate and VideoTrackPrivate objects
that are not necessarily Audio- and VideoTrackPrivateMediaSourceAVFObjC subclasses, move those classes notification
features up into Audio- and VideoTrackPrivate, again using a Function object rather than a client class.
Add a new SourceBufferParserWebM and associated AudioTrackPrivateWebM and VideoTrackPrivateWebM classes, which
use libwebm via libwebrtc to parse appended buffers. SourceBufferParserWebM feeds passed-in data into a
libwebm-provided parser of its own. It then builds up tracks and samples based on callbacks from that same parser,
constructing CMSampleBuffers and VideoTrackPrivate objects out of the underlying libwebm primitives.
Because WebM uses a UUID as its track identifier, the representation of a "trackID" inside WebCore must be
increased from an int to a uint64_t, or trackIDs will be truncated or zeroed when passed between classes and
when converted to and from AtomStrings.
This early implementation is not yet able to pass the WebM WPT media-source/ tests, as we only have a VP9 decoder
available, and those tests use both VP8 and Vorbis.
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebMParserEnabled):
(WebCore::RuntimeEnabledFeatures::webMParserEnabled const):
* platform/graphics/AudioTrackPrivate.h:
(WebCore::AudioTrackPrivate::setEnabled):
(WebCore::AudioTrackPrivate::setEnabledChangedCallback):
* platform/graphics/VP9Utilities.cpp:
(WebCore::isValidVPColorPrimaries):
(WebCore::isValidVPTransferCharacteristics):
(WebCore::isValidVPMatrixCoefficients):
(WebCore::parseVPCodecParameters):
* platform/graphics/VP9Utilities.h:
* platform/graphics/VideoTrackPrivate.h:
(WebCore::VideoTrackPrivate::setSelected):
(WebCore::VideoTrackPrivate::setSelectedChangedCallback):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp:
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::setEnabled):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::update):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::update):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
(WebCore::MediaSampleAVFObjC::create):
(WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
* platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.h: Added.
(isType):
* platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.mm: Added.
(-[WebAVStreamDataParserListener initWithParser:parent:]):
(-[WebAVStreamDataParserListener dealloc]):
(-[WebAVStreamDataParserListener invalidate]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):
(-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]):
(-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
(WebCore::SourceBufferParserAVFObjC::isContentTypeSupported):
(WebCore::SourceBufferParserAVFObjC::SourceBufferParserAVFObjC):
(WebCore::SourceBufferParserAVFObjC::~SourceBufferParserAVFObjC):
(WebCore::SourceBufferParserAVFObjC::appendData):
(WebCore::SourceBufferParserAVFObjC::flushPendingMediaData):
(WebCore::SourceBufferParserAVFObjC::setShouldProvideMediaDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::shouldProvideMediadataForTrackID):
(WebCore::SourceBufferParserAVFObjC::resetParserState):
(WebCore::SourceBufferParserAVFObjC::didParseStreamDataAsAsset):
(WebCore::SourceBufferParserAVFObjC::didFailToParseStreamDataWithError):
(WebCore::SourceBufferParserAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferParserAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::create):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):
(WebCore::SourceBufferPrivateAVFObjC::didEncounterErrorDuringParsing):
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::appendCompleted):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::resetParserState):
(WebCore::SourceBufferPrivateAVFObjC::destroyParser):
(WebCore::SourceBufferPrivateAVFObjC::clearTracks):
(WebCore::SourceBufferPrivateAVFObjC::hasSelectedVideo const):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeSelected):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::parser const):
(WebCore::SourceBufferPrivateAVFObjC::attemptToDecrypt):
(WebCore::SourceBufferPrivateAVFObjC::flush):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::canSetMinimumUpcomingPresentationTime const):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC):
* platform/graphics/cocoa/AudioTrackPrivateWebM.cpp: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
(WebCore::AudioTrackPrivateWebM::create):
(WebCore::AudioTrackPrivateWebM::AudioTrackPrivateWebM):
(WebCore::AudioTrackPrivateWebM::id const):
(WebCore::AudioTrackPrivateWebM::label const):
(WebCore::AudioTrackPrivateWebM::language const):
(WebCore::AudioTrackPrivateWebM::trackIndex const):
* platform/graphics/cocoa/AudioTrackPrivateWebM.h: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
* platform/graphics/cocoa/SourceBufferParser.cpp: Copied from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h.
(WebCore::SourceBufferParser::isContentTypeSupported):
(WebCore::SourceBufferParser::create):
* platform/graphics/cocoa/SourceBufferParser.h: Added.
(WebCore::SourceBufferParser::setDidParseInitializationDataCallback):
(WebCore::SourceBufferParser::setDidEncounterErrorDuringParsingCallback):
(WebCore::SourceBufferParser::setDidProvideMediaDataCallback):
(WebCore::SourceBufferParser::setWillProvideContentKeyRequestInitializationDataForTrackIDCallback):
(WebCore::SourceBufferParser::setDidProvideContentKeyRequestInitializationDataForTrackIDCallback):
* platform/graphics/cocoa/SourceBufferParserWebM.cpp: Added.
(WebCore::isWebmParserAvailable):
(WebCore::SourceBufferParserWebM::isContentTypeSupported):
(WebCore::SourceBufferParserWebM::SourceBufferParserWebM):
(WebCore::SourceBufferParserWebM::appendData):
(WebCore::SourceBufferParserWebM::flushPendingMediaData):
(WebCore::SourceBufferParserWebM::setShouldProvideMediaDataForTrackID):
(WebCore::SourceBufferParserWebM::shouldProvideMediadataForTrackID):
(WebCore::SourceBufferParserWebM::resetParserState):
(WebCore::SourceBufferParserWebM::trackDataForTrackNumber):
(WebCore::SourceBufferParserWebM::OnElementBegin):
(WebCore::SourceBufferParserWebM::OnEbml):
(WebCore::SourceBufferParserWebM::OnSegmentBegin):
(WebCore::SourceBufferParserWebM::OnInfo):
(WebCore::SourceBufferParserWebM::OnClusterBegin):
(WebCore::SourceBufferParserWebM::OnTrackEntry):
(WebCore::SourceBufferParserWebM::OnBlockBegin):
(WebCore::SourceBufferParserWebM::OnBlockEnd):
(WebCore::SourceBufferParserWebM::OnSimpleBlockBegin):
(WebCore::SourceBufferParserWebM::OnSimpleBlockEnd):
(WebCore::SourceBufferParserWebM::OnBlockGroupBegin):
(WebCore::SourceBufferParserWebM::OnBlockGroupEnd):
(WebCore::convertToColorPrimaries):
(WebCore::convertToTransferCharacteristics):
(WebCore::convertToMatrixCoefficients):
(WebCore::convertSubsamplingXYToChromaSubsampling):
(WebCore::createFormatDescriptionFromVP9HeaderParser):
(WebCore::SourceBufferParserWebM::OnFrame):
* platform/graphics/cocoa/SourceBufferParserWebM.h: Added.
(WebCore::SourceBufferParserWebM::status const):
(WebCore::SourceBufferParserWebM::type const):
(isType):
* platform/graphics/cocoa/VP9UtilitiesCocoa.h:
* platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
(WebCore::isVP9DecoderAvailable):
(WebCore::validateVPParameters):
* platform/graphics/cocoa/VideoTrackPrivateWebM.cpp:
(WebCore::VideoTrackPrivateWebM::create):
(WebCore::VideoTrackPrivateWebM::VideoTrackPrivateWebM):
(WebCore::VideoTrackPrivateWebM::id const):
(WebCore::VideoTrackPrivateWebM::label const):
(WebCore::VideoTrackPrivateWebM::language const):
(WebCore::VideoTrackPrivateWebM::trackIndex const):
* platform/graphics/cocoa/VideoTrackPrivateWebM.h:
Source/WebKit:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
Add an Experimental setting to enable the MSE WebM parser (off by default).
* Shared/WebPreferences.yaml:
LayoutTests:
<rdar://problem/65782467>
Reviewed by Eric Carlson.
* media/media-source/content/test-vp9-manifest.json: Added.
* media/media-source/content/test-vp9.webm: Added.
* media/media-source/media-source-webm-expected.txt: Added.
* media/media-source/media-source-webm.html: Added.
Canonical link: https://commits.webkit.org/227430@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-22 00:25:09 +00:00
|
|
|
platform/graphics/cocoa/VideoTrackPrivateWebM.cpp
|
2020-09-12 10:37:19 +00:00
|
|
|
platform/graphics/coretext/FontCascadeCoreText.cpp
|
|
|
|
platform/graphics/coretext/FontCoreText.cpp
|
|
|
|
platform/graphics/coretext/FontPlatformDataCoreText.cpp
|
|
|
|
platform/graphics/coretext/GlyphPageCoreText.cpp
|
2018-10-17 21:55:36 +00:00
|
|
|
platform/graphics/cv/ImageTransferSessionVT.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/cv/PixelBufferConformerCV.cpp
|
2020-11-11 10:44:25 +00:00
|
|
|
platform/graphics/cv/GraphicsContextGLCVANGLE.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/coreimage/FilterEffectRendererCoreImage.mm
|
[Cocoa] [GPU Process] Perform image decoding of color fonts in the Web Process
https://bugs.webkit.org/show_bug.cgi?id=217506
Reviewed by Simon Fraser.
Source/WebCore:
Core Text itself doesn't know how to draw things; it has to rely on Core Graphics to do that.
However, Core Graphics only understands the simplest of text drawing concepts; it doesn't understand
things like color fonts or emoji. Core Text sits between the application and Core Graphics, and is
responsible for splitting up an arbitrary draw command into individual simple pieces which Core
Graphics can understand. For example, when you ask Core Text to draw a string which is of the form
"outlines emoji outlines", Core Text will end up telling Core Graphics to draw the first outlines, then
draw the emoji image (using Core Graphics's normal image drawing routines), then draw the remaining
outlines.
This is exactly the same kind of filtering we want to do for the GPU Process. We want to be able to
separate out the glyphs which are rendered using outlines from the emoji glyphs which are rendered
using images. We want to handle the image glyphs ourself in WebKit using our own image drawing display
list facilities, which will cause images to be decoded in the Web Process, thereby increasing the
security of the GPU Process.
So, this patch implements a custom CGContext, backed by a function table that is populated in WebKit.
We pass this custom CGContext into Core Text, which does its normal splitting up of outlines / images,
and calls glyph / image drawing functions on our CGContext. Because these functions are implemented by
WebKit, this effectively makes WebKit able to intercept the drawing calls, and implement them ourself
by appending items to the current display list. So, when Core Text tells our CGContext to draw an emoji,
our callback runs and we "just" append a DrawImage display list item.
I use scare-quotes around "just" because it is a bit more complicated than that. Core Text internally
can change the fill/stroke color (for COLR glyphs), the text matrix (it should be updated between
adjacent runs), the CTM, and the shadow state (because Core Text sometimes will implement shadows itself
by just drawing the text two times). So, in our CGContext callback, we have to look at the state of
the CGContext, figure out if anything changed (because we're not notified when changes happen), and
if things did change, append additional display list items to make a parallel change happen at draw
time.
Tests added in https://trac.webkit.org/r269177
* Headers.cmake:
* PlatformAppleWin.cmake:
* PlatformWinCairo.cmake:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/FreeType.cmake:
* platform/graphics/cg/ImageBufferCGBackend.cpp:
(WebCore::ImageBufferCGBackend::setupContext):
* platform/graphics/coretext/FontCascadeCoreText.cpp:
(WebCore::fillVectorWithHorizontalGlyphPositions):
* platform/graphics/displaylists/DisplayListDrawGlyphsRecorder.h: Added.
* platform/graphics/displaylists/DisplayListDrawGlyphsRecorderCoreText.cpp: Added.
(WebCore::DisplayList::beginLayer): VTable callback for creating a transparency layer.
(WebCore::DisplayList::endLayer): Ditto for ending a transparency layer.
(WebCore::DisplayList::drawGlyphs): VTable callback for drawing outline glyphs.
(WebCore::DisplayList::drawImage): VTable callback for drawing an image.
(WebCore::DisplayList::DrawGlyphsRecorder::createInternalContext): Set up the custom CGContext
infrastructure. Hook up the VTable callbacks.
(WebCore::DisplayList::DrawGlyphsRecorder::DrawGlyphsRecorder):
(WebCore::DisplayList::DrawGlyphsRecorder::populateInternalState): We need to save the GraphicsContext
state at the beginning of the entry point, so we can restore anything that changed when we're done.
(WebCore::DisplayList::DrawGlyphsRecorder::populateInternalContext): Because Core Text internally
interrogates the CGContext to see if it needs to do things like draw shadows itself, we need to make
sure that the recorder's state is mirrored in our custom CGContext. This applies all the relevant
state to our CGContext so it's ready when Core Text asks for it.
(WebCore::DisplayList::DrawGlyphsRecorder::prepareInternalContext): Call the above two functions.
(WebCore::DisplayList::DrawGlyphsRecorder::concludeInternalContext): Called once when we're done.
This function cleans up, by possibly appending additional display list items to restore the state
back to what it was when we started.
(WebCore::DisplayList::DrawGlyphsRecorder::updateFillColor): Detect a changed fill color, and if it has
changed, append a display list item to make a parallel change at drawing time.
(WebCore::DisplayList::DrawGlyphsRecorder::updateStrokeColor): Ditto for the stroke color.
(WebCore::DisplayList::DrawGlyphsRecorder::updateCTM): Ditto for the CTM.
(WebCore::DisplayList::shadowIsCleared):
(WebCore::DisplayList::DrawGlyphsRecorder::updateShadow): Ditto for the shadow state.
(WebCore::DisplayList::DrawGlyphsRecorder::recordBeginLayer): Hook this up to beginTransparencyLayer().
(WebCore::DisplayList::DrawGlyphsRecorder::recordEndLayer): Hook this up to endTransparencyLayer().
(WebCore::DisplayList::computeAdvancesFromPositions): CGContext gives us positions, but our display list
infrastructure requires advances. Simply subtract to convert between them.
(WebCore::DisplayList::DrawGlyphsRecorder::recordDrawGlyphs): The callback that appends a DrawGlyphs
display list item. Note it has to call the various update() functions to detect changes in the CGContext
state.
(WebCore::DisplayList::DrawGlyphsRecorder::recordDrawImage): Ditto for a DrawImage display list item.
(WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphs): The main entry point. Simply set up, do the work,
then clean up.
* platform/graphics/displaylists/DisplayListDrawGlyphsRecorderHarfBuzz.cpp: Added. Dummy implementation
to make the other ports continue to compile.
(WebCore::DisplayList::DrawGlyphsRecorder::DrawGlyphsRecorder):
(WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphs):
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::Recorder):
(WebCore::DisplayList::Recorder::drawGlyphs): Call m_drawGlyphsRecorder.drawGlyphs() instead of just
appending a DrawGlyphs command.
(WebCore::DisplayList::Recorder::concatCTM): Tiny optimization.
(WebCore::DisplayList::Recorder::clipToDrawingCommands): The current clipToDrawingCommands's context
CTM didn't match the parallel one used during playback. In order to make the CTMs match are recording
and playback time, we have to make sure they start off the same.
* platform/graphics/displaylists/DisplayListRecorder.h: DisplayList::Recorder owns a DrawGlyphsRecorder,
whose lifetime equals that of the DisplayList::Recorder. Rather than destroying / recreating the
DrawGlyphsRecorder, the DrawGlyphsRecorder class is smart enough to clean up after itself so it can be
reused multiple times.
Source/WebCore/PAL:
Add some new entry points, and do some various cleanup.
* pal/spi/cg/CoreGraphicsSPI.h:
Canonical link: https://commits.webkit.org/231072@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-31 00:01:02 +00:00
|
|
|
platform/graphics/displaylists/DisplayListDrawGlyphsRecorderCoreText.cpp
|
2018-11-21 17:24:47 +00:00
|
|
|
platform/graphics/gpu/cocoa/GPUDeviceMetal.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/graphics/ios/DisplayRefreshMonitorIOS.mm
|
|
|
|
platform/graphics/ios/IconIOS.mm
|
|
|
|
platform/graphics/mac/ColorMac.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/mac/ComplexTextControllerCoreText.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/graphics/mac/FloatPointMac.mm
|
|
|
|
platform/graphics/mac/FloatSizeMac.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/mac/FontCustomPlatformData.cpp
|
2021-01-26 13:43:59 +00:00
|
|
|
platform/graphics/mac/GraphicsChecksMac.cpp
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/graphics/mac/IconMac.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/mac/ImageMac.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/graphics/mac/IntPointMac.mm
|
|
|
|
platform/graphics/mac/IntSizeMac.mm
|
2021-03-22 18:25:00 +00:00
|
|
|
platform/graphics/mac/LegacyDisplayRefreshMonitorMac.cpp
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/graphics/mac/PDFDocumentImageMac.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/mac/SimpleFontDataCoreText.cpp
|
2019-01-05 01:12:19 +00:00
|
|
|
platform/graphics/mac/SwitchingGPUClient.cpp
|
2018-06-08 18:20:44 +00:00
|
|
|
platform/graphics/mac/WebKitNSImageExtras.mm
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/graphics/mac/WebLayer.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/graphics/opentype/OpenTypeCG.cpp
|
2019-01-18 22:26:37 +00:00
|
|
|
platform/ios/ColorIOS.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/ios/Device.cpp
|
|
|
|
platform/ios/DeviceMotionClientIOS.mm
|
|
|
|
platform/ios/DeviceOrientationClientIOS.mm
|
|
|
|
platform/ios/DragImageIOS.mm
|
|
|
|
platform/ios/KeyEventIOS.mm
|
|
|
|
platform/ios/LegacyTileCache.mm
|
|
|
|
platform/ios/LegacyTileGrid.mm
|
|
|
|
platform/ios/LegacyTileGridTile.mm
|
|
|
|
platform/ios/LegacyTileLayer.mm
|
|
|
|
platform/ios/LegacyTileLayerPool.mm
|
2020-05-09 23:10:41 +00:00
|
|
|
platform/ios/LocalCurrentGraphicsContextIOS.mm
|
2019-06-10 19:19:16 +00:00
|
|
|
platform/ios/LocalCurrentTraitCollection.mm
|
2020-02-18 18:27:01 +00:00
|
|
|
platform/ios/LocalizedDeviceModel.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/ios/PasteboardIOS.mm
|
[iOS] Arrow keys do not dispatch DOM events to non-editable elements
https://bugs.webkit.org/show_bug.cgi?id=189389
Reviewed by Simon Fraser.
Source/WebCore:
On iOS the arrow keys are identified by special multi character key strings: UIKeyInput{Up,
Down, Left, Right}Arrow as opposed to special key codes as on Mac. When converting the iOS-
specific WebEvent we need to take care to recognize when the key string for the event is
one of these special key strings when computing key code, character code, and key identifier
properties for the WebCore platform-specific event. These details will be included in
the corresponding DOM keyboard events that are dispatched when the arrow keys are pressed.
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
Mark file PlatformEventFactoryIOS as @no-unify as it is not compatible with the unified sources
build strategy given its use of wtf/cocoa/SoftLinking.h macros.
* platform/ios/PlatformEventFactoryIOS.h:
* platform/ios/PlatformEventFactoryIOS.mm:
(WebCore::convertSpecialKeyToCharCode): Manufacture the appropriate character code for an
event that represents an arrow key. Otherwise, return std::nullopt to indicate that the
event is not for an arrow key.
(WebCore::keyCodeForEvent): Manufacture the appropriate Windows virtual key code for an
event that represents an arrow key. Otherwise, do what we do now and return the key code
associated with the WebEvent.
(WebCore::keyIdentifierForKeyEvent): Modified to test if the event is for an arrow key
and return the appropriate key identifier.
(WebCore::keyForKeyEvent): Modified to test if the event is for an arrow key
and return the appropriate character code.
(WebCore::codeForKeyEvent): Modified to call keyCodeForEvent(), which knows how to account
for events that represent arrow keys.
(WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
Source/WebKit:
Use WebCore::keyCodeForEvent() to retrieve the key code for a WebEvent instead of querying
the key code from the WebEvent directly. The function WebCore::keyCodeForEvent() knows how
to compute the key code for an event that represents an arrow key.
* Shared/ios/WebIOSEventFactory.mm:
(WebIOSEventFactory::createWebKeyboardEvent):
LayoutTests:
Update expected result now that we compute the correct keyIdentifier, keycode, and which properties
for DOM keyboard events dispatched when the arrow keys are pressed.
* fast/events/ios/keydown-keyup-in-non-editable-content-expected.txt:
Canonical link: https://commits.webkit.org/204446@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-10 21:02:50 +00:00
|
|
|
platform/ios/PlatformEventFactoryIOS.mm @no-unify
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/ios/PlatformPasteboardIOS.mm
|
|
|
|
platform/ios/PlatformScreenIOS.mm
|
|
|
|
platform/ios/PlatformSpeechSynthesizerIOS.mm @no-unify
|
|
|
|
platform/ios/PlaybackSessionInterfaceAVKit.mm @no-unify
|
2019-10-23 22:23:52 +00:00
|
|
|
platform/ios/PreviewConverterIOS.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/ios/QuickLook.mm
|
|
|
|
platform/ios/ScrollAnimatorIOS.mm
|
|
|
|
platform/ios/ScrollViewIOS.mm
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/ios/ScrollbarThemeIOS.mm
|
2021-04-21 00:03:56 +00:00
|
|
|
platform/ios/SelectionGeometry.cpp
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/ios/SystemMemoryIOS.cpp
|
2019-01-18 20:41:58 +00:00
|
|
|
platform/ios/ThemeIOS.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/ios/TileControllerMemoryHandlerIOS.cpp
|
2019-01-18 20:41:58 +00:00
|
|
|
platform/ios/UserAgentIOS.mm
|
|
|
|
platform/ios/ValidationBubbleIOS.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/ios/VideoFullscreenInterfaceAVKit.mm @no-unify
|
|
|
|
platform/ios/WebAVPlayerController.mm
|
|
|
|
platform/ios/WebBackgroundTaskController.mm
|
|
|
|
platform/ios/WebCoreMotionManager.mm
|
2019-01-18 23:34:06 +00:00
|
|
|
platform/ios/WebEvent.mm @no-unify
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/ios/WebItemProviderPasteboard.mm @no-unify
|
|
|
|
platform/ios/WebSQLiteDatabaseTrackerClient.mm
|
2019-01-18 23:34:06 +00:00
|
|
|
platform/ios/WebVideoFullscreenControllerAVKit.mm @no-unify
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/ios/WidgetIOS.mm
|
|
|
|
platform/ios/wak/FloatingPointEnvironment.cpp
|
|
|
|
platform/ios/wak/WAKScrollView.mm
|
|
|
|
platform/ios/wak/WAKView.mm @no-unify
|
|
|
|
platform/ios/wak/WAKWindow.mm
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/ios/wak/WKGraphics.mm
|
|
|
|
platform/ios/wak/WKView.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/ios/wak/WebCoreThread.mm
|
|
|
|
platform/ios/wak/WebCoreThreadRun.cpp
|
|
|
|
platform/ios/wak/WebCoreThreadSystemInterface.cpp
|
2020-06-10 00:05:48 +00:00
|
|
|
platform/mac/BlocklistUpdater.mm
|
macCatalyst: Cursor should update on mouse movement and style change
https://bugs.webkit.org/show_bug.cgi?id=205317
<rdar://problem/46793696>
Reviewed by Anders Carlsson.
Source/WebCore:
* Configurations/WebCore.xcconfig:
Link AppKit for NSCursor.
* SourcesCocoa.txt:
Remove CursorIOS.cpp.
De-unify CursorMac; because it imports AppKit headers, we have to
take care to make sure it doesn't also get WAK (which it does if you
leave it unified).
* WebCore.xcodeproj/project.pbxproj:
Remove CursorIOS.cpp and de-unify CursorMac (by adding it to the target)
* loader/EmptyClients.h:
* page/Chrome.cpp:
(WebCore::Chrome::setCursor):
(WebCore::Chrome::setCursorHiddenUntilMouseMoves):
Unifdef many things.
* page/ChromeClient.h:
(WebCore::ChromeClient::supportsSettingCursor):
Add a ChromeClient bit, supportsSettingCursor, which can be used
to guard work that shouldn't happen if a platform doesn't support
pushing cursor updates out from WebCore. This will be true everywhere
except iOS, and does the work of the old platform ifdefs.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::updateCursor):
(WebCore::EventHandler::selectCursor):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::scheduleCursorUpdate):
* page/EventHandler.h:
* platform/Cursor.cpp:
* platform/Cursor.h:
Unifdef, and use supportsSettingCursor to avoid some unnecessary work.
* platform/ios/CursorIOS.cpp: Removed.
* platform/ios/WidgetIOS.mm:
(WebCore::Widget::setCursor):
Propagate cursor changes upwards.
* platform/mac/CursorMac.mm:
(WebCore::cursor):
(WebCore::Cursor::ensurePlatformCursor const):
CursorMac is now built in macCatalyst. However, parts that depend
on HIServices or NSImage are #ifdeffed out, and fall back to an arrow.
Source/WebKit:
* Configurations/WebKit.xcconfig:
Link AppKit for NSCursor.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Cursor>::decode):
Enable Cursor encoders.
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setCursor):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
Unifdef various things.
Implement setCursor().
Source/WebKitLegacy/ios:
* WebCoreSupport/WebChromeClientIOS.h:
Provide a stub implementation of cursor-related ChromeClient methods.
Source/WTF:
* wtf/FeatureDefines.h:
Make ENABLE_CURSOR_SUPPORT true on iOS, for macCatalyst. This results
in it being true everywhere, so remove it.
Add a new ENABLE_CUSTOM_CURSOR_SUPPORT, indicating whether we support
custom bitmap cursors. It covers the subset of ENABLE_CURSOR_SUPPORT
code that we still don't support in macCatalyst.
* wtf/Platform.h:
Add HAVE_HISERVICES (true on macOS but not macCatalyst) and
HAVE_NSCURSOR (true on macOS and macCatalyst but not e.g. iOS).
Canonical link: https://commits.webkit.org/218543@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-17 19:57:25 +00:00
|
|
|
platform/mac/CursorMac.mm @no-unify
|
2021-05-19 20:30:27 +00:00
|
|
|
platform/mac/DataDetectorHighlight.mm
|
2020-07-30 07:21:44 +00:00
|
|
|
platform/mac/HIDDevice.cpp
|
|
|
|
platform/mac/HIDElement.cpp
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/mac/KeyEventMac.mm @no-unify
|
2020-05-09 23:10:41 +00:00
|
|
|
platform/mac/LocalCurrentGraphicsContextMac.mm
|
2019-01-05 01:12:19 +00:00
|
|
|
platform/mac/LocalDefaultSystemAppearance.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/mac/LoggingMac.mm
|
2021-01-27 21:07:46 +00:00
|
|
|
platform/mac/MediaRemoteSoftLink.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/mac/NSScrollerImpDetails.mm
|
|
|
|
platform/mac/PasteboardMac.mm
|
|
|
|
platform/mac/PasteboardWriter.mm
|
|
|
|
platform/mac/PlatformEventFactoryMac.mm
|
|
|
|
platform/mac/PlatformPasteboardMac.mm
|
|
|
|
platform/mac/PlatformScreenMac.mm
|
|
|
|
platform/mac/PlatformSpeechSynthesizerMac.mm
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/mac/PlaybackSessionInterfaceMac.mm @no-unify
|
2020-06-10 00:05:48 +00:00
|
|
|
platform/mac/PluginBlocklist.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/mac/PowerObserverMac.cpp
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/mac/PublicSuffixMac.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/mac/SSLKeyGeneratorMac.mm
|
|
|
|
platform/mac/ScrollAnimatorMac.mm @no-unify
|
2021-02-15 21:48:10 +00:00
|
|
|
platform/mac/ScrollController.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/mac/ScrollViewMac.mm
|
|
|
|
platform/mac/ScrollbarThemeMac.mm @no-unify
|
2020-02-13 21:40:08 +00:00
|
|
|
platform/mac/SerializedPlatformDataCueMac.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/mac/StringUtilities.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/mac/SuddenTermination.mm
|
|
|
|
platform/mac/ThemeMac.mm
|
|
|
|
platform/mac/ThreadCheck.mm @no-unify
|
|
|
|
platform/mac/UserActivityMac.mm
|
|
|
|
platform/mac/UserAgentMac.mm
|
|
|
|
platform/mac/ValidationBubbleMac.mm
|
|
|
|
platform/mac/VideoFullscreenInterfaceMac.mm
|
|
|
|
platform/mac/WebCoreFullScreenPlaceholderView.mm
|
|
|
|
platform/mac/WebCoreFullScreenWarningView.mm
|
|
|
|
platform/mac/WebCoreFullScreenWindow.mm
|
[macOS] Cannot change font size at selection until font panel is shown
https://bugs.webkit.org/show_bug.cgi?id=189295
<rdar://problem/35593389>
Reviewed by Ryosuke Niwa.
Source/WebCore:
Currently, attempting to alter the font size of currently selected editable text in WKWebView via menu items
will fail if the font panel has never been shown. This is because WebViewImpl::changeFontFromFontPanel, which is
responsible for converting the current font at the selection to the new font using -[NSFontManager convertFont:]
bails as a result of NSFontManager's currently selected font always being nil.
WKWebView is responsible for keeping NSFontManager up-to-date with the currently selected font; in fact, this
was initially the case in r180465, which introduced NSFontManager support in WebKit2 by propagating EditorState
updates that contained font information for the current selection. However, this regressed performance due to
selected font computation triggering extra layout passes; r180768 addressed this by introducing a mechanism for
requesting the font at the current selection, and only updating NSFontManager with the new selected font when
the shared font panel is visible (determined by KVO on NSFontPanel). However, this again regressed WKWebView
launch performance, due to KVO registration always forcing the shared NSFontPanel to be created. r182037
addressed this by only registering for KVO on the font panel if the WKWebView has been made editable (SPI on
WKWebView).
This leads to two issues when attempting to alter font attributes using macOS UI: (1) in web views that have not
been made editable using SPI, showing the font panel and attempting to change the font fails due to the selected
font staying nil, because we've never begun registering for KVO notifications on the font panel so we don't try
to keep the font manager up to date. (2) Even if the web view is made editable, if the font panel is never
shown, then the font manager still won't be kept up to date with the current selection, so changing fonts using
menu items still does not work.
We fix both of these problems by refactoring font manager support on WebKit2 such that an up-to-date selected
font in the UI process is no longer necessary in order to alter the font at the current selection. To do this,
we figure out what changes the NSFontManager would've made to the currently selected font in the UI process, and
then propagate this information to the web process, where we convert this information into an EditingStyle which
we apply to the current selection.
The code to both determine the attributes changed by NSFontManager and to convert these attributes into editing
styles to be applied via Editor already exists in WebKitLegacy, in WebHTMLView.mm. This patch moves this
existing logic into WebCore and teases it apart into two portions: the first portion probes NSFontManager to
determine which aspects of the font changed and constructs FontChanges, which captures these differences. The
second portion maps FontChanges to an EditingStyle, which can then be applied to the current selection. In
WebKitLegacy, we construct FontChanges using the font manager, and then immediately use it to create and apply
an EditingStyle. In WebKit, we construct FontChanges in the UI process using the font manager, and then send
this over to the web process via WebPage::changeFont, which then creates and applies the EditingStyle.
Note that this patch also introduces FontAttributeChanges, which is similar in concept to FontChanges, but
captures a broader range of changes possible via NSFontPanel. This was done so that we can eliminate all of the
font manager probing code (along with the two specimen fonts) from WebHTMLView, but is also necessary in order
to allow changing font shadow, strikethrough, and underlines via the font panel to work in WebKit2. This will be
fixed in a followup, by making FontAttributeChanges IPC encodable and by making WKWebView/WKView respond to the
-changeAttributes: selector.
Changes in behavior to WebKit2 are covered by new API tests; legacy WebKit behavior should remain unchanged.
Tests: FontManagerTests.ChangeFontSizeWithMenuItems
FontManagerTests.ChangeFontWithPanel
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* editing/Editor.h:
Remove applyFontStyles.
* editing/FontAttributeChanges.cpp: Added.
(WebCore::FontChanges::platformFontFamilyNameForCSS const):
Given a font family name and a font name, returns the string to use as the "font-family" style property value.
Originally from WebHTMLView.mm.
(WebCore::FontChanges::createEditingStyle const):
Converts font changes to an EditingStyle that can be used to apply these changes.
(WebCore::FontChanges::createStyleProperties const):
Introduce FontChanges, which encapsulates changes which are to be applied to the font in the current selection.
(WebCore::cssValueListForShadow):
(WebCore::FontAttributeChanges::createEditingStyle const):
Converts font attribute changes to an EditingStyle that can be used to apply these changes.
* editing/FontAttributeChanges.h: Added.
Introduce FontAttributeChanges, which encapsulates changes which are to be applied to the font attributes in the
current selection. This includes a set of FontChanges, as well as additional attributes such as strike-through
and underlines.
(WebCore::FontChanges::setFontName):
(WebCore::FontChanges::setFontFamily):
(WebCore::FontChanges::setFontSize):
(WebCore::FontChanges::setFontSizeDelta):
(WebCore::FontChanges::setBold):
(WebCore::FontChanges::setItalic):
(WebCore::FontAttributeChanges::setVerticalAlign):
(WebCore::FontAttributeChanges::setBackgroundColor):
(WebCore::FontAttributeChanges::setForegroundColor):
(WebCore::FontAttributeChanges::setShadow):
(WebCore::FontAttributeChanges::setStrikeThrough):
(WebCore::FontAttributeChanges::setUnderline):
(WebCore::FontAttributeChanges::setFontChanges):
Setters for FontChanges and FontAttributeChanges. Initially, most of these values are optional, indicating that
there should be no change.
(WebCore::FontChanges::encode const):
(WebCore::FontChanges::decode):
Add encoding/decoding support to FontChanges, so that it can be sent over IPC for WebKit2.
* editing/cocoa/FontAttributeChangesCocoa.mm: Added.
(WebCore::FontChanges::platformFontFamilyNameForCSS const):
Helper method to determine whether the font family or the font name should be used, by looking up the PostScript
font name using a FontDescriptor and comparing it against the result of -[NSFont fontName]. This logic was
originally in WebHTMLView.mm.
* editing/mac/EditorMac.mm:
(WebCore::Editor::applyFontStyles): Deleted.
* platform/mac/WebCoreNSFontManagerExtras.h: Added.
* platform/mac/WebCoreNSFontManagerExtras.mm: Added.
Add helper functions to compute FontChanges and FontAttributeChanges from NSFontManager.
(WebCore::firstFontConversionSpecimen):
(WebCore::secondFontConversionSpecimen):
Two "specimen fonts" used to determine what changes NSFontManager or NSFontPanel makes when performing font or
font attribute conversion. Moved from WebHTMLView.mm.
(WebCore::computedFontChanges):
(WebCore::computedFontAttributeChanges):
Moved here from WebHTMLView.mm. Instead of converting font attributes to NSStrings and setting properties on
DOMCSSStyleDeclaration, we instead specify properties on MutableStyleProperties using CSSValues.
Source/WebKit:
Refactors NSFontManager support in WebKit2. See WebCore ChangeLog for more details.
* Scripts/webkit/messages.py:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView changeFont:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView changeFont:]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::changeFontFromFontManager):
(WebKit::WebViewImpl::changeFontFromFontPanel): Deleted.
Renamed this from changeFontFromFontPanel to changeFontFromFontManager. This new name is more accurate in the
case where a menu item is used to alter the font, which doesn't involve NSFontPanel at all.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::changeFont):
(WebKit::WebPageProxy::setFont): Deleted.
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::changeFont):
(WebKit::WebPage::setFont): Deleted.
Source/WebKitLegacy/mac:
Remove code in WebKitLegacy for diffing NSFonts to figure out which style properties need to be changed. See
WebCore ChangeLog for more details.
* WebView/WebHTMLView.mm:
(-[WebHTMLView changeFont:]):
(-[WebHTMLView changeAttributes:]):
(-[WebHTMLView _originalFontA]): Deleted.
(-[WebHTMLView _originalFontB]): Deleted.
(fontNameForDescription): Deleted.
(-[WebHTMLView _addToStyle:fontA:fontB:]): Deleted.
(-[WebHTMLView _styleFromFontManagerOperation]): Deleted.
(-[WebHTMLView _styleForAttributeChange:]): Deleted.
Tools:
Add API tests to simulate using menu items to increase or decrease font size, and also simulate using
NSFontPanel to specify the font family, font size, and other traits.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/FontManagerTests.mm: Added.
(-[TestWKWebView selectedText]):
(-[TestWKWebView selectNextWord]):
(-[TestWKWebView stylePropertyAtSelectionStart:]):
(-[TestWKWebView stylePropertyAtSelectionEnd:]):
(webViewForFontManagerTesting):
(menuItemCellForFontAction):
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/204355@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-06 19:46:38 +00:00
|
|
|
platform/mac/WebCoreNSFontManagerExtras.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/mac/WebCoreNSURLExtras.mm
|
|
|
|
platform/mac/WebCoreObjCExtras.mm
|
2020-06-10 00:05:48 +00:00
|
|
|
platform/mac/WebGLBlocklist.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/mac/WebNSAttributedStringExtras.mm
|
|
|
|
platform/mac/WebPlaybackControlsManager.mm
|
|
|
|
platform/mac/WidgetMac.mm
|
2018-12-13 02:34:19 +00:00
|
|
|
platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp
|
2020-06-08 11:49:15 +00:00
|
|
|
platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm
|
2018-12-13 02:34:19 +00:00
|
|
|
platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm
|
2020-06-08 11:49:15 +00:00
|
|
|
platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm
|
2021-05-12 08:57:38 +00:00
|
|
|
platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.cpp
|
|
|
|
platform/mediastream/cocoa/AudioMediaStreamTrackRendererInternalUnit.cpp
|
|
|
|
platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/mediastream/ios/AVAudioSessionCaptureDevice.mm
|
|
|
|
platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm @no-unify
|
|
|
|
platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm @no-unify
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/mediastream/mac/AVCaptureDeviceManager.mm @no-unify
|
|
|
|
platform/mediastream/mac/AVVideoCaptureSource.mm @no-unify
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/mediastream/mac/BaseAudioSharedUnit.cpp
|
|
|
|
platform/mediastream/mac/CoreAudioCaptureDevice.cpp
|
|
|
|
platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp
|
|
|
|
platform/mediastream/mac/CoreAudioCaptureSource.cpp
|
|
|
|
platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp
|
|
|
|
platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp
|
2020-10-15 11:36:46 +00:00
|
|
|
platform/mediastream/mac/MediaStreamTrackAudioSourceProviderCocoa.cpp
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/mediastream/mac/MockAudioSharedUnit.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/mediastream/mac/MockRealtimeVideoSourceMac.mm
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp
|
|
|
|
platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm
|
|
|
|
platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp
|
|
|
|
platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm
|
|
|
|
platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp
|
|
|
|
platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp
|
|
|
|
platform/mediastream/mac/RealtimeVideoUtilities.mm
|
|
|
|
platform/mediastream/mac/ScreenDisplayCapturerMac.mm
|
2020-10-15 11:36:46 +00:00
|
|
|
platform/mediastream/mac/WebAudioSourceProviderCocoa.mm
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/mediastream/mac/WindowDisplayCapturerMac.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/mock/MediaPlaybackTargetMock.cpp
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/mock/MediaPlaybackTargetPickerMock.cpp
|
2019-10-21 16:29:06 +00:00
|
|
|
platform/mock/MockAudioDestinationCocoa.cpp
|
2018-11-13 07:07:21 +00:00
|
|
|
platform/network/cf/CertificateInfoCFNet.cpp
|
Make NetworkRTCResolver port agnostic
https://bugs.webkit.org/show_bug.cgi?id=178855
Patch by Alejandro G. Castro <alex@igalia.com> on 2018-03-07
Reviewed by Youenn Fablet.
Source/WebCore:
Add new API in the DNSResolveQueue allowing to revolve hostnames and get the result. Add platform
specific code for soup platform and refactor the other platforms. Added new API to the DNS API header
and move the general code to the DNS.cpp file, that way we can reuse that code in all the platforms
and leave the ResolveQueue class of the platforms in a file.
No new tests because this is a refactor.
* PlatformAppleWin.cmake: Move the DNSCFNet class to DNSResolveQueueCFNet.
* PlatformMac.cmake: Ditto.
* Sources.txt: Add the DNS.cpp for compilation.
* SourcesCocoa.txt: Move the DNSCFNet class to DNSResolveQueueCFNet.
* WebCore.xcodeproj/project.pbxproj: Move the DNSCFNet class to DNSResolveQueueCFNet, add the DNS.cpp
for compilation. Add the new DNSResolveQueueCFNet class.
* platform/Curl.cmake: Move the DNSCFNet class to DNSResolveQueueCurl.
* platform/network/DNS.cpp: Add this file with the default implementation of the DNS functions for
all the platforms.
(WebCore::prefetchDNS): Copied from every platform implementation.
(WebCore::resolveDNS): Add the function, resolves a hostname, receives the identifier of the operation
and the completion handler.
(WebCore::stopResolveDNS): Add the function, stops a resolution operation, receives the identifier
of the operation.
* platform/network/DNS.h: Add the new APIs resolveDNS and stopResolveDNS with the classes used for the
implementation.
(WebCore::IPAddress::IPAddress): Add this class used to send the resolved address information, it does
not depend on libwebrtc rtc classes.
(WebCore::IPAddress::get): Get a reference to the struct sockaddr_in in the IPAddress class.
(WebCore::DNSCompletionHandler): Add this CompletionHandler type to be used when resolving the DNS
address.
* platform/network/DNSResolveQueue.cpp: Add the DNSResolveQueue platform instantiation in the singleton.
(WebCore::DNSResolveQueue::singleton): Use DNSResolveQueue platform classes when creating the singleton..
(WebCore::DNSResolveQueue::resolve): Add this method to get the address of a hostname, it sends the
identifier and the completion handler to use when returning the result.
(WebCore::DNSResolveQueue::stopResolve): Add this method to stop the resolve operation when required.
* platform/network/DNSResolveQueue.h: Add the new methods and make the class abstract, so that every
platform can implement the functions.
* platform/network/cf/DNSResolveQueueCFNet.cpp: Renamed from Source/WebCore/platform/network/cf/DNSCFNet.cpp.
Add the methods to the new class DNSResolveQueueCFNet, move the prefetchDNS to the DNS.cpp general
implementation.
* platform/network/cf/DNSResolveQueueCFNet.h: Add the new class inheriting from the DNSResolveQueue. Add the
new methods, we have to implement these methods and move the NetworkRTCResolver for COCOA code here.
(WebCore::DNSResolveQueueCF::resolve): Dummy method, not implemented.
(WebCore::DNSResolveQueueCF::stopResolve): Ditto.
* platform/network/curl/DNSResolveQueueCurl.cpp: Renamed from Source/WebCore/platform/network/curl/DNSCurl.cpp.
* platform/network/curl/DNSResolveQueueCurl.h: Add the new class inheriting from the DNSResolveQueue.
(WebCore::DNSResolveQueueCurl::resolve): Ditto.
(WebCore::DNSResolveQueueCurl::stopResolve): Ditto.
* platform/network/soup/DNSResolveQueueSoup.h: New class inheriting from the DNSResolveQueue class, adding
a HasMap with the active operations, it allows stopping them.
* platform/network/soup/DNSResolveQueueSoup.cpp: Renamed from Source/WebCore/platform/network/curl/DNSSoup.cpp.
(WebCore::resolvedWithObserverCallback): Called when the result address from the soup platform is ready,
sends the address to the completion handler.
(WebCore::DNSResolveQueueSoup::resolve): Launch the resolve operation with the soup library.
(WebCore::DNSResolveQueueSoup::stopResolve): Stop the resolve operation on process with a GCancellable.
Source/WebKit:
Create a specific Cocoa class to isolate the generic code in the base class, make the base implementation port
agnostic and dependent on DNS API in the platform directory which encapsulates the platform specific details.
* NetworkProcess/webrtc/NetworkRTCProvider.cpp: Create an alias class name defined per platform to instantiate the resolver.
(WebKit::NetworkRTCProvider::createResolver): Used the alias class name and receive a new IPAddress class that is not
dependent on rtc libwebrtc library.
* NetworkProcess/webrtc/NetworkRTCResolver.cpp: Remove the platform specific code. Use the DNS API to implement the
platform specific code in the default start and stop methods. Add the identifier of the resolve operation to the class.
(WebKit::NetworkRTCResolver::NetworkRTCResolver): Add the identifier in the initialization.
(WebKit::NetworkRTCResolver::~NetworkRTCResolver): Remove the platform specific code.
(WebKit::NetworkRTCResolver::completed): Ditto.
(WebKit::NetworkRTCResolver::start): Add a new implementation using the DNS API.
(WebKit::NetworkRTCResolver::stop): Ditto
* NetworkProcess/webrtc/NetworkRTCResolver.h: Remove the platform specific code and use the DNSResolveQueue for a general
solution to implement the platform specific code. Avoid using the IPAddress class that depends on libwertc classes to make
it more general regarding DNS name resolution.
(WebKit::NetworkRTCResolver::start): Make this class virtual.
(WebKit::NetworkRTCResolver::stop): Ditto.
* NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp: Copied Cocoa code from Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolver.cpp.
Now this class overrides the start and stop methods that use DNS, cocoa implementation should use the DNS methods in the future and
remove this class, making sure all the platform specific class is in the platform directory.
* NetworkProcess/webrtc/NetworkRTCResolverCocoa.h: Copied Cocoa code from Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolver.h.
* PlatformGTK.cmake: Add NetworkRTCResolver compilation for GTK.
* WebKit.xcodeproj/project.pbxproj: Add the NetworkRTCResolverCocoa class to the compilation.
Tools:
Added new unit tests for he resolve and stopResolve functions. We need to compile them for the
other platforms when the APIs are supported.
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebCore/DNS.cpp:
Canonical link: https://commits.webkit.org/199068@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-03-07 15:21:24 +00:00
|
|
|
platform/network/cf/DNSResolveQueueCFNet.cpp
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/network/cf/FormDataStreamCFNet.cpp
|
|
|
|
platform/network/cf/NetworkStorageSessionCFNet.cpp
|
|
|
|
platform/network/cf/ProxyServerCFNet.cpp
|
|
|
|
platform/network/cf/ResourceRequestCFNet.cpp
|
|
|
|
platform/network/cf/SocketStreamHandleImplCFNet.cpp
|
2018-11-13 07:07:21 +00:00
|
|
|
platform/network/cocoa/CertificateInfoCocoa.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/network/cocoa/CookieCocoa.mm
|
|
|
|
platform/network/cocoa/CookieStorageObserver.mm
|
|
|
|
platform/network/cocoa/CredentialCocoa.mm
|
|
|
|
platform/network/cocoa/NetworkLoadMetrics.mm
|
|
|
|
platform/network/cocoa/NetworkStorageSessionCocoa.mm
|
|
|
|
platform/network/cocoa/ProtectionSpaceCocoa.mm
|
2021-02-16 16:59:26 +00:00
|
|
|
platform/network/cocoa/RangeResponseGenerator.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/network/cocoa/ResourceRequestCocoa.mm
|
2019-03-13 18:45:31 +00:00
|
|
|
platform/network/cocoa/ResourceResponseCocoa.mm @no-unify // Unsafe to unify until rdar://problem/48853137 is resolved
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/network/cocoa/WebCoreNSURLSession.mm @no-unify
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/network/ios/NetworkStateNotifierIOS.mm
|
|
|
|
platform/network/ios/WebCoreURLResponseIOS.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/network/mac/AuthenticationMac.mm
|
|
|
|
platform/network/mac/BlobDataFileReferenceMac.mm
|
|
|
|
platform/network/mac/CookieStorageMac.mm
|
|
|
|
platform/network/mac/CredentialStorageMac.mm
|
|
|
|
platform/network/mac/FormDataStreamMac.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/network/mac/NetworkStateNotifierMac.cpp
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/network/mac/ResourceErrorMac.mm
|
|
|
|
platform/network/mac/ResourceHandleMac.mm
|
|
|
|
platform/network/mac/SynchronousLoaderClient.mm
|
|
|
|
platform/network/mac/UTIUtilities.mm
|
|
|
|
platform/network/mac/WebCoreURLResponse.mm
|
|
|
|
platform/text/cf/HyphenationCF.cpp
|
2020-02-07 04:12:39 +00:00
|
|
|
platform/text/cocoa/LocaleCocoa.mm
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/text/cocoa/LocalizedDateCache.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/text/ios/TextEncodingRegistryIOS.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
platform/text/mac/TextBoundaries.mm
|
2018-08-21 16:47:43 +00:00
|
|
|
platform/text/mac/TextCheckingMac.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
platform/text/mac/TextEncodingRegistryMac.mm
|
2020-11-22 06:09:32 +00:00
|
|
|
platform/xr/cocoa/PlatformXRCocoa.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
rendering/RenderThemeCocoa.mm
|
2018-02-22 03:49:05 +00:00
|
|
|
rendering/RenderThemeIOS.mm
|
|
|
|
rendering/RenderThemeMac.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
rendering/TextAutoSizing.cpp
|
2020-07-03 23:23:48 +00:00
|
|
|
testing/cocoa/WebViewVisualIdentificationOverlay.mm
|
2017-10-26 07:07:51 +00:00
|
|
|
|
2020-07-03 23:23:48 +00:00
|
|
|
// The following files aren't unified with others to prevent them from being merged
|
|
|
|
// with files that use the system OpenGL.
|
2017-10-26 07:07:51 +00:00
|
|
|
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/graphics/angle/ExtensionsGLANGLE.cpp @no-unify
|
|
|
|
platform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unify
|
2021-03-17 11:47:47 +00:00
|
|
|
platform/graphics/angle/GraphicsContextGLANGLEEGLUtilities.cpp @no-unify
|
2020-07-03 23:23:48 +00:00
|
|
|
platform/graphics/angle/TemporaryANGLESetting.cpp @no-unify
|