WebKit-https.git
6 months ago[webkit-patch] Use commit.webkit.org instead of remote SVN to compute identifier
jbedard@apple.com [Fri, 26 Mar 2021 23:10:12 +0000 (23:10 +0000)]
[webkit-patch] Use commit.webkit.org instead of remote SVN to compute identifier
https://bugs.webkit.org/show_bug.cgi?id=223820
<rdar://problem/75902125>

Reviewed by Dewei Zhu.

* Scripts/webkitpy/tool/commands/download_unittest.py:
(DownloadCommandsTest.mock_svn_remote): Replace mock Svn with mock requests.
* Scripts/webkitpy/tool/commands/upload_unittest.py:
* Scripts/webkitpy/tool/comments.py:
(bug_comment_from_svn_revision): Use commits.webkit.org instead of svn.webkit.org.
* Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py:
(CloseBugForLandDiffTest.test_empty_state): Replace mock Svn with mock requests.

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

6 months agoSource/WebCore/editing/cocoa/HTMLConverter.mm:1278:44: runtime error: member call...
cdumez@apple.com [Fri, 26 Mar 2021 22:41:39 +0000 (22:41 +0000)]
Source/WebCore/editing/cocoa/HTMLConverter.mm:1278:44: runtime error: member call on null pointer of type 'WebCore::ArchiveResource'
https://bugs.webkit.org/show_bug.cgi?id=223696

Reviewed by Alex Christensen.

Fix bug found by UBSan.

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_addAttachmentForElement):
- Drop duplicate call to dataSource->subresource(url) as it doesn't seem it can return something else
  than null if it returned null the first time around.
- Make sure resource is null-checked before we dereference it to get the MIME type.

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

6 months agoRefactor NetworkSessionCocoa to prepare for per-WebPageProxy sessions
beidson@apple.com [Fri, 26 Mar 2021 22:05:35 +0000 (22:05 +0000)]
Refactor NetworkSessionCocoa to prepare for per-WebPageProxy sessions
https://bugs.webkit.org/show_bug.cgi?id=223776

Reviewed by Alex Christensen.

No new tests (No behavior change refactor)

A NetworkSessionCocoa has (n) NSURLSessions associated with it.

When a network load needs to happen - based on the context for that load - the appropriate
NSURLSession is chosen (or created).

In a future patch, there will be an additional bit of context used for choosing the appropriate
NSURLSession - The WKWebView the load was triggered from.

This patch takes those (n) NSURLSessions and wraps them in a SessionSet object.
It also adds the concept of looking up the appropriate SessionSet based on the WebPageProxyIdentifier
triggering the load.

This patch by itself should not be a behavior change, but allows the followup to be much simpler.

* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::resume):

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::createSocketChannel):
(WebKit::NetworkConnectionToWebProcess::establishSWContextConnection):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:

* NetworkProcess/NetworkDataTask.cpp:
(WebKit::NetworkDataTask::create):

* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::createWebSocketTask):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::removeWebSocketTask):
(WebKit::NetworkSession::addWebSocketTask):

* NetworkProcess/NetworkSocketChannel.cpp:
(WebKit::NetworkSocketChannel::create):
(WebKit::NetworkSocketChannel::NetworkSocketChannel):
(WebKit::NetworkSocketChannel::~NetworkSocketChannel):
* NetworkProcess/NetworkSocketChannel.h:

* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::hstsStorage const):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::NetworkSessionCocoa::initializeStandardSessionsInSet):
(WebKit::NetworkSessionCocoa::sessionSetForPage):
(WebKit::NetworkSessionCocoa::sessionSetForPage const):
(WebKit::NetworkSessionCocoa::initializeEphemeralStatelessSessionIfNeeded):
(WebKit::NetworkSessionCocoa::SessionSet::initializeEphemeralStatelessSessionIfNeeded):
(WebKit::NetworkSessionCocoa::sessionWrapperForTask):
(WebKit::NetworkSessionCocoa::appBoundSession):
(WebKit::NetworkSessionCocoa::hasAppBoundSession const):
(WebKit::NetworkSessionCocoa::clearAppBoundSession):
(WebKit::NetworkSessionCocoa::isolatedSession):
(WebKit::NetworkSessionCocoa::SessionSet::isolatedSession):
(WebKit::NetworkSessionCocoa::hasIsolatedSession const):
(WebKit::NetworkSessionCocoa::clearIsolatedSessions):
(WebKit::NetworkSessionCocoa::invalidateAndCancelSessionSet):
(WebKit::NetworkSessionCocoa::invalidateAndCancel):
(WebKit::NetworkSessionCocoa::createWebSocketTask):
(WebKit::NetworkSessionCocoa::addWebSocketTask):
(WebKit::NetworkSessionCocoa::removeWebSocketTask):
(WebKit::NetworkSessionCocoa::hostNamesWithAlternativeServices const):
(WebKit::NetworkSessionCocoa::deleteAlternativeServicesForHostNames):
(WebKit::NetworkSessionCocoa::clearAlternativeServices):
(WebKit::NetworkSessionCocoa::initializeEphemeralStatelessSession): Deleted.

* NetworkProcess/soup/NetworkSessionSoup.cpp:
(WebKit::NetworkSessionSoup::createWebSocketTask):
* NetworkProcess/soup/NetworkSessionSoup.h:

* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):

* WebProcess/Network/WebSocketChannel.cpp:
(WebKit::WebSocketChannel::create):
(WebKit::WebSocketChannel::WebSocketChannel):
(WebKit::WebSocketChannel::connect):
* WebProcess/Network/WebSocketChannel.h:

* WebProcess/Network/WebSocketProvider.cpp:
(WebKit::WebSocketProvider::createWebSocketChannel):
* WebProcess/Network/WebSocketProvider.h:

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::establishConnection):
(WebKit::WebSWContextManagerConnection::installServiceWorker):

* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_lastNavigationWasAppBound):

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

6 months ago[JSC] Use AppleICU SPI for canonicalization
ysuzuki@apple.com [Fri, 26 Mar 2021 22:00:33 +0000 (22:00 +0000)]
[JSC] Use AppleICU SPI for canonicalization
https://bugs.webkit.org/show_bug.cgi?id=223552

Reviewed by Ryosuke Niwa.

JSTests:

* stress/intl-canonical-locale-alias-mapping.js: Added.
(shouldBe):
(Intl.getCanonicalLocales):

Source/JavaScriptCore:

uloc_canonicalize does not perform alias mapping. This is different from ECMA402's canonicalization requirement.
ICU C++ icu::Locale can canonicalize locale ID with alias mapping, but this is not exposed to C API.

In this patch, we adopt AppleICU SPI "ualoc_canonicalForm" added in rdar://74314220. This canonicalization can perform
alias mapping too. We do not extend uloc_canonicalize since this API explicitly says "It does NOT map aliased names in any way."[1].
In [2], we are tracking upstreaming of this new SPI. Once it is upstreamed to the mainline ICU, we will switch to that.

[1]: https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/uloc_8h.html#a69b148194cf57ac40d4bb15c5b905260
[2]: https://unicode-org.atlassian.net/browse/ICU-21506

* runtime/IntlLocale.cpp:
(JSC::LocaleIDBuilder::initialize):
(JSC::LocaleIDBuilder::toCanonical):
* runtime/IntlObject.cpp:
(JSC::localeIDBufferForLanguageTagWithNullTerminator):
(JSC::canonicalizeLanguageTag):
(JSC::canonicalizeLocaleIDWithoutNullTerminator):
(JSC::localeIDBufferForLanguageTag): Deleted.
* runtime/IntlObject.h:

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

6 months agoAllow some image overlay content to render in fully transparent image elements
wenson_hsieh@apple.com [Fri, 26 Mar 2021 21:23:17 +0000 (21:23 +0000)]
Allow some image overlay content to render in fully transparent image elements
https://bugs.webkit.org/show_bug.cgi?id=223781
<rdar://problem/75886351>

Reviewed by Tim Horton.

Source/WebCore:

Introduce `ImageOverlayController`, and use it to render selections in image overlay content when the image
overlay's host element is fully transparent.

Test: fast/images/image-extraction/mac/select-word-in-transparent-image-overlay.html

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::willBeRemovedFromFrame):

Add plumbing to allow `ImageOverlayController` to uninstall its `PageOverlay` when the document is about to be
detached. See `ImageOverlayController::` below.

* editing/SelectionRectGatherer.cpp:
(WebCore::SelectionRectGatherer::Notifier::~Notifier):

Have `SelectionRectGatherer` notify the image overlay controller as well, when selection rects change.

* page/ChromeClient.h:
(WebCore::ChromeClient::needsImageOverlayControllerForSelectionPainting const):

Add a new client hook that returns whether or not we should use `ImageOverlayController` to paint selections.
If not (i.e. we're on iOS, where we use UIKit to draw selections in the UI process), then we'll never install
page overlays, since `selectionRectsDidChange` is effectively a no-op.

* page/ImageOverlayController.cpp: Added.
(WebCore::ImageOverlayController::ImageOverlayController):
(WebCore::ImageOverlayController::selectionRectsDidChange):

When selection rects change, if the selection is inside an image overlay whose host is completely transparent
(or very close to being completely transparent), then remember the selection rects along with the renderer's
background color, and use this to render selection highlights separately, in a `PageOverlay`.

(WebCore::ImageOverlayController::documentDetached):

If the `Document` containing the current rendered overlay selection is detached, immediately uninstall the
current `PageOverlay`. This ensures that the overlays don't persist through navigation.

(WebCore::ImageOverlayController::installPageOverlayIfNeeded):
(WebCore::ImageOverlayController::uninstallPageOverlayIfNeeded):

Helper methods to add or remove the `PageOverlay` from the current `Page`.

(WebCore::ImageOverlayController::willMoveToPage):

Uninstall the current page overlay if needed.

(WebCore::ImageOverlayController::drawRect):

Use the information stored in `ImageOverlayController::selectionRectsDidChange` to render custom selection
rects.

* page/ImageOverlayController.h: Added.
* page/Page.cpp:
* page/Page.h:

Add an `ImageOverlayController` to the `Page`.

(WebCore::Page::imageOverlayController):

Source/WebKit:

Implement a new chrome client hook. See WebCore ChangeLog for more information.

* WebProcess/WebCoreSupport/WebChromeClient.h:

LayoutTests:

Adjust an existing layout test so that it actually checks what it was intended to check; add a new layout test
to cover the changes in this bug.

* fast/images/image-extraction/mac/select-word-in-draggable-image-overlay.html:

Drive-by fix: remove some extraneous imported scripts from this layout test, and additionally simplify the test
so that it doesn't rely on event sender to select text.

* fast/images/image-extraction/mac/select-word-in-transparent-image-overlay-expected-mismatch.html: Added.
* fast/images/image-extraction/mac/select-word-in-transparent-image-overlay.html: Added.

Add a new layout test with a fully transparent image element that covers a div of the same size, with a
background image that is identical to the image element's image. This emulates the behavior of certain websites
that prompted this fallback image overlay rendering codepath in the first place.

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

6 months ago[CMake] Deprecate using DERIVED_SOURCES_DIR/FOWARDING_HEADERS_DIR directly
don.olmstead@sony.com [Fri, 26 Mar 2021 20:37:09 +0000 (20:37 +0000)]
[CMake] Deprecate using DERIVED_SOURCES_DIR/FOWARDING_HEADERS_DIR directly
https://bugs.webkit.org/show_bug.cgi?id=223763

Reviewed by Michael Catanzaro.

.:

Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR. There are still some
uses in GTK/WPE but those should be phased out.

Sets the directory structure to look like an Apple build in terms of where headers and
derived sources are held. Rather than having one root derived sources and one root
header directory those directories are now per project. This helps catch any errors with
header includes.

Deletes some old Mac CMake code that is no longer relevant around creating forwarding
headers.

For AppleWin the old structure is used because of its internal build which assumes the
old structure.

* Source/cmake/OptionsAppleWin.cmake:
* Source/cmake/OptionsFTW.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsPlayStation.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWinCairo.cmake:
* Source/cmake/WebKitCommon.cmake:
* Source/cmake/WebKitFS.cmake:
* Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR.

* CMakeLists.txt:
* PlatformMac.cmake:

Source/WebCore:

Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR.

* PlatformFTW.cmake:
* PlatformWin.cmake:

Source/WebKit:

Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR.

* PlatformGTK.cmake:
* PlatformMac.cmake: Remove creation of forwarding headers.

Source/WebKitLegacy:

Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR.

* PlatformMac.cmake:

Tools:

Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR.

* DumpRenderTree/PlatformMac.cmake:
* MiniBrowser/gtk/CMakeLists.txt:
* MiniBrowser/mac/CMakeLists.txt:
* WebKitTestRunner/PlatformMac.cmake:
* wpe/backends/CMakeLists.txt:

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

6 months ago[MiniBrowser] Remove redundant "Disable Simple Line Layout" menu item
zalan@apple.com [Fri, 26 Mar 2021 20:07:12 +0000 (20:07 +0000)]
[MiniBrowser] Remove redundant "Disable Simple Line Layout" menu item
https://bugs.webkit.org/show_bug.cgi?id=223812

Reviewed by Simon Fraser.

SLL was replaced by IFC integration a while ago.

* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController initWithMenu:]):
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleSimpleLineLayoutEnabled:]): Deleted.
(-[SettingsController simpleLineLayoutEnabled]): Deleted.
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController didChangeSettings]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController didChangeSettings]):

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

6 months ago[JSC] Use new Apple ICU APIs to avoid C++ ICU API usage
ysuzuki@apple.com [Fri, 26 Mar 2021 20:05:48 +0000 (20:05 +0000)]
[JSC] Use new Apple ICU APIs to avoid C++ ICU API usage
https://bugs.webkit.org/show_bug.cgi?id=223783
<rdar://problem/75060240>

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch adopts ICU 69's draft APIs to avoid using ICU C++ APIs in newer macOS build.
AppleICU adopts these draft APIs so that we can use it even in ICU 68 if ICU is AppleICU.
The API is ucal_getTimeZoneOffsetFromLocal, which is back-ported from ICU 69[1].
The purpose of this API is that calculating timezone offset and dst offset from *local* time.

[1]: https://github.com/unicode-org/icu/commit/53aa0505c5f95a8cebbd7b4421d474fd2a790b80

* runtime/IntlDateTimeFormat.cpp:
* runtime/JSDateMath.cpp:
(JSC::OpaqueICUTimeZoneDeleter::operator()):
(JSC::DateCache::calculateLocalTimeOffset):
(JSC::DateCache::defaultTimeZone):
(JSC::DateCache::timeZoneCacheSlow):
* runtime/JSDateMath.h:

Source/WTF:

* wtf/DateMath.h:
(WTF::LocalTimeOffset::LocalTimeOffset):

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

6 months agoEnforce notifyd message filtering
pvollan@apple.com [Fri, 26 Mar 2021 19:26:35 +0000 (19:26 +0000)]
Enforce notifyd message filtering
https://bugs.webkit.org/show_bug.cgi?id=223601
<rdar://75098580>

Reviewed by Brent Fulgham.

Source/WebCore/PAL:

Add Notify SPI file.

* PAL.xcodeproj/project.pbxproj:
* pal/spi/cocoa/NotifySPI.h: Added.

Source/WebKit:

Enable Notify filtering by setting Notify options before entering sandbox.

* Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::compileAndApplySandboxSlowCase):

Source/WTF:

Add ENABLE define for Notify filtering.

* wtf/PlatformEnableCocoa.h:

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

6 months agoUnreviewed, reverting r274938.
commit-queue@webkit.org [Fri, 26 Mar 2021 19:16:41 +0000 (19:16 +0000)]
Unreviewed, reverting r274938.
https://bugs.webkit.org/show_bug.cgi?id=223811

Introduced perf regression

Reverted changeset:

"Add IOKit method filter telemetry"
https://bugs.webkit.org/show_bug.cgi?id=223652
https://trac.webkit.org/changeset/274938

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

6 months agoImplement PCM SQLite changes based on spec review
katherine_cheney@apple.com [Fri, 26 Mar 2021 19:14:01 +0000 (19:14 +0000)]
Implement PCM SQLite changes based on spec review
https://bugs.webkit.org/show_bug.cgi?id=223726
<rdar://problem/75818526>

Reviewed by Brent Fulgham.

Source/WebKit:

This patch makes 2 significant changes in the SQLite database for
PCM. First, it renames attributeOnSiteDomainID to destinationSiteDomainID
based on spec review. Second, it adds support for sending reports to
both click source and destination sites. This involved adding an
additional column to the AttributedPrivateClickMeasurement table to
store the earliest time to send a report to the destination, renaming
the earliestTimeToSend column to specify source, and removing the NOT NULL
constraint on earliestTimeToSend in order to mark in the database when
a report has been send to the source site.

Since we need to remove a NOT NULL constraint and update foreign keys
and unique constraints, this requires a full migration of data from
the PCM tables.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
earliestTimeToSendToDestination should be null for now until we
implement the rest of the PCM work in
https://bugs.webkit.org/show_bug.cgi?id=223615.

Remove semi-colons from create table queries. They don't matter in
this context and if we remove them we can use the create table
queries to check for a correct schema.

(WebKit::attributedPrivateClickMeasurementSchemaV1):
(WebKit::attributedPrivateClickMeasurementSchemaV1Alternate):
Capture the table info from AttributedPrivateClickMeasurement to check
if we need an update.

(WebKit::expectedUnattributedColumns):
(WebKit::expectedAttributedColumns):
Instead of storing outdated columns, we should store expected columns
and add any missing ones in addMissingColumnsToTable.

(WebKit::ResourceLoadStatisticsDatabaseStore::tableSchema):
(WebKit::ResourceLoadStatisticsDatabaseStore::needsUpdatedPrivateClickMeasurementSchema):
(WebKit::ResourceLoadStatisticsDatabaseStore::missingReferenceToObservedDomains):
Separate out some duplicated code.

(WebKit::ResourceLoadStatisticsDatabaseStore::migrateDataToNewTablesIfNecessary):
(WebKit::ResourceLoadStatisticsDatabaseStore::columnsForTable):
(WebKit::ResourceLoadStatisticsDatabaseStore::addMissingColumnsToTable):
(WebKit::ResourceLoadStatisticsDatabaseStore::addMissingColumnsIfNecessary):
(WebKit::ResourceLoadStatisticsDatabaseStore::renameColumnInTable):
(WebKit::ResourceLoadStatisticsDatabaseStore::renameColumnsIfNecessary):
(WebKit::ResourceLoadStatisticsDatabaseStore::openAndUpdateSchemaIfNecessary):
Simplify the way we update the schema by first adding columns, then
renaming, then migrating. This way we don't need to worry about a
mismatch in number of columns or column name when transferring data.

(WebKit::ResourceLoadStatisticsDatabaseStore::clearSentAttribution):
(WebKit::ResourceLoadStatisticsDatabaseStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WebKit::unattributedPrivateClickMeasurementSchemaV1): Deleted.
(WebKit::unattributedPrivateClickMeasurementSchemaV1Alternate): Deleted.
(WebKit::outdatedUnattributedColumns): Deleted.
(WebKit::outdatedAttributedColumns): Deleted.
(WebKit::columnsToCopy): Deleted.
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::statisticsDatabaseColumnsForTable):
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::statisticsDatabaseColumnsForTable):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _statisticsDatabaseColumnsForTable:completionHandler:]):
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::statisticsDatabaseColumnsForTable):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::statisticsDatabaseColumnsForTable):
* UIProcess/WebsiteData/WebsiteDataStore.h:
New function for testing.

Tools:

Add API test coverage to check that renaming and adding columns works.
Data migration was tested manually.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: Added.
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db: Added.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db-shm: Added.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db-wal: Added.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db: Added.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db-shm: Added.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db-wal: Added.

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

6 months agoUnreviewed, reverting r275081.
jbedard@apple.com [Fri, 26 Mar 2021 18:11:44 +0000 (18:11 +0000)]
Unreviewed, reverting r275081.

Broke Apple Internal builds

Reverted changeset:

"Avoid calling `xcodebuild -showsdks` where possible."
https://bugs.webkit.org/show_bug.cgi?id=223727
https://commits.webkit.org/r275081

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

6 months agoLayoutTests/imported/w3c:
commit-queue@webkit.org [Fri, 26 Mar 2021 17:58:32 +0000 (17:58 +0000)]
LayoutTests/imported/w3c:
Add interpolation for object-position CSS property
https://bugs.webkit.org/show_bug.cgi?id=223568

Patch by Tim Nguyen <ntim.bugs@gmail.com> on 2021-03-26
Reviewed by Antoine Quint.

* web-platform-tests/css/css-images/object-position-interpolation.html: Added.

Source/WebCore:
Make the object-position CSS property animatable.
https://bugs.webkit.org/show_bug.cgi?id=223568

Patch by Tim Nguyen <ntim@apple.com> on 2021-03-26
Reviewed by Antoine Quint.

Test: imported/w3c/web-platform-tests/css/css-images/object-position-interpolation.html

* animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::canInterpolateLengthPoints):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

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

6 months agoAllow logging minimal info about uploading media files in the system diagnose
said@apple.com [Fri, 26 Mar 2021 17:08:07 +0000 (17:08 +0000)]
Allow logging minimal info about uploading media files in the system diagnose
https://bugs.webkit.org/show_bug.cgi?id=223706

Reviewed by Alex Christensen.

Source/WebCore:

Give the WebKit client the ability to log info about the media files which
were submitted to a web server through an HTMLFormElement.

* Headers.cmake:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::submit):
* loader/EmptyClients.cpp:
* page/DiagnosticLoggingClient.h:
* page/DiagnosticLoggingDomain.h: Copied from Source/WebKit/UIProcess/API/APIDiagnosticLoggingClient.h.

Source/WebKit:

Add the new method logDiagnosticMessageWithDomain to the modern ObjC API
WKDiagnosticLoggingDelegate and make it accessible from DiagnosticLoggingClient.

* Scripts/webkit/messages.py:
(types_that_cannot_be_forward_declared):
* UIProcess/API/APIDiagnosticLoggingClient.h:
(API::DiagnosticLoggingClient::logDiagnosticMessageWithDomain):
* UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
* UIProcess/Cocoa/DiagnosticLoggingClient.h:
* UIProcess/Cocoa/DiagnosticLoggingClient.mm:
(WebKit::DiagnosticLoggingClient::setDelegate):
(WebKit::toWKDiagnosticLoggingDomain):
(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithDomain):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::logDiagnosticMessageWithDomain):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithDomain):
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:

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

6 months agoImplement cachedPropertyValue for WebXR [SameObject] attributes
ifernandez@igalia.com [Fri, 26 Mar 2021 16:41:27 +0000 (16:41 +0000)]
Implement cachedPropertyValue for WebXR [SameObject] attributes
https://bugs.webkit.org/show_bug.cgi?id=223635

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update WebXR [SameObject] related test expectations.

* web-platform-tests/webxr/xrRigidTransform_sameObject.https-expected.txt: Added.
* web-platform-tests/webxr/xrSession_sameObject.https-expected.txt: Added.
* web-platform-tests/webxr/xrView_sameObject.https-expected.txt: Added.
* web-platform-tests/webxr/xrViewerPose_views_sameObject.https-expected.txt: Added.

Source/WebCore:

[SameObject] is not currently implemented in WebKit. We need to implement custom getters.

Tested by WebXR WPT.

* Modules/webxr/WebXRRigidTransform.h:
(WebCore::WebXRRigidTransform::cachedMatrix):
* Modules/webxr/WebXRRigidTransform.idl:
* Modules/webxr/WebXRView.h:
(WebCore::WebXRView::cachedProjectionMatrix):
* Modules/webxr/WebXRView.idl:
* Modules/webxr/WebXRViewerPose.h:
(WebCore::WebXRViewerPose::cachedViews):
* Modules/webxr/WebXRViewerPose.idl:
* Sources.txt:
* bindings/js/JSWebXRRigidTransformCustom.cpp: Added.
(WebCore::JSWebXRRigidTransform::matrix const):
* bindings/js/JSWebXRViewCustom.cpp: Added.
(WebCore::JSWebXRView::projectionMatrix const):
* bindings/js/JSWebXRViewerPoseCustom.cpp: Added.
(WebCore::JSWebXRViewerPose::views const):

LayoutTests:

Update WebXR [SameObject] related test expectations.

* platform/wpe/TestExpectations:

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

6 months ago[Cocoa] Enable the UseGPUProcessForMedia preference by default
jer.noble@apple.com [Fri, 26 Mar 2021 16:28:13 +0000 (16:28 +0000)]
[Cocoa] Enable the UseGPUProcessForMedia preference by default
https://bugs.webkit.org/show_bug.cgi?id=223771

Reviewed by Eric Carlson.

* FeatureFlags/WebKit-ios.plist:
* FeatureFlags/WebKit-macos.plist:
* FeatureFlags/WebKit-appletvos.plist:
* FeatureFlags/WebKit-watchos.plist:

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

6 months agoAdopt AVKit SPI for hiding touch bar seeking controls
drousso@apple.com [Fri, 26 Mar 2021 15:58:17 +0000 (15:58 +0000)]
Adopt AVKit SPI for hiding touch bar seeking controls
https://bugs.webkit.org/show_bug.cgi?id=223773
<rdar://problem/68937617>

Reviewed by Jer Noble.

Source/WebCore:

* platform/mac/WebPlaybackControlsManager.h:
* platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager setSeekableTimeRanges:]):
(-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):
If the list of seekable time ranges is empty, we are unable to seek.

Source/WebCore/PAL:

* pal/spi/cocoa/AVKitSPI.h:

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

6 months agoUnreviewed.
calvaris@igalia.com [Fri, 26 Mar 2021 15:50:16 +0000 (15:50 +0000)]
Unreviewed.

* platform/glib/TestExpectations: Unflag
media/encrypted-media/clearKey/clearKey-webm-video-playback-mse.html
and
media/encrypted-media/clearKey/clearKey-session-life-cycle.html

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

6 months agoUnreviewed.
calvaris@igalia.com [Fri, 26 Mar 2021 15:47:28 +0000 (15:47 +0000)]
Unreviewed.

* platform/gtk/TestExpectations: Unflag
http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html.

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

6 months agoGraphicsContextGLOpenGL should avoid calling into ANGLE MakeCurrent
commit-queue@webkit.org [Fri, 26 Mar 2021 15:34:49 +0000 (15:34 +0000)]
GraphicsContextGLOpenGL should avoid calling into ANGLE MakeCurrent
https://bugs.webkit.org/show_bug.cgi?id=223511

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-03-26
Reviewed by Kenneth Russell.

Avoid calling ANGLE MakeCurrent for contexts that are already current. Cache the current context pointer into a
global variable. Currently the code adds no locking. For the forseeable future, ANGLE does not support
simultaneous access from multiple threads.

The optimization can be done when run in WebContent process or in GPU process, but not when in WK1. This is because in WK1,
the 3rd party client may run arbitrary code in WebKit thread. This includes code that changes EAGL or AGL state.
This code might change the current context underneath WebKit. In WK1 mode, we already use "volatile context" feature of
ANGLE to reset the platform context on every EGL command. The command we use for this for normal GL commands is EGL_MakeCurrent.
Makes in-process WebGL faster in MotionMark triangles by 6300 -> 9800 pts
Makes GPU process WebGL faster in MotionMark triangles by 5300 -> 7000 pts

* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
(WebCore::isCurrentContextPredictable):
(WebCore::InitializeEGLDisplay):
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::makeContextCurrent):
(WebCore::GraphicsContextGLOpenGL::clearCurrentContext):
(WebCore::GraphicsContextGLOpenGL::releaseCurrentContext):
(WebCore::GraphicsContextGLOpenGL::checkGPUStatus):
* platform/graphics/opengl/GraphicsContextGLOpenGL.h:

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

6 months agoUnreviewed.
calvaris@igalia.com [Fri, 26 Mar 2021 15:34:24 +0000 (15:34 +0000)]
Unreviewed.

* platform/gtk/TestExpectations: Unflagging
media/track/track-remove-active-cue-crash.html.

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

6 months agoUnreviewed.
calvaris@igalia.com [Fri, 26 Mar 2021 15:29:53 +0000 (15:29 +0000)]
Unreviewed.

* platform/gtk/TestExpectations: Unflag
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-audio-video-in-main-frame.html

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

6 months agoUnreviewed.
calvaris@igalia.com [Fri, 26 Mar 2021 15:18:10 +0000 (15:18 +0000)]
Unreviewed.

* platform/gtk/TestExpectations: Unflagging
mediasource-endofstream-invaliderror.html.

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

6 months agoUse webrtc GPU Process feature flag for video capture on MacOS
youenn@apple.com [Fri, 26 Mar 2021 11:18:06 +0000 (11:18 +0000)]
Use webrtc GPU Process feature flag for video capture on MacOS
https://bugs.webkit.org/show_bug.cgi?id=223683

Reviewed by Eric Carlson.

Manually tested.

* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultCaptureVideoInGPUProcessEnabled):

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

6 months agoFix interpolation of the caret-color CSS property
graouts@webkit.org [Fri, 26 Mar 2021 11:16:59 +0000 (11:16 +0000)]
Fix interpolation of the caret-color CSS property
https://bugs.webkit.org/show_bug.cgi?id=223181
<rdar://problem/75687413>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add 64 PASS results for the caret-color interpolation test which now is passing completely.
The test css/css-ui/caret-color-021.html also progresses.

* web-platform-tests/css/css-ui/animation/caret-color-interpolation-expected.txt:
* web-platform-tests/css/css-ui/caret-color-021-expected.txt:

Source/WebCore:

Add support for the "auto" value for the "caret-color" CSS property. That value
is its initial value. We support it with a new boolean flag on StyleRareInheritedData
which we reset to false when setCaretColor() or setVisitedLinkCaretColor() is called.

Then, we can blend this property with the new CaretColorPropertyWrapper wrapper which is
required to correctly get and set the "auto" bit.

* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* css/CSSProperties.json: We can remove the initial value key since this property is entirely
custom.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setCaretColor):
(WebCore::RenderStyle::setHasAutoCaretColor):
(WebCore::RenderStyle::setVisitedLinkCaretColor):
(WebCore::RenderStyle::setHasVisitedLinkAutoCaretColor):
(WebCore::RenderStyle::hasAutoCaretColor const):
(WebCore::RenderStyle::hasVisitedLinkAutoCaretColor const):
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):
* rendering/style/StyleRareInheritedData.h:
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInitialCaretColor):
(WebCore::Style::BuilderCustom::applyInheritCaretColor):
(WebCore::Style::BuilderCustom::applyValueCaretColor):

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

6 months agoFix NowPlayingInfoArtwork operator== logic.
commit-queue@webkit.org [Fri, 26 Mar 2021 11:07:44 +0000 (11:07 +0000)]
Fix NowPlayingInfoArtwork operator== logic.
https://bugs.webkit.org/show_bug.cgi?id=223730
<rdar://problem/75822687>

Patch by Jean-Yves Avenard <jya@apple.com> on 2021-03-26
Reviewed by Youenn Fablet.

Source/WebCore:

Gtest NowPlayingInfoArtworkTest added .

* platform/audio/NowPlayingInfo.h:
(WebCore::NowPlayingInfoArtwork::operator== const):
(WebCore::NowPlayingInfoArtwork::operator!= const):

Tools:

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/NowPlayingInfoTests.cpp: Added.
(TestWebKitAPI::testEmptyArtwork):
(TestWebKitAPI::TEST):

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

6 months agoEnable Metal ANGLE backend for WebGL
dino@apple.com [Fri, 26 Mar 2021 10:28:55 +0000 (10:28 +0000)]
Enable Metal ANGLE backend for WebGL
https://bugs.webkit.org/show_bug.cgi?id=220076
<rdar://problem/72565020>

Reviewed by Sam Weinig.

Source/WTF:

Turn the Metal backend for ANGLE on, moving the feature
from Internal to Experimental.

* Scripts/Preferences/WebPreferencesExperimental.yaml:
* Scripts/Preferences/WebPreferencesInternal.yaml:

LayoutTests:

Updated results for WebGL 2 content with the Metal ANGLE
backend. See https://bugs.webkit.org/show_bug.cgi?id=222239

* platform/mac/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/ios-wk2/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:
* platform/wk2/TestExpectations:

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

6 months agoRemove ASSERT in RenderListItem::computeMarkerStyle
commit-queue@webkit.org [Fri, 26 Mar 2021 10:16:48 +0000 (10:16 +0000)]
Remove ASSERT in RenderListItem::computeMarkerStyle
https://bugs.webkit.org/show_bug.cgi?id=222670

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-26
Reviewed by Ryosuke Niwa.

Source/WebCore:

Remove ASSERT in RenderListItem::computeMarkerStyle
since ::marker does not apply to all elements so
getCachedPseudoStyle can return null.

Test: fast/lists/list-item-compute-marker-style-crash.xhtml

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::computeMarkerStyle const):

LayoutTests:

* fast/lists/list-item-compute-marker-style-crash-expected.txt: Added.
* fast/lists/list-item-compute-marker-style-crash.xhtml: Added.

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

6 months agoREGRESSION(r272301): [SOUP] default port attribute when persisting credential informa...
carlosgc@webkit.org [Fri, 26 Mar 2021 09:37:51 +0000 (09:37 +0000)]
REGRESSION(r272301): [SOUP] default port attribute when persisting credential information with libsecret
https://bugs.webkit.org/show_bug.cgi?id=223782

Reviewed by Adrian Perez de Castro.

Use the default port instead of 0 when the URL omits the port.

* platform/network/soup/AuthenticationChallengeSoup.cpp:
(WebCore::protectionSpaceFromSoupAuthAndURL):

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

6 months agoUse ICUDeleter to encode ucnv_close/uenum_close call into type of deleter of std...
ysuzuki@apple.com [Fri, 26 Mar 2021 09:25:21 +0000 (09:25 +0000)]
Use ICUDeleter to encode ucnv_close/uenum_close call into type of deleter of std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=223503

Reviewed by Alex Christensen.

Use ICUDeleter<ucnv_close> instead of holding ucnv_close pointer in ICUConverterPtr.
This deleter encodes ucnv_close calls into type so that we do not need to hold a pointer
to ucnv_close.

We also use ICUDeleter<uenum_close> in place where we use UEnumeration.

* Modules/applepay/PaymentRequestValidator.mm:
(WebCore::validateCurrencyCode):
* platform/text/EncodingTables.cpp:
(WebCore::jis0208):
(WebCore::jis0212):
(WebCore::big5):
(WebCore::eucKR):
(WebCore::gb18030):
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::createICUConverter const):
* platform/text/TextCodecICU.h:

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

6 months agoUpdate the BEFORE/SINCE, SYSTEM_VERSION_PREFIX, and MACOSX_DEPLOYMENT_TARGET flags
commit-queue@webkit.org [Fri, 26 Mar 2021 07:02:15 +0000 (07:02 +0000)]
Update the BEFORE/SINCE, SYSTEM_VERSION_PREFIX, and MACOSX_DEPLOYMENT_TARGET flags
https://bugs.webkit.org/show_bug.cgi?id=223779

Patch by Jessie Berlin <jberlin@webkit.org> on 2021-03-26
Reviewed by Tim Horton.

* Configurations/DebugRelease.xcconfig:
Source/JavaScriptCore:

* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/ThirdParty/libwebrtc:

* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebCore:

* Configurations/Version.xcconfig:
* Configurations/WebCore.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebCore/PAL:

* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebInspectorUI:

* Configurations/Version.xcconfig:

Source/WebKit:

* Configurations/Version.xcconfig:
* Configurations/WebKit.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

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

6 months agoAvoid calling `xcodebuild -showsdks` where possible.
heycam@apple.com [Fri, 26 Mar 2021 06:57:35 +0000 (06:57 +0000)]
Avoid calling `xcodebuild -showsdks` where possible.
https://bugs.webkit.org/show_bug.cgi?id=223727

Reviewed by Sam Weinig.

run-minibrowser needs to know what port it's running on, since that
affects the build directory to look in to find the MiniBrowser binary.
On macOS, webkitdirs.pm's determinePortName ends up running
`xcodebuild -showsdks` to see if the current SDK has an internal
variant available, but this is slow.  But we don't need to know the
exact SDK name here, just the SDK platform name, to determine the
port name.

So we shuffle some code around to avoid calling `xcodebuild -showsdks`
where we can.  This reduces the time spent in run-minibrowser before
MiniBrowser is launched (crudely measured with `time run-minibrowser
--help`) from 2s to 0.6s on this machine.

* Scripts/webkitdirs.pm:
(readXcodeUserDefault):
(determineArchitecture):
(argumentsForConfiguration):
(availableXcodeSDKs):
(isValidXcodeSDKPlatformName):
(determineXcodeSDKPlatformName):
(determineXcodeSDK):
(xcodeSDKPlatformName):
(determinePortName):

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

6 months ago[WinCairo] Unreviewed test gardening
Hironori.Fujii@sony.com [Fri, 26 Mar 2021 06:34:08 +0000 (06:34 +0000)]
[WinCairo] Unreviewed test gardening

* platform/wincairo-wk1/TestExpectations:
* platform/wincairo/TestExpectations:

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

6 months agovalidate untagArrayPtr
sbarati@apple.com [Fri, 26 Mar 2021 05:25:40 +0000 (05:25 +0000)]
validate untagArrayPtr
https://bugs.webkit.org/show_bug.cgi?id=214953
<rdar://problem/66391434>

Reviewed by Mark Lam.

This patch adds validation to untagArrayPtr along paths where we don't
immediately store/load from the result.

This patch also changes the removeArrayPtrTag macro assembler function to
use a bitwise and instead of xpacd to strip the tag, because it's faster.

* assembler/MacroAssemblerARM64E.h:
(JSC::MacroAssemblerARM64E::untagArrayPtr):
(JSC::MacroAssemblerARM64E::removeArrayPtrTag):
* assembler/testmasm.cpp:
(JSC::testCagePreservesPACFailureBit):
* bytecode/AccessCase.cpp:
(JSC::AccessCase::generateWithGuard):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::cageTypedArrayStorage):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::untagArrayPtr):
(JSC::FTL::DFG::LowerDFGToB3::caged):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::cageWithoutUntagging):
(JSC::AssemblyHelpers::cageConditionallyAndUntag):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::cageWithoutUntagging): Deleted.
(JSC::AssemblyHelpers::cageConditionally): Deleted.
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):
* wasm/WasmAirIRGenerator.cpp:
(JSC::Wasm::AirIRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::AirIRGenerator::addCallIndirect):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
* wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToWasm):
* wasm/js/JSToWasm.cpp:
(JSC::Wasm::createJSToWasmWrapper):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

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

6 months agoAllow WKContentRuleList to block only in frames or only in main frame
achristensen@apple.com [Fri, 26 Mar 2021 05:24:51 +0000 (05:24 +0000)]
Allow WKContentRuleList to block only in frames or only in main frame
https://bugs.webkit.org/show_bug.cgi?id=219001
Source/WebCore:

<rdar://problem/71382045>

Reviewed by Ben Poulain.

This adds load-context to the trigger, which can have an array containing main-frame or iframe.
This makes the trigger only happen in such loading contexts.

* Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::validateURL):
* contentextensions/ContentExtension.cpp:
(WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded):
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::getTypeFlags):
(WebCore::ContentExtensions::loadTrigger):
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForPingLoad):
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
* loader/PingLoader.cpp:
(WebCore::PingLoader::sendPing):
(WebCore::PingLoader::sendViolationReport):
* loader/ResourceLoadInfo.cpp:
(WebCore::ContentExtensions::toResourceType):
(WebCore::ContentExtensions::readResourceType):
(WebCore::ContentExtensions::readLoadType):
(WebCore::ContentExtensions::readLoadContext):
(WebCore::ContentExtensions::ResourceLoadInfo::getResourceFlags const):
* loader/ResourceLoadInfo.h:

Source/WebKit:

Reviewed by Ben Poulain.

* UIProcess/API/APIContentRuleListStore.cpp:
(API::ContentRuleListStore::getContentRuleListSource):
* UIProcess/API/APIContentRuleListStore.h:

Tools:

Reviewed by Ben Poulain.

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):

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

6 months agoHave App Highlights be a Configuration Setting instead of an internal Preference...
megan_gardner@apple.com [Fri, 26 Mar 2021 05:09:24 +0000 (05:09 +0000)]
Have App Highlights be a Configuration Setting instead of an internal Preference setting.
https://bugs.webkit.org/show_bug.cgi?id=223720
rdar://75196085

Reviewed by Wenson Hsieh.

Source/WebKit:

* FeatureFlags/WebKit-appletvos.plist:
* FeatureFlags/WebKit-ios.plist:
* FeatureFlags/WebKit-macos.plist:
* FeatureFlags/WebKit-watchos.plist:
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultAppHighlightsEnabled): Deleted.
* Shared/WebPreferencesDefaultValues.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setupPageConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _setAppHighlightsEnabled:]):
(-[WKWebViewConfiguration _appHighlightsEnabled]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.h:

Source/WTF:

* Scripts/Preferences/WebPreferences.yaml:
* Scripts/Preferences/WebPreferencesInternal.yaml:

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

6 months agoDon't add `-webkit-user-select: none;` on image elements with `draggable=true`
wenson_hsieh@apple.com [Fri, 26 Mar 2021 03:27:16 +0000 (03:27 +0000)]
Don't add `-webkit-user-select: none;` on image elements with `draggable=true`
https://bugs.webkit.org/show_bug.cgi?id=223774
<rdar://problem/75860124>

Reviewed by Tim Horton.

Source/WebCore:

Avoid adding this presentational CSS style property for image elements marked with `draggable=true`. Since
image elements are already draggable by default and mouse drags over image elements do not trigger text
selection, it's not necessary for the user agent to add this style property. See below for more details.

Test: fast/images/image-extraction/mac/select-word-in-draggable-image-overlay.html

* html/HTMLElement.cpp:
(WebCore::HTMLElement::collectStyleForPresentationAttribute):

If the element is already draggable (barring HTML attributes), don't additionally disable text selection inside
the element when we additionally have `draggable=true` set on the element.

(WebCore::HTMLElement::draggable const):

Refactor this to consult `isDraggableIgnoringAttributes()` when determining whether to check if the `draggable`
attribute value is not `"false"` vs. equal to `"true"`. In the case where the element is already draggable, we
only return `false` here if `draggable=false` is explicitly set.

* html/HTMLElement.h:
(WebCore::HTMLElement::isDraggableIgnoringAttributes const):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::draggable const): Deleted.
* html/HTMLImageElement.h:

Override `isDraggableIgnoringAttributes` and return `true`.

LayoutTests:

* fast/images/image-extraction/mac/select-word-in-draggable-image-overlay-expected-mismatch.html: Added.
* fast/images/image-extraction/mac/select-word-in-draggable-image-overlay.html: Added.

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

6 months ago[Metal ANGLE] fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays...
dino@apple.com [Fri, 26 Mar 2021 03:20:14 +0000 (03:20 +0000)]
[Metal ANGLE] fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays.html causes GPURestarts on some machines
https://bugs.webkit.org/show_bug.cgi?id=223767

Patch by Kyle Piddington <kpiddington@apple.com> on 2021-03-25
Reviewed by Darin Adler.

Avoid GPURestarts on Intel machines by reducing test workload. The
core of this test, using default generic attributes, is still in
place.

* fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays.html:

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

6 months agoANGLE Metal crash ASAN webgl/1.0.3/conformance/misc/object-deletion-behaviour.html
dino@apple.com [Fri, 26 Mar 2021 03:13:09 +0000 (03:13 +0000)]
ANGLE Metal crash ASAN webgl/1.0.3/conformance/misc/object-deletion-behaviour.html
https://bugs.webkit.org/show_bug.cgi?id=223739

Patch by Kyle Piddington <kpiddington@apple.com> on 2021-03-25
Reviewed by Dean Jackson.

Previously, ANGLE would try to read color attachments off of the
cached render targets. However, since validation happens before
state sync, the cached render targets may be out of date.

For non-surface backed render targets, we instead get a fresh copy
of the render target when determening the native pixel format.

* src/libANGLE/renderer/metal/FrameBufferMtl.h:
* src/libANGLE/renderer/metal/FrameBufferMtl.mm:
(rx::FramebufferMtl::getImplementationColorReadFormat const):
(rx::FramebufferMtl::getColorReadRenderTargetNoCache const):

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

6 months ago[Metal ANGLE] Add CPU mipmap generation for workaround on Intel devices.
dino@apple.com [Fri, 26 Mar 2021 03:09:08 +0000 (03:09 +0000)]
[Metal ANGLE] Add CPU mipmap generation for workaround on Intel devices.
https://bugs.webkit.org/show_bug.cgi?id=223778

Patch by Kyle Piddington <kpiddington@apple.com> on 2021-03-25
Reviewed by Dean Jackson.

Mipmap generation on Intel does not reliably work for textures with
width less than four. To reliably pass webGL conformance, we need
to switch to CPU mipmap generation when generating mipmaps in this
specific circumstance.

This patch fixes the following four tests on Intel
webgl/1.0.3/conformance/limits/gl-max-texture-dimensions.html
webgl/1.0.3/conformance/textures/texture-size.html
webgl/2.0.0/conformance/limits/gl-max-texture-dimensions.html
webgl/2.0.0/conformance/textures/misc/texture-size.html

* include/platform/Feature.h:
(angle::FeatureCategoryToString):
* include/platform/FeaturesMtl.h:
* src/libANGLE/renderer/metal/DisplayMtl.mm:
(rx::DisplayMtl::initializeFeatures):
* src/libANGLE/renderer/metal/TextureMtl.mm:
(rx::TextureMtl::generateMipmap):

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

6 months agoIt should be possible to drag images with overlay content
wenson_hsieh@apple.com [Fri, 26 Mar 2021 02:27:29 +0000 (02:27 +0000)]
It should be possible to drag images with overlay content
https://bugs.webkit.org/show_bug.cgi?id=223766
<rdar://problem/75856030>

Reviewed by Tim Horton.

Source/WebCore:

Make a few minor adjustments to make drag and drop play well with images with overlay content. See below for
more details.

Test: DragAndDropTests.DragElementWithImageOverlay

* html/HTMLElement.cpp:
(WebCore::HTMLElement::isInsideImageOverlay):

Add a helper method to return whether an individual DOM node is inside an image overlay. Use this in the
existing version of this method that takes a `SimpleRange`.

* html/HTMLElement.h:
* page/DragController.cpp:
(WebCore::DragController::draggableElement const):

Skip all drag source actions except for `Selection` in the case where we're hit-testing to text inside of an
image overlay.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):

Make `isMouseDownOnLinkOrImage` `false` in the case where we're over image overlay text.

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::nodeForImageData const):
(WebCore::HitTestResult::image const):
(WebCore::HitTestResult::imageRect const):
(WebCore::HitTestResult::absoluteImageURL const):

Teach `HitTestResult` to skip out of image overlay content and find the actual image element when determining
the image URL, image, or image rect.

* rendering/HitTestResult.h:

Tools:

Add an API test to verify that the top part of the image (with an overlay) doesn't trigger a `dragstart` when
dragged, but the bottom part of the image does.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/simple-image-overlay.html: Added.

Add a test page that installs an image overlay for testing purposes (assuming that the web view injects the
global `internals` object).

* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
* TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
* TestWebKitAPI/cocoa/DragAndDropSimulator.h:
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator containsDraggedType:]):

Add a helper method to return whether or not the simulated drag resulted in the given type being written to the
"drag pasteboard" (in the case of iOS, this just means any of the source item providers).

* TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
(-[DragAndDropSimulator initWithWebViewFrame:configuration:]):

Make a minor adjustment to ensure that the drag pasteboard is cleared out before starting a simulated drag.

(-[DragAndDropSimulator containsDraggedType:]):

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

6 months ago[ BigSur Debug ] http/tests/security/webaudio-render-remote-audio-blocked-no-crossori...
jenner@apple.com [Fri, 26 Mar 2021 01:29:28 +0000 (01:29 +0000)]
[ BigSur Debug ] http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-redirect.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=223759

Unreviewed test gardening.

* platform/mac/TestExpectations: Updated test expectations to Pass Timeout while test is reviewed.

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

6 months agoRemove 10.13 DEPLOYMENT_TARGETs and SYSTEM_VERSION_PREFIXs
commit-queue@webkit.org [Fri, 26 Mar 2021 01:29:16 +0000 (01:29 +0000)]
Remove 10.13 DEPLOYMENT_TARGETs and SYSTEM_VERSION_PREFIXs
https://bugs.webkit.org/show_bug.cgi?id=223765

Patch by Jessie Berlin <jberlin@webkit.org> on 2021-03-25
Reviewed by Tim Horton.

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
Source/JavaScriptCore:

* Configurations/Version.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Version.xcconfig:

Source/ThirdParty/libwebrtc:

* Configurations/Version.xcconfig:

Source/WebCore:

* Configurations/Version.xcconfig:

Source/WebCore/PAL:

* Configurations/Version.xcconfig:

Source/WebInspectorUI:

* Configurations/Version.xcconfig:

Source/WebKit:

* Configurations/Version.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/Version.xcconfig:

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

6 months ago[ macOS ] media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscree...
jenner@apple.com [Fri, 26 Mar 2021 01:08:33 +0000 (01:08 +0000)]
[ macOS ] media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=223761

Unreviewed test gardening.

* platform/mac/TestExpectations: Updated test expectations to Pass Timeout while test is reviewed.

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

6 months ago[GPU Process] Turn GPU process rendering for 2D canvas on by default
said@apple.com [Fri, 26 Mar 2021 00:22:20 +0000 (00:22 +0000)]
[GPU Process] Turn GPU process rendering for 2D canvas on by default
https://bugs.webkit.org/show_bug.cgi?id=223772
<rdar://75799739>

Reviewed by Tim Horton.

Enable the 'gpu_process_canvas_rendering' feature flag.

* FeatureFlags/WebKit-appletvos.plist:
* FeatureFlags/WebKit-ios.plist:
* FeatureFlags/WebKit-macos.plist:
* FeatureFlags/WebKit-watchos.plist:

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

6 months agoSource/WebCore:
zalan@apple.com [Fri, 26 Mar 2021 00:09:23 +0000 (00:09 +0000)]
Source/WebCore:
[RenderTreeBuilder] Do not try to normalize the tree while destroying the multicolumn flow
https://bugs.webkit.org/show_bug.cgi?id=223722
<rdar://75731256>

Reviewed by Simon Fraser.

Test: fast/multicol/crash-while-destroying-the-column-context.html

This patch ensures that we don't start moving around parts of the fragmented flow subtree (e.g. collapsing anonymous blocks) while
trying place the spanner renderers back to their original positions as part of the "we don't need multicolumn context anymore".
(e.g spanner placeholder is removed -> triggers anon block collapsing -> moves subtrees around inside the multicolumn subtree -> insertion happens -> spanner placeholder gets re-validated)

* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::destroy):
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::detach):
* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval):
(WebCore::RenderTreeBuilder::MultiColumn::multiColumnRelativeWillBeRemoved):
* rendering/updating/RenderTreeBuilderMultiColumn.h:

LayoutTests:
[RenederTreeBuilder] Do not try to normalize the tree while destroying the multicolumn flow
https://bugs.webkit.org/show_bug.cgi?id=223722
<rdar://75731256>

Reviewed by Simon Fraser.

* fast/multicol/crash-while-destroying-the-column-context-expected.txt: Added.
* fast/multicol/crash-while-destroying-the-column-context.html: Added.

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

6 months agoAX: Consider implementing @aria-details.
andresg_22@apple.com [Thu, 25 Mar 2021 23:35:20 +0000 (23:35 +0000)]
AX: Consider implementing @aria-details.
https://bugs.webkit.org/show_bug.cgi?id=165842
rdar://30725491

Reviewed by Chris Fleizach.

Source/WebCore:

Tests: accessibility/ios-simulator/aria-details.html
       accessibility/mac/aria-details.html

- Added [WebAccessibilityObjectWrapper accessibilityDetailsElements] on iOS.
- Added helper function accessibleElementsForObjects to retrieve platform-
specific accessible elements given a collection of AXCoreObjects.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(accessibleElementsForObjects):
(-[WebAccessibilityObjectWrapper accessibilityDetailsElements]):
(-[WebAccessibilityObjectWrapper accessibilityErrorMessageElements]):

Tools:

Added AccessibilityUIElement::detailsElements.

* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::detailsElements const):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::detailsElements const):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::detailsElements const):

LayoutTests:

* accessibility/ios-simulator/aria-details-expected.txt: Added.
* accessibility/ios-simulator/aria-details.html: Added.
* accessibility/mac/aria-details-expected.txt: Added.
* accessibility/mac/aria-details.html: Added.
* platform/mac-wk1/TestExpectations:

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

6 months ago[CMake] Use WebDriver_DERIVED_SOURCES value
don.olmstead@sony.com [Thu, 25 Mar 2021 23:10:50 +0000 (23:10 +0000)]
[CMake] Use WebDriver_DERIVED_SOURCES value
https://bugs.webkit.org/show_bug.cgi?id=223760

Reviewed by Ross Kirsling.

Replace DERIVED_SOURCES_WEBDRIVER_DIR with WebDriver_DERIVED_SOURCES.

* CMakeLists.txt:

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

6 months agoUnreviewed, reverting r275057.
commit-queue@webkit.org [Thu, 25 Mar 2021 22:47:37 +0000 (22:47 +0000)]
Unreviewed, reverting r275057.
https://bugs.webkit.org/show_bug.cgi?id=223768

Caused build failure

Reverted changeset:

"Enforce notifyd message filtering"
https://bugs.webkit.org/show_bug.cgi?id=223601
https://trac.webkit.org/changeset/275057

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

6 months agoUnreviewed, reverting r275056.
tsavell@apple.com [Thu, 25 Mar 2021 21:51:30 +0000 (21:51 +0000)]
Unreviewed, reverting r275056.

This is no longer needed

Reverted changeset:

"stress/early-return-from-builtin.js.default is failing on iOS
JSC testers"
https://commits.webkit.org/r275056

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

6 months agoSome calls in AuthenticatorPresenterCoordinator::selectAssertionResponse are not...
katherine_cheney@apple.com [Thu, 25 Mar 2021 21:49:33 +0000 (21:49 +0000)]
Some calls in AuthenticatorPresenterCoordinator::selectAssertionResponse are not yet available for mac
https://bugs.webkit.org/show_bug.cgi?id=223752
<rdar://problem/75808515>

Reviewed by Jiewen Tan.

* wtf/PlatformHave.h:

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

6 months agoCollapse newly adjacent anonymous table cells when a table cell is detached from...
heycam@apple.com [Thu, 25 Mar 2021 21:45:05 +0000 (21:45 +0000)]
Collapse newly adjacent anonymous table cells when a table cell is detached from between them.
https://bugs.webkit.org/show_bug.cgi?id=220934

Reviewed by Zalan Bujtas.

Source/WebCore:

We already had support for collapsing newly adjacent table row cells when a
table row cell is detached from between them.  We need to do this for anonymous
table cells too.

Test: fast/table/table-anonymous-cell-collapse.html

* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::destroyAndCleanUpAnonymousWrappers): Call
into the RenderTreeBuilder::Table to collapse anonymous table cells when
needed.
* rendering/updating/RenderTreeBuilderTable.cpp:
(WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblings):
Factor out the existing collapseAndDestroyAnonymousSiblingRows into
something re-usable.
(WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingCells):
Added.
(WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows):
Factored out to collapseAndDestroyAnonymousSiblings.
* rendering/updating/RenderTreeBuilderTable.h:

LayoutTests:

* fast/table/table-anonymous-cell-collapse-expected.html: Added.
* fast/table/table-anonymous-cell-collapse.html: Added.

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

6 months agoEnforce notifyd message filtering
pvollan@apple.com [Thu, 25 Mar 2021 21:23:45 +0000 (21:23 +0000)]
Enforce notifyd message filtering
https://bugs.webkit.org/show_bug.cgi?id=223601
<rdar://75098580>

Reviewed by Brent Fulgham.

Source/WebCore/PAL:

Add Notify SPI file.

* PAL.xcodeproj/project.pbxproj:
* pal/spi/cocoa/NotifySPI.h: Added.

Source/WebKit:

Enable Notify filtering by setting Notify options before entering sandbox.

* Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::compileAndApplySandboxSlowCase):

Source/WTF:

Add ENABLE define for Notify filtering.

* wtf/PlatformEnableCocoa.h:

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

6 months agostress/early-return-from-builtin.js.default is failing on iOS JSC testers
tsavell@apple.com [Thu, 25 Mar 2021 20:53:45 +0000 (20:53 +0000)]
stress/early-return-from-builtin.js.default is failing on iOS JSC testers
rdar://75597901

Unreviewed test gardening.

* stress/early-return-from-builtin.js:

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

6 months agoSource/WebCore:
commit-queue@webkit.org [Thu, 25 Mar 2021 20:46:08 +0000 (20:46 +0000)]
Source/WebCore:
Fix edge cases in normalization of conic-gradient color stops
https://bugs.webkit.org/show_bug.cgi?id=221294
<rdar://problem/74157218>

Patch by Tim Nguyen <ntim@apple.com> on 2021-03-25
Reviewed by Darin Adler.

`lastOneOrLessIndex` had an off-by-one error, so it did not go through the
branch handling clamping all the stop offsets when they're all above 1.

Also made `normalizeStopsAndEndpointsOutsideRange` logic easier to follow using
`Optional<size_t>` instead of placeholder values.

Test: web-platform-tests/css/css-images/normalization-conic-2.html

* css/CSSGradientValue.cpp:
(WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange):

LayoutTests:
Enable normalization-conic-2.html WPT now that underlying bug is fixed.
Also skip some conic-gradient tests only on Windows instead of all platforms.
https://bugs.webkit.org/show_bug.cgi?id=221294
<rdar://problem/74157218>

Patch by Tim Nguyen <ntim@apple.com> on 2021-03-25
Reviewed by Darin Adler.

* TestExpectations: enabled imported/w3c/web-platform-tests/css/css-images/normalization-conic-2.html.

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

6 months ago[iOS] Date picker view jumps to center when switching between MobileSafari and anothe...
akeerthi@apple.com [Thu, 25 Mar 2021 20:22:10 +0000 (20:22 +0000)]
[iOS] Date picker view jumps to center when switching between MobileSafari and another app
https://bugs.webkit.org/show_bug.cgi?id=223662
<rdar://problem/74748727>

Reviewed by Tim Horton.

Tapping on a date input presents a UIDatePicker inside of a
UIContextMenuInteraction. The presentation of context menus is
dependent on the _positionInformation in WKContentViewInteraction being
up-to-date.

To ensure the value is up-to-date, a position information request is
made prior to presenting the date picker. However, the location used
for the request is the current FocusedElementInformation's
lastInteractionLocation. This is fine in most cases, since the date
picker is usually present immediately after tapping on the date input.
However, the date picker can be closed and presented again when
switching between MobileSafari and another app, as the input is focused
again when MobileSafari is reopened. If the switch is performed using a
gesture, the last interaction location is modified. Consequently, the
last interaction location does not always correspond to the position
of the date input, and the position information request gives us
incorrect information, leading to incorrect presentation of the picker.

To fix, add a new way of presenting context menus that is not dependent
on position information. Instead, form controls can use the information
they already have in FocusedElementInformation to present their
peripherals.

No new tests, since this bug only reproduces when swiping to switch apps.
Other touches in the web view immediately dismiss the date picker, making
the bug difficult to reproduce in a test.

* Shared/FocusedElementInformation.cpp:
(WebKit::FocusedElementInformation::encode const):
(WebKit::FocusedElementInformation::decode):
* Shared/FocusedElementInformation.h:

Added a member to inform FocusedElementInformation whether the focused
element is in a subscrollable region.

See r248447 for more details on why this information is needed when
creating a UITargetedPreview.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView overridePositionTrackingViewForTargetedPreviewIfNecessary:containerScrollingNodeID:]):

Factored out the logic that overrides the targeted preview's position
tracking view when the element is in a subscrollable region.

(-[WKContentView _createTargetedContextMenuHintPreviewForFocusedElement]):

Create a targeted preview using the current FocusedElementInformation.

(-[WKContentView _createTargetedContextMenuHintPreviewIfPossible]):
* UIProcess/ios/forms/WKDateTimeInputControl.mm:
(-[WKDateTimePicker controlBeginEditing]):

Displaying the context menu no longer needs to be done asynchronously
since the FocusedElementInformation is already available during
controlBeginEditing.

* UIProcess/ios/forms/WKFormSelectPicker.mm:

Adopt the new logic for <select> elements, since the presented context
menu is an input peripheral, and can run into the same issues as the
date picker.

(-[WKSelectPicker controlBeginEditing]):
(-[WKSelectPicker contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::completeSyntheticClick):

Remove a redundant call to elementDidRefocus following r258333. The
FocusController already calls elementDidRefocus before this point, when
the mousepress event is dispatched.

The redundant call was uncovered when making the context menu
presentation synchronous, and causes problems with the presentation.
Specifically, the first call to elementDidRefocus causes the context
menu to be presented. The second call then results in an attempt
to scroll the web view, since the context menu can obscure the
assisted node. The additional scrolling is unwanted behavior, since it
does not occur when focusing the node for the first time.

This issue was previously unobserved, since the asynchronous presentation
of the context menu (after obtaining new position information) resulted
in both calls to elementDidRefocus occuring before presentation.

(WebKit::WebPage::getFocusedElementInformation):

Forward the scrolling node information to the UIProcess, so that the
position tracking view of the UITargetedPreview can be overridden
if necessary.

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

6 months agoEmbiggen maximum HashTable size when not using ANGLE
don.olmstead@sony.com [Thu, 25 Mar 2021 20:20:47 +0000 (20:20 +0000)]
Embiggen maximum HashTable size when not using ANGLE
https://bugs.webkit.org/show_bug.cgi?id=223757

Reviewed by Alex Christensen.

This is a partial revert of r274603 which cut the maximum size HashTable from 400 to 250.
When not using ANGLE directly for an OpenGL ES implementation there's some code hashing its
sh::ShaderVariable from the shader compiler ANGLE ships with. This type is too big and
triggers the static_assert.

The eventual goal is for ANGLE to be the OpenGL ES implementation for WebKit when enabling
WebGL. On PlayStation we already have a system OpenGL ES and any use of WebGL is in legacy
applications. The WebGL compliance features in ANGLE aren't needed in this case so ideally
we wouldn't even compile out ANGLE.

This patch punts on fixing the actual problem and just resolves this build issue.

* wtf/HashTable.h:
(WTF::KeyTraits>::inlineLookup):

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

6 months agoearly-return-from-builtin.js should try/catch in case of OOM
sbarati@apple.com [Thu, 25 Mar 2021 19:57:08 +0000 (19:57 +0000)]
early-return-from-builtin.js should try/catch in case of OOM
https://bugs.webkit.org/show_bug.cgi?id=223756

Reviewed by Yusuke Suzuki.

It's throwing an OOM on iOS.

* stress/early-return-from-builtin.js:

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

6 months ago[ Debug wk2 ] ASSERTION FAILED: willBeComposited == needsToBeComposited(layer, queryData)
jenner@apple.com [Thu, 25 Mar 2021 19:16:12 +0000 (19:16 +0000)]
[ Debug wk2 ] ASSERTION FAILED: willBeComposited == needsToBeComposited(layer, queryData)
https://bugs.webkit.org/show_bug.cgi?id=223750

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations: Added test expectation to Pass Crash while test is reviewed.
* platform/mac-wk2/TestExpectations: Updated test expectation to Pass Crash while test is reviewed.

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

6 months agoSendKeys on Input of type=file returns element not found in some cases
bburg@apple.com [Thu, 25 Mar 2021 18:54:45 +0000 (18:54 +0000)]
SendKeys on Input of type=file returns element not found in some cases
https://bugs.webkit.org/show_bug.cgi?id=223028
<rdar://problem/75526126>

Reviewed by Devin Rousso.

This bizarre behavior is triggered by removing the <input type=file> element inside an onclick() handler
for the input element. This confuses safaridriver, which expects to be able to query the file input's .value
via JavaScript after setting the files.

As part of the fix, provide the list of selected filenames in the Automation.fileChooserDismissed event.
On the safaridriver side, just use the list of filenames provided in this event to avoid an extra JS evaluation
that may race with page content.

* UIProcess/Automation/Automation.json:
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::handleRunOpenPanel):

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

6 months agoAddress some alignment issues found by UBSan in contentextensions code
cdumez@apple.com [Thu, 25 Mar 2021 18:47:17 +0000 (18:47 +0000)]
Address some alignment issues found by UBSan in contentextensions code
https://bugs.webkit.org/show_bug.cgi?id=223748

Reviewed by Darin Adler.

Address some alignment issues found by UBSan in contentextensions code:
- contentextensions/SerializedNFA.h:55:20: runtime error: reference binding to misaligned address 0xnnnnnnnnn for type 'const unsigned long long', which requires 8 byte alignment
- contentextensions/NFAToDFA.cpp:254:29: runtime error: reference binding to misaligned address 0xnnnnnnnnn for type 'const unsigned long long', which requires 8 byte alignment
- contentextensions/DFABytecodeCompiler.cpp:43:5: runtime error: store to misaligned address 0xnnnnnnnnn for type 'unsigned short', which requires 2 byte alignment

Use memcpy() to store/load to/from misaligned address.

* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::append):
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::epsilonClosureExcludingSelf):
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
* contentextensions/SerializedNFA.h:
(WebCore::ContentExtensions::SerializedNFA::Range::pointerAt const):
(WebCore::ContentExtensions::SerializedNFA::Range::valueAt const):
(WebCore::ContentExtensions::SerializedNFA::ConstTargetIterator::operator* const):
(WebCore::ContentExtensions::SerializedNFA::ConstTargetIterator::operator-> const):
(WebCore::ContentExtensions::SerializedNFA::ConstRangeIterator::first const):
(WebCore::ContentExtensions::SerializedNFA::ConstRangeIterator::last const):
(WebCore::ContentExtensions::SerializedNFA::ConstRangeIterator::data const):
(WebCore::ContentExtensions::SerializedNFA::ConstRangeIterator::range const):
(WebCore::ContentExtensions::SerializedNFA::transitionsForNode const):
(WebCore::ContentExtensions::SerializedNFA::Range::operator[] const): Deleted.

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

6 months agoSource/WebCore/xml/parser/CharacterReferenceParserInlines.h:107:33: runtime error...
cdumez@apple.com [Thu, 25 Mar 2021 18:20:58 +0000 (18:20 +0000)]
Source/WebCore/xml/parser/CharacterReferenceParserInlines.h:107:33: runtime error: signed integer overflow: 268435455 * 16 cannot be represented in type 'int'
https://bugs.webkit.org/show_bug.cgi?id=223718

Reviewed by Darin Adler.

Use Checked<> for the result in consumeCharacterReference() to deal with overflows
in a well-defined manner.

* xml/parser/CharacterReferenceParserInlines.h:
(WebCore::consumeCharacterReference):

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

6 months agoREGRESSION (r272376): [iOS] ASSERTION FAILED: sessionID.isEphemeral() || !path.isEmpt...
commit-queue@webkit.org [Thu, 25 Mar 2021 17:36:00 +0000 (17:36 +0000)]
REGRESSION (r272376): [iOS] ASSERTION FAILED: sessionID.isEphemeral() || !path.isEmpty() in WebKit::NetworkProcess::swServerForSession
https://bugs.webkit.org/show_bug.cgi?id=222713

Patch by Alex Christensen <achristensen@webkit.org> on 2021-03-25
Reviewed by Geoff Garen.

Because NetworkProcess::CreateNetworkConnectionToWebProcess is sent with SendOption::DispatchMessageEvenWhenWaitingForSyncReply, it is possible
for two messages of type NetworkProcess::AddWebsiteDataStore and two messages of type NetworkProcess::CreateNetworkConnectionToWebProcess to be in the queue,
but the second NetworkProcess::CreateNetworkConnectionToWebProcess jumps to the front of the line while the UI process is waiting for the reply to the first.
Then, when calling NetworkProcess::swServerForSession we expect the session's parameters to have been initialized in the network process already, but we cut
ahead of the parameter initialization message.  This is a realistically rare condition that can only be hit when using SPI, but it is hit in the
ResourceLoadStatistics.StoreSuspension API test.  To fix this, we send the WebsiteDataStoreParameters from each WebsiteDataStore in the NetworkProcessCreationParameters.
To avoid doing extra work, we introduce an early return in NetworkProcessProxy::addSession if we have already added parameters from this session to the network process.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::addSessionStorageQuotaManager):
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):
(WebKit::NetworkProcessProxy::addSession):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::parametersFromEachWebsiteDataStore):
* UIProcess/WebsiteData/WebsiteDataStore.h:

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

6 months agoPCM: Rename attributeOn to attributionDestination and change the IDL data type of...
wilander@apple.com [Thu, 25 Mar 2021 17:34:41 +0000 (17:34 +0000)]
PCM: Rename attributeOn to attributionDestination and change the IDL data type of attributionSourceId to unsigned long
https://bugs.webkit.org/show_bug.cgi?id=223661
<rdar://problem/75762075>

Reviewed by Brent Fulgham.

The PR review of the update of the PCM spec lead WebKit, Mozilla, and Google to decide on two changes:
1. Rename attributeOn to attributionDestination
2. Change the IDL data type of attributionSourceId from DOMString to unsigned long

The spec change can be seen in this commit:
https://github.com/privacycg/private-click-measurement/pull/75/commits/8623b5df5e899e6652bc5b00313585f7eeafa797

Source/WebCore:

This patch makes those changes, plus changes names of SPIs, functions, and variables accordingly.

Existing tests were updated.

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):
* html/HTMLAnchorElement.idl:
* html/HTMLAttributeNames.in:
* loader/PrivateClickMeasurement.cpp:
(WebCore::PrivateClickMeasurement::isValid const):
(WebCore::PrivateClickMeasurement::attributionReportAttributeOnURL const):
(WebCore::PrivateClickMeasurement::attributionReportJSON const):
* loader/PrivateClickMeasurement.h:
(WebCore::PrivateClickMeasurement::AttributionDestinationSite::AttributionDestinationSite):
(WebCore::PrivateClickMeasurement::AttributionDestinationSite::operator== const):
(WebCore::PrivateClickMeasurement::AttributionDestinationSite::deletedValue):
(WebCore::PrivateClickMeasurement::AttributionDestinationSite::constructDeletedValue):
(WebCore::PrivateClickMeasurement::AttributionDestinationSiteHash::hash):
(WebCore::PrivateClickMeasurement::AttributionDestinationSiteHash::equal):
(WebCore::PrivateClickMeasurement::PrivateClickMeasurement):
(WebCore::PrivateClickMeasurement::destinationSite const):
(WebCore::PrivateClickMeasurement::encode const):
(WebCore::PrivateClickMeasurement::decode):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::AttributionDestinationSite>::emptyValue):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::AttributionDestinationSite>::constructDeletedValue):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::AttributionDestinationSite>::isDeletedValue):
(WebCore::PrivateClickMeasurement::AttributeOnSite::AttributeOnSite): Deleted.
(WebCore::PrivateClickMeasurement::AttributeOnSite::operator== const): Deleted.
(WebCore::PrivateClickMeasurement::AttributeOnSite::matches const): Deleted.
(WebCore::PrivateClickMeasurement::AttributeOnSite::isHashTableDeletedValue const): Deleted.
(WebCore::PrivateClickMeasurement::AttributeOnSite::deletedValue): Deleted.
(WebCore::PrivateClickMeasurement::AttributeOnSite::constructDeletedValue): Deleted.
(WebCore::PrivateClickMeasurement::AttributeOnSite::deleteValue): Deleted.
(WebCore::PrivateClickMeasurement::AttributeOnSite::isDeletedValue const): Deleted.
(WebCore::PrivateClickMeasurement::AttributeOnSiteHash::hash): Deleted.
(WebCore::PrivateClickMeasurement::AttributeOnSiteHash::equal): Deleted.
(WebCore::PrivateClickMeasurement::attributeOnSite const): Deleted.
(WTF::HashTraits<WebCore::PrivateClickMeasurement::AttributeOnSite>::emptyValue): Deleted.
(WTF::HashTraits<WebCore::PrivateClickMeasurement::AttributeOnSite>::constructDeletedValue): Deleted.
(WTF::HashTraits<WebCore::PrivateClickMeasurement::AttributeOnSite>::isDeletedValue): Deleted.

Source/WebKit:

This patch makes those changes, plus changes names of SPIs, functions, and variables accordingly.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::buildPrivateClickMeasurementFromDatabase):
(WebKit::ResourceLoadStatisticsDatabaseStore::findPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::insertPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::removeUnattributed):
(WebKit::ResourceLoadStatisticsDatabaseStore::attributePrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::attributionToString):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearSentAttribution):
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::attributePrivateClickMeasurement):
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::setPrivateClickMeasurementAttributionReportURLsForTesting):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::setPrivateClickMeasurementAttributionReportURLsForTesting):
* NetworkProcess/NetworkSession.h:
* NetworkProcess/PrivateClickMeasurementManager.cpp:
(WebKit::PrivateClickMeasurementManager::handleAttribution):
(WebKit::PrivateClickMeasurementManager::attribute):
(WebKit::PrivateClickMeasurementManager::setAttributionReportURLsForTesting):
* NetworkProcess/PrivateClickMeasurementManager.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPrivateClickMeasurementAttributionReportURLsForTesting):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _setPrivateClickMeasurementAttributionReportURLsForTesting:destinationURL:completionHandler:]):
(-[WKWebView _setPrivateClickMeasurementAttributionReportURLsForTesting:attributeOnURL:completionHandler:]): Deleted.
* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _setUIEventAttribution:]):
(-[WKWebView _uiEventAttribution]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::setPrivateClickMeasurementAttributionReportURLsForTesting):
* UIProcess/WebPageProxy.h:

Tools:

* TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setPrivateClickMeasurementAttributionReportURLsForTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setPrivateClickMeasurementAttributionReportURLsForTesting):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Test cases were updated accordingly.

* http/tests/contentextensions/block-private-click-measurement.html:
* http/tests/privateClickMeasurement/anchor-tag-attributes-reflect-expected.txt:
* http/tests/privateClickMeasurement/anchor-tag-attributes-reflect.html:
* http/tests/privateClickMeasurement/anchor-tag-attributes-validation-expected.txt:
* http/tests/privateClickMeasurement/anchor-tag-attributes-validation.html:
    Since attributionSourceId is now an unsigned long, tests that checked invalid
    string values are no longer relevant. It should be noted that a set
    attributionSourceId with an invalid value becomes 0 which is a valid value.
* http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect.html:
* http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive.html:
* http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html:
* http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html:
* http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority.html:
* http/tests/privateClickMeasurement/clear-through-website-data-removal.html:
* http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session.html:
* http/tests/privateClickMeasurement/expired-ad-click-gets-removed-on-session-start.html:
* http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start.html:
* http/tests/privateClickMeasurement/expired-attributions-removed.html:
* http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority.html:
* http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority.html:
* http/tests/privateClickMeasurement/second-conversion-with-higher-priority.html:
* http/tests/privateClickMeasurement/second-conversion-with-lower-priority.html:
* http/tests/privateClickMeasurement/send-attribution-conversion-request.html:
* http/tests/privateClickMeasurement/store-disabled-in-ephemeral-session.html:
* http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce.html:
* http/tests/privateClickMeasurement/store-private-click-measurement.html:

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

6 months agoDrop unnecessary Settings pre-warming in ProcessWarming::prewarmGlobally()
cdumez@apple.com [Thu, 25 Mar 2021 17:16:06 +0000 (17:16 +0000)]
Drop unnecessary Settings pre-warming in ProcessWarming::prewarmGlobally()
https://bugs.webkit.org/show_bug.cgi?id=223749

Reviewed by Antti Koivisto.

Drop unnecessary Settings pre-warming in ProcessWarming::prewarmGlobally(). Based on the comment,
it looks like the intention was to prewarm some font families. However, looking at the code, nothing
that gets populated is global and survives the destruction of the Settings object on the next line.
We don't even make any calls to CTFont.

* page/ProcessWarming.cpp:
(WebCore::ProcessWarming::prewarmGlobally):

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

6 months agoDo not do process pre-warming when the system is under memory pressure
cdumez@apple.com [Thu, 25 Mar 2021 16:49:46 +0000 (16:49 +0000)]
Do not do process pre-warming when the system is under memory pressure
https://bugs.webkit.org/show_bug.cgi?id=223717
<rdar://problem/75810423>

Reviewed by Antti Koivisto.

Source/WebKit:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::prewarmGlobally):
Only do prewarming if we're not under memory pressure as this would make
the situation worse.

Source/WTF:

* wtf/cocoa/MemoryPressureHandlerCocoa.mm:
(WTF::MemoryPressureHandler::install):
- Listen to the same memory pressure notifications on macOS and iOS. Previously, macOS would not respond to
  non-critical memory pressure notifications for example. Also, since macOS would not listen for the notification
  that happens when the memory usage goes back to normal, MemoruPressureHandler::isUnderMemoryPressure() would
  start returning true after a critical memory pressure notification and it would never go back to false.

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

6 months agoSwitch from PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION to filtering interfaces in...
youenn@apple.com [Thu, 25 Mar 2021 16:33:06 +0000 (16:33 +0000)]
Switch from PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION to filtering interfaces in Network process
https://bugs.webkit.org/show_bug.cgi?id=223679

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:

Source/WebCore:

Covered by webrtc/datachannel/filter-ice-candidate.html.

* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::createPeerConnection):
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:
Use set_allow_tcp_listen instead of PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION.

Source/WebKit:

When starting to monitor, pass whether to enumerate all interfaces from WebProcess to NetworkProcess as a boolean.
In NetworkProcess, do network interface enumeration as usual, but use the boolean to decide whether to send the full list or the list that is related to the default IP addresses to WebProcess.

* NetworkProcess/webrtc/NetworkRTCMonitor.cpp:
(WebKit::NetworkManagerWrapper::addListener):
(WebKit::NetworkManagerWrapper::onNetworksChanged):
(WebKit::NetworkRTCMonitor::startUpdatingIfNeeded):
(WebKit::NetworkRTCMonitor::onNetworksChanged):
* NetworkProcess/webrtc/NetworkRTCMonitor.h:
* NetworkProcess/webrtc/NetworkRTCMonitor.messages.in:
* WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
(WebKit::LibWebRTCProvider::createPeerConnection):
* WebProcess/Network/webrtc/WebRTCMonitor.cpp:
(WebKit::WebRTCMonitor::setEnumeratingAllNetworkInterfacesEnabled):
(WebKit::WebRTCMonitor::StartUpdating):
* WebProcess/Network/webrtc/WebRTCMonitor.h:

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

6 months agoOnly preheat MTLCopyAllDevices on Mac
cdumez@apple.com [Thu, 25 Mar 2021 16:19:39 +0000 (16:19 +0000)]
Only preheat MTLCopyAllDevices on Mac
https://bugs.webkit.org/show_bug.cgi?id=223747

Patch by Ben Nham <nham@apple.com> on 2021-03-25
Reviewed by Chris Dumez.

We should use adoptNS to avoid leaking the array returned by MTLCopyAllDevices. We should
also only do this on Mac because this is only a public API on the Mac, and the issue of
graphics drivers falling out of the dyld shared cache doesn't exist on iOS.

* platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
(WebCore::GPUDevice::prewarm):

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

6 months agoWKContentRuleList first-party should include other subdomains of the current registra...
commit-queue@webkit.org [Thu, 25 Mar 2021 15:30:32 +0000 (15:30 +0000)]
WKContentRuleList first-party should include other subdomains of the current registrable domain
https://bugs.webkit.org/show_bug.cgi?id=223728
Source/WebCore:

<rdar://71912579>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-03-25
Reviewed by John Wilander.

Covered by API tests.

* loader/ResourceLoadInfo.cpp:
(WebCore::ContentExtensions::ResourceLoadInfo::isThirdParty const):

Tools:

Patch by Alex Christensen <achristensen@webkit.org> on 2021-03-25
Reviewed by John Wilander.

* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):

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

6 months agoAlign RemoteVideoDecoder destruction strategy with RemoteVideoEncoder
youenn@apple.com [Thu, 25 Mar 2021 15:28:52 +0000 (15:28 +0000)]
Align RemoteVideoDecoder destruction strategy with RemoteVideoEncoder
https://bugs.webkit.org/show_bug.cgi?id=223745

Reviewed by Eric Carlson.

When decoder is released, we make sure to nullify the decoder callback.
We wait to release WebKit decoder at RemoteVideoDecoder destruction time.

* Source/webrtc/sdk/WebKit/WebKitDecoder.mm:
(webrtc::RemoteVideoDecoder::~RemoteVideoDecoder):
(webrtc::RemoteVideoDecoder::Release):

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

6 months agoImprove RealtimeIncomingVideoSourceCocoa::OnFrame logging to include rotation and...
youenn@apple.com [Thu, 25 Mar 2021 15:28:10 +0000 (15:28 +0000)]
Improve RealtimeIncomingVideoSourceCocoa::OnFrame logging to include rotation and size information
https://bugs.webkit.org/show_bug.cgi?id=223741

Reviewed by Eric Carlson.

No change of behavior.

* platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
(WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame):

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

6 months ago[Flatpak SDK] Update to GStreamer 1.18.4
commit-queue@webkit.org [Thu, 25 Mar 2021 15:03:41 +0000 (15:03 +0000)]
[Flatpak SDK] Update to GStreamer 1.18.4
https://bugs.webkit.org/show_bug.cgi?id=223644

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-25
Reviewed by Adrian Perez de Castro.

* elements/sdk/gst-libav.bst:
* elements/sdk/gst-plugins-bad.bst:
* elements/sdk/gst-plugins-base.bst:
* elements/sdk/gst-plugins-good.bst:
* elements/sdk/gst-plugins-ugly.bst:
* elements/sdk/gstreamer.bst:
* patches/gst-plugins-base-0001-videodecoder-Fix-racy-critical-when-pool-negotiation.patch: Removed.

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

6 months ago[GTK][WPE] JSC crashes if a function expects a parameter but doesn't receive any
carlosgc@webkit.org [Thu, 25 Mar 2021 14:34:25 +0000 (14:34 +0000)]
[GTK][WPE] JSC crashes if a function expects a parameter but doesn't receive any
https://bugs.webkit.org/show_bug.cgi?id=223646

Reviewed by Adrian Perez de Castro.

Source/JavaScriptCore:

Handle the case of receiving fewer argumens than expected in function calls and constructors. We pass undefined
for the expected arguments that are missing. We were not correctly handling the case of converting undefined and
null values to JSCValue, so this patch fixes that case too.

* API/glib/JSCCallbackFunction.cpp:
(JSC::JSCCallbackFunction::call):
(JSC::JSCCallbackFunction::construct):
* API/glib/JSCContext.cpp:
(jscContextJSValueToWrappedObject):
(jscContextJSValueToGValue):

Tools:

Add test cases.

* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(valueToString):
(testJSCFunction):
(testJSCClass):

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

6 months ago[ews] Add unit-test to ensure that config.json doesn't have tab characters
aakash_jain@apple.com [Thu, 25 Mar 2021 13:44:39 +0000 (13:44 +0000)]
[ews] Add unit-test to ensure that config.json doesn't have tab characters
https://bugs.webkit.org/show_bug.cgi?id=223440

Reviewed by Jonathan Bedard.

* CISupport/build-webkit-org/loadConfig_unittest.py:
(ConfigDotJSONTest.test_tab_character): Unit-test to ensure that there are no tab characters.
* CISupport/ews-build/config.json:
* CISupport/ews-build/loadConfig_unittest.py:
(ConfigDotJSONTest.test_tab_character):

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

6 months agoUnreviewed, reverting r274826 and r274968.
commit-queue@webkit.org [Thu, 25 Mar 2021 13:42:33 +0000 (13:42 +0000)]
Unreviewed, reverting r274826 and r274968.
https://bugs.webkit.org/show_bug.cgi?id=223746

Added broken layout test

Reverted changesets:

"AX: textRectsFromMarkers always fails"
https://bugs.webkit.org/show_bug.cgi?id=223556
https://trac.webkit.org/changeset/274826

"AX: Add functions rectsForTextMarkerRange for testing"
https://bugs.webkit.org/show_bug.cgi?id=223705
https://trac.webkit.org/changeset/274968

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

6 months agoREGRESSION (r270134) Web Inspector: Audit: Results are stacked on top of each other.
rcaliman@apple.com [Thu, 25 Mar 2021 13:41:51 +0000 (13:41 +0000)]
REGRESSION (r270134) Web Inspector: Audit: Results are stacked on top of each other.
https://bugs.webkit.org/show_bug.cgi?id=223381
<rdar://problem/75528374>

Reviewed by Devin Rousso.

Ensure pre-existing `ContentView`s are removed when navigating back/forward
even when the incoming `ContentView` is already attached.

For example, `AuditTestContentView` instances for individual tests are already attached
when shown as part of a test group `AuditTestGroupContentView`.
Navigating from the group to the individual test view must remove the group view.

* UserInterface/Views/ContentViewContainer.js:
(WI.ContentViewContainer.prototype.showBackForwardEntryForIndex):

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

6 months agoImprove interpolation of the shape-outside CSS property
graouts@webkit.org [Thu, 25 Mar 2021 12:22:22 +0000 (12:22 +0000)]
Improve interpolation of the shape-outside CSS property
https://bugs.webkit.org/show_bug.cgi?id=223738

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add another 29 PASS results for shape-outside interpolation.

* web-platform-tests/css/css-shapes/animation/shape-outside-composition-expected.txt:
* web-platform-tests/css/css-shapes/animation/shape-outside-interpolation-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

While we had logic to deal with cases where ShapeValue objects could not be interpolated, we did not make
use of it in the animation wrapper. We now move this logic from the blendFunc() to the canInterpolate()
override method on the wrapper to correctly interpolate only when possible.

* animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):

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

6 months agoREGRESSION(r271560): [Linux] release assert in Thread::initializePlatformThreading
berto@igalia.com [Thu, 25 Mar 2021 12:10:54 +0000 (12:10 +0000)]
REGRESSION(r271560): [Linux] release assert in Thread::initializePlatformThreading
https://bugs.webkit.org/show_bug.cgi?id=223069

Reviewed by Carlos Garcia Campos.

Replace an existing signal handler instead of aborting.

* wtf/posix/ThreadingPOSIX.cpp:
(WTF::Thread::initializePlatformThreading):

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

6 months agoAll Books quirks are flakily not applied in modern WebKit
timothy_horton@apple.com [Thu, 25 Mar 2021 10:14:43 +0000 (10:14 +0000)]
All Books quirks are flakily not applied in modern WebKit
https://bugs.webkit.org/show_bug.cgi?id=157101
<rdar://problem/25965028>

Reviewed by Darin Adler.

Source/WebCore:

No new tests; I haven't found a way to write a test that doesn't involve
adding a new parameter to the process bootstrap message, which seems
out of the realm of reason for a test.

* bindings/js/CommonVM.cpp:
(WebCore::commonVMSlow):
(WebCore::globalConstRedeclarationShouldThrow): Deleted.
Stop hardcoding globalConstRedeclarationShouldThrow based on the UI process identity.

* platform/RuntimeApplicationChecks.cpp:
(WebCore::isInAuxiliaryProcess):
* platform/RuntimeApplicationChecks.h:
* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::applicationBundleIdentifier):
(WebCore::setApplicationBundleIdentifierOverride):
Add an assertion to catch any future case where a bundle check is queried
in a auxiliary process before the hosting application bundle identifier is set.

Source/WebKit:

In r200121, a quirk was introduced that queried the isIBooks()
RuntimeApplicationChecks method from inside commonVM().

RuntimeApplicationChecks bundle checks cache the result of the bundle
check, and, as such, must not be called until the bundle identifer of
the UI application is known. In legacy WebKit, this is not a problem,
because the check is running in the application process; in modern WebKit,
there is a short window between process launch and the InitializeWebProcess
message being received where we won't know the bundle identifier, and if
isIBooks() (or any other bundle check) is called during this time, it will
cache the wrong result.

It is possible for commonVM() to be called in this window; one possible path
to this is by triggering an os_log_fault during this time, which WebKit
observes (via os_state_add_handler()) in order to dump memory usage
(which happens to call commonVM() and results in isIBooks getting called
and caching the wrong value).

Add an assertion, and move the quirk to live as a setting on the process
pool configuration, to be set via SPI by Books, instead of as a bundle check.

Also, ensure that client bundle identifier and SDK version are set in
all WebKit subprocesses, so that bundle/SDK checks work everywhere
(previously, the GPU process was using SDK checks without having pushed
the values from the UI process, resulting in incorrect results, and
running afoul of the assertion added above).

* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
(API::defaultShouldThrowExceptionForGlobalConstantRedeclaration):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration shouldThrowExceptionForGlobalConstantRedeclaration]):
(-[_WKProcessPoolConfiguration setShouldThrowExceptionForGlobalConstantRedeclaration:]):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Plumb a new _WKProcessPoolConfiguration parameter to the Web Content process,
and set the bit on the commonVM when launched.

* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):
(WebKit::AuxiliaryProcess::platformInitialize):
* Shared/AuxiliaryProcess.h:
* Shared/Cocoa/AuxiliaryProcessCocoa.mm:
(WebKit::initializeTimerCoalescingPolicy):
(WebKit::AuxiliaryProcess::platformInitialize):
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer):
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getClientSDKVersion):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
Remove an extra unused member.
* Shared/ios/AuxiliaryProcessIOS.mm:
(WebKit::AuxiliaryProcess::platformInitialize): Deleted.
* Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::initializeTimerCoalescingPolicy): Deleted.
(WebKit::AuxiliaryProcess::platformInitialize): Deleted.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Plumb the client bundle identifer and SDK version to all auxiliary processes
at process initialization time instead of InitializeWebProcess/NetworkProcess
message receipt time, closing the window in which it is invalid to use
bundle checks, and ensuring that bundle checks work in all processes.

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

6 months agoMetal ANGLE non-blockers: Fix webgl/1.0.3/conformance/uniforms/uniform-default-values...
dino@apple.com [Thu, 25 Mar 2021 06:10:22 +0000 (06:10 +0000)]
Metal ANGLE non-blockers: Fix webgl/1.0.3/conformance/uniforms/uniform-default-values.html, Stencil debug layer assertions
https://bugs.webkit.org/show_bug.cgi?id=223667

https://bugs.webkit.org/show_bug.cgi?id=223667

On Release, uniformDefaultValues was resetting program memory
either early, or oddly. Since program reflection should be constant
per Shader anyway, drop the 'reset' after assigning reflection data.

In addition, clamp stencil rectangle to always be within framebuffer bounds. Code taken from upstream ANGLE.

Patch by Kyle Piddington <kpiddington@apple.com> on 2021-03-24
Reviewed by Dean Jackson.

* src/libANGLE/renderer/metal/ProgramMtl.mm:
(rx::ProgramMtl::linkImplDirect):
* src/libANGLE/renderer/metal/mtl_command_buffer.mm:
(rx::mtl::RenderCommandEncoder::initAttachmentWriteDependencyAndScissorRect):
(rx::mtl::RenderCommandEncoder::restart):
(rx::mtl::RenderCommandEncoder::setScissorRect):
* src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm:
(rx::mtl::TranslatedShaderInfo::reset):
(rx::mtl::GlslangGetMSL):

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

6 months agoCrash in TextChecker::updateSpellingUIWithGrammarString()
commit-queue@webkit.org [Thu, 25 Mar 2021 05:46:13 +0000 (05:46 +0000)]
Crash in TextChecker::updateSpellingUIWithGrammarString()
https://bugs.webkit.org/show_bug.cgi?id=223716

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-03-24
Reviewed by Ryosuke Niwa.

Prevent a crash by checking the GrammarDetail's range.

* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::updateSpellingUIWithGrammarString):

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

6 months ago[GTK] Re-skip modern-media-controls tests after r274810
lmoura@igalia.com [Thu, 25 Mar 2021 05:38:29 +0000 (05:38 +0000)]
[GTK] Re-skip modern-media-controls tests after r274810

Unreviewed test gardening.

* platform/gtk/TestExpectations: Skipping them again until proper
support is added.

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

6 months ago[GLIB] Gardening already closed bug and a WPE flaky
lmoura@igalia.com [Thu, 25 Mar 2021 05:28:53 +0000 (05:28 +0000)]
[GLIB] Gardening already closed bug and a WPE flaky

Unreviewed test gardening.

* platform/glib/TestExpectations:
* platform/wpe/TestExpectations:

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

6 months agoWTF::setPermissionsOfConfigPage() should allow its VM_FLAGS_PERMANENT workaround...
mark.lam@apple.com [Thu, 25 Mar 2021 02:53:03 +0000 (02:53 +0000)]
WTF::setPermissionsOfConfigPage() should allow its VM_FLAGS_PERMANENT workaround unconditionally.
https://bugs.webkit.org/show_bug.cgi?id=223725
rdar://75813316

Reviewed by Saam Barati.

If the OS does not support the flag, then we should not require it.

* wtf/WTFConfig.cpp:
(WTF::setPermissionsOfConfigPage):

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

6 months agoUse StaticStringImpl instead of StringImpl::createStaticStringImpl if it is not dynam...
ysuzuki@apple.com [Thu, 25 Mar 2021 02:31:29 +0000 (02:31 +0000)]
Use StaticStringImpl instead of StringImpl::createStaticStringImpl if it is not dynamic string content
https://bugs.webkit.org/show_bug.cgi?id=223714

Reviewed by Saam Barati.

We should just use StaticStringImpl instead of StringImpl::createStaticStringImpl if the string content is
not dynamically allocated one. Keep in mind that this URL code is strongly assuming that internal StringImpl
is static so that this string (and URL) can be used in multiple threads. And StaticStringImpl meets this requirement.

* wtf/URL.cpp:
(WTF::aboutBlankURL):
(WTF::aboutSrcDocURL):

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

6 months ago[ Debug ] http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html...
jenner@apple.com [Thu, 25 Mar 2021 02:20:28 +0000 (02:20 +0000)]
[ Debug ] http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html and one other test are flakey timeouts
https://bugs.webkit.org/show_bug.cgi?id=223724

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations: Updated test expectations to Pass Timeout while test is reviewed.
* platform/mac/TestExpectations: Updated test expectations to Pass Timeout while test is reviewed.

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

6 months agoAll string resources from UserAgentStyleSheets / UserAgentScripts should be used...
ysuzuki@apple.com [Thu, 25 Mar 2021 01:55:58 +0000 (01:55 +0000)]
All string resources from UserAgentStyleSheets / UserAgentScripts should be used as non-copying StringImpl
https://bugs.webkit.org/show_bug.cgi?id=223685

Reviewed by Saam Barati.

Source/WebCore:

We use StringImpl::createWithoutCopying for string resources from UserAgentStyleSheets / UserAgentScripts to make sure that
these resources do not allocate heap strings.

This patch also fixes HTMLMeterElement's bug (and imageOverlayUserAgentStyleSheet's bug). Previously, we are using String::ConstructFromLiteral,
but this only accepts string literal as it says. As a result, we are dropping the last character since UserAgentStyleSheets's last character is not \0.

* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::quickTimePluginReplacementScript):
* WebCoreMacros.cmake:
* dom/Document.cpp:
(WebCore::Document::ensurePlugInsInjectedScript):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::updateWithImageExtractionResult):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::didAddUserAgentShadowRoot):
* rendering/RenderThemeAdwaita.cpp:
(WebCore::RenderThemeAdwaita::extraDefaultStyleSheet):
(WebCore::RenderThemeAdwaita::extraMediaControlsStyleSheet):
(WebCore::RenderThemeAdwaita::mediaControlsScripts):
* rendering/RenderThemeCocoa.mm:
(WebCore::RenderThemeCocoa::mediaControlsStyleSheet):
(WebCore::RenderThemeCocoa::mediaControlsScripts):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::extraDefaultStyleSheet):
(WebCore::RenderThemeWin::extraQuirksStyleSheet):
* style/UserAgentStyle.cpp:
(WebCore::Style::UserAgentStyle::initDefaultStyleSheet):
(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):

Source/WebDriver:

* Session.cpp:
(WebDriver::Session::fullscreenWindow):
(WebDriver::Session::findElements):
(WebDriver::Session::isElementSelected):
(WebDriver::Session::isElementEnabled):
(WebDriver::Session::isElementDisplayed):
(WebDriver::Session::getElementAttribute):
(WebDriver::Session::elementClear):

Source/WTF:

Add StringImpl::createWithoutCopying for `const char*`.

* wtf/text/StringImpl.h:
(WTF::StringImpl::createWithoutCopying):

LayoutTests:

* fast/dom/HTMLMeterElement/meter-element-markup-expected.txt:

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

6 months agobindings/js/JSEventListener.cpp:281:91: runtime error: reference binding to null...
cdumez@apple.com [Thu, 25 Mar 2021 01:48:19 +0000 (01:48 +0000)]
bindings/js/JSEventListener.cpp:281:91: runtime error: reference binding to null pointer of type 'WebCore::ScriptExecutionContext'
https://bugs.webkit.org/show_bug.cgi?id=223719

Reviewed by Darin Adler.

Make sure we null check the scriptExecutionContext before we dereference it.

* bindings/js/JSEventListener.cpp:
(WebCore::eventHandlerAttribute):
(WebCore::windowEventHandlerAttribute):

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

6 months ago[ macOS Wk2 ]inspector/indexeddb/clearObjectStore.html is a flakey timeout
jenner@apple.com [Thu, 25 Mar 2021 01:42:09 +0000 (01:42 +0000)]
[ macOS Wk2 ]inspector/indexeddb/clearObjectStore.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=222140

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations: Updating test expectations to include Pass Failure Timeout.

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

6 months agoPort FontDescriptionKey::computeHash() from legacy IntegerHasher to Hasher
cdumez@apple.com [Thu, 25 Mar 2021 01:28:46 +0000 (01:28 +0000)]
Port FontDescriptionKey::computeHash() from legacy IntegerHasher to Hasher
https://bugs.webkit.org/show_bug.cgi?id=223701

Reviewed by Darin Adler.

Port FontDescriptionKey::computeHash() from legacy IntegerHasher to Hasher. Hasher
has the benefit of having add() overloads that take in signed integer types.

* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::computeHash const):

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

6 months agoMetal ANGLE crashes LayoutTests/inspector/canvas/updateShader-webgl.html
commit-queue@webkit.org [Thu, 25 Mar 2021 01:06:18 +0000 (01:06 +0000)]
Metal ANGLE crashes LayoutTests/inspector/canvas/updateShader-webgl.html
Rather than rely on an instance variable in a C++ class, just query the dictionary constant when needed.

https://bugs.webkit.org/show_bug.cgi?id=223695

Patch by Kyle Piddington <kpiddington@apple.com> on 2021-03-24
Reviewed by Dean Jackson.

* src/libANGLE/renderer/metal/ProgramMtl.h:
* src/libANGLE/renderer/metal/ProgramMtl.mm:
(rx::ProgramMtl::ProgramMtl):
(rx::ProgramMtl::linkImplSpirv):
(rx::ProgramMtl::linkImplDirect):
(rx::ProgramMtl::linkTranslatedShaders):

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

6 months agoExtend WebAudio heap allocation assertions to cover the pre & post-rendering phases
cdumez@apple.com [Thu, 25 Mar 2021 00:46:39 +0000 (00:46 +0000)]
Extend WebAudio heap allocation assertions to cover the pre & post-rendering phases
https://bugs.webkit.org/show_bug.cgi?id=223640

Reviewed by Sam Weinig.

Extend WebAudio heap allocation assertions to cover the pre & post-rendering phases. I had to add
exceptions for some heap allocations that are currently happening during this phase but I
will work to reduce the number of exceptions in follow-ups.

* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::render):
* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::updateInternalBus):
* Modules/webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::updateInternalBus):
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::addAutomaticPullNode):
(WebCore::BaseAudioContext::updateAutomaticPullNodes):
* platform/audio/AudioDSPKernelProcessor.cpp:
(WebCore::AudioDSPKernelProcessor::initialize):

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

6 months agoUnreviewed build fix after r274983.
cdumez@apple.com [Thu, 25 Mar 2021 00:33:19 +0000 (00:33 +0000)]
Unreviewed build fix after r274983.

* Modules/mediasession/MediaSession.h:

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

6 months agoAutoinstalling keyring-7.3.1 is failing with Python 2
jbedard@apple.com [Thu, 25 Mar 2021 00:24:39 +0000 (00:24 +0000)]
Autoinstalling keyring-7.3.1 is failing with Python 2
https://bugs.webkit.org/show_bug.cgi?id=223677
<rdar://problem/75800504>

Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version, add setuptools_scm.
* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.install): Always install setuptools_scm.

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

6 months agoMove TelephoneNumberDetector preloading off the main thread
cdumez@apple.com [Thu, 25 Mar 2021 00:05:48 +0000 (00:05 +0000)]
Move TelephoneNumberDetector preloading off the main thread
https://bugs.webkit.org/show_bug.cgi?id=223715

Reviewed by Geoffrey Garen.

Move TelephoneNumberDetector preloading off the main thread. We have evidence that prewarmGlobally() can be slow and hang the main
thread for too long (rdar://75279383). As a result, it is a good idea to prewarm things off the main thread whenever possible.

* page/ProcessWarming.cpp:
(WebCore::ProcessWarming::prewarmGlobally):
* platform/TelephoneNumberDetector.h:
* platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
(WebCore::TelephoneNumberDetector::phoneNumbersScanner):
(WebCore::TelephoneNumberDetector::prewarm):

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

6 months agoREGRESSION(r274919) [ATK] accessibility/set-selected-text-range-contenteditable.html...
lmoura@igalia.com [Thu, 25 Mar 2021 00:04:42 +0000 (00:04 +0000)]
REGRESSION(r274919) [ATK] accessibility/set-selected-text-range-contenteditable.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=223710

Reviewed by Adrian Perez de Castro.

r274919 clamped the values passed to the accessibility elements,
making the {-1,0} text range to be collapsed to {0,0} as text ranges
are composed of unsigned ints.

This commit updates the test to remove the ATK-specific case of
passing -1 to point to the final offset of a text range.

* accessibility/set-selected-text-range-contenteditable.html: Remove
ATK-specific quirk.
* platform/glib/accessibility/set-selected-text-range-contenteditable-expected.txt: Removed.

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

6 months ago[Cocoa] Add Experimental MediaSession coordinator
eric.carlson@apple.com [Wed, 24 Mar 2021 23:14:51 +0000 (23:14 +0000)]
[Cocoa] Add Experimental MediaSession coordinator
https://bugs.webkit.org/show_bug.cgi?id=222158
<rdar://problem/74508862>

Reviewed by Jer Noble.

Source/WebCore:

Add an experimental MediaSession coordinator, an object that provides an interface
that allows script to coordinate changes to MediaSession with the User Agent. Also
add an experimental MediaSession playlist interface.

The changes are behind new experimental feature flags,
MediaSessionCoordinatorEnabled and MediaSessionPlaylistEnabled.

Test: media/media-session/mock-coordinator.html

* DerivedSources-input.xcfilelist: Add new IDL files.
* DerivedSources-output.xcfilelist: Add new derived sources.
* DerivedSources.make: Add new IDL.

* Modules/mediasession/MediaMetadata.cpp:
(WebCore::MediaMetadata::create): Set trackIdentifier from init data.
(WebCore::MediaMetadata::setTrackIdentifier): trackIdentifier setter.
* Modules/mediasession/MediaMetadata.h:
(WebCore::MediaMetadata::trackIdentifier const):
* Modules/mediasession/MediaMetadata.idl:

* Modules/mediasession/MediaMetadataInit.h: Add trackIdentifier.
(WebCore::MediaMetadataInit::encode const):
(WebCore::MediaMetadataInit::decode):
* Modules/mediasession/MediaMetadataInit.idl:

* Modules/mediasession/MediaSession.cpp:
(WebCore::MediaSession::MediaSession): Initialize MainThreadGenericEventQueue.
(WebCore::MediaSession::setMetadata): metadataUpdated -> notifyMetadataObservers.
(WebCore::MediaSession::setReadyState): Session readyState setter.
(WebCore::MediaSession::setCoordinator): Coordinator setter. Post 'coordinatorchange'
event after change.
(WebCore::MediaSession::setPlaylist): Playlist setter.
(WebCore::MediaSession::setActionHandler): Call notifyActionHandlerObservers.
(WebCore::MediaSession::setPositionState): Call notifyPositionStateObservers.
(WebCore::MediaSession::metadataUpdated): Call notifyMetadataObservers.
(WebCore::MediaSession::addObserver): New.
(WebCore::MediaSession::removeObserver): New.
(WebCore::MediaSession::forEachObserver): New.
(WebCore::MediaSession::notifyMetadataObservers): New.
(WebCore::MediaSession::notifyPositionStateObservers): New.
(WebCore::MediaSession::notifyPlaybackStateObservers): New.
(WebCore::MediaSession::notifyActionHandlerObservers): New.
(WebCore::MediaSession::notifyReadyStateObservers): New.
* Modules/mediasession/MediaSession.h:
(WebCore::MediaSession::coordinator const):
(WebCore::MediaSession::playlist const):
(WebCore::MediaSession::logger const):
* Modules/mediasession/MediaSession.idl:

* Modules/mediasession/MediaSessionAction.h:
* Modules/mediasession/MediaSessionAction.idl:
* Modules/mediasession/MediaSessionActionDetails.h:
* Modules/mediasession/MediaSessionActionDetails.idl:

MediaSessionCoordinator proxies calls through the PlatformMediaSessionCoordinator,
and then calls the equivalent MediaSession methode if the platform coordinator
is successful.
* Modules/mediasession/MediaSessionCoordinator.cpp: Added.
(WebCore::nextCoordinatorLogIdentifier):
(WebCore::MediaSessionCoordinator::create):
(WebCore::MediaSessionCoordinator::MediaSessionCoordinator):
(WebCore::MediaSessionCoordinator::seekTo):
(WebCore::MediaSessionCoordinator::play):
(WebCore::MediaSessionCoordinator::pause):
(WebCore::MediaSessionCoordinator::setTrack):
(WebCore::MediaSessionCoordinator::setMediaSession):
(WebCore::MediaSessionCoordinator::logChannel):
* Modules/mediasession/MediaSessionCoordinator.h: New.
(WebCore::MediaSessionCoordinator::logger const):
(WebCore::MediaSessionCoordinator::logIdentifier const):
(WebCore::MediaSessionCoordinator::logClassName):
* Modules/mediasession/MediaSessionCoordinator.idl: New.

* Modules/mediasession/NavigatorMediaSession.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* dom/EventNames.h:
* dom/EventTargetFactory.in:

* platform/graphics/PlatformMediaSessionCoordinator.h: Added.
(WebCore::PlatformMediaSessionCoordinator::setLogger):
(WebCore::PlatformMediaSessionCoordinator::loggerPtr const):
(WebCore::PlatformMediaSessionCoordinator::logIdentifier const):
(WebCore::PlatformMediaSessionCoordinator::logClassName const):
(WebCore::PlatformMediaSessionCoordinator::logChannel const):

* testing/Internals.cpp:
(WebCore::Internals::registerMockMediaSessionCoordinator): Register the mock
media session coordinator for testing.
* testing/Internals.h:
* testing/Internals.idl:

* testing/MockMediaSessionCoordinator.cpp: Added.
(WebCore::MockMediaSessionCoordinator::create):
(WebCore::MockMediaSessionCoordinator::MockMediaSessionCoordinator):
(WebCore::MockMediaSessionCoordinator::seekTo):
(WebCore::MockMediaSessionCoordinator::play):
(WebCore::MockMediaSessionCoordinator::pause):
(WebCore::MockMediaSessionCoordinator::setTrack):
* testing/MockMediaSessionCoordinator.h: New.

Source/WTF:

* Scripts/Preferences/WebPreferencesExperimental.yaml:
* wtf/PlatformEnableCocoa.h:

LayoutTests:

* platform/TestExpectations:
* media/media-session/mock-coordinator-expected.txt: Added.
* media/media-session/mock-coordinator.html: Added.

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

6 months agoPreload graphics drivers on a background thread instead of the main thread
cdumez@apple.com [Wed, 24 Mar 2021 23:02:31 +0000 (23:02 +0000)]
Preload graphics drivers on a background thread instead of the main thread
https://bugs.webkit.org/show_bug.cgi?id=223713

Reviewed by Simon Fraser.

Preload graphics drivers on a background thread instead of the main thread. We have evidence of prewarmGlobally() hanging
the main thread (rdar://75279383) so we should do pre-warming off the main thread whenever possible.

r265418 introduced this graphics loader preloading and an earlier version of this patch was simply calling MTLCopyAllDevices()
on a background queue. However, that patch was updated before landing to do the work on the main thread. I think we should go
back to the earlier iteration.

* page/ProcessWarming.cpp:
(WebCore::ProcessWarming::prewarmGlobally):
* platform/graphics/gpu/GPUDevice.h:
* platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
(WebCore::GPUDevice::prewarm):
* platform/graphics/gpu/dawn/GPUDeviceDawn.cpp:
(WebCore::GPUDevice::prewarm):

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

6 months agoVersioning.
repstein@apple.com [Wed, 24 Mar 2021 23:01:12 +0000 (23:01 +0000)]
Versioning.

WebKit-7612.1.9

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

6 months agoFix interpolation of the border-spacing property
graouts@webkit.org [Wed, 24 Mar 2021 22:25:19 +0000 (22:25 +0000)]
Fix interpolation of the border-spacing property
https://bugs.webkit.org/show_bug.cgi?id=223702

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Import the border-spacing interpolation test with its 120 tests passing.

* web-platform-tests/css/css-tables/animations/border-spacing-interpolation-expected.txt: Added.
* web-platform-tests/css/css-tables/animations/border-spacing-interpolation.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/css-tables/animations/border-spacing-interpolation.html

While we already supported animation of border-spacing, we did not correctly clip the interpolated
value to 0.

* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

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