WebKit-https.git
4 months agoUpdate flakiness dashboard configuration for iOS 13 queues
ryanhaddad@apple.com [Wed, 18 Sep 2019 22:08:13 +0000 (22:08 +0000)]
Update flakiness dashboard configuration for iOS 13 queues
https://bugs.webkit.org/show_bug.cgi?id=201711

Reviewed by Jonathan Bedard.

* TestResultServer/static-dashboards/builders.jsonp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250059 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoPhantom insertion phase may disagree with arguments forwarding about live ranges
sbarati@apple.com [Wed, 18 Sep 2019 22:03:20 +0000 (22:03 +0000)]
Phantom insertion phase may disagree with arguments forwarding about live ranges
https://bugs.webkit.org/show_bug.cgi?id=200715
<rdar://problem/54301717>

Reviewed by Yusuke Suzuki.

JSTests:

* stress/phantom-insertion-live-range-should-agree-with-arguments-forwarding.js: Added.
(main.v23):
(main.try.v43):
(main.):
(main):

Source/JavaScriptCore:

The issue is that Phantom insertion phase was disagreeing about live ranges
from the arguments forwarding phase. The effect is that Phantom insertion
would insert a Phantom creating a longer live range than what arguments
forwarding was analyzing. Arguments forwarding will look for the last DFG
use or the last bytecode use of a variable it wants to eliminate. It then
does an interference analysis to ensure that nothing clobbers other variables
it needs to recover the sunken allocation during OSR exit.

Phantom insertion works by ordering the program into OSR exit epochs. If a value was used
in the current epoch, there is no need to insert a phantom for it. We
determine where we might need a Phantom by looking at bytecode kills. In this
analysis, we have a mapping from bytecode local to DFG node. However, we
sometimes forgot to remove the entry when a local is killed. So, if the first
kill of a variable is in the same OSR exit epoch, we won't insert a Phantom by design.
However, if the variable gets killed again, we might errantly insert a Phantom
for the prior variable which should've already been killed. The solution is to
clear the entry in our mapping when a variable is killed.

The program in question was like this:

1: DirectArguments
...
2: MovHint(@1, loc1) // arguments forwarding treats this as the final kill for @1
...
clobber things needed for recovery
...

Arguments elimination would transform the program since between @1 and
@2, nothing clobbers values needed for exit and nothing escapes @1. The
program becomes:

1: PhantomDirectArguments
...
2: MovHint(@1, loc1) // arguments forwarding treats this as the final kill for @1
...
clobber things needed for recovery of @1
...

Phantom insertion would then transform the program into:

1: PhantomDirectArguments
...
2: MovHint(@1, loc1) // arguments forwarding treats this as the final kill for @1
...
clobber things needed for recovery of @1
...
3: Phantom(@1)
...

This is wrong because Phantom insertion and arguments forwarding must agree on live
ranges, otherwise the interference analysis performed by arguments forwarding will
not correctly analyze up until where the value might be recovered.

* dfg/DFGPhantomInsertionPhase.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoTry to fix the macOS High Sierra build after r250048.
aestes@apple.com [Wed, 18 Sep 2019 22:02:24 +0000 (22:02 +0000)]
Try to fix the macOS High Sierra build after r250048.

* pal/spi/cocoa/PassKitSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250057 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[LFC] Introduce UsedVerticalValues::Constraints
zalan@apple.com [Wed, 18 Sep 2019 21:48:03 +0000 (21:48 +0000)]
[LFC] Introduce UsedVerticalValues::Constraints
https://bugs.webkit.org/show_bug.cgi?id=201933
<rdar://problem/55487485>

Reviewed by Antti Koivisto.

UsedVerticalValues::Constraints holds the constraint values ((optional)containing block height and contentbox top) for a particular box geometry computation.
This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
See webkit.org/b/201795

* layout/FormattingContext.cpp:
(WebCore::Layout::outOfFlowHorizontalConstraints):
(WebCore::Layout::outOfFlowVerticalConstraints):
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
(WebCore::Layout::outOfFlowConstraints): Deleted.
* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
* layout/LayoutUnits.cpp:
(WebCore::Layout::UsedVerticalValues::Constraints::Constraints):
* layout/LayoutUnits.h:
(WebCore::Layout::UsedVerticalValues::Constraints::Constraints):
(WebCore::Layout::UsedVerticalValues::UsedVerticalValues):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
(WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
* layout/inlineformatting/InlineFormattingContext.h:
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250056 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed test gardening for iOS.
ryanhaddad@apple.com [Wed, 18 Sep 2019 21:35:08 +0000 (21:35 +0000)]
Unreviewed test gardening for iOS.

* platform/ios/TestExpectations: Mark quicklook/numbers-09.html as failing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250055 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed, WinCairo build fix after r250045.
cdumez@apple.com [Wed, 18 Sep 2019 21:33:06 +0000 (21:33 +0000)]
Unreviewed, WinCairo build fix after r250045.

* platform/network/curl/CurlFormDataStream.cpp:
(WebCore::CurlFormDataStream::computeContentLength):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250054 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoNetworkLoadParameters shouldn't store sessionID
commit-queue@webkit.org [Wed, 18 Sep 2019 21:31:27 +0000 (21:31 +0000)]
NetworkLoadParameters shouldn't store sessionID
https://bugs.webkit.org/show_bug.cgi?id=201921

Patch by Benjamin Nham <nham@apple.com> on 2019-09-18
Reviewed by Chris Dumez.

Now that there's a single session id per WebProcess, we don't need to
store the session id in NetworkLoadParameters anymore. Clients can just
directly ask NetworkConnectionToWebProcess for the WebProcess's session
ID instead.

* NetworkProcess/AdClickAttributionManager.cpp:
(WebKit::AdClickAttributionManager::fireConversionRequest):
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/NetworkCORSPreflightChecker.cpp:
(WebKit::NetworkCORSPreflightChecker::startPreflight):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::preconnectTo):
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkResourceLoadMap.h:
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::convertToDownload):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::NetworkSession):
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):
(WebKit::PingLoad::loadRequest):
(WebKit::PingLoad::didReceiveChallenge):
* NetworkProcess/PingLoad.h:
* NetworkProcess/PreconnectTask.cpp:
(WebKit::PreconnectTask::PreconnectTask):
* NetworkProcess/PreconnectTask.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::startPingLoad):
(WebKit::WebLoaderStrategy::preconnectTo):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250053 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed, rolling out r250002.
commit-queue@webkit.org [Wed, 18 Sep 2019 21:13:26 +0000 (21:13 +0000)]
Unreviewed, rolling out r250002.
https://bugs.webkit.org/show_bug.cgi?id=201943

Patching of the callee and call is not atomic (Requested by
tadeuzagallo on #webkit).

Reverted changeset:

"Change WebAssembly calling conventions"
https://bugs.webkit.org/show_bug.cgi?id=201799
https://trac.webkit.org/changeset/250002

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250052 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[LFC] Add contentbox left constraint to UsedHorizontalValues::Constraints
zalan@apple.com [Wed, 18 Sep 2019 21:12:06 +0000 (21:12 +0000)]
[LFC] Add contentbox left constraint to UsedHorizontalValues::Constraints
https://bugs.webkit.org/show_bug.cgi?id=201923
<rdar://problem/55485796>

Reviewed by Antti Koivisto.

Pass in the contentbox left constraint value to the FormattingContext::compute*() functions so that they don't need to read the containg block's geometry.
This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
See webkit.org/b/201795

* layout/FormattingContext.cpp:
(WebCore::Layout::outOfFlowConstraints):
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
* layout/LayoutUnits.cpp:
(WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
* layout/LayoutUnits.h:
(WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
(WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250051 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[LFC] Introduce UsedHorizontalValues::Constraints
zalan@apple.com [Wed, 18 Sep 2019 19:56:14 +0000 (19:56 +0000)]
[LFC] Introduce UsedHorizontalValues::Constraints
https://bugs.webkit.org/show_bug.cgi?id=201919
<rdar://problem/55481927>

Reviewed by Antti Koivisto.

UsedHorizontalValues::Constraints holds the constraint values for a particular box geometry computation (currently it only has the horizontal width constraint)

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
(WebCore::Layout::FormattingContext::computeBorderAndPadding):
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
(WebCore::Layout::FormattingContext::Geometry::computedPadding const):
(WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
(WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
* layout/FormattingContextQuirks.cpp:
(WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
* layout/LayoutUnits.h:
(WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
(WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
(WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
* layout/floats/FloatingContext.h:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
* layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250050 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoRemove alternate declaration of CCECCryptorImportKey
krollin@apple.com [Wed, 18 Sep 2019 19:39:53 +0000 (19:39 +0000)]
Remove alternate declaration of CCECCryptorImportKey
https://bugs.webkit.org/show_bug.cgi?id=201903
<rdar://problem/55466589>

Reviewed by Chris Dumez.

In macOS 10.15 and iOS 13.0 SDKs, the keyPackage parameter of
CCECCryptorImportKey() was changed from "void*" to "const void*". This
change was accounted for in Bug 195754 by making the same change to
the parallel declarations in CommonCryptoSPI.h. But since this header
also needed to be used in macOS 10.14 contexts, the old declaration
was also kept.

But since this function is a "C" function, the types of parameters are
not included in the function signature, and it doesn't really matter
what parameter types are, so long as the right values are sent to the
called function. This means that we don't need two versions of the
function, one with a "const" parameter and one without. We only really
need one. In this case, it makes sense to keep the more-restrictive
one -- the with a "const void*" parameter. Therefore, remove the one
taking just "void*".

* pal/spi/cocoa/CommonCryptoSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250049 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[Apple Pay] Tell websites why a session was cancelled
aestes@apple.com [Wed, 18 Sep 2019 19:13:33 +0000 (19:13 +0000)]
[Apple Pay] Tell websites why a session was cancelled
https://bugs.webkit.org/show_bug.cgi?id=201912
Source/WebCore:

Reviewed by Brady Eidson.

Added ApplePayCancelEvent as the interface for ApplePaySession's cancel event. This event
object includes a `sessionError` attribute that exposes a Web-safe version of the PassKit
domain error we received from PKPaymentAuthorization(View)Controller. Currently, we report
all errors with code "unknown", but more codes will be added in future patches.

Test: http/tests/ssl/applepay/ApplePayCancelEvent.https.html

* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/applepay/ApplePayCancelEvent.cpp: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
(WebCore::ApplePayCancelEvent::ApplePayCancelEvent):
(WebCore::ApplePayCancelEvent::sessionError const):
(WebCore::ApplePayCancelEvent::eventInterface const):
* Modules/applepay/ApplePayCancelEvent.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
(WebCore::ApplePayCancelEvent::create):
* Modules/applepay/ApplePayCancelEvent.idl: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::didCancelPaymentSession):
* Modules/applepay/ApplePaySession.h:
* Modules/applepay/ApplePaySessionError.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
* Modules/applepay/ApplePaySessionError.idl: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
* Modules/applepay/PaymentCoordinator.cpp:
(WebCore::PaymentCoordinator::didCancelPaymentSession):
* Modules/applepay/PaymentCoordinator.h:
* Modules/applepay/PaymentHeaders.h:
* Modules/applepay/PaymentSession.cpp:
* Modules/applepay/PaymentSession.h:
* Modules/applepay/PaymentSessionError.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
* Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm: Copied from Source/WebCore/Modules/applepay/PaymentSession.h.
(WebCore::additionalError):
(WebCore::PaymentSessionError::PaymentSessionError):
(WebCore::PaymentSessionError::sessionError const):
(WebCore::PaymentSessionError::platformError const):
(WebCore::PaymentSessionError::unknownError const):
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::ApplePayPaymentHandler::didCancelPaymentSession):
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
* Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:
* Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/EventNames.in:
* testing/MockPaymentCoordinator.cpp:
(WebCore::MockPaymentCoordinator::cancelPayment):

Source/WebCore/PAL:

<rdar://problem/55469706>

Reviewed by Brady Eidson.

Soft-linked PKPassKitErrorDomain and included PassKit headers more judiciously.

* pal/cocoa/PassKitSoftLink.h:
* pal/cocoa/PassKitSoftLink.mm:
* pal/spi/cocoa/PassKitSPI.h:

Source/WebKit:

<rdar://problem/55469706>

Reviewed by Brady Eidson.

Remembered the error passed to -[WKPaymentAuthorizationDelegate _willFinishWithError:] and
sent it to the WebContent process in Messages::WebPaymentCoordinator::DidCancelPaymentSession.

* Platform/cocoa/PaymentAuthorizationPresenter.h:
* Platform/cocoa/WKPaymentAuthorizationDelegate.mm:
(-[WKPaymentAuthorizationDelegate _didFinish]):
(-[WKPaymentAuthorizationDelegate _willFinishWithError:]):
* Shared/ApplePay/WebPaymentCoordinatorProxy.cpp:
(WebKit::WebPaymentCoordinatorProxy::didCancelPaymentSession):
(WebKit::WebPaymentCoordinatorProxy::presenterDidFinish):
* Shared/ApplePay/WebPaymentCoordinatorProxy.h:
(WebKit::WebPaymentCoordinatorProxy::didCancelPaymentSession):
* Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<WebCore::PaymentSessionError>::encode):
(IPC::ArgumentCoder<WebCore::PaymentSessionError>::decode):
* Shared/WebCoreArgumentCoders.h:
* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
(WebKit::WebPaymentCoordinator::networkProcessConnectionClosed):
(WebKit::WebPaymentCoordinator::didCancelPaymentSession):
* WebProcess/ApplePay/WebPaymentCoordinator.h:
* WebProcess/ApplePay/WebPaymentCoordinator.messages.in:

LayoutTests:

Reviewed by Brady Eidson.

* http/tests/ssl/applepay/ApplePayCancelEvent.https-expected.txt: Added.
* http/tests/ssl/applepay/ApplePayCancelEvent.https.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250048 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoWebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID
cdumez@apple.com [Wed, 18 Sep 2019 18:47:03 +0000 (18:47 +0000)]
WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID
https://bugs.webkit.org/show_bug.cgi?id=201882

Reviewed by Geoffrey Garen.

WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID now that we have a single
sessionID per WebProcess.

Source/WebCore:

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::installContextData):
(WebCore::SWServer::runServiceWorker):
* workers/service/server/SWServerToContextConnection.h:

Source/WebKit:

* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::installServiceWorkerContext):
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient):
(WebKit::ServiceWorkerFrameLoaderClient::sessionID const):
(WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250047 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoStop passing sessionIDs to NetworkProcessConnection methods
cdumez@apple.com [Wed, 18 Sep 2019 18:38:25 +0000 (18:38 +0000)]
Stop passing sessionIDs to NetworkProcessConnection methods
https://bugs.webkit.org/show_bug.cgi?id=201886

Reviewed by Geoffrey Garen.

Stop passing sessionIDs to NetworkProcessConnection methods. This is no longer
necessary now that we have a single session per WebProcess.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
* WebProcess/Databases/WebDatabaseProvider.cpp:
(WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
(WebKit::NetworkProcessConnection::didCacheResource):
(WebKit::NetworkProcessConnection::idbConnectionToServer):
(WebKit::NetworkProcessConnection::idbConnectionToServerForSession): Deleted.
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250046 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoCacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID
cdumez@apple.com [Wed, 18 Sep 2019 18:37:13 +0000 (18:37 +0000)]
CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID
https://bugs.webkit.org/show_bug.cgi?id=201920

Reviewed by Geoffrey Garen.

CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID.
This sessionID is no longer used now that we have a session per WebProcess.

Source/WebCore:

* Modules/cache/CacheStorageConnection.cpp:
(WebCore::formDataSize):
(WebCore::CacheStorageConnection::computeRealBodySize):
* Modules/cache/CacheStorageConnection.h:
* Modules/cache/DOMWindowCaches.cpp:
(WebCore::DOMWindowCaches::caches const):
* Modules/cache/WorkerCacheStorageConnection.cpp:
(WebCore::WorkerCacheStorageConnection::sessionID const): Deleted.
* Modules/cache/WorkerCacheStorageConnection.h:
* fileapi/Blob.cpp:
(WebCore::Blob::size const):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::blobSize):
* fileapi/ThreadableBlobRegistry.h:
* loader/cache/KeepaliveRequestTracker.cpp:
(WebCore::KeepaliveRequestTracker::tryRegisterRequest):
(WebCore::KeepaliveRequestTracker::registerRequest):
(WebCore::KeepaliveRequestTracker::unregisterRequest):
* page/CacheStorageProvider.h:
(WebCore::CacheStorageProvider::createCacheStorageConnection):
* platform/network/BlobRegistry.h:
* platform/network/FormData.cpp:
(WebCore::FormDataElement::lengthInBytes const):
(WebCore::FormData::lengthInBytes const):
* platform/network/FormData.h:
* testing/Internals.cpp:
(WebCore::Internals::clearCacheStorageMemoryRepresentation):
(WebCore::Internals::cacheStorageEngineRepresentation):
(WebCore::Internals::updateQuotaBasedOnSpaceUsage):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::createCacheStorageConnection):
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
(WebCore::ServiceWorkerThreadProxy::createCacheStorageConnection):
* workers/service/context/ServiceWorkerThreadProxy.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):

Source/WebKit:

* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
* WebProcess/Cache/WebCacheStorageConnection.cpp:
(WebKit::WebCacheStorageConnection::sessionID const): Deleted.
* WebProcess/Cache/WebCacheStorageConnection.h:
* WebProcess/Cache/WebCacheStorageProvider.cpp:
(WebKit::WebCacheStorageProvider::createCacheStorageConnection):
* WebProcess/Cache/WebCacheStorageProvider.h:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::blobSize):
* WebProcess/FileAPI/BlobRegistryProxy.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPlatformStrategies.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250045 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoREGRESSION: (Catalina) fast/images/async-image-multiple-clients-repaint.html is a...
russell_e@apple.com [Wed, 18 Sep 2019 18:05:20 +0000 (18:05 +0000)]
REGRESSION: (Catalina) fast/images/async-image-multiple-clients-repaint.html is a flakey failure.
rdar://55484256

Unreviewed Test Gardening.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250044 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoDrop FrameLoaderClient::sessionID()
cdumez@apple.com [Wed, 18 Sep 2019 17:14:15 +0000 (17:14 +0000)]
Drop FrameLoaderClient::sessionID()
https://bugs.webkit.org/show_bug.cgi?id=201916

Reviewed by Geoffrey Garen.

Drop FrameLoaderClient::sessionID(). The Frame can get the sessionID from its page (Which is
what the FrameLoaderClient::sessionID() ended up doing) and other call sites at WebKit2 layer
can get the sessionID from the WebProcess singleton.

Source/WebCore:

* loader/EmptyClients.cpp:
* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoaderClient.h:
* page/Frame.cpp:
(WebCore::Frame::sessionID const):

Source/WebKit:

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient):
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250043 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoWebServiceWorkerProvider::handleFetch() does not need to take in a sessionID
cdumez@apple.com [Wed, 18 Sep 2019 17:13:29 +0000 (17:13 +0000)]
WebServiceWorkerProvider::handleFetch() does not need to take in a sessionID
https://bugs.webkit.org/show_bug.cgi?id=201917

Reviewed by Geoffrey Garen.

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
* WebProcess/Storage/WebServiceWorkerProvider.cpp:
(WebKit::WebServiceWorkerProvider::handleFetch):
* WebProcess/Storage/WebServiceWorkerProvider.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250042 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoWebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs...
cdumez@apple.com [Wed, 18 Sep 2019 17:12:46 +0000 (17:12 +0000)]
WebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs to take a sessionID
https://bugs.webkit.org/show_bug.cgi?id=201883

Reviewed by Geoffrey Garen.

WebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs to take a sessionID,
now that we have a single session per WebProcess.

Source/WebCore:

* workers/service/ServiceWorkerClient.cpp:
(WebCore::ServiceWorkerClient::postMessage):
* workers/service/context/SWContextManager.h:

Source/WebKit:

* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::postMessageToServiceWorkerClient):
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerClient):
* WebProcess/Storage/WebSWContextManagerConnection.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250041 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed, rolling out r250030.
russell_e@apple.com [Wed, 18 Sep 2019 16:51:19 +0000 (16:51 +0000)]
Unreviewed, rolling out r250030.

Cause of Recent Build Failures.

Reverted changeset:

"Make all ScriptWrappable IsoHeap-ed"
https://bugs.webkit.org/show_bug.cgi?id=201846
https://trac.webkit.org/changeset/250030

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250040 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[WPE][GTK] Update build environments to use libwpe+WPEBackend-fdo 1.4.0
aperez@igalia.com [Wed, 18 Sep 2019 16:27:20 +0000 (16:27 +0000)]
[WPE][GTK] Update build environments to use libwpe+WPEBackend-fdo 1.4.0
https://bugs.webkit.org/show_bug.cgi?id=201915

Reviewed by Michael Catanzaro.

* flatpak/org.webkit.WPEModules.yaml: Bump versions of libwpe and WPEBackend-fdo to 1.4.0
* gtk/jhbuild.modules: Ditto.
* wpe/jhbuild.modules: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250039 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoREGRESSION (macOS): Many webgpu/whlsl* tests are flaky failures.
russell_e@apple.com [Wed, 18 Sep 2019 16:11:03 +0000 (16:11 +0000)]
REGRESSION (macOS): Many webgpu/whlsl* tests are flaky failures.
https://bugs.webkit.org/show_bug.cgi?id=201877

Unreviewed Test Gardening.

Two additional tests are flaky, marking as such.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoFollowup iOS 13 test gardening for r250023
tsavell@apple.com [Wed, 18 Sep 2019 15:55:08 +0000 (15:55 +0000)]
Followup iOS 13 test gardening for r250023

Unreviewed test gardening

* platform/ios-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250037 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[GTK][WPE] bubblewrap sandbox should be disabled when running inside docker
clopez@igalia.com [Wed, 18 Sep 2019 15:53:11 +0000 (15:53 +0000)]
[GTK][WPE] bubblewrap sandbox should be disabled when running inside docker
https://bugs.webkit.org/show_bug.cgi?id=201914

Reviewed by Michael Catanzaro.

Detect if running inside Docker by checking the file /.dockerenv
In that case, disable the sandbox.

* UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
(WebKit::isInsideDocker):
(WebKit::ProcessLauncher::launchProcess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250036 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[LFC] FormattingContext::Geometry::computedHeight* functions need containingBlockHeig...
zalan@apple.com [Wed, 18 Sep 2019 15:53:06 +0000 (15:53 +0000)]
[LFC] FormattingContext::Geometry::computedHeight* functions need containingBlockHeight only.
https://bugs.webkit.org/show_bug.cgi?id=201880
<rdar://problem/55449623>

Reviewed by Antti Koivisto.

Let's tighten the incoming vertical parameter.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
(WebCore::Layout::FormattingContext::Geometry::computedMaxHeight const):
(WebCore::Layout::FormattingContext::Geometry::computedMinHeight const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250035 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoDocumentMarkerController should not invoke ensureLineBoxes during TextIterator traversal
antti@apple.com [Wed, 18 Sep 2019 15:41:09 +0000 (15:41 +0000)]
DocumentMarkerController should not invoke ensureLineBoxes during TextIterator traversal
https://bugs.webkit.org/show_bug.cgi?id=201911
<rdar://problem/55455458>

Reviewed by Zalan Bujtas.

DocumentMarkerController::addMarker may call ensureLineBoxes but TextIterator doesn't expect mutations during traversal.
Fix by doing range collection as a separate step.

* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::collectTextRanges):
(WebCore::DocumentMarkerController::addMarker):
(WebCore::DocumentMarkerController::addTextMatchMarker):
(WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
(WebCore::DocumentMarkerController::addDictationResultMarker):
(WebCore::DocumentMarkerController::addDraggedContentMarker):
(WebCore::DocumentMarkerController::addPlatformTextCheckingMarker):
(WebCore::DocumentMarkerController::removeMarkers):
(WebCore::DocumentMarkerController::filterMarkers):
* dom/DocumentMarkerController.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250034 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[LFC] Shrink-to-fit-width needs the available width constraint value only
zalan@apple.com [Wed, 18 Sep 2019 15:38:17 +0000 (15:38 +0000)]
[LFC] Shrink-to-fit-width needs the available width constraint value only
https://bugs.webkit.org/show_bug.cgi?id=201896
<rdar://problem/55465382>

Reviewed by Antti Koivisto.

* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250033 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[WebGPU] Update demos to work on STP 92
mmaxfield@apple.com [Wed, 18 Sep 2019 14:31:12 +0000 (14:31 +0000)]
[WebGPU] Update demos to work on STP 92
https://bugs.webkit.org/show_bug.cgi?id=201872

Reviewed by Dean Jackson.

Websites/browserbench.org:

GPUShaderStageBit => GPUShaderStage

* MotionMark1.1/tests/3d/resources/webgpu.js:
(Stage.call.initialize):

Websites/webkit.org:

Updating for new WSL buffer layouts.
Updating for new WSL compiler struct validation rules.
GPUShaderStageBit => GPUShaderStage
GPUColorWriteBits => GPUColorWrite
GPUBufferUsage.TRANSFER_DST => GPUBufferUsage.COPY_DST
GPUBufferUsage.TRANSFER_SRC => GPUBufferUsage.COPY_SRC

* demos/webgpu/babylon/babylonWebGpu.max.js:
* demos/webgpu/babylon/oneHelmetWebGPUWSLShaders.js:
(sampler.bumpSamplerSampler.register):
(sampler.reflectionSamplerSampler.register):
(float2.uv.attribute): Deleted.
(float3.normal.attribute): Deleted.
* demos/webgpu/compute-boids.html:
* demos/webgpu/hello-cube.html:
* demos/webgpu/scripts/compute-blur.js:
(setUpCompute):
(createShaderCode):
* demos/webgpu/scripts/compute-boids-compile.js:
* demos/webgpu/scripts/hello-triangle.js:
(async.helloTriangle):
* demos/webgpu/textured-cube.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250032 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoREGRESSION (r247566): Leak of UICTFontDescriptor in WebCore::FontDatabase::InstalledF...
ddkilzer@apple.com [Wed, 18 Sep 2019 11:30:16 +0000 (11:30 +0000)]
REGRESSION (r247566): Leak of UICTFontDescriptor in WebCore::FontDatabase::InstalledFont::InstalledFont()
<https://webkit.org/b/201893>
<rdar://problem/55464115>

Reviewed by Brent Fulgham.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontDatabase::InstalledFont::InstalledFont): Use
adoptCF() to fix the leak.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250031 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoMake all ScriptWrappable IsoHeap-ed
ysuzuki@apple.com [Wed, 18 Sep 2019 10:33:16 +0000 (10:33 +0000)]
Make all ScriptWrappable IsoHeap-ed
https://bugs.webkit.org/show_bug.cgi?id=201846
<rdar://problem/55407535>

Reviewed by Mark Lam.

This patch puts Event and derived classes under IsoHeap to make all ScriptWrappable classes IsoHeap-ed.

* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
(WebCore::WebKitPlaybackTargetAvailabilityEvent::create): Deleted.
(WebCore::WebKitPlaybackTargetAvailabilityEvent::availability const): Deleted.
* Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
* Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
* Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
* Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
(WebCore::ApplePayPaymentMethodSelectedEvent::create): Deleted.
(WebCore::ApplePayPaymentMethodSelectedEvent::paymentMethod): Deleted.
* Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
* Modules/applepay/ApplePayShippingContactSelectedEvent.h:
* Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
* Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
* Modules/applepay/ApplePayValidateMerchantEvent.cpp:
* Modules/applepay/ApplePayValidateMerchantEvent.h:
(WebCore::ApplePayValidateMerchantEvent::create): Deleted.
(WebCore::ApplePayValidateMerchantEvent::validationURL const): Deleted.
* Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
* Modules/encryptedmedia/MediaKeyMessageEvent.h:
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h:
(WebCore::WebKitMediaKeyMessageEvent::create): Deleted.
(WebCore::WebKitMediaKeyMessageEvent::message const): Deleted.
(WebCore::WebKitMediaKeyMessageEvent::destinationURL const): Deleted.
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h:
(WebCore::WebKitMediaKeyNeededEvent::create): Deleted.
(WebCore::WebKitMediaKeyNeededEvent::initData const): Deleted.
* Modules/gamepad/GamepadEvent.cpp:
* Modules/gamepad/GamepadEvent.h:
(WebCore::GamepadEvent::create): Deleted.
(WebCore::GamepadEvent::gamepad const): Deleted.
* Modules/indexeddb/IDBRequestCompletionEvent.cpp:
* Modules/indexeddb/IDBRequestCompletionEvent.h:
(WebCore::IDBRequestCompletionEvent::create): Deleted.
* Modules/indexeddb/IDBVersionChangeEvent.cpp:
* Modules/indexeddb/IDBVersionChangeEvent.h:
* Modules/mediarecorder/BlobEvent.cpp:
* Modules/mediarecorder/BlobEvent.h:
* Modules/mediarecorder/MediaRecorderErrorEvent.cpp:
* Modules/mediarecorder/MediaRecorderErrorEvent.h:
* Modules/mediastream/MediaStreamTrackEvent.cpp:
* Modules/mediastream/MediaStreamTrackEvent.h:
* Modules/mediastream/OverconstrainedErrorEvent.cpp: Copied from Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h.
* Modules/mediastream/OverconstrainedErrorEvent.h:
(WebCore::OverconstrainedErrorEvent::create): Deleted.
(WebCore::OverconstrainedErrorEvent::error const): Deleted.
(WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent): Deleted.
* Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
* Modules/mediastream/RTCDTMFToneChangeEvent.h:
* Modules/mediastream/RTCDataChannelEvent.cpp:
* Modules/mediastream/RTCDataChannelEvent.h:
* Modules/mediastream/RTCPeerConnectionIceEvent.cpp:
* Modules/mediastream/RTCPeerConnectionIceEvent.h:
(WebCore::RTCPeerConnectionIceEvent::url const): Deleted.
* Modules/mediastream/RTCTrackEvent.cpp:
* Modules/mediastream/RTCTrackEvent.h:
(WebCore::RTCTrackEvent::receiver const): Deleted.
(WebCore::RTCTrackEvent::track const): Deleted.
(WebCore::RTCTrackEvent::streams const): Deleted.
(WebCore::RTCTrackEvent::transceiver const): Deleted.
(WebCore::RTCTrackEvent::eventInterface const): Deleted.
* Modules/paymentrequest/MerchantValidationEvent.cpp:
* Modules/paymentrequest/MerchantValidationEvent.h:
* Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
* Modules/paymentrequest/PaymentMethodChangeEvent.h:
* Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
* Modules/paymentrequest/PaymentRequestUpdateEvent.h:
* Modules/speech/SpeechSynthesisEvent.cpp:
* Modules/speech/SpeechSynthesisEvent.h:
(WebCore::SpeechSynthesisEvent::charIndex const): Deleted.
(WebCore::SpeechSynthesisEvent::elapsedTime const): Deleted.
(WebCore::SpeechSynthesisEvent::name const): Deleted.
(WebCore::SpeechSynthesisEvent::eventInterface const): Deleted.
* Modules/webaudio/AudioProcessingEvent.cpp:
* Modules/webaudio/AudioProcessingEvent.h:
* Modules/webaudio/OfflineAudioCompletionEvent.cpp:
* Modules/webaudio/OfflineAudioCompletionEvent.h:
* Modules/webgpu/GPUUncapturedErrorEvent.cpp:
* Modules/webgpu/GPUUncapturedErrorEvent.h:
* Modules/websockets/CloseEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* Modules/websockets/CloseEvent.h:
(WebCore::CloseEvent::create): Deleted.
(WebCore::CloseEvent::wasClean const): Deleted.
(WebCore::CloseEvent::code const): Deleted.
(WebCore::CloseEvent::reason const): Deleted.
(WebCore::CloseEvent::CloseEvent): Deleted.
* Modules/webvr/VRDisplayEvent.cpp:
* Modules/webvr/VRDisplayEvent.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibleSetValueEvent.cpp:
* accessibility/AccessibleSetValueEvent.h:
(WebCore::AccessibleSetValueEvent::create): Deleted.
(WebCore::AccessibleSetValueEvent::value const): Deleted.
* animation/AnimationPlaybackEvent.cpp:
* animation/AnimationPlaybackEvent.h:
* bindings/js/ScriptWrappable.cpp: Copied from Source/WebCore/html/canvas/WebGLContextEvent.cpp.
* bindings/js/ScriptWrappable.h:
* dom/AnimationEvent.cpp:
* dom/AnimationEvent.h:
* dom/BeforeLoadEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* dom/BeforeLoadEvent.h:
* dom/BeforeTextInsertedEvent.cpp:
* dom/BeforeTextInsertedEvent.h:
* dom/BeforeUnloadEvent.cpp:
* dom/BeforeUnloadEvent.h:
* dom/ClipboardEvent.cpp:
* dom/ClipboardEvent.h:
* dom/CompositionEvent.cpp:
* dom/CompositionEvent.h:
* dom/CustomEvent.cpp:
* dom/CustomEvent.h:
* dom/DeviceMotionEvent.cpp:
* dom/DeviceMotionEvent.h:
* dom/DeviceOrientationEvent.cpp:
* dom/DeviceOrientationEvent.h:
* dom/ErrorEvent.cpp:
* dom/ErrorEvent.h:
* dom/Event.cpp:
* dom/Event.h:
* dom/FocusEvent.cpp:
* dom/FocusEvent.h:
* dom/HashChangeEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* dom/HashChangeEvent.h:
* dom/InputEvent.cpp:
* dom/InputEvent.h:
* dom/KeyboardEvent.cpp:
* dom/KeyboardEvent.h:
* dom/MessageEvent.cpp:
* dom/MessageEvent.h:
* dom/MouseEvent.cpp:
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.cpp:
* dom/MouseRelatedEvent.h:
* dom/MutationEvent.cpp:
* dom/MutationEvent.h:
* dom/OverflowEvent.cpp:
* dom/OverflowEvent.h:
* dom/PageTransitionEvent.cpp:
* dom/PageTransitionEvent.h:
* dom/PointerEvent.cpp:
* dom/PointerEvent.h:
* dom/PopStateEvent.cpp:
* dom/PopStateEvent.h:
* dom/ProgressEvent.cpp:
* dom/ProgressEvent.h:
* dom/PromiseRejectionEvent.cpp:
* dom/PromiseRejectionEvent.h:
* dom/SecurityPolicyViolationEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* dom/SecurityPolicyViolationEvent.h:
* dom/TextEvent.cpp:
* dom/TextEvent.h:
* dom/TouchEvent.cpp:
* dom/TouchEvent.h:
* dom/TransitionEvent.cpp:
* dom/TransitionEvent.h:
* dom/UIEvent.cpp:
* dom/UIEvent.h:
* dom/UIEventWithKeyState.cpp:
* dom/UIEventWithKeyState.h:
* dom/WebKitAnimationEvent.cpp:
* dom/WebKitAnimationEvent.h:
* dom/WebKitTransitionEvent.cpp:
* dom/WebKitTransitionEvent.h:
* dom/WheelEvent.cpp:
* dom/WheelEvent.h:
* html/MediaEncryptedEvent.cpp:
* html/MediaEncryptedEvent.h:
* html/canvas/WebGLContextEvent.cpp:
* html/canvas/WebGLContextEvent.h:
* html/shadow/ProgressShadowElement.h:
* html/track/TrackEvent.cpp:
* html/track/TrackEvent.h:
* storage/StorageEvent.cpp:
* storage/StorageEvent.h:
(WebCore::StorageEvent::key const): Deleted.
(WebCore::StorageEvent::oldValue const): Deleted.
(WebCore::StorageEvent::newValue const): Deleted.
(WebCore::StorageEvent::url const): Deleted.
(WebCore::StorageEvent::storageArea const): Deleted.
* svg/SVGFEDistantLightElement.h:
* svg/SVGFEFuncAElement.h:
* svg/SVGFEFuncBElement.h:
* svg/SVGFEFuncGElement.h:
* svg/SVGFEFuncRElement.h:
* svg/SVGFEPointLightElement.h:
* svg/SVGFESpotLightElement.h:
* svg/SVGZoomEvent.cpp:
* svg/SVGZoomEvent.h:
* workers/service/ExtendableEvent.cpp:
* workers/service/ExtendableEvent.h:
* workers/service/ExtendableMessageEvent.cpp:
* workers/service/ExtendableMessageEvent.h:
* workers/service/FetchEvent.cpp:
* workers/service/FetchEvent.h:
* xml/XMLHttpRequestProgressEvent.cpp: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp.
* xml/XMLHttpRequestProgressEvent.h:
(WebCore::XMLHttpRequestProgressEvent::create): Deleted.
(WebCore::XMLHttpRequestProgressEvent::position const): Deleted.
(WebCore::XMLHttpRequestProgressEvent::totalSize const): Deleted.
(WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250030 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoJPEGImageDecoder: use libjpeg-turbo RGBA output path even for Adobe transform=0 JPEGs
Hironori.Fujii@sony.com [Wed, 18 Sep 2019 10:03:19 +0000 (10:03 +0000)]
JPEGImageDecoder: use libjpeg-turbo RGBA output path even for Adobe transform=0 JPEGs
https://bugs.webkit.org/show_bug.cgi?id=200163

Reviewed by Carlos Garcia Campos.

Remove the workaround for old libjpeg-turbo which doesn't support
BGRA output for Adobe transform=0 images. The bug was fixed in
libjpeg-turbo 1.2.1.

No new tests, no behavior change.

* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode): Removed code in #if defined(TURBO_JPEG_RGB_SWIZZLE).
(colorSpaceHasAlpha): Removed an unused inline function.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250029 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed. Remove build warning since r248998.
jh718.park@samsung.com [Wed, 18 Sep 2019 09:19:33 +0000 (09:19 +0000)]
Unreviewed. Remove build warning since r248998.

This patch removes build warning below.
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

No new tests, no behavioral change.

Patch by Joonghun Park <jh718.park@samsung.com> on 2019-09-18

* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::rowAvailable):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250028 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[cairo] Incorrect targetRect in BackingStoreBackendCairoImpl::scroll
Hironori.Fujii@sony.com [Wed, 18 Sep 2019 07:55:42 +0000 (07:55 +0000)]
[cairo] Incorrect targetRect in BackingStoreBackendCairoImpl::scroll
https://bugs.webkit.org/show_bug.cgi?id=201895

Reviewed by Carlos Garcia Campos.

In BackingStoreBackendCairoImpl::scroll, targetRect is calculated
wrongly by shifting maxX and maxY. Bug 59655 fixed the issue by
removing the shifting, but only for BackingStoreBackendCairoX11::scroll.

No new tests, no behavior change.

* platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:
(WebCore::BackingStoreBackendCairoImpl::scroll): Take intersection of targetRect and scrollRect.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250027 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[Cocoa] Add a WKA extension point
aestes@apple.com [Wed, 18 Sep 2019 07:16:11 +0000 (07:16 +0000)]
[Cocoa] Add a WKA extension point
https://bugs.webkit.org/show_bug.cgi?id=201801
<rdar://problem/55372507>

Reviewed by Alexey Proskuryakov.

* Modules/applepay/ApplePayRequestBase.cpp:
(WebCore::requiresSupportedNetworks):
(WebCore::convertAndValidate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250026 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[JSC] Generator should have internal fields
ysuzuki@apple.com [Wed, 18 Sep 2019 05:02:45 +0000 (05:02 +0000)]
[JSC] Generator should have internal fields
https://bugs.webkit.org/show_bug.cgi?id=201159

Reviewed by Keith Miller.

JSTests:

* stress/create-generator.js: Added.
(shouldBe):
(test.generator):
(test):
* stress/generator-construct-failure.js: Added.
(shouldThrow):
(TypeError):
* stress/generator-prototype-change.js: Added.
(shouldBe):
(gen):
* stress/generator-prototype-closure.js: Added.
(shouldBe):
(test.gen):
(test):
* stress/object-assign-fast-path.js:

Source/JavaScriptCore:

This patch makes generator's internal states InternalField instead of private properties.
Each generator function produces a generator with different [[Prototype]], which makes generators have different Structures.
As a result, Generator.prototype.next etc.'s implementation becomes megamorphic even if it is not necessary.

If we make these structures adaptively poly-proto, some generators get poly-proto structures while others are not, resulting
in megamorphic lookup in Generator.prototype.next. If we make all the generator's structure poly-proto, it makes Generator.prototype.next
lookup suboptimal for now.

In this patch, we start with a relatively simple solution. This patch introduces JSGenerator class, and it has internal fields for generator's internal
states. We extend promise-internal-field access bytecodes to access to these fields from bytecode so that Generator.prototype.next can access
these fields without using megamorphic get_by_id_direct.

And we attach JSGeneratorType to JSGenerator so that we can efficiently implement `@isGenerator()` check in bytecode.

We reserve the offset = 0 slot for the future poly-proto extension for JSGenerator. By reserving this slot, non-poly-proto JSGenerator and poly-proto
JSGenerator still can offer the way to access to the same Generator internal fields with the same offset while poly-proto JSGenerator can get offset = 0
inline-storage slot for PolyProto implementation.

This patch adds op_create_generator since it is distinct from op_create_promise once we add PolyProto support.
In the future when we introduce some kind of op_create_async_generator we will probably share only one bytecode for both generator and async generator.

This patch offers around 10% improvement in JetStream2/Basic. And this patch is the basis of optimization of JetStream2/async-fs which leverages async generators significantly.

This patch includes several design decisions.

    1. We add a new JSGenerator instead of leveraging JSFinalObject. The main reason is that we would like to have JSGeneratorType to quickly query `@isGenerator`.
    2. This patch currently does not include object-allocation-sinking support for JSGenerator, but it is trivial, and will be added. And this patch also does not include poly-proto
       support for JSGenerator. The main reason is simply because this patch is already large enough, and I do not want to make this patch larger and larger.
    3. We can support arbitrary sized inline-storage: Reserving 0-5 offsets for internal fields, and start putting all the other things to the subsequent internal fields. But for now,
       we are not taking this approach just because I'm not sure this is necessary. If we found such a pattern, we can easily extend the current one but for now, I would like to keep
       this patch simple.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* builtins/AsyncFunctionPrototype.js:
(globalPrivate.asyncFunctionResume):
* builtins/GeneratorPrototype.js:
(globalPrivate.generatorResume):
(next):
(return):
(throw):
* bytecode/BytecodeGeneratorification.cpp:
(JSC::BytecodeGeneratorification::run):
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* bytecode/BytecodeIntrinsicRegistry.h:
* bytecode/BytecodeList.rb:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
* bytecode/SpeculatedType.cpp:
(JSC::speculationFromJSType):
* bytecode/SpeculatedType.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitPutGeneratorFields):
(JSC::BytecodeGenerator::emitCreateGenerator):
(JSC::BytecodeGenerator::emitNewGenerator):
(JSC::BytecodeGenerator::emitYield):
(JSC::BytecodeGenerator::emitDelegateYield):
(JSC::BytecodeGenerator::emitGeneratorStateChange):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitIsGenerator):
(JSC::BytecodeGenerator::generatorStateRegister):
(JSC::BytecodeGenerator::generatorValueRegister):
(JSC::BytecodeGenerator::generatorResumeModeRegister):
(JSC::BytecodeGenerator::generatorFrameRegister):
* bytecompiler/NodesCodegen.cpp:
(JSC::generatorInternalFieldIndex):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_getGeneratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putGeneratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_isGenerator):
(JSC::FunctionNode::emitBytecode):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGClobbersExitState.cpp:
(JSC::DFG::clobbersExitState):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupIsCellWithType):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToNewGenerator):
(JSC::DFG::Node::speculatedTypeForQuery):
(JSC::DFG::Node::hasStructure):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCreatePromise):
(JSC::DFG::SpeculativeJIT::compileCreateGenerator):
(JSC::DFG::SpeculativeJIT::compileNewGenerator):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewGenerator):
(JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateGenerator):
(JSC::FTL::DFG::LowerDFGToB3::isCellWithType):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_internal_field):
(JSC::JIT::emit_op_put_internal_field):
* llint/LowLevelInterpreter.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::createSubclassStructureSlow):
* runtime/InternalFunction.h:
(JSC::InternalFunction::createSubclassStructure):
* runtime/JSGenerator.cpp: Added.
(JSC::JSGenerator::create):
(JSC::JSGenerator::createStructure):
(JSC::JSGenerator::JSGenerator):
(JSC::JSGenerator::finishCreation):
(JSC::JSGenerator::visitChildren):
* runtime/JSGenerator.h: Copied from Source/JavaScriptCore/runtime/JSGeneratorFunction.h.
* runtime/JSGeneratorFunction.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::generatorStructure const):
* runtime/JSType.cpp:
(WTF::printInternal):
* runtime/JSType.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250025 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed iOS 13 test gardening, update test expectations.
ryanhaddad@apple.com [Wed, 18 Sep 2019 04:33:54 +0000 (04:33 +0000)]
Unreviewed iOS 13 test gardening, update test expectations.

* platform/ios/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250024 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed iOS 13 test gardening, udpate test expectations and baselines.
ryanhaddad@apple.com [Wed, 18 Sep 2019 04:22:07 +0000 (04:22 +0000)]
Unreviewed iOS 13 test gardening, udpate test expectations and baselines.

* platform/ios/TestExpectations:
* platform/ios/js/dom/navigator-maxtouchpoints-expected.txt: Added.
* platform/ios/platform/ios/ios/fast/text/opticalFont-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed test gardening, rebaseline a test after r249963.
ryanhaddad@apple.com [Wed, 18 Sep 2019 03:58:54 +0000 (03:58 +0000)]
Unreviewed test gardening, rebaseline a test after r249963.

* media/track/track-cue-rendering-rtl-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250022 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoMove comment explaining our Options to OptionsList.h
keith_miller@apple.com [Wed, 18 Sep 2019 03:23:28 +0000 (03:23 +0000)]
Move comment explaining our Options to OptionsList.h
https://bugs.webkit.org/show_bug.cgi?id=201891

Rubber-stamped by Mark Lam.

We moved the list so we should move the comment.

* runtime/Options.h:
* runtime/OptionsList.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250021 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoFollow-up: [iOS 13] Enable WebKit build
jbedard@apple.com [Wed, 18 Sep 2019 02:48:09 +0000 (02:48 +0000)]
Follow-up: [iOS 13] Enable WebKit build
https://bugs.webkit.org/show_bug.cgi?id=199481
<rdar://problem/52619048>

Unreviewed build-fix.

* WebKitPrivateFrameworkStubs/iOS/13/DeviceIdentity.framework: Added.
* WebKitPrivateFrameworkStubs/iOS/13/DeviceIdentity.framework/DeviceIdentity.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/13/IOSurfaceAccelerator.framework: Added.
* WebKitPrivateFrameworkStubs/iOS/13/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250020 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[Win][MiniBrowser] Remove unused DOMDefaultImpl.cpp
Hironori.Fujii@sony.com [Wed, 18 Sep 2019 01:55:42 +0000 (01:55 +0000)]
[Win][MiniBrowser] Remove unused DOMDefaultImpl.cpp
https://bugs.webkit.org/show_bug.cgi?id=201867

Reviewed by Darin Adler.

* MiniBrowser/win/CMakeLists.txt: Removed DOMDefaultImpl.cpp.
* MiniBrowser/win/DOMDefaultImpl.cpp: Removed.
* MiniBrowser/win/DOMDefaultImpl.h: Removed.
* MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250019 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed, revert change that Alex mistakenly committed at the same time as r250006...
cdumez@apple.com [Wed, 18 Sep 2019 01:43:06 +0000 (01:43 +0000)]
Unreviewed, revert change that Alex mistakenly committed at the same time as r250006 and broke the build.

* page/PerformanceObserver.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250018 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed WinCairo build fix following r249985.
ross.kirsling@sony.com [Wed, 18 Sep 2019 01:27:23 +0000 (01:27 +0000)]
Unreviewed WinCairo build fix following r249985.

* Shared/WebProcessDataStoreParameters.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250016 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoRemove the "Show Link Previews" and "Hide Link Previews" action menus in the preview...
dino@apple.com [Wed, 18 Sep 2019 01:20:41 +0000 (01:20 +0000)]
Remove the "Show Link Previews" and "Hide Link Previews" action menus in the preview platter
https://bugs.webkit.org/show_bug.cgi?id=201864
<rdar://55190038>

Reviewed by Simon Fraser.

Source/WebKit:

* UIProcess/ios/WKActionSheetAssistant.mm: Remove the toggle action from the
default values.
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
* UIProcess/ios/WKContentViewInteraction.mm: No longer try to add a toggle when
it isn't there.
(-[WKContentView assignLegacyDataForContextMenuInteraction]):
(menuWithShowLinkPreviewAction): Deleted.

Tools:

Test for the suggested actions.

* TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:
(-[TestContextMenuSuggestedActionsUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuSuggestedActionsUIDelegate webView:contextMenuWillPresentForElement:]):
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250015 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoElide unnecessary moves in Air O0
keith_miller@apple.com [Wed, 18 Sep 2019 01:06:46 +0000 (01:06 +0000)]
Elide unnecessary moves in Air O0
https://bugs.webkit.org/show_bug.cgi?id=201703

Reviewed by Saam Barati.

This patch also removes the code that would try to reuse temps in
WasmAirIRGenerator. That code makes it hard to accurately
determine where a temp dies as it could be reused again
later. Thus every temp, may appear to live for a long time in the
global ordering.

This appears to be a minor progression on the overall score of
wasm subtests in JS2 and a 10% wasm-JIT memory usage reduction.

This patch also fixes an issue where we didn't ask Patchpoints
for early clobber registers when determining what callee saves
were used by the program.

* b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp:
(JSC::B3::Air::GenerateAndAllocateRegisters::generate):
* b3/air/AirBasicBlock.h:
* b3/air/AirCode.h:
* b3/air/AirHandleCalleeSaves.cpp:
(JSC::B3::Air::handleCalleeSaves):
* b3/air/testair.cpp:
* wasm/WasmAirIRGenerator.cpp:
(JSC::Wasm::AirIRGenerator::didKill): Deleted.
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::didKill): Deleted.
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseBody):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
* wasm/WasmValidate.cpp:
(JSC::Wasm::Validate::didKill): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250009 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoStop calling Page::setSessionID() from WebKit2
achristensen@apple.com [Wed, 18 Sep 2019 00:38:46 +0000 (00:38 +0000)]
Stop calling Page::setSessionID() from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=201888

Patch by Chris Dumez <cdumez@apple.com> on 2019-09-17
Reviewed by Alex Christensen.

Stop calling Page::setSessionID() from WebKit2 since Page's sessionID can never change when
using WebKit2 (We process-swap and create a new Page in a new process when changing data
store). Instead, we now pass the sessionID ID when constructing the Page, as part of the
PageConfiguration structure.

Source/WebCore:

* editing/markup.cpp:
(WebCore::createPageForSanitizingWebContent):
* loader/EmptyClients.cpp:
(WebCore::pageConfigurationWithEmptyClients):
* loader/EmptyClients.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setSessionID):
* page/PageConfiguration.cpp:
(WebCore::PageConfiguration::PageConfiguration):
* page/PageConfiguration.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::createPageForServiceWorker):
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):

Source/WebKit:

* Shared/WebsitePoliciesData.cpp:
(WebKit::WebsitePoliciesData::applyToDocumentLoader):
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAutoSizingAdjustmentTimer):
(WebKit::WebPage::setSessionID): Deleted.
* WebProcess/WebPage/WebPage.h:

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250006 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUse constexpr instead of const in symbol definitions that are obviously constexpr.
mark.lam@apple.com [Wed, 18 Sep 2019 00:36:19 +0000 (00:36 +0000)]
Use constexpr instead of const in symbol definitions that are obviously constexpr.
https://bugs.webkit.org/show_bug.cgi?id=201879

Rubber-stamped by Joseph Pecoraro.

Source/bmalloc:

* bmalloc/AvailableMemory.cpp:
* bmalloc/IsoTLS.h:
* bmalloc/Map.h:
* bmalloc/Mutex.cpp:
(bmalloc::Mutex::lockSlowCase):
* bmalloc/PerThread.h:
* bmalloc/Vector.h:
* bmalloc/Zone.h:

Source/JavaScriptCore:

const may require external storage  (at the compiler's whim) though these
currently do not.  constexpr makes it clear that the value is a literal constant
that can be inlined.  In most cases in the code, when we say static const, we
actually mean static constexpr.  I'm changing the code to reflect this.

* API/JSAPIValueWrapper.h:
* API/JSCallbackConstructor.h:
* API/JSCallbackObject.h:
* API/JSContextRef.cpp:
* API/JSWrapperMap.mm:
* API/tests/CompareAndSwapTest.cpp:
* API/tests/TypedArrayCTest.cpp:
* API/tests/testapi.mm:
(testObjectiveCAPIMain):
* KeywordLookupGenerator.py:
(Trie.printAsC):
* assembler/ARMv7Assembler.h:
* assembler/AssemblerBuffer.h:
* assembler/AssemblerCommon.h:
* assembler/MacroAssembler.h:
* assembler/MacroAssemblerARM64.h:
* assembler/MacroAssemblerARM64E.h:
* assembler/MacroAssemblerARMv7.h:
* assembler/MacroAssemblerCodeRef.h:
* assembler/MacroAssemblerMIPS.h:
* assembler/MacroAssemblerX86.h:
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::absDouble):
(JSC::MacroAssemblerX86Common::negateDouble):
* assembler/MacroAssemblerX86_64.h:
* assembler/X86Assembler.h:
* b3/B3Bank.h:
* b3/B3CheckSpecial.h:
* b3/B3DuplicateTails.cpp:
* b3/B3EliminateCommonSubexpressions.cpp:
* b3/B3FixSSA.cpp:
* b3/B3FoldPathConstants.cpp:
* b3/B3InferSwitches.cpp:
* b3/B3Kind.h:
* b3/B3LowerToAir.cpp:
* b3/B3NativeTraits.h:
* b3/B3ReduceDoubleToFloat.cpp:
* b3/B3ReduceLoopStrength.cpp:
* b3/B3ReduceStrength.cpp:
* b3/B3ValueKey.h:
* b3/air/AirAllocateRegistersByGraphColoring.cpp:
* b3/air/AirAllocateStackByGraphColoring.cpp:
* b3/air/AirArg.h:
* b3/air/AirCCallSpecial.h:
* b3/air/AirEmitShuffle.cpp:
* b3/air/AirFixObviousSpills.cpp:
* b3/air/AirFormTable.h:
* b3/air/AirLowerAfterRegAlloc.cpp:
* b3/air/AirPrintSpecial.h:
* b3/air/AirStackAllocation.cpp:
* b3/air/AirTmp.h:
* b3/testb3_6.cpp:
(testInterpreter):
* bytecode/AccessCase.cpp:
* bytecode/CallLinkStatus.cpp:
* bytecode/CallVariant.h:
* bytecode/CodeBlock.h:
* bytecode/CodeOrigin.h:
* bytecode/DFGExitProfile.h:
* bytecode/DirectEvalCodeCache.h:
* bytecode/ExecutableToCodeBlockEdge.h:
* bytecode/GetterSetterAccessCase.cpp:
* bytecode/LazyOperandValueProfile.h:
* bytecode/ObjectPropertyCondition.h:
* bytecode/ObjectPropertyConditionSet.cpp:
* bytecode/PolymorphicAccess.cpp:
* bytecode/PropertyCondition.h:
* bytecode/SpeculatedType.h:
* bytecode/StructureStubInfo.cpp:
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset):
* bytecode/UnlinkedCodeBlock.h:
* bytecode/UnlinkedEvalCodeBlock.h:
* bytecode/UnlinkedFunctionCodeBlock.h:
* bytecode/UnlinkedFunctionExecutable.h:
* bytecode/UnlinkedModuleProgramCodeBlock.h:
* bytecode/UnlinkedProgramCodeBlock.h:
* bytecode/ValueProfile.h:
* bytecode/VirtualRegister.h:
* bytecode/Watchpoint.h:
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/Label.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ThisNode::emitBytecode):
* bytecompiler/RegisterID.h:
* debugger/Breakpoint.h:
* debugger/DebuggerParseData.cpp:
* debugger/DebuggerPrimitives.h:
* debugger/DebuggerScope.h:
* dfg/DFGAbstractHeap.h:
* dfg/DFGAbstractValue.h:
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGByteCodeParser.cpp:
* dfg/DFGCSEPhase.cpp:
* dfg/DFGCommon.h:
* dfg/DFGCompilationKey.h:
* dfg/DFGDesiredGlobalProperty.h:
* dfg/DFGEdgeDominates.h:
* dfg/DFGEpoch.h:
* dfg/DFGForAllKills.h:
(JSC::DFG::forAllKilledNodesAtNodeIndex):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::isLiveInBytecode):
* dfg/DFGHeapLocation.h:
* dfg/DFGInPlaceAbstractState.cpp:
* dfg/DFGIntegerCheckCombiningPhase.cpp:
* dfg/DFGIntegerRangeOptimizationPhase.cpp:
* dfg/DFGInvalidationPointInjectionPhase.cpp:
* dfg/DFGLICMPhase.cpp:
* dfg/DFGLazyNode.h:
* dfg/DFGMinifiedID.h:
* dfg/DFGMovHintRemovalPhase.cpp:
* dfg/DFGNodeFlowProjection.h:
* dfg/DFGNodeType.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPhantomInsertionPhase.cpp:
* dfg/DFGPromotedHeapLocation.h:
* dfg/DFGPropertyTypeKey.h:
* dfg/DFGPureValue.h:
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGRegisterBank.h:
* dfg/DFGSSAConversionPhase.cpp:
* dfg/DFGSSALoweringPhase.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileDoubleRep):
(JSC::DFG::compileClampDoubleToByte):
(JSC::DFG::SpeculativeJIT::compileArithRounding):
(JSC::DFG::compileArithPowIntegerFastPath):
(JSC::DFG::SpeculativeJIT::compileArithPow):
(JSC::DFG::SpeculativeJIT::emitBinarySwitchStringRecurse):
* dfg/DFGStackLayoutPhase.cpp:
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* dfg/DFGStrengthReductionPhase.cpp:
* dfg/DFGStructureAbstractValue.h:
* dfg/DFGVarargsForwardingPhase.cpp:
* dfg/DFGVariableEventStream.cpp:
(JSC::DFG::VariableEventStream::reconstruct const):
* dfg/DFGWatchpointCollectionPhase.cpp:
* disassembler/ARM64/A64DOpcode.h:
* ftl/FTLLocation.h:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileArithRandom):
* ftl/FTLSlowPathCall.cpp:
* ftl/FTLSlowPathCallKey.h:
* heap/CellContainer.h:
* heap/CellState.h:
* heap/ConservativeRoots.h:
* heap/GCSegmentedArray.h:
* heap/HandleBlock.h:
* heap/Heap.cpp:
(JSC::Heap::updateAllocationLimits):
* heap/Heap.h:
* heap/HeapSnapshot.h:
* heap/HeapUtil.h:
(JSC::HeapUtil::findGCObjectPointersForMarking):
* heap/IncrementalSweeper.cpp:
* heap/LargeAllocation.h:
* heap/MarkedBlock.cpp:
* heap/Strong.h:
* heap/VisitRaceKey.h:
* heap/Weak.h:
* heap/WeakBlock.h:
* inspector/JSInjectedScriptHost.h:
* inspector/JSInjectedScriptHostPrototype.h:
* inspector/JSJavaScriptCallFrame.h:
* inspector/JSJavaScriptCallFramePrototype.h:
* inspector/agents/InspectorConsoleAgent.cpp:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
* inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
(CppProtocolTypesHeaderGenerator._generate_versions):
* inspector/scripts/tests/generic/expected/version.json-result:
* interpreter/Interpreter.h:
* interpreter/ShadowChicken.cpp:
* jit/BinarySwitch.cpp:
* jit/CallFrameShuffler.h:
* jit/ExecutableAllocator.h:
* jit/FPRInfo.h:
* jit/GPRInfo.h:
* jit/ICStats.h:
* jit/JITThunks.h:
* jit/Reg.h:
* jit/RegisterSet.h:
* jit/TempRegisterSet.h:
* jsc.cpp:
* parser/ASTBuilder.h:
* parser/Nodes.h:
* parser/SourceCodeKey.h:
* parser/SyntaxChecker.h:
* parser/VariableEnvironment.h:
* profiler/ProfilerOrigin.h:
* profiler/ProfilerOriginStack.h:
* profiler/ProfilerUID.h:
* runtime/AbstractModuleRecord.cpp:
* runtime/ArrayBufferNeuteringWatchpointSet.h:
* runtime/ArrayConstructor.h:
* runtime/ArrayConventions.h:
* runtime/ArrayIteratorPrototype.h:
* runtime/ArrayPrototype.cpp:
(JSC::setLength):
* runtime/AsyncFromSyncIteratorPrototype.h:
* runtime/AsyncGeneratorFunctionPrototype.h:
* runtime/AsyncGeneratorPrototype.h:
* runtime/AsyncIteratorPrototype.h:
* runtime/AtomicsObject.cpp:
* runtime/BigIntConstructor.h:
* runtime/BigIntPrototype.h:
* runtime/BooleanPrototype.h:
* runtime/ClonedArguments.h:
* runtime/CodeCache.h:
* runtime/ControlFlowProfiler.h:
* runtime/CustomGetterSetter.h:
* runtime/DateConstructor.h:
* runtime/DatePrototype.h:
* runtime/DefinePropertyAttributes.h:
* runtime/ErrorPrototype.h:
* runtime/EvalExecutable.h:
* runtime/Exception.h:
* runtime/ExceptionHelpers.cpp:
(JSC::invalidParameterInSourceAppender):
(JSC::invalidParameterInstanceofSourceAppender):
* runtime/ExceptionHelpers.h:
* runtime/ExecutableBase.h:
* runtime/FunctionExecutable.h:
* runtime/FunctionRareData.h:
* runtime/GeneratorPrototype.h:
* runtime/GenericArguments.h:
* runtime/GenericOffset.h:
* runtime/GetPutInfo.h:
* runtime/GetterSetter.h:
* runtime/GlobalExecutable.h:
* runtime/Identifier.h:
* runtime/InspectorInstrumentationObject.h:
* runtime/InternalFunction.h:
* runtime/IntlCollatorConstructor.h:
* runtime/IntlCollatorPrototype.h:
* runtime/IntlDateTimeFormatConstructor.h:
* runtime/IntlDateTimeFormatPrototype.h:
* runtime/IntlNumberFormatConstructor.h:
* runtime/IntlNumberFormatPrototype.h:
* runtime/IntlObject.h:
* runtime/IntlPluralRulesConstructor.h:
* runtime/IntlPluralRulesPrototype.h:
* runtime/IteratorPrototype.h:
* runtime/JSArray.cpp:
(JSC::JSArray::tryCreateUninitializedRestricted):
* runtime/JSArray.h:
* runtime/JSArrayBuffer.h:
* runtime/JSArrayBufferView.h:
* runtime/JSBigInt.h:
* runtime/JSCJSValue.h:
* runtime/JSCell.h:
* runtime/JSCustomGetterSetterFunction.h:
* runtime/JSDataView.h:
* runtime/JSDataViewPrototype.h:
* runtime/JSDestructibleObject.h:
* runtime/JSFixedArray.h:
* runtime/JSGenericTypedArrayView.h:
* runtime/JSGlobalLexicalEnvironment.h:
* runtime/JSGlobalObject.h:
* runtime/JSImmutableButterfly.h:
* runtime/JSInternalPromiseConstructor.h:
* runtime/JSInternalPromiseDeferred.h:
* runtime/JSInternalPromisePrototype.h:
* runtime/JSLexicalEnvironment.h:
* runtime/JSModuleEnvironment.h:
* runtime/JSModuleLoader.h:
* runtime/JSModuleNamespaceObject.h:
* runtime/JSNonDestructibleProxy.h:
* runtime/JSONObject.cpp:
* runtime/JSONObject.h:
* runtime/JSObject.h:
* runtime/JSPromiseConstructor.h:
* runtime/JSPromiseDeferred.h:
* runtime/JSPromisePrototype.h:
* runtime/JSPropertyNameEnumerator.h:
* runtime/JSProxy.h:
* runtime/JSScope.h:
* runtime/JSScriptFetchParameters.h:
* runtime/JSScriptFetcher.h:
* runtime/JSSegmentedVariableObject.h:
* runtime/JSSourceCode.h:
* runtime/JSString.cpp:
* runtime/JSString.h:
* runtime/JSSymbolTableObject.h:
* runtime/JSTemplateObjectDescriptor.h:
* runtime/JSTypeInfo.h:
* runtime/MapPrototype.h:
* runtime/MinimumReservedZoneSize.h:
* runtime/ModuleProgramExecutable.h:
* runtime/NativeExecutable.h:
* runtime/NativeFunction.h:
* runtime/NativeStdFunctionCell.h:
* runtime/NumberConstructor.h:
* runtime/NumberPrototype.h:
* runtime/ObjectConstructor.h:
* runtime/ObjectPrototype.h:
* runtime/ProgramExecutable.h:
* runtime/PromiseDeferredTimer.cpp:
* runtime/PropertyMapHashTable.h:
* runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::add):
* runtime/PrototypeKey.h:
* runtime/ProxyConstructor.h:
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::performGetOwnPropertyNames):
* runtime/ProxyRevoke.h:
* runtime/ReflectObject.h:
* runtime/RegExp.h:
* runtime/RegExpCache.h:
* runtime/RegExpConstructor.h:
* runtime/RegExpKey.h:
* runtime/RegExpObject.h:
* runtime/RegExpPrototype.h:
* runtime/RegExpStringIteratorPrototype.h:
* runtime/SamplingProfiler.cpp:
* runtime/ScopedArgumentsTable.h:
* runtime/ScriptExecutable.h:
* runtime/SetPrototype.h:
* runtime/SmallStrings.h:
* runtime/SparseArrayValueMap.h:
* runtime/StringConstructor.h:
* runtime/StringIteratorPrototype.h:
* runtime/StringObject.h:
* runtime/StringPrototype.h:
* runtime/Structure.h:
* runtime/StructureChain.h:
* runtime/StructureRareData.h:
* runtime/StructureTransitionTable.h:
* runtime/Symbol.h:
* runtime/SymbolConstructor.h:
* runtime/SymbolPrototype.h:
* runtime/SymbolTable.h:
* runtime/TemplateObjectDescriptor.h:
* runtime/TypeProfiler.cpp:
* runtime/TypeProfiler.h:
* runtime/TypeProfilerLog.cpp:
* runtime/VarOffset.h:
* testRegExp.cpp:
* tools/HeapVerifier.cpp:
(JSC::HeapVerifier::checkIfRecorded):
* tools/JSDollarVM.cpp:
* wasm/WasmB3IRGenerator.cpp:
* wasm/WasmBBQPlan.cpp:
* wasm/WasmFaultSignalHandler.cpp:
* wasm/WasmFunctionParser.h:
* wasm/WasmOMGForOSREntryPlan.cpp:
* wasm/WasmOMGPlan.cpp:
* wasm/WasmPlan.cpp:
* wasm/WasmSignature.cpp:
* wasm/WasmSignature.h:
* wasm/WasmWorklist.cpp:
* wasm/js/JSWebAssembly.h:
* wasm/js/JSWebAssemblyCodeBlock.h:
* wasm/js/WebAssemblyCompileErrorConstructor.h:
* wasm/js/WebAssemblyCompileErrorPrototype.h:
* wasm/js/WebAssemblyFunction.h:
* wasm/js/WebAssemblyInstanceConstructor.h:
* wasm/js/WebAssemblyInstancePrototype.h:
* wasm/js/WebAssemblyLinkErrorConstructor.h:
* wasm/js/WebAssemblyLinkErrorPrototype.h:
* wasm/js/WebAssemblyMemoryConstructor.h:
* wasm/js/WebAssemblyMemoryPrototype.h:
* wasm/js/WebAssemblyModuleConstructor.h:
* wasm/js/WebAssemblyModulePrototype.h:
* wasm/js/WebAssemblyRuntimeErrorConstructor.h:
* wasm/js/WebAssemblyRuntimeErrorPrototype.h:
* wasm/js/WebAssemblyTableConstructor.h:
* wasm/js/WebAssemblyTablePrototype.h:
* wasm/js/WebAssemblyToJSCallee.h:
* yarr/Yarr.h:
* yarr/YarrParser.h:
* yarr/generateYarrCanonicalizeUnicode:

Source/WebCore:

No new tests.  Covered by existing tests.

* bindings/js/JSDOMConstructorBase.h:
* bindings/js/JSDOMWindowProperties.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GeneratePrototypeDeclaration):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestEnabledBySetting.h:
* bindings/scripts/test/JS/JSTestEnabledForContext.h:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestGlobalObject.h:
* bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
* bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
* bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
* bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
* bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
* bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
* bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
* bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
* bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
* bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
* bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
* bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
* bindings/scripts/test/JS/JSTestPluginInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bridge/objc/objc_runtime.h:
* bridge/runtime_array.h:
* bridge/runtime_method.h:
* bridge/runtime_object.h:

Source/WebKit:

* WebProcess/Plugins/Netscape/JSNPObject.h:

Source/WTF:

* wtf/Assertions.cpp:
* wtf/AutomaticThread.cpp:
* wtf/BitVector.h:
* wtf/Bitmap.h:
* wtf/BloomFilter.h:
* wtf/Brigand.h:
* wtf/CheckedArithmetic.h:
* wtf/CrossThreadCopier.h:
* wtf/CurrentTime.cpp:
* wtf/DataLog.cpp:
* wtf/DateMath.cpp:
(WTF::daysFrom1970ToYear):
* wtf/DeferrableRefCounted.h:
* wtf/GetPtr.h:
* wtf/HashFunctions.h:
* wtf/HashMap.h:
* wtf/HashTable.h:
* wtf/HashTraits.h:
* wtf/JSONValues.cpp:
* wtf/JSONValues.h:
* wtf/ListHashSet.h:
* wtf/Lock.h:
* wtf/LockAlgorithm.h:
* wtf/LockAlgorithmInlines.h:
(WTF::Hooks>::lockSlow):
* wtf/Logger.h:
* wtf/LoggerHelper.h:
(WTF::LoggerHelper::childLogIdentifier const):
* wtf/MainThread.cpp:
* wtf/MetaAllocatorPtr.h:
* wtf/MonotonicTime.h:
* wtf/NaturalLoops.h:
(WTF::NaturalLoops::NaturalLoops):
* wtf/ObjectIdentifier.h:
* wtf/RAMSize.cpp:
* wtf/Ref.h:
* wtf/RefPtr.h:
* wtf/RetainPtr.h:
* wtf/SchedulePair.h:
* wtf/StackShot.h:
* wtf/StdLibExtras.h:
* wtf/TinyPtrSet.h:
* wtf/URL.cpp:
* wtf/URLHash.h:
* wtf/URLParser.cpp:
(WTF::URLParser::defaultPortForProtocol):
* wtf/Vector.h:
* wtf/VectorTraits.h:
* wtf/WallTime.h:
* wtf/WeakHashSet.h:
* wtf/WordLock.h:
* wtf/cocoa/CPUTimeCocoa.cpp:
* wtf/cocoa/MemoryPressureHandlerCocoa.mm:
* wtf/persistence/PersistentDecoder.h:
* wtf/persistence/PersistentEncoder.h:
* wtf/text/AtomStringHash.h:
* wtf/text/CString.h:
* wtf/text/StringBuilder.cpp:
(WTF::expandedCapacity):
* wtf/text/StringHash.h:
* wtf/text/StringImpl.h:
* wtf/text/StringToIntegerConversion.h:
(WTF::toIntegralType):
* wtf/text/SymbolRegistry.h:
* wtf/text/TextStream.cpp:
(WTF::hasFractions):
* wtf/text/WTFString.h:
* wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250005 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoFollow-up after String.codePointAt optimization
ysuzuki@apple.com [Wed, 18 Sep 2019 00:31:50 +0000 (00:31 +0000)]
Follow-up after String.codePointAt optimization
https://bugs.webkit.org/show_bug.cgi?id=201889

Reviewed by Saam Barati.

JSTests:

* stress/string-char-at-bad-type.js: Added.
(shouldBe):
(object.toString):
(test):
* stress/string-char-code-at-bad-type.js: Added.
(shouldBe):
(object.toString):
(test):
* stress/string-code-point-at-bad-type.js: Added.
(shouldBe):
(object.toString):
(test):

Source/JavaScriptCore:

Follow-up after string.codePointAt DFG / FTL optimizations,

1. Gracefully accept arguments more than expected for intrinsics
2. Check BadType in String.codePointAt, String.charAt, and String.charCodeAt.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250004 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed restabilization of non-unified build.
ross.kirsling@sony.com [Tue, 17 Sep 2019 23:55:26 +0000 (23:55 +0000)]
Unreviewed restabilization of non-unified build.

Source/WebCore:

* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::resolveContext const):
* platform/win/BString.h:
* svg/PatternAttributes.h:
* svg/SVGLengthValue.cpp:
* svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
* workers/service/ServiceWorkerJob.cpp:
* workers/service/WorkerSWClientConnection.cpp:
* workers/service/server/SWServerRegistration.cpp:

Source/WebKit:

* UIProcess/WebProcessProxy.cpp:
* WebProcess/Network/WebLoaderStrategy.cpp:
* WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250003 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoChange WebAssembly calling conventions
tzagallo@apple.com [Tue, 17 Sep 2019 23:52:28 +0000 (23:52 +0000)]
Change WebAssembly calling conventions
https://bugs.webkit.org/show_bug.cgi?id=201799

Reviewed by Saam Barati.

Currently, the Wasm::Callee writes itself to CallFrameSlot::callee. However, this won't work when
we have the Wasm interpreter, since we need the callee in order to know which function are we executing.
This patch changes the calling conventions in preparation for the interpreter, so that the caller
becomes responsible for writing the callee into the call frame.
However, there are exceptions to this rule: stubs can still write to the callee slot, since they are individually
generated and will still be present in the interpreter. We keep this design to avoid emitting unnecessary
code when we know statically who is the callee:
- Caller writes to call frame: intra-module direct wasm calls, indirect wasm calls, JS-to-wasm stub (new frame), JS-to-wasm IC.
- Callee writes to call frame: inter-module wasm-to-wasm stub, JS-to-wasm stub (callee frame), wasm-to-JS stub, OMG osr entry

Additionally, this patch also changes it so that the callee keeps track of its callers, instead of having a global mapping
of calls in the Wasm::CodeBlock. This makes it easier to repatch all callers of a given Callee when it tiers up.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wasm/WasmAirIRGenerator.cpp:
(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::addCall):
(JSC::Wasm::AirIRGenerator::addCallIndirect):
(JSC::Wasm::parseAndCompileAir):
* wasm/WasmAirIRGenerator.h:
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
(JSC::Wasm::parseAndCompile):
* wasm/WasmB3IRGenerator.h:
* wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::BBQPlan):
(JSC::Wasm::BBQPlan::prepare):
(JSC::Wasm::BBQPlan::compileFunctions):
(JSC::Wasm::BBQPlan::complete):
* wasm/WasmBBQPlan.h:
* wasm/WasmBBQPlanInlines.h:
(JSC::Wasm::BBQPlan::initializeCallees):
* wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToWasm):
* wasm/WasmCallee.cpp:
(JSC::Wasm::Callee::Callee):
(JSC::Wasm::repatchMove):
(JSC::Wasm::repatchCall):
(JSC::Wasm::BBQCallee::addCaller):
(JSC::Wasm::BBQCallee::addAndLinkCaller):
(JSC::Wasm::BBQCallee::repatchCallers):
* wasm/WasmCallee.h:
(JSC::Wasm::Callee::entrypoint):
(JSC::Wasm::Callee::code const):
(JSC::Wasm::Callee::calleeSaveRegisters):
* wasm/WasmCallingConvention.h:
(JSC::Wasm::CallingConvention::setupFrameInPrologue const):
* wasm/WasmCodeBlock.cpp:
(JSC::Wasm::CodeBlock::CodeBlock):
* wasm/WasmCodeBlock.h:
(JSC::Wasm::CodeBlock::embedderEntrypointCalleeFromFunctionIndexSpace):
(JSC::Wasm::CodeBlock::wasmBBQCalleeFromFunctionIndexSpace):
(JSC::Wasm::CodeBlock::entrypointLoadLocationFromFunctionIndexSpace):
(JSC::Wasm::CodeBlock::boxedCalleeLoadLocationFromFunctionIndexSpace):
* wasm/WasmEmbedder.h:
* wasm/WasmFormat.h:
(JSC::Wasm::WasmToWasmImportableFunction::offsetOfBoxedCalleeLoadLocation):
* wasm/WasmInstance.h:
(JSC::Wasm::Instance::offsetOfBoxedCalleeLoadLocation):
* wasm/WasmOMGForOSREntryPlan.cpp:
(JSC::Wasm::OMGForOSREntryPlan::OMGForOSREntryPlan):
(JSC::Wasm::OMGForOSREntryPlan::work):
* wasm/WasmOMGForOSREntryPlan.h:
* wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::OMGPlan):
(JSC::Wasm::OMGPlan::work):
* wasm/WasmOMGPlan.h:
* wasm/WasmOperations.cpp:
(JSC::Wasm::triggerOMGReplacementCompile):
(JSC::Wasm::doOSREntry):
(JSC::Wasm::triggerOSREntryNow):
* wasm/js/JSToWasm.cpp:
(JSC::Wasm::createJSToWasmWrapper):
* wasm/js/JSToWasm.h:
* wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):
(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::WebAssemblyFunction):
* wasm/js/WebAssemblyFunction.h:
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):
* wasm/js/WebAssemblyWrapperFunction.cpp:
(JSC::WebAssemblyWrapperFunction::create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250002 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoresults.webkit.org results bubbles' tooltips should include SDK information
jbedard@apple.com [Tue, 17 Sep 2019 23:48:49 +0000 (23:48 +0000)]
results.webkit.org results bubbles' tooltips should include SDK information
https://bugs.webkit.org/show_bug.cgi?id=201823

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/view/static/js/configuration.js:
(Configuration.prototype.compare): Like the Python instance of this class,
support using null as a wildcard.
(Configuration.prototype.compareSDKs): Ditto.
* resultsdbpy/resultsdbpy/view/static/js/timeline.js:
(TimelineFromEndpoint.prototype.render.onDotEnterFactory): Construct a configuration
object from all bits of data used to construct a given bubble.
(TimelineFromEndpoint.prototype.render):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250001 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoWebProcess class methods should not need to take a sessionID
cdumez@apple.com [Tue, 17 Sep 2019 21:57:07 +0000 (21:57 +0000)]
WebProcess class methods should not need to take a sessionID
https://bugs.webkit.org/show_bug.cgi?id=201881

Reviewed by Geoffrey Garen.

WebProcess class methods should not need to take a sessionID given that we have a single
session per WebProcess now.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/WebProcessDataStoreParameters.h:
(WebKit::WebProcessDataStoreParameters::encode const):
(WebKit::WebProcessDataStoreParameters::decode):
* UIProcess/Plugins/PlugInAutoStartProvider.cpp:
(WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
(WebKit::PlugInAutoStartProvider::autoStartOriginHashesCopy const):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
(WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):
* UIProcess/Plugins/PlugInAutoStartProvider.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::webProcessDataStoreParameters):
(WebKit::WebProcessPool::initializeNewWebProcess):
* UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToAllProcesses):
(WebKit::WebProcessPool::sendToAllProcessesForSession):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::fetchWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
(WebKit::WebProcessProxy::establishServiceWorkerContext):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginDidReceiveUserInteraction):
* WebProcess/WebCoreSupport/WebPlugInClient.cpp:
(WebKit::WebPlugInClient::didStartFromOrigin):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setWebsiteDataStoreParameters):
(WebKit::WebProcess::removeWebPage):
(WebKit::WebProcess::isPlugInAutoStartOriginHash):
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
(WebKit::WebProcess::plugInDidStartFromOrigin):
(WebKit::WebProcess::didAddPlugInAutoStartOriginHash):
(WebKit::WebProcess::resetPlugInAutoStartOriginHashes):
(WebKit::WebProcess::plugInDidReceiveUserInteraction):
(WebKit::WebProcess::fetchWebsiteData):
(WebKit::WebProcess::deleteWebsiteData):
(WebKit::WebProcess::deleteWebsiteDataForOrigins):
(WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249985 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed, address flakiness of imported/w3c/web-platform-tests/html/browsers/offlin...
cdumez@apple.com [Tue, 17 Sep 2019 21:49:26 +0000 (21:49 +0000)]
Unreviewed, address flakiness of imported/w3c/web-platform-tests/html/browsers/offline/application-cache-api/api_update_error.https.html.

Stop logging console messages.

LayoutTests/imported/w3c:

* web-platform-tests/html/browsers/offline/application-cache-api/api_update_error.https-expected.txt:

LayoutTests:

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249984 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed, revert r249850 as the flakiness should be gone as of the testharness...
cdumez@apple.com [Tue, 17 Sep 2019 21:43:13 +0000 (21:43 +0000)]
Unreviewed, revert r249850 as the flakiness should be gone as of the testharness.js update in r249977.
https://bugs.webkit.org/show_bug.cgi?id=201661

* web-platform-tests/service-workers/service-worker/getregistrations.https.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249983 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoRebaseline imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing...
russell_e@apple.com [Tue, 17 Sep 2019 20:56:13 +0000 (20:56 +0000)]
Rebaseline imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing.window.html for Catalina and iOS 13.
https://bugs.webkit.org/show_bug.cgi?id=172357

Unreviewed Test Gardening.

* platform/ios/imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing.window-expected.txt:
* platform/mac-mojave/imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing.window-expected.txt: Copied from LayoutTests/platform/ios/imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing.window-expected.txt.
* platform/mac/imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing.window-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249981 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoWebMDNSRegister no longer needs to be provided sessionIDs
cdumez@apple.com [Tue, 17 Sep 2019 20:49:36 +0000 (20:49 +0000)]
WebMDNSRegister no longer needs to be provided sessionIDs
https://bugs.webkit.org/show_bug.cgi?id=201876

Reviewed by Geoffrey Garen.

WebMDNSRegister no longer needs to be provided sessionIDs, now that we
have one session per WebProcess.

* NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
(WebKit::NetworkMDNSRegister::registerMDNSName):
(WebKit::NetworkMDNSRegister::sessionID const):
* NetworkProcess/webrtc/NetworkMDNSRegister.h:
* NetworkProcess/webrtc/NetworkMDNSRegister.messages.in:
* WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
(WebKit::LibWebRTCProvider::registerMDNSName):
(WebKit::LibWebRTCProvider::createSocketFactory):
* WebProcess/Network/webrtc/WebMDNSRegister.cpp:
(WebKit::WebMDNSRegister::registerMDNSName):
* WebProcess/Network/webrtc/WebMDNSRegister.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249980 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoWebSWServerConnection does not need to store a sessionID
cdumez@apple.com [Tue, 17 Sep 2019 20:48:58 +0000 (20:48 +0000)]
WebSWServerConnection does not need to store a sessionID
https://bugs.webkit.org/show_bug.cgi?id=201878

Reviewed by Geoffrey Garen.

WebSWServerConnection does not need to store a sessionID, it can simply get it from its SWServer.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::establishSWServerConnection):
* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::WebSWServerConnection):
(WebKit::WebSWServerConnection::startFetch):
(WebKit::WebSWServerConnection::sessionID const):
* NetworkProcess/ServiceWorker/WebSWServerConnection.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249979 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoRemove some support for < iOS 12
krollin@apple.com [Tue, 17 Sep 2019 20:20:38 +0000 (20:20 +0000)]
Remove some support for < iOS 12
https://bugs.webkit.org/show_bug.cgi?id=201851
<rdar://problem/55422044>

Reviewed by Jiewen Tan and Alexey Proskuryakov.

Remove some support for iOS versions less than 12.0.

Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
values >= 120000. This means that expressions like
"__IPHONE_OS_VERSION_MIN_REQUIRED < 101200" are always False and
"__IPHONE_OS_VERSION_MIN_REQUIRED >= 101200" are always True.

This removal is part of a series of patches effecting such removal.

Source/WebCore:

No new tests -- no new or changed functionality.

* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::create):
(WebCore::castDataArgumentToCCRSACryptorCreateFromDataIfNeeded): Deleted.

Source/WebCore/PAL:

* pal/spi/cocoa/IOSurfaceSPI.h:

Tools:

* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
(WTR::installFakeHelvetica):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249978 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUpdate testharness.js from upstream for web-platform-tests
cdumez@apple.com [Tue, 17 Sep 2019 20:17:47 +0000 (20:17 +0000)]
Update testharness.js from upstream for web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=201843

Reviewed by Jiewen Tan.

LayoutTests/imported/w3c:

Update testharness.js from upstream 6fd5e1e086ce590a4780a30d129 for web-platform-tests and
rebaseline tests accordingly.

* web-platform-tests/FileAPI/FileReader/workers-expected.txt:
* web-platform-tests/FileAPI/url/url-format.any.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.https.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.https.worker-expected.txt:
* web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any-expected.txt:
* web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.worker-expected.txt:
* web-platform-tests/content-security-policy/inside-worker/shared-inheritance-expected.txt:
* web-platform-tests/content-security-policy/inside-worker/shared-script-expected.txt:
* web-platform-tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.sub-expected.txt:
* web-platform-tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.tentative-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-001-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-002-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-003-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-004-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-005-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-006-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-007-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-008-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-009-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-010-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-011-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-012-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-013-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-014-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-015-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-016-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-017-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-018-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-019-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-020-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-021-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-022-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-023-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-024-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-025-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-026-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-027-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-028-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-029-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-030-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-031-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-032-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-033-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-034-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-035-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-036-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-001-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-002-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-003-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-004-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-005-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-006-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-007-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-008-expected.txt:
* web-platform-tests/css/css-grid/grid-definition/grid-change-fit-content-argument-001-expected.txt:
* web-platform-tests/css/css-properties-values-api/unit-cycles-expected.txt:
* web-platform-tests/css/css-properties-values-api/url-resolution-expected.txt:
* web-platform-tests/custom-elements/parser/parser-fallsback-to-unknown-element-expected.txt:
* web-platform-tests/dom/events/Event-dispatch-listener-order.window-expected.txt:
* web-platform-tests/dom/events/Event-isTrusted.any-expected.txt:
* web-platform-tests/dom/events/Event-isTrusted.any.worker-expected.txt:
* web-platform-tests/dom/nodes/Element-getElementsByTagName-change-document-HTMLNess-expected.txt:
* web-platform-tests/eventsource/eventsource-prototype-expected.txt:
* web-platform-tests/fetch/api/basic/stream-safe-creation.any.worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-cache.any-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-cache.any.worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-redirect.any-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-redirect.any.worker-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt:
* web-platform-tests/fetch/api/request/request-consume-empty-expected.txt:
* web-platform-tests/fetch/api/response/response-consume-empty-expected.txt:
* web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-global-scope-expected.txt:
* web-platform-tests/html/browsers/history/joint-session-history/joint-session-history-iframe-state-expected.txt:
* web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-expected.txt:
* web-platform-tests/html/browsers/origin/origin-of-data-document-expected.txt:
* web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter-expected.txt:
* web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window-expected.txt:
* web-platform-tests/html/browsers/the-window-object/focus.window-expected.txt:
* web-platform-tests/html/browsers/windows/document-access/document_access_parent_access.tentative-expected.txt:
* web-platform-tests/html/browsers/windows/targeting-cross-origin-nested-browsing-contexts-expected.txt:
* web-platform-tests/html/dom/documents/dom-tree-accessors/document.title-01-expected.txt:
* web-platform-tests/html/dom/documents/dom-tree-accessors/document.title-02-expected.txt:
* web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display-expected.txt:
* web-platform-tests/html/rendering/non-replaced-elements/tables/table-vspace-hspace-expected.txt:
* web-platform-tests/html/rendering/non-replaced-elements/tables/table-vspace-hspace-s-expected.txt:
* web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-marginwidth-marginheight-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-base-element/base_target_does_not_affect_iframe_src_navigation-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-base-element/base_target_does_not_affect_location_assignment-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/srclang-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/language-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-frame-element/document-getters-return-null-for-cross-origin-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/document-getters-return-null-for-cross-origin-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_allow_downloads_without_user_activation.sub.tentative-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads_without_user_activation.sub.tentative-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox_030-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-object-element/document-getters-return-null-for-cross-origin-expected.txt:
* web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/084-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-02-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-expected.txt:
* web-platform-tests/html/syntax/parsing/quotes-in-meta-expected.txt:
* web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/document-open-cancels-javascript-url-navigation-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/window-onerror-parse-error-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error-throw-expected.txt:
* web-platform-tests/html/webappapis/timers/negative-settimeout-expected.txt:
* web-platform-tests/infrastructure/server/context.any-expected.txt:
* web-platform-tests/infrastructure/server/context.any.serviceworker-expected.txt:
* web-platform-tests/infrastructure/server/context.any.worker-expected.txt:
* web-platform-tests/infrastructure/server/title.any.worker-expected.txt:
* web-platform-tests/mediacapture-streams/MediaStreamTrack-end-manual.https-expected.txt:
* web-platform-tests/pointerevents/pointerevent_root_computed_style-expected.txt:
* web-platform-tests/pointerevents/pointerevent_root_hit_test-expected.txt:
* web-platform-tests/preload/link-header-preload-nonce-expected.txt:
* web-platform-tests/resource-timing/resource_TAO_match_origin-expected.txt:
* web-platform-tests/resource-timing/resource_TAO_match_wildcard-expected.txt:
* web-platform-tests/resource-timing/resource_TAO_multi-expected.txt:
* web-platform-tests/resource-timing/resource_TAO_multi_wildcard-expected.txt:
* web-platform-tests/resource-timing/resource_TAO_null-expected.txt:
* web-platform-tests/resource-timing/resource_TAO_origin_uppercase-expected.txt:
* web-platform-tests/resource-timing/resource_TAO_space-expected.txt:
* web-platform-tests/resource-timing/resource_TAO_wildcard-expected.txt:
* web-platform-tests/resources/testharness.css.headers:
* web-platform-tests/resources/testharness.js:
(WindowTestEnvironment.prototype._forEach_windows):
(WindowTestEnvironment.prototype.next_default_test_name):
(WorkerTestEnvironment.prototype.next_default_test_name):
(ShellTestEnvironment):
(ShellTestEnvironment.prototype.next_default_test_name):
(ShellTestEnvironment.prototype.on_new_harness_properties):
(ShellTestEnvironment.prototype.on_tests_ready):
(ShellTestEnvironment.prototype.add_on_loaded_callback):
(ShellTestEnvironment.prototype.test_timeout):
(create_test_environment):
(is_shared_worker):
(is_service_worker):
(test):
(promise_test):
(this.wait_for):
(EventWatcher):
(done):
* web-platform-tests/resources/testharness.js.headers:
* web-platform-tests/server-timing/resource_timing_idl-expected.txt:
* web-platform-tests/server-timing/resource_timing_idl.https-expected.txt:
* web-platform-tests/server-timing/service_worker_idl-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-get-resultingClientId.https-expected.txt:
* web-platform-tests/streams/piping/general-expected.txt:
* web-platform-tests/visual-viewport/viewport-read-size-causes-layout-expected.txt:
* web-platform-tests/visual-viewport/viewport-read-size-in-iframe-causes-layout-expected.txt:
* web-platform-tests/wasm/jsapi/constructor/instantiate-bad-imports.any.worker-expected.txt:
* web-platform-tests/wasm/jsapi/instance/constructor-bad-imports.any.worker-expected.txt:
* web-platform-tests/web-animations/timing-model/animations/canceling-an-animation-expected.txt:
* web-platform-tests/webrtc/RTCRtpTransceiver-setCodecPreferences-expected.txt:
* web-platform-tests/websockets/Close-undefined.any.worker-expected.txt:
* web-platform-tests/websockets/opening-handshake/003-expected.txt:
* web-platform-tests/websockets/unload-a-document/001-expected.txt:
* web-platform-tests/websockets/unload-a-document/002-expected.txt:
* web-platform-tests/websockets/unload-a-document/003-expected.txt:
* web-platform-tests/websockets/unload-a-document/004-expected.txt:
* web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker-expected.txt:
* web-platform-tests/workers/Worker_ErrorEvent_error-expected.txt:
* web-platform-tests/workers/baseurl/alpha/importScripts-in-worker-expected.txt:
* web-platform-tests/workers/baseurl/alpha/xhr-in-worker-expected.txt:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/001.worker-expected.txt:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/002.worker-expected.txt:
* web-platform-tests/xhr/overridemimetype-done-state.any-expected.txt:
* web-platform-tests/xhr/overridemimetype-done-state.any.worker-expected.txt:
* web-platform-tests/xhr/responsetype.any-expected.txt:
* web-platform-tests/xhr/timeout-sync-expected.txt:

LayoutTests:

* http/wpt/resource-timing/rt-initiatorType-other-expected.txt:
* http/wpt/webauthn/resources/util.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249977 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[JSC] CheckArray+NonArray is not filtering out Array in AI
ysuzuki@apple.com [Tue, 17 Sep 2019 19:52:43 +0000 (19:52 +0000)]
[JSC] CheckArray+NonArray is not filtering out Array in AI
https://bugs.webkit.org/show_bug.cgi?id=201857
<rdar://problem/54194820>

Reviewed by Keith Miller.

JSTests:

* stress/check-array-with-non-array-does-not-filter-arrays.js: Added.
(foo):

Source/JavaScriptCore:

The code of DFG::ArrayMode::alreadyChecked is different from SpeculativeJIT's CheckArray / CheckStructure.
While we assume CheckArray+NonArray ensures it only passes non-array inputs, DFG::ArrayMode::alreadyChecked
accepts arrays too. So CheckArray+NonArray is removed in AI if the input is proven that it is an array.
This patch aligns DFG::ArrayMode::alreadyChecked to the checks done at runtime.

* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::alreadyChecked const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249976 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoWebPaymentCoordinatorProxy does not need sessionIDs
cdumez@apple.com [Tue, 17 Sep 2019 19:30:48 +0000 (19:30 +0000)]
WebPaymentCoordinatorProxy does not need sessionIDs
https://bugs.webkit.org/show_bug.cgi?id=201875

Reviewed by Geoffrey Garen.

WebPaymentCoordinatorProxy does not need sessionIDs so let's stop passing them around.

* Shared/ApplePay/WebPaymentCoordinatorProxy.cpp:
(WebKit::WebPaymentCoordinatorProxy::canMakePaymentsWithActiveCard):
(WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
* Shared/ApplePay/WebPaymentCoordinatorProxy.h:
* Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in:
* Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest):
* Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
* Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
(WebKit::WebPaymentCoordinator::canMakePaymentsWithActiveCard):
(WebKit::WebPaymentCoordinator::showPaymentUI):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249975 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoSVG <animateMotion> does not reset the element to its first animation frame if its...
zimmermann@webkit.org [Tue, 17 Sep 2019 19:23:56 +0000 (19:23 +0000)]
SVG <animateMotion> does not reset the element to its first animation frame if its fill is "remove"
https://bugs.webkit.org/show_bug.cgi?id=201565

Reviewed by Said Abou-Hallawa.

Source/WebCore:

Fix fill="remove" support for <animateMotion>: properly trigger visual updates.
Motion animations are implemented by provding an additional transformation on
SVGGraphicsElements: the supplementalTransform().

When an <animateMotion> element specifies fill="remove" the supplemental transform is
correctly reset, when the animation is finished. However, nobody is notified about the
change of transformation matrix. Fix by marking the target elements renderer as
setNeedsTransformUpdate() and call markForLayoutAndParentResourceInvalidation().

<animate> elements are not affected by the bug:
SVGAnimateElementBase::clearAnimatedType()
 -> invokes SVGAttributeAnimator::stop()
    -> invokes applyAnimatedPropertyChange() [via SVGAnimatedPropertyAnimator]
    -> invokes SVGXXXElement::svgAttributeChanged().

When animating e.g. the 'transform' attribute SVGGraphicsElement::svgAttributeChanged()
will use exactly the same mechanism to trigger visul updates: first call
setNeedsTransformUpdate() on the associated renderer, followd by a call to
markForLayoutAndParentResourceInvalidation().

--> Both code paths are now consistent.
Also fixes http://web-platform-tests.live/svg/animations/animateMotion-fill-remove.html.

Tests: svg/animations/fill-remove-support.html
       svg/animations/animateMotion-remove-freeze-use.svg

* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::clearAnimatedType): Call applyResultsToTarget().
(WebCore::SVGAnimateMotionElement::calculateAnimatedValue): Stop calling
setNeedsTransformUpdate() on the target elements renderer, since applyResultsToTarget()
is responsible for modifications of the renderer state.
(WebCore::SVGAnimateMotionElement::applyResultsToTarget): Always mark the renderer
as setNeedsTransformUpdate() when applying the results, before the call to
RenderSVGResource::markForLayoutAndParentResourceInvalidation(). This is more consistent
with respect to the code path that updates the SVGElements instances (<use> support).

LayoutTests:

Add a layout test covering fill="remove" support <animate> and <animateMotion>.
Add another layout test covering both fill="remove" and fill="freeze" for
<animateMotion> on SVG elements and their instances (<use>).

* svg/animations/animateMotion-remove-freeze-use-expected.svg: Added.
* svg/animations/animateMotion-remove-freeze-use.svg: Added.
* svg/animations/fill-remove-support-expected.txt: Added.
* svg/animations/fill-remove-support.html: Added.
* svg/animations/resources/fill-remove-support.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249974 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoThere should be a single CacheStorageConnection per WebProcess
cdumez@apple.com [Tue, 17 Sep 2019 19:22:39 +0000 (19:22 +0000)]
There should be a single CacheStorageConnection per WebProcess
https://bugs.webkit.org/show_bug.cgi?id=201874

Reviewed by Geoffrey Garen.

There should be a single CacheStorageConnection per WebProcess now that we have a single session
per WebProcess. This invariant allows us to simplify the code.

* NetworkProcess/cache/CacheStorageEngineConnection.cpp:
(WebKit::CacheStorageEngineConnection::~CacheStorageEngineConnection):
(WebKit::CacheStorageEngineConnection::open):
(WebKit::CacheStorageEngineConnection::remove):
(WebKit::CacheStorageEngineConnection::caches):
(WebKit::CacheStorageEngineConnection::retrieveRecords):
(WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
(WebKit::CacheStorageEngineConnection::putRecords):
(WebKit::CacheStorageEngineConnection::reference):
(WebKit::CacheStorageEngineConnection::dereference):
(WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
(WebKit::CacheStorageEngineConnection::engineRepresentation):
(WebKit::CacheStorageEngineConnection::sessionID const):
* NetworkProcess/cache/CacheStorageEngineConnection.h:
* NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
* WebProcess/Cache/WebCacheStorageConnection.cpp:
(WebKit::WebCacheStorageConnection::WebCacheStorageConnection):
(WebKit::WebCacheStorageConnection::open):
(WebKit::WebCacheStorageConnection::remove):
(WebKit::WebCacheStorageConnection::retrieveCaches):
(WebKit::WebCacheStorageConnection::retrieveRecords):
(WebKit::WebCacheStorageConnection::batchDeleteOperation):
(WebKit::WebCacheStorageConnection::batchPutOperation):
(WebKit::WebCacheStorageConnection::reference):
(WebKit::WebCacheStorageConnection::dereference):
(WebKit::WebCacheStorageConnection::clearMemoryRepresentation):
(WebKit::WebCacheStorageConnection::engineRepresentation):
(WebKit::WebCacheStorageConnection::updateQuotaBasedOnSpaceUsage):
(WebKit::WebCacheStorageConnection::sessionID const):
* WebProcess/Cache/WebCacheStorageConnection.h:
* WebProcess/Cache/WebCacheStorageProvider.cpp:
(WebKit::WebCacheStorageProvider::createCacheStorageConnection):
* WebProcess/Cache/WebCacheStorageProvider.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249973 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoREGRESSION (macOS): Many webgpu/whlsl* tests are flaky failures.
russell_e@apple.com [Tue, 17 Sep 2019 19:01:54 +0000 (19:01 +0000)]
REGRESSION (macOS): Many webgpu/whlsl* tests are flaky failures.
https://bugs.webkit.org/show_bug.cgi?id=201877.

Unreviewed Test Gardening.

Incorrectly marked tests as Failures. Changed to ImageOnlyFailures as
intended.
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249972 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoREGRESSION (macOS): Many webgpu/whlsl* tests are flaky failures.
russell_e@apple.com [Tue, 17 Sep 2019 18:55:23 +0000 (18:55 +0000)]
REGRESSION (macOS): Many webgpu/whlsl* tests are flaky failures.
https://bugs.webkit.org/show_bug.cgi?id=201877

Unreviewed Test Gardening.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249971 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed attempt to fix internal build after r249962.
cdumez@apple.com [Tue, 17 Sep 2019 18:42:11 +0000 (18:42 +0000)]
Unreviewed attempt to fix internal build after r249962.

* UIProcess/API/C/WKPreferencesRef.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoWeb Inspector: HTML Formatter - better handling for HTML specific tag cases (<p>...
joepeck@webkit.org [Tue, 17 Sep 2019 18:37:07 +0000 (18:37 +0000)]
Web Inspector: HTML Formatter - better handling for HTML specific tag cases (<p>/<li>)
https://bugs.webkit.org/show_bug.cgi?id=201757
<rdar://problem/55409987>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

* UserInterface/Workers/Formatter/HTMLFormatter.js:
(HTMLFormatter.prototype._after):
Handle a closing tag with different text than the opening tag.

* UserInterface/Workers/Formatter/HTMLTreeBuilderFormatter.js:
(HTMLTreeBuilderFormatter.prototype._pushParserNodeTopLevel):
(HTMLTreeBuilderFormatter.prototype._pushParserNodeStack):
(HTMLTreeBuilderFormatter.prototype._implicitlyCloseHTMLNodesForOpenTag):
(HTMLTreeBuilderFormatter.prototype._implicitlyCloseTagNamesInsideParentTagNames):
(HTMLTreeBuilderFormatter.prototype._indexOfStackNodeMatchingTagNames):
Generalize the implicit closing a bit. Allow open tags to implicitly
close certain other open tags in the stack.

LayoutTests:

* inspector/formatting/formatting-html-expected.txt:
* inspector/formatting/formatting-html.html:
* inspector/formatting/resources/html-tests/auto-close-normal-expected.html: Renamed from LayoutTests/inspector/formatting/resources/html-tests/auto-close-expected.html.
* inspector/formatting/resources/html-tests/auto-close-normal.html: Renamed from LayoutTests/inspector/formatting/resources/html-tests/auto-close.html.
* inspector/formatting/resources/html-tests/auto-close-special-expected.html: Added.
* inspector/formatting/resources/html-tests/auto-close-special.html: Added.
* inspector/formatting/resources/html-tests/list-expected.html:
* inspector/formatting/resources/html-tests/list.html:
* inspector/formatting/resources/html-tests/not-well-formed-1-expected.html:
* inspector/formatting/resources/html-tests/not-well-formed-1.html:
* inspector/formatting/resources/html-tests/p-expected.html: Added.
* inspector/formatting/resources/html-tests/p.html: Added.
* inspector/formatting/resources/html-tests/table-expected.html: Added.
* inspector/formatting/resources/html-tests/table.html: Added.
* inspector/formatting/resources/html-tests/tag-case-expected.html: Added.
* inspector/formatting/resources/html-tests/tag-case.html: Added.
Tests for HTML specialties.

* inspector/formatting/formatting-xml-expected.txt:
* inspector/formatting/formatting-xml.html:
* inspector/formatting/resources/xml-tests/tag-case-expected.xml: Added.
* inspector/formatting/resources/xml-tests/tag-case.xml: Added.
* inspector/formatting/resources/xml-tests/valid-html-invalid-xml-expected.xml:
* inspector/formatting/resources/xml-tests/valid-html-invalid-xml.xml:
XML is case-sensitive. Ensure XML doesn't get more of the HTML specialties.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249969 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoRolled out r249964 because it broke the build.
aestes@apple.com [Tue, 17 Sep 2019 18:11:10 +0000 (18:11 +0000)]
Rolled out r249964 because it broke the build.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249967 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agorun-webkit-tests: Driver.do_post_tests_work() is never called when `stop_when_done...
ddkilzer@apple.com [Tue, 17 Sep 2019 17:50:26 +0000 (17:50 +0000)]
run-webkit-tests: Driver.do_post_tests_work() is never called when `stop_when_done` is true in Driver.run_test()
<https://webkit.org/b/201873>

Reviewed by Jonathan Bedard.

* Scripts/webkitpy/port/driver.py:
(Driver.run_test): Call self.do_post_tests_work() when a test
shard has completed, but didn't crash or time out.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249965 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[Cocoa] Add a WKA extension point
aestes@apple.com [Tue, 17 Sep 2019 17:46:04 +0000 (17:46 +0000)]
[Cocoa] Add a WKA extension point
https://bugs.webkit.org/show_bug.cgi?id=201801
<rdar://problem/55372507>

Reviewed by Alexey Proskuryakov.

* Modules/applepay/ApplePayRequestBase.cpp:
(WebCore::requiresSupportedNetworks):
(WebCore::convertAndValidate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249964 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoTextIterator should convert tabs to spaces
antti@apple.com [Tue, 17 Sep 2019 17:31:20 +0000 (17:31 +0000)]
TextIterator should convert tabs to spaces
https://bugs.webkit.org/show_bug.cgi?id=201863

Reviewed by Zalan Bujtas.

LayoutTests/imported/w3c:

* web-platform-tests/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt:
* web-platform-tests/innerText/getter-expected.txt:

Source/WebCore:

As seen in tests

imported/w3c/web-platform-tests/innerText/getter.html
imported/w3c/web-platform-tests/html/dom/elements/the-innertext-idl-attribute/getter.html

The old simple line layout path in TextIterator used to do this.

* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextBox):

LayoutTests:

* editing/pasteboard/5761530-1.html:

Set body to 'whitespace:pre' so tabs don't get lost in test output.

* fast/tokenizer/script_extra_close-expected.txt:
* imported/blink/fast/text/font-linux-normalize-expected.txt:
* platform/mac/editing/pasteboard/5761530-1-expected.txt: Removed.

No need for platform specific result.

* editing/pasteboard/5761530-1-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249963 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoREGRESSION (r249923): ASSERTION FAILED: sessionID == WebProcess::singleton().sessionI...
cdumez@apple.com [Tue, 17 Sep 2019 17:12:04 +0000 (17:12 +0000)]
REGRESSION (r249923): ASSERTION FAILED: sessionID == WebProcess::singleton().sessionID() in WebCore::SWClientConnection *WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession(PAL::SessionID)
https://bugs.webkit.org/show_bug.cgi?id=201859
<rdar://problem/55426742>

Reviewed by Alex Christensen.

Source/WebKit:

Drop support for the WKPreferencesSetPrivateBrowsingEnabled() C API (Mark as deprecated and make it a no-op) as it
was changing a WebContent process's sessionID, which is no longer supported. This was also using the legacy private
browsing session, which we're trying to get rid of. There is suitable C API to do private browsing (WKWebsiteDataStoreRef).

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPrivateBrowsingEnabled):
(WKPreferencesGetPrivateBrowsingEnabled):
* UIProcess/API/C/WKPreferencesRef.h:
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(WKPageIsURLKnownHSTSHost):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::isURLKnownHSTSHost const):
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::addPage):
(WebKit::WebPreferences::removePage):
(WebKit::WebPreferences::updateBoolValueForKey):
* UIProcess/WebPreferences.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
* UIProcess/WebProcessPool.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Update API test to use WKWebsiteDataStoreRef C API to do private browsing instead of using
the legacy WKPreferencesSetPrivateBrowsingEnabled() C API.

* TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249962 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoREGRESSION (iOS 13): rAF stops firing when navigating away cross-origin and then...
cdumez@apple.com [Tue, 17 Sep 2019 17:09:49 +0000 (17:09 +0000)]
REGRESSION (iOS 13): rAF stops firing when navigating away cross-origin and then back
https://bugs.webkit.org/show_bug.cgi?id=201767
<rdar://problem/55350854>

Reviewed by Geoffrey Garen.

Source/WebKit:

When navigating back and restoring a SuspendedPage, WebPage::reinitializeWebPage() ends up
reconstructing a new DrawingArea to match the identifier of the DrawingAreaProxy that the
UIProcess created. The issue is that when reconstructing the DrawingArea, we were losing
the DisplayRefreshMonitors that had been registered on the previous drawing area. To
address the issue, we now make sure to transfer the DisplayRefreshMonitors over from the
old to the new drawing area. This patch is kept as small as possible to faciliate cherry
picking to a branch. However, I think we should consider refactoring the code so that
we no longer need to re-create the DrawingArea in the WebProcess in this case.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::adoptDisplayRefreshMonitorsFromDrawingArea):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::adoptDisplayRefreshMonitorsFromDrawingArea):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reinitializeWebPage):

LayoutTests:

Add layout test coverage.

* http/tests/navigation/page-cache-requestAnimationFrame-expected.txt: Added.
* http/tests/navigation/page-cache-requestAnimationFrame.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249961 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoBring up queues for iOS 13
ryanhaddad@apple.com [Tue, 17 Sep 2019 16:49:49 +0000 (16:49 +0000)]
Bring up queues for iOS 13
https://bugs.webkit.org/show_bug.cgi?id=201710

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/build.webkit.org-config/config.json: Move iOS 12 queues to iOS 13.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js: Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
(table.queue-grid tr.platform.ios-simulator-12 img.logo): Deleted.
(table.queue-grid tr.platform.ios-12 img.logo): Deleted.
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Update unit tests.
* BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
(_should_file_trigger_build):
* BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
(ShouldBuildTest):
(ShouldBuildTest.test_should_build):
* BuildSlaveSupport/ews-build/config.json: Move iOS 12 queues to iOS 13.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249960 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoCheckArray on DirectArguments/ScopedArguments does not filter out slow put array...
sbarati@apple.com [Tue, 17 Sep 2019 16:32:11 +0000 (16:32 +0000)]
CheckArray on DirectArguments/ScopedArguments does not filter out slow put array storage
https://bugs.webkit.org/show_bug.cgi?id=201853
<rdar://problem/53805461>

Reviewed by Yusuke Suzuki.

JSTests:

* stress/direct-arguments-check-array-filter-type.js: Added.
(foo):

Source/JavaScriptCore:

We were claiming CheckArray for ScopedArguments/DirectArguments was filtering
out SlowPutArrayStorage. It does no such thing. We just check that the object
is either ScopedArguments/DirectArguments.

* dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::arrayModesThatPassFiltering const):
(JSC::DFG::ArrayMode::arrayModesWithIndexingShapes const):
(JSC::DFG::ArrayMode::arrayModesWithIndexingShape const): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249959 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoFollow-up: Provide a prototype for AR QuickLook to trigger processing in the originat...
jbedard@apple.com [Tue, 17 Sep 2019 16:25:35 +0000 (16:25 +0000)]
Follow-up: Provide a prototype for AR QuickLook to trigger processing in the originating page
https://bugs.webkit.org/show_bug.cgi?id=201371

Unreviewed follow-up fix.

* pal/spi/ios/SystemPreviewSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249958 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed, address flakiness of imported/w3c/web-platform-tests/IndexedDB/fire-error...
cdumez@apple.com [Tue, 17 Sep 2019 16:05:37 +0000 (16:05 +0000)]
Unreviewed, address flakiness of imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html

Do not log console messages.

LayoutTests/imported/w3c:

* web-platform-tests/IndexedDB/fire-error-event-exception-expected.txt:

LayoutTests:

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249957 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed, rolling out r249950.
tsavell@apple.com [Tue, 17 Sep 2019 16:03:09 +0000 (16:03 +0000)]
Unreviewed, rolling out r249950.

Broke the iOS build.

Reverted changeset:

"Remove the "Show Link Previews" and "Hide Link Previews"
action menus in the preview platter"
https://bugs.webkit.org/show_bug.cgi?id=201864
https://trac.webkit.org/changeset/249950

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249956 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[LFC[MarginCollapsing] MarginCollapse::estimatedMarginBefore should take pre-computed...
zalan@apple.com [Tue, 17 Sep 2019 15:57:15 +0000 (15:57 +0000)]
[LFC[MarginCollapsing] MarginCollapse::estimatedMarginBefore should take pre-computed non-collapsed margin values.
https://bugs.webkit.org/show_bug.cgi?id=201848
<rdar://problem/55419419>

Reviewed by Antti Koivisto.

This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
See webkit.org/b/201795

* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeIgnoringCollapsingThrough):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[First-letter] Use WeakPtr for the first-letter insertion point.
zalan@apple.com [Tue, 17 Sep 2019 15:01:23 +0000 (15:01 +0000)]
[First-letter] Use WeakPtr for the first-letter insertion point.
https://bugs.webkit.org/show_bug.cgi?id=201842
<rdar://problem/51373788>

Reviewed by Antti Koivisto.

Source/WebCore:

The about-to-be-removed first letter renderer's sibling could potentially be destroyed too as the result of the anonymous subtree collapsing logic (when the next sibling is a generated anonymous block and it is not needed anymore.)

Test: fast/text/first-letter-with-columns-crash.html

* rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(WebCore::RenderTreeBuilder::FirstLetter::updateStyle):

LayoutTests:

* fast/text/first-letter-with-columns-crash-expected.txt: Added.
* fast/text/first-letter-with-columns-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[GTK] Initial view loading is slow
carlosgc@webkit.org [Tue, 17 Sep 2019 11:05:00 +0000 (11:05 +0000)]
[GTK] Initial view loading is slow
https://bugs.webkit.org/show_bug.cgi?id=201451

Reviewed by Sergio Villar Senin.

The problem is that now we are always calling DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint() after a
new process is launched and we used to do that only when launching a new process after a crash. This makes
m_hasReceivedFirstUpdate useless, because it's always set to true right after a process is launched. Then, we
wait up to half a second (which is usually the case for the initial load) until the first update. We only want
to do that when recovering from a crash or when swapping processes to avoid flashing effect.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::launchProcess): Add ProcessLaunchReason parameter and pass it to
finishAttachingToWebProcess instead of IsProcessSwap.
(WebKit::WebPageProxy::swapToWebProcess): Pass ProcessLaunchReason::ProcessSwap to
finishAttachingToWebProcess().
(WebKit::WebPageProxy::finishAttachingToWebProcess): Do not call
DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint() when process launch reason is ProcessLaunchReason::InitialProcess.
(WebKit::WebPageProxy::launchProcessForReload): Pass ProcessLaunchReason::Reload to launchProcess().
* UIProcess/WebPageProxy.h: Remove IsProcessSwap and add ProcessLaunchReason instead that is passed to
launchProcess and finishAttachingToWebProcess.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249953 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoREGRESSION(r249275): [GTK][WPE] WebPage injected bundle messages no longer work
carlosgc@webkit.org [Tue, 17 Sep 2019 11:04:12 +0000 (11:04 +0000)]
REGRESSION(r249275): [GTK][WPE] WebPage injected bundle messages no longer work
https://bugs.webkit.org/show_bug.cgi?id=201865

Reviewed by Žan Doberšek.

We use them to implement the web resources API. This is another regression of r249275 because we are using the
page proxy identifier when we really want to the web page identifier.

* UIProcess/API/glib/WebKitWebContext.cpp:
(webkitWebContextGetWebViewForPage): Use WebPageProxy::webPageID() instead of WebPageProxy::identifier().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249952 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[GTK] Cannot create EGL window surface: EGL_BAD_ALLOC
carlosgc@webkit.org [Tue, 17 Sep 2019 10:12:26 +0000 (10:12 +0000)]
[GTK] Cannot create EGL window surface: EGL_BAD_ALLOC
https://bugs.webkit.org/show_bug.cgi?id=201505

Reviewed by Žan Doberšek.

This happens because eglCreateWindowSurface() is called twice for the same window when not using the WPE
renderer. New versions of Mesa fail the second time with a EGL_BAD_ALLOC.

* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createWindowContext): Check surface is nullptr before falling back to use
eglCreateWindowSurface().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249951 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoRemove the "Show Link Previews" and "Hide Link Previews" action menus in the preview...
dino@apple.com [Tue, 17 Sep 2019 09:03:40 +0000 (09:03 +0000)]
Remove the "Show Link Previews" and "Hide Link Previews" action menus in the preview platter
https://bugs.webkit.org/show_bug.cgi?id=201864
<rdar://55190038>

Reviewed by Simon Fraser.

Source/WebKit:

* UIProcess/ios/WKActionSheetAssistant.mm: Remove the toggle action from the
default values.
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
* UIProcess/ios/WKContentViewInteraction.mm: No longer try to add a toggle when
it isn't there.
(-[WKContentView assignLegacyDataForContextMenuInteraction]):
(menuWithShowLinkPreviewAction): Deleted.

Tools:

Test for the suggested actions.

* TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:
(-[TestContextMenuSuggestedActionsUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuSuggestedActionsUIDelegate webView:contextMenuWillPresentForElement:]):
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249950 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[WebAuthn] Use WebPreferences instead of RuntimeEnabledFeatures in UIProcess
jiewen_tan@apple.com [Tue, 17 Sep 2019 08:17:17 +0000 (08:17 +0000)]
[WebAuthn] Use WebPreferences instead of RuntimeEnabledFeatures in UIProcess
https://bugs.webkit.org/show_bug.cgi?id=198176
<rdar://problem/55285709>

Reviewed by Youenn Fablet.

Source/WebCore:

No changes of behavior.

* Modules/webauthn/PublicKeyCredential.cpp:
(WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):
Resolves the promise with false immediately when the feature flag is false.

Source/WebKit:

This patch does the following two things:
1) It merges WebAuthenticationRequestData::creationOptions and requestOptions into a variant, and therefore
merges code paths that involve WebAuthenticationRequestData.
2) It teaches WebAuthenticationRequestData to store a WebPreferences such that AuthenticatorManager could utilize
runtime feature flags to turn features on or off.

* UIProcess/WebAuthentication/Authenticator.cpp:
(WebKit::Authenticator::handleRequest):
* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::handleRequest):
(WebKit::AuthenticatorManager::clearState):
(WebKit::AuthenticatorManager::authenticatorAdded):
(WebKit::AuthenticatorManager::startDiscovery):
(WebKit::AuthenticatorManager::makeCredential): Deleted.
(WebKit::AuthenticatorManager::getAssertion): Deleted.
* UIProcess/WebAuthentication/AuthenticatorManager.h:
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::makeCredential):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterUserConsented):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):
(WebKit::LocalAuthenticator::getAssertion):
(WebKit::LocalAuthenticator::continueGetAssertionAfterUserConsented):
* UIProcess/WebAuthentication/Cocoa/LocalService.mm:
(WebKit::LocalService::isAvailable):
Don't check RuntimeEnabledFeatures given it is for WebCore.
* UIProcess/WebAuthentication/WebAuthenticationRequestData.h:
(): Deleted.
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
(WebKit::WebAuthenticatorCoordinatorProxy::makeCredential):
(WebKit::WebAuthenticatorCoordinatorProxy::getAssertion):
(WebKit::WebAuthenticatorCoordinatorProxy::handleRequest):
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
* UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
(WebKit::CtapAuthenticator::makeCredential):
(WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived const):
(WebKit::CtapAuthenticator::getAssertion):
* UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp:
(WebKit::U2fAuthenticator::makeCredential):
(WebKit::U2fAuthenticator::checkExcludeList):
(WebKit::U2fAuthenticator::issueRegisterCommand):
(WebKit::U2fAuthenticator::getAssertion):
(WebKit::U2fAuthenticator::issueSignCommand):
(WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived):
(WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249949 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoKeeps running obsolete WebProcess-es for too long
carlosgc@webkit.org [Tue, 17 Sep 2019 08:14:29 +0000 (08:14 +0000)]
Keeps running obsolete WebProcess-es for too long
https://bugs.webkit.org/show_bug.cgi?id=201492

Reviewed by Chris Dumez.

That's how the web process cache is expected to work, but it's true that it probably only makes sense to use it
when cache model is primary web browser.

* UIProcess/WebProcessCache.cpp:
(WebKit::WebProcessCache::updateCapacity): Disable the web process cache when cache model is not primary web browser.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249948 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[GTK] Crash closing web view while hardware acceleration is enabled
carlosgc@webkit.org [Tue, 17 Sep 2019 08:05:30 +0000 (08:05 +0000)]
[GTK] Crash closing web view while hardware acceleration is enabled
https://bugs.webkit.org/show_bug.cgi?id=200856

Reviewed by Michael Catanzaro.

The crash happens when destroying the WaylandCompositor::Surface because the web view GL context is used to
release the texture, but the GL context is no longer valid after web view
unrealize. AcceleratedBackingStoreWayland should handle the web view unrealize to destroy the GL context. It
will be created on demand again after the web view is realized.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Notify AcceleratedBackingStore.
(webkitWebViewBaseUnrealize): Ditto.
* UIProcess/gtk/AcceleratedBackingStore.h:
(WebKit::AcceleratedBackingStore::realize): Added.
(WebKit::AcceleratedBackingStore::unrealize): Added.
* UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
(WebKit::AcceleratedBackingStoreWayland::realize): In case of using WaylandCompositor, call
WaylandCompositor::bindWebPage() to bind the WebPageProxy to the Wayland surface.
(WebKit::AcceleratedBackingStoreWayland::unrealize): Destroy GL resources and the GL context.
(WebKit::AcceleratedBackingStoreWayland::tryEnsureGLContext): Do not try to create the GL context if the web
view is not realized.
(WebKit::AcceleratedBackingStoreWayland::displayBuffer): Remove the code to initialize the texture.
(WebKit::AcceleratedBackingStoreWayland::paint): And add it here.
* UIProcess/gtk/AcceleratedBackingStoreWayland.h:
* UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::Surface::setWebPage): Return early if given page is the current one already.
(WebKit::WaylandCompositor::bindWebPage): Set the surface WebPageProxy.
(WebKit::WaylandCompositor::unbindWebPage): Unset the surface WebPageProxy.
* UIProcess/gtk/WaylandCompositor.h:
* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): When restoring a previous layer tree
host, always call resumeRendering() to balance the suspendRendering() called in exitAcceleratedCompositingMode().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249947 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoAccess-Control-Expose-Headers parsed incorrectly
commit-queue@webkit.org [Tue, 17 Sep 2019 07:56:08 +0000 (07:56 +0000)]
Access-Control-Expose-Headers parsed incorrectly
https://bugs.webkit.org/show_bug.cgi?id=172357

Patch by Rob Buis <rbuis@igalia.com> on 2019-09-17
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Import cors/access-control-expose-headers-parsing.window.js and adjust it
so it fetches a remote url, since subdomains do not work for localhost.

* web-platform-tests/cors/access-control-expose-headers-parsing.window-expected.txt: Added.
* web-platform-tests/cors/access-control-expose-headers-parsing.window.html: Added.
* web-platform-tests/cors/access-control-expose-headers-parsing.window.js:
(runTests):
(exposeTest): Deleted.
* web-platform-tests/cors/allow-headers-expected.txt: Removed.
* web-platform-tests/cors/allow-headers.htm: Removed.
* web-platform-tests/cors/resources/access-control-expose-headers-parsing-2.asis: Removed.
* web-platform-tests/cors/resources/access-control-expose-headers-parsing.asis: Removed.
* web-platform-tests/cors/resources/access-control-expose-headers.json: Added.
* web-platform-tests/cors/resources/expose-headers.py: Added.
(main):

Source/WebCore:

When parsing the list, strip HTTP spaces and verify
that the list items are valid HTTP tokens.

Behavior matches Firefox and Chrome.

Test: imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing.window.html

* platform/network/HTTPParsers.h:
(WebCore::addToAccessControlAllowList):
(WebCore::parseAccessControlAllowList):

LayoutTests:

Add Mac/iOS expectations.

* platform/ios/imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing.window-expected.txt: Added.
* platform/mac/imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing.window-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249946 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoContent-Type should be preserved on responses created from DOMCache
youenn@apple.com [Tue, 17 Sep 2019 07:39:52 +0000 (07:39 +0000)]
Content-Type should be preserved on responses created from DOMCache
https://bugs.webkit.org/show_bug.cgi?id=201815

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Fixes one subtest.
Remaining failing test is failing consistently in other browsers.

* web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/window/cache-match.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/worker/cache-match.https-expected.txt:

Source/WebCore:

       Covered by updated test expectations

* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::create):
Update content type when creating the response from DOMCache.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249945 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[WinCairo][curl] Define NOCRYPT to suppress libressl "Warning, overriding WinCrypt...
Hironori.Fujii@sony.com [Tue, 17 Sep 2019 07:26:17 +0000 (07:26 +0000)]
[WinCairo][curl] Define NOCRYPT to suppress libressl "Warning, overriding WinCrypt defines"
https://bugs.webkit.org/show_bug.cgi?id=201858

Reviewed by Alex Christensen.

LibreSSL headers are reporing a compilation warning for overriding
WinCrypt defines. Define NOCRYPT to let windows.h not to include
WinCrypt for WinCairo port.

* Source/cmake/OptionsWinCairo.cmake: Added -DNOCRYPT.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249944 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoMove code for traversing reversed text boxes from TextIterator to TextBoxIterator
antti@apple.com [Tue, 17 Sep 2019 06:38:22 +0000 (06:38 +0000)]
Move code for traversing reversed text boxes from TextIterator to TextBoxIterator
https://bugs.webkit.org/show_bug.cgi?id=201819

Reviewed by Zalan Bujtas.

Handle traversal order in TextBoxIterator.

* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextNode):
(WebCore::TextIterator::handleTextBox):
(WebCore::TextIterator::handleTextNodeFirstLetter):
* editing/TextIterator.h:
* rendering/line/LineLayoutInterfaceTextBoxes.cpp:
(WebCore::LineLayoutInterface::TextBox::rect const):
(WebCore::LineLayoutInterface::TextBox::logicalRect const):
(WebCore::LineLayoutInterface::TextBox::hasHyphen const):
(WebCore::LineLayoutInterface::TextBox::isLeftToRightDirection const):
(WebCore::LineLayoutInterface::TextBox::dirOverride const):
(WebCore::LineLayoutInterface::TextBox::text const):
(WebCore::LineLayoutInterface::TextBox::localStartOffset const):
(WebCore::LineLayoutInterface::TextBox::localEndOffset const):
(WebCore::LineLayoutInterface::TextBox::length const):
(WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
(WebCore::LineLayoutInterface::TextBoxIterator::traverseNextInVisualOrder):
(WebCore::LineLayoutInterface::TextBoxIterator::traverseNextInTextOrder):
(WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
(WebCore::LineLayoutInterface::TextBoxIterator::atEnd const):
(WebCore::LineLayoutInterface::Provider::firstTextBoxInVisualOrderFor):
(WebCore::LineLayoutInterface::Provider::firstTextBoxInTextOrderFor):
(WebCore::LineLayoutInterface::Provider::textBoxRangeFor):
* rendering/line/LineLayoutInterfaceTextBoxes.h:
(WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
(WebCore::LineLayoutInterface::TextBoxIterator::operator++):
(WebCore::LineLayoutInterface::Provider::firstTextBoxFor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249943 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoUnreviewed, rolling out r249910.
ryanhaddad@apple.com [Tue, 17 Sep 2019 06:24:28 +0000 (06:24 +0000)]
Unreviewed, rolling out r249910.

Caused layout test failures and timeouts on Catalina

Reverted changeset:

"REGRESSION(249649): Unable to open local files in MiniBrowser
on macOS"
https://bugs.webkit.org/show_bug.cgi?id=201798
https://trac.webkit.org/changeset/249910

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249942 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoRemove "gopher" from list of special schemes in URLParser
commit-queue@webkit.org [Tue, 17 Sep 2019 05:39:18 +0000 (05:39 +0000)]
Remove "gopher" from list of special schemes in URLParser
https://bugs.webkit.org/show_bug.cgi?id=201852

Patch by Alex Christensen <achristensen@webkit.org> on 2019-09-16
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-origin-expected.txt:
* web-platform-tests/url/a-element-origin-xhtml-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/url-constructor-expected.txt:
* web-platform-tests/url/url-origin-expected.txt:
* web-platform-tests/url/url-setters-expected.txt:

Source/WTF:

There is little meaningful content on gopher servers, and WebKit does not actually support gopher.
This makes WebKit match the behavior of Gecko and goes along with a change proposed at
https://github.com/whatwg/url/issues/342

* wtf/URLParser.cpp:
(WTF::URLParser::defaultPortForProtocol):
(WTF::scheme):
(WTF::URLParser::copyURLPartsUntil):
(WTF::URLParser::parse):

Tools:

* TestWebKitAPI/Tests/WTF/URLParser.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

LayoutTests:

* fast/url/invalid-urls-utf8-expected.txt:
* fast/url/invalid-urls-utf8.html:
* fast/url/segments-expected.txt:
* fast/url/segments.html:
* fast/url/standard-url-expected.txt:
* fast/url/standard-url.html:
* fetch/fetch-urls.json:
* http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249941 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[WinCairo][curl] Don't compile unused CertificateCFWin.cpp
Hironori.Fujii@sony.com [Tue, 17 Sep 2019 05:28:46 +0000 (05:28 +0000)]
[WinCairo][curl] Don't compile unused CertificateCFWin.cpp
https://bugs.webkit.org/show_bug.cgi?id=201860

Reviewed by Alex Christensen.

Source/WebCore:

Curl port is using ResourceHandle::setClientCertificateInfo
instead of ResourceHandle::setClientCertificate.

* PlatformWin.cmake: Added CertificateCFWin.cpp to WebCore_SOURCES only if USE_CFURLCONNECTION.
* platform/network/ResourceHandle.h: Removed an unused method setClientCertificate.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::setClientCertificate): Deleted.

Source/WebKitLegacy/win:

* WebMutableURLRequest.cpp: Include <WebCore/CertificateCFWin.h> only if USE(CFURLCONNECTION).
(WebMutableURLRequest::setClientCertificate): Don't use PCCERT_CONTEXT for curl port which is defined in WinCrypt.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249940 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoDrop sessionID / websiteDataStoreID from WebPageCreationParameters
cdumez@apple.com [Tue, 17 Sep 2019 03:48:49 +0000 (03:48 +0000)]
Drop sessionID / websiteDataStoreID from WebPageCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=201847

Reviewed by Youenn Fablet.

Drop sessionID / websiteDataStoreID from WebPageCreationParameters now that we have
one session per WebProcess.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
(WebKit::WebPageCreationParameters::WebPageCreationParameters): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAutoSizingAdjustmentTimer):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::createWebPage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249939 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[AppleWin] Assertion failure in defaultSupportedImageTypes in UTIRegistry.cpp
Hironori.Fujii@sony.com [Tue, 17 Sep 2019 03:05:13 +0000 (03:05 +0000)]
[AppleWin] Assertion failure in defaultSupportedImageTypes in UTIRegistry.cpp
https://bugs.webkit.org/show_bug.cgi?id=198286

Reviewed by Brent Fulgham.

Some image types aren't supported by CG for Windows.

No new tests, covered by existing tests.

* platform/graphics/cg/ImageSourceCGWin.cpp:
(WebCore::MIMETypeForImageType): Return the correct MIME types for
com.microsoft.cur and com.microsoft.ico.
* platform/graphics/cg/UTIRegistry.cpp:
(WebCore::defaultSupportedImageTypes): Excluded public.jpeg-2000 and public.mpo-image if PLATFORM(WIN).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249938 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[Cairo] Image::drawTiled → Cairo::drawSurface → cairo_paint_with_alpha → segfault...
Hironori.Fujii@sony.com [Tue, 17 Sep 2019 02:56:54 +0000 (02:56 +0000)]
[Cairo] Image::drawTiled → Cairo::drawSurface → cairo_paint_with_alpha → segfault happens in pixman
https://bugs.webkit.org/show_bug.cgi?id=201755

Reviewed by Don Olmstead.

Segmentation faults happened in pixman while painting a image. In
Cairo::drawSurface, originalSrcRect can be slightly larger than
the surface size because of floating number calculations.
Cairo::drawSurface created a subsurface which is running over the
parent surface boundaries.

* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::drawSurface): Calculated a intersection with
expandedSrcRect and the parent surface size for subsurface size.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoProvide a prototype for AR QuickLook to trigger processing in the originating page
dino@apple.com [Tue, 17 Sep 2019 02:29:31 +0000 (02:29 +0000)]
Provide a prototype for AR QuickLook to trigger processing in the originating page
https://bugs.webkit.org/show_bug.cgi?id=201371

Hopefully fix the public iOS 13 build.

Source/WebCore/PAL:

* pal/spi/ios/SystemPreviewSPI.h:

Source/WebKit:

* UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249936 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months agoWasm StreamingParser should validate that number of functions matches number of decla...
tzagallo@apple.com [Tue, 17 Sep 2019 01:40:49 +0000 (01:40 +0000)]
Wasm StreamingParser should validate that number of functions matches number of declarations
https://bugs.webkit.org/show_bug.cgi?id=201850
<rdar://problem/55290186>

Reviewed by Yusuke Suzuki.

JSTests:

* wasm/regress/validate-number-of-functions-match-declarations.js: Added.
(catch):

Source/JavaScriptCore:

Currently, when parsing the code section, we check that the number of functions matches the number
of declarations in the function section. However, that check is never performed if the module does
not have a code section. To fix that, we perform the check again in StreamingParser::finalize.

* wasm/WasmStreamingParser.cpp:
(JSC::Wasm::StreamingParser::finalize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249935 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 months ago[WebAuthn] Name instance variables consistently in WKMockNFTag
ddkilzer@apple.com [Tue, 17 Sep 2019 01:25:59 +0000 (01:25 +0000)]
[WebAuthn] Name instance variables consistently in WKMockNFTag
<https://webkit.org/b/201845>

Reviewed by Jiewen Tan.

* UIProcess/WebAuthentication/Mock/MockNfcService.mm:
Make all @synthesize instance variables use a leading underscore
for their name.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249934 268f45cc-cd09-0410-ab3c-d52691b4dbfc