⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Mar 30, 2021:

10:52 PM Changeset in webkit [275270] by Wenson Hsieh
  • 8 edits in trunk/Source/WebKit

[iOS] Fall back to context menu presentation after long pressing image overlay text
https://bugs.webkit.org/show_bug.cgi?id=223967
<rdar://problem/76028620>

Reviewed by Tim Horton.

Add support for this behavior; see <rdar://problem/76028620> for more details.

  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

Add a couple of new flags (isSelected and isImageOverlayText) to indicate whether the interaction is over
selected text, and also whether the interaction is over text in an image overlay, respectively.

  • Shared/ios/InteractionInformationRequest.cpp:

(WebKit::InteractionInformationRequest::encode const):
(WebKit::InteractionInformationRequest::decode):
(WebKit::InteractionInformationRequest::isValidForRequest const):

Add a new position information request option to ignore user agent shadow root content.

  • Shared/ios/InteractionInformationRequest.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

Add a flag that's set when _imageExtractionTimeoutGestureRecognizer is recognized, and is about to present a
context menu, and is unset upon starting the context menu presentation.

(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):
(-[WKContentView gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]):
(-[WKContentView gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]):

Make the timeout gesture (_imageExtractionTimeoutGestureRecognizer) require the failure of the context menu
initiation gesture, such that this image extraction timeout gesture won't trigger if the context menu has
already been triggered.

(-[WKContentView _invalidateCurrentPositionInformation]):
(-[WKContentView _didCommitLoadForMainFrame]):

Pull logic for resetting cached position information into a helper, and call it inside
-_didCommitLoadForMainFrame.

(-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):

Reset the new flag (_contextMenuWasTriggeredByImageExtractionTimeout) if necessary, and use its existing value
to determine whether we should ignore UA shadow root content when performing a hit-test for the context menu
configuration.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::imageRendererAndImage):
(WebKit::imagePositionInformation):
(WebKit::elementPositionInformation):

Additionally supply the image URL and image data if includeImageData is set, even if the hit-tested node is
just a text node underneath an image element's overlay.

(WebKit::selectionPositionInformation):
(WebKit::WebPage::positionInformation):

Add support for the new position information flags.

10:48 PM Changeset in webkit [275269] by graouts@webkit.org
  • 11 edits
    2 deletes in trunk

Computed style for background-position should not use "left" and "top" keywords
https://bugs.webkit.org/show_bug.cgi?id=223878

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Add 106 new PASS results.

  • web-platform-tests/css/css-backgrounds/animations/background-position-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-position-origin-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/parsing/background-position-computed-expected.txt:
  • web-platform-tests/css/css-pseudo/first-letter-allowed-properties.html: Update the test per WPT PR #28284.

Source/WebCore:

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle): Ensure querying the computed
style for background-position longhands passes in the RenderStyle for the calc() case.
(WebCore::createPositionListForLayer):

LayoutTests:

  • fast/backgrounds/background-position-parsing-2-expected.txt: Removed.
  • fast/backgrounds/background-position-parsing-2.html: We remove this test because it is incorrect

and superseded by WPT tests that we now pass, checking parsing of both valid and invalid values.

  • fast/css/background-position-serialize-expected.txt:
  • fast/css/background-position-serialize.html: Update this test to not expect "left" or "top".
  • transitions/resources/transition-test-helpers.js: Update the helper to not rely on keywords

to obtain x and y values from the computed style.

10:34 PM Changeset in webkit [275268] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

ASSERT(m_sendPort) in IPC::Connection::open() when running some iOS unit tests
https://bugs.webkit.org/show_bug.cgi?id=223982
<rdar://75974285>

Reviewed by Alexey Proskuryakov.

If the UIProcess exits or severs it connection to the WebProcess while the WebProcess is
launching, the WebProcess ends up getting an invalid mach port upon initialization. This
is expected and XPCServiceInitializerDelegate::getConnectionIdentifier() was dealing with
this. getConnectionIdentifier() was checking if the port was invalid by checking if it was
MACH_PORT_NULL and calling exit() in such case. However, something has changed (likely
at OS level) and we are now sometimes getting MACH_PORT_DEAD instead of MACH_PORT_NULL.
The proper way to check if a mach port is valid is to call MACH_PORT_VALID(), which checks
for both MACH_PORT_NULL and MACH_PORT_DEAD. I therefore updated getConnectionIdentifier()
to use MACH_PORT_VALID() instead of an explicit check for MACH_PORT_NULL. This gets rid
of debug assertions we were seeing in the output of some iOS unit tests.

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:

(WebKit::XPCServiceInitializerDelegate::getConnectionIdentifier):

9:25 PM Changeset in webkit [275267] by Chris Dumez
  • 40 edits
    1 copy
    1 add
    1 delete in trunk

Service Worker scripts use too much memory in the network process
https://bugs.webkit.org/show_bug.cgi?id=223808
<rdar://75637093>

Reviewed by Geoff Garen.

Source/WebCore:

Previously, the network process would store service worker scripts in a SQLite database.
When starting to use service workers, we would load all those scripts from the database
into memory. This would use a decent amount of memory in the network process.

To address the issue, the approach is this patch is to store the scripts as separate
files on the filesystem instead. This when, when loading them, we can simply mmap() them
and greatly reduce dirty memory usage.

Note that the service worker process (which may be the WebContent process) also keeps a
copy of the imported service worker scripts for the service workers it is running. More
work will be needed in a follow-up but we should be able to extend the approach so that
the service worker process would only have a mmap'd version of those scripts. This would
reduce dirty memory usage on the WebContent/ServiceWorker process side as well. I am
doing this separately though to reduce patch size and facilitate review.

No new tests, there should be no Web-facing behavior change, just a decreased
dirty memory usage in the network process when service workers are used.

I did manual memory testing with a very large service worker that had one ~100MB main
script, importing another ~100MB script.

Here are the memory results without my change:

  • Networking (Dirty): 238MB (cold) / 331MB (warm)
  • WebContent (Dirty): 441MB (cold) / 857MB (warm)

Here are the memory results with my change:

  • Networking (Dirty): 22MB (cold) / 14MB (warm)
  • WebContent (Dirty): 440MB (cold) / 438MB (warm)

This shows that ALL memory from the scripts in the network process is no longer marked
as dirty. We also see a significant progression in the WebProcess in the warm case, since
the scripts are coming from the network process as shared memory in this case. There is
no progression in the WebProcess in the cold case yet, since the script were just
downloaded and are coming from the WebProcess to the NetworkProcess. In a follow-up, the
network process could send shared memory back to the WebProcess, after saving the scripts
to disk, so that the WebProcess can replace the copies of its scripts and save more memory.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Add new SWScriptStorage class to the project.

  • inspector/agents/worker/ServiceWorkerAgent.cpp:

(WebCore::ServiceWorkerAgent::getInitializationInfo):
Convert the script type from SharedBuffer to String.

  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::operator== const):
Fix assertions that were hitting when comparing to empty SharedBuffers (offset would be 0
and size would be 0). This was caught by API tests since we have some service worker API
tests that use empty worker scripts.

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadSynchronously):
Add some conversion from String to SharedBuffer to the script, and vice-versa, in the
service worker case.

  • workers/service/ServiceWorkerContextData.cpp:

(WebCore::ServiceWorkerContextData::isolatedCopy const):
(WebCore::scriptBufferToString):
(WebCore::stringToScriptBuffer):

  • workers/service/ServiceWorkerContextData.h:

(WebCore::ServiceWorkerContextData::ImportedScript::isolatedCopy const):
(WebCore::ServiceWorkerContextData::ImportedScript::decode):
(WebCore::ServiceWorkerContextData::decode):

  • Store scripts as SharedBuffer instead of String, so that they can hold mmap'd data.
  • Add scriptBufferToString() / stringToScriptBuffer() utility functions to convert script sources between String and SharedBuffer.
  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::ServiceWorkerThread):
Convert from script from SharedBuffer to String.

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::recordsTableSchema):
Update database schema and bump version now that we no longer store the
service worker script inside the SQLite database. Instead, those scripts
are stored separately on the filesystem via SWScriptStorage.

(WebCore::ImportedScriptAttributes::encode const):
(WebCore::ImportedScriptAttributes::decode):
Introduce new ImportedScriptAttributes struct which contains all the data
members of ServiceWorkerContextData::ImportedScript, except for the actual
script source. We now save a HashMap of ImportedScriptAttributes in the
databasae instead of HashMap of ImportedScript since we no longer want to
store imported script sources in the database, but rather store them
separately on the file system.

(WebCore::stripScriptSources):
Utility function to convert a HashMap of ServiceWorkerContextData::ImportedScript
into a HashMap of ImportedScriptAttributes (identical but without the script
source), ready to save in the SQLite database.

(WebCore::populateScriptSourcesFromDisk):
Utility function to construct a HashMap of ServiceWorkerContextData::ImportedScript
from a HasMap of ImportedScriptAttributes, coming from the SQLiteDatabase. The
missing script sources are fetched from the disk via SWScriptStorage.

(WebCore::RegistrationDatabase::~RegistrationDatabase):
Make sure we destroy the SWScriptStorage on the background queue for thread-safety.

(WebCore::RegistrationDatabase::scriptStorageDirectory const):
Returns the path on the filesystem where service worker scripts are stored.

(WebCore::RegistrationDatabase::scriptStorage):
Constructs (if necessary) a SWScriptStorage and return it.

(WebCore::RegistrationDatabase::clearAll):
Make sure we clear all the service worker scripts on disk in addition to the database,
now that they are stored separately.

(WebCore::RegistrationDatabase::doPushChanges):

  • Stop storing the script sources in the SQLite database, and instead store them as separate

files on the file system via SWScriptStorage.

  • Improve logging
  • When done storing the scripts to disk, send these new mmap'd versions back to the SWServerWorker on the main thread, so that it can replace it's heavy script sources with these ones. This helps reduce memory usage.

(WebCore::RegistrationDatabase::importRecords):

  • Load the script sources from the disk via SWScriptStorage, now that they are no longer stored in the SQLite database.
  • Improve logging.
  • workers/service/server/RegistrationDatabase.h:
  • workers/service/server/RegistrationStore.cpp:

(WebCore::RegistrationStore::didSaveWorkerScriptsToDisk):

  • workers/service/server/RegistrationStore.h:

Pass scripts that were saved to disk from the store to the SWServerWorker so that it
can replace its scripts sources with those new mmap'd version, in order to save memory.

  • workers/service/server/SWScriptStorage.cpp: Added.

(WebCore::hashURL):
(WebCore::SWScriptStorage::SWScriptStorage):
(WebCore::SWScriptStorage::registrationDirectory const):
(WebCore::SWScriptStorage::scriptPath const):
(WebCore::SWScriptStorage::store):
(WebCore::SWScriptStorage::retrieve):
(WebCore::SWScriptStorage::clear):

  • workers/service/server/SWScriptStorage.h: Added.

Add SWScriptStorage to deal with the storage / retrieval of Service
Worker scripts to / from disk, as files on the file system. When
going a retrieval, we return a script as a SharedBuffer which usually contains
mmap'd() data (we don't use mmap() for files that are smaller than the PAGE_SIZE).
The scripts reside in a Scripts/ folder, beside the database. The scripts are separated
by origin (using SHA256 of the origin as folder name with salt), and then by registration (by
using SHA256 of the registration scope as subfolder name with salt). The file name for the script
is a SHA256 of the script URL with salt.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::didSaveWorkerScriptsToDisk):
Pass scripts that were saved to disk from the store to the SWServerWorker so that it
can replace its scripts sources with those new mmap'd version, in order to save memory.

(WebCore::SWServer::updateWorker):
Convert script from String to SharedBuffer.

  • workers/service/server/SWServerJobQueue.cpp:

(WebCore::SWServerJobQueue::scriptFetchFinished):
Convert script from SharedBuffer to String.

  • workers/service/server/SWServerToContextConnection.cpp:

(WebCore::SWServerToContextConnection::setScriptResource):

  • workers/service/server/SWServerToContextConnection.h:

Take in a ServiceWorkerContextData::ImportedScript for convenience, instead of taking
all its data members as separate parameters.

  • workers/service/server/SWServerWorker.cpp:

(WebCore::SWServerWorker::SWServerWorker):

  • workers/service/server/SWServerWorker.h:

(WebCore::SWServerWorker::script const):
Use SharedBuffer type for script instead of String type, so that we can hold on the
mmap'd data and reduce memory usage.

Source/WebKit:

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:

Pass a ServiceWorkerContextData::ImportedScript struct in the SetScriptResource IPC
for convenience. We used to pass the ImportedScript data members separately.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::clearAllCachesFromDisk):
(WebKit::CacheStorage::Engine::clearCachesForOriginFromDirectories):
(WebKit::CacheStorage::Engine::deleteNonEmptyDirectoryOnBackgroundThread):

  • NetworkProcess/cache/CacheStorageEngine.h:
  • NetworkProcess/cache/NetworkCacheFileSystem.cpp:
  • NetworkProcess/cache/NetworkCacheFileSystem.h:
  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::deleteOldVersions):
Drop deleteDirectoryRecursively() implementation and use the existing
FileSystem::deleteNonEmptyDirectory() in wtf instead.

  • NetworkProcess/cache/NetworkCacheData.cpp:

(WebKit::NetworkCache::Data::mapToFile const):
Moved some of the mapToFile() logic to WTF, so that it can be reused.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::encodeSharedBuffer):
(IPC::decodeSharedBuffer):
Update SharedBuffer's IPC argument coder to distinguish a null SharedBuffer
and an empty one. We now use SharedBuffer to store service worker script sources
and it is possible for the script sources to be empty (and they are in some of
our API tests).

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::setScriptResource):
Pass a ServiceWorkerContextData::ImportedScript struct in the SetScriptResource IPC
for convenience. We used to pass the ImportedScript data members separately.

Source/WTF:

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::deleteNonEmptyDirectory):
Add an implementation of FileSystem::deleteNonEmptyDirectory() on all supported platforms.
We previously only had implemetations for Cocoa and Windows.

(WTF::FileSystemImpl::mapToFile):
Moved most of the mapToFile() logic from NetworkCacheData::mapToFile() to FileSystem, so that
it can be reused by the new SWScriptStorage class. It creates the destination file, mmap's it,
writes the provided data to it and then returns the mmap'd file.

(WTF::FileSystemImpl::readOrMakeSalt):
Move readOrMakeSalt() from NetworkCacheData to FileSystem so that it can be reused by the new
SWScriptStorage.

  • wtf/FileSystem.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-4.sqlite3: Removed.

Drop outdated pre-baked service worker registration database as it is no longer
needed and it is a pain to keep up to date.

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::TEST_F):
Add API test coverage for FileSystem::deleteNonEmptyDirectory(). It is not a new API but it
had no tests, it used more in this patch and we now have an implementation on all supported
platforms.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
  • Tweak service worker tests so that they expect a version 6 database instead of version 5, since I updated the database scheme and bumped the version.
  • Update test that was relying on a pre-baked service worker database file (with old schema) and have it dynamically generate the database instead by loading a page that registers a service worker.
9:22 PM Changeset in webkit [275266] by Ruben Turcios
  • 1 copy in tags/Safari-611.1.21.0.12

Tag Safari-611.1.21.0.12.

9:20 PM Changeset in webkit [275265] by Devin Rousso
  • 6 edits in trunk/LayoutTests

[Catalina WK2] 5 media/modern-media-controls/tracks-support tests consistently timing out
https://bugs.webkit.org/show_bug.cgi?id=223673
<rdar://problem/75769577>

Unreviewed, check that the subtitlesMenu exists before attempting to look at its children.

  • media/modern-media-controls/tracks-support/auto-text-track.html:
  • media/modern-media-controls/tracks-support/click-track-in-contextmenu.html:
  • media/modern-media-controls/tracks-support/hidden-tracks.html:
  • media/modern-media-controls/tracks-support/off-text-track.html:
  • media/modern-media-controls/tracks-support/text-track-selected-via-media-api.html:
9:18 PM Changeset in webkit [275264] by Ruben Turcios
  • 1 copy in tags/Safari-611.1.21.161.2

Tag Safari-611.1.21.161.2.

8:30 PM Changeset in webkit [275263] by clopez@igalia.com
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Gardening of tests.

Unreviewed gardening

Update list of expected failures.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
8:01 PM Changeset in webkit [275262] by Devin Rousso
  • 4 edits in trunk/Source

REGRESSION(r274607): media controls script is visible in Web Inspector even without the engineering "Show WebKit-internal scripts" enabled
https://bugs.webkit.org/show_bug.cgi?id=223961

Reviewed by Yusuke Suzuki.

It turns out that Web Inspector will only ignore scripts that have a source URL directive
that matches __InjectedScript_*.js, not those that have a (source) URL matching that.

In addition to Web Inspector ignoring these scripts in the UI, it will also cause the
Debugger to not pause in scripts with a matching source URL directive (unless the
local build engineering only "Pause in WebKit-internal scripts" is enabled).

Source/JavaScriptCore:

  • Scripts/make-js-file-arrays.py:

(main):
Add a //# sourceURL=__InjectedScript_*.js to the contents before it's encoded.

Source/WebCore:

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
Change the ScriptSourceCode here to not have a URL and have make-js-file-arrays.py
add a //# sourceURL=__InjectedScript_*.js to the contents before it's encoded.

7:55 PM Changeset in webkit [275261] by weinig@apple.com
  • 18 edits
    1 copy
    2 adds in trunk/Source

JSGlobalObject's m_customGetterFunctionMap and m_customSetterFunctionMap should be sets, not maps, and should use both the identifier and function pointer as the key
https://bugs.webkit.org/show_bug.cgi?id=223613

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • Adds a generic WeakGCSet class to go with the existing WeakGCMap.
  • Renames WeakGCMapBase to WeakGCHashTable, moves it to its own file and now uses it as the base class of both WeakGCSet and WeakGCMap.
  • Replaces JSGlobalObject's customGetterFunctionMap/customSetterFunctionMap with customGetterFunctionSet/customSetterFunctionSet, using the new WeakGCSet, and updates them to use both the function pointer and property name for the key, rather than just the function pointer which is what the previous code did. This allows multiple custom functions to use the same underlying function pointer as long as they have distinct property names, which is going to be used to optimize the bindings for CSSStyleDeclaration.

Add new files.

  • heap/Heap.cpp:

(JSC::Heap::runEndPhase):
(JSC::Heap::pruneStaleEntriesFromWeakGCHashTables):
(JSC::Heap::registerWeakGCHashTable):
(JSC::Heap::unregisterWeakGCHashTable):
(JSC::Heap::pruneStaleEntriesFromWeakGCMaps): Deleted.
(JSC::Heap::registerWeakGCMap): Deleted.
(JSC::Heap::unregisterWeakGCMap): Deleted.

  • heap/Heap.h:

Update for new name. WeakGCMapBase -> WeakGCHashTable.

  • runtime/JSCInlines.h:

Add WeakGCSetInlines.h

  • runtime/JSCustomGetterFunction.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSCustomGetterFunction::JSCustomGetterFunction):
(JSC::JSCustomGetterFunction::create):

  • runtime/JSCustomGetterFunction.h:
  • runtime/JSCustomSetterFunction.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSCustomSetterFunction::JSCustomSetterFunction):
(JSC::JSCustomSetterFunction::create):

  • runtime/JSCustomSetterFunction.h:

Add helper type CustomFunctionPointer and helper function customFunctionPointer()
to allow some generic hashing code to run on either JSCustomGetterFunction
or JSCustomSetterFunction.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::WeakCustomGetterOrSetterHash::hash):
(JSC::JSGlobalObject::WeakCustomGetterOrSetterHash::equal):
(JSC::JSGlobalObject::customGetterFunctionSet):
(JSC::JSGlobalObject::customSetterFunctionSet):
(JSC::JSGlobalObject::customGetterFunctionMap): Deleted.
(JSC::JSGlobalObject::customSetterFunctionMap): Deleted.
Replace m_customGetterFunctionMap/m_customSetterFunctionMap with
m_customGetterFunctionSet/m_customSetterFunctionSet. As the key is included
in the value, it saves space to use a set rather than a map. We now also
hash and compare both the function pointer and the property name to allow
sharing implementations.

  • runtime/JSObject.cpp:

(JSC::WeakCustomGetterOrSetterHashTranslator::hash):
(JSC::WeakCustomGetterOrSetterHashTranslator::equal):
(JSC::createCustomGetterFunction):
(JSC::createCustomSetterFunction):
Update creation functions to use the new sets, making use of the
ensureValue function and a HashTranslator allowing the use of a
std::pair<PropertyName, FunctionPointer> as an alternative lookup
key. This allows us to avoid creating the JSCustomGetterFunction/JSCustomSetterFunction
pointer if one with the same property name and function pointer are
already in the set.

  • runtime/WeakGCHashTable.h: Added.

(JSC::WeakGCHashTable::~WeakGCHashTable):
Moved from WeakGCMap and renamed as it is now the base of both
WeakGCMap and WeakGCSet.

  • runtime/WeakGCMap.h:

Update to use new WeakGCHashTable base class.

  • runtime/WeakGCMapInlines.h:

(JSC::KeyTraitsArg>::WeakGCMap):
(JSC::KeyTraitsArg>::~WeakGCMap):
Update for new Heap function names for WeakGCHashTable.

  • runtime/WeakGCSet.h: Added.
  • runtime/WeakGCSetInlines.h: Added.

(JSC::TraitsArg>::WeakGCSet):
(JSC::TraitsArg>::~WeakGCSet):
(JSC::TraitsArg>::find):
(JSC::TraitsArg>::find const):
(JSC::TraitsArg>::contains const):
(JSC::TraitsArg>::pruneStaleEntries):
Added a minimal WeakGCSet based on WeakGCMap.

Source/WTF:

Adds a heterogenous HashSet::ensure, which allows lazy construction of the value to
insert into the HashSet only if the heterogenous key (e.g. a key + HashTranslator
that are not the same as the HashSet's ValueType) does not match any item in the
set. For example given a set of ExpensiveToConstruct, but uniquely identifiable
by CheapToConstruct:

HashSet<ExpensiveToConstruct> hashSet;
...
struct Translator {

static unsigned hash(const CheapToConstruct& key)
{

return key.hash();

}
static bool equal(const ExpensiveToConstruct& a, const CheapToConstruct& b)
{

return a == b;

}

};

hashSet.ensure<Translator>(CheapToConstruct { ... }, [] {

return ExpensiveToConstruct { ... };

});

This will be used by the custom getter/setter sets to avoid constructing the GC objects
unless they are really needed.

Also took the opertunity to replace some typedefs with usings, and fixed some comments.

  • wtf/HashSet.h:

(WTF::Traits>::ensure):

7:52 PM Changeset in webkit [275260] by jiewen_tan@apple.com
  • 11 edits
    6 adds in trunk

PCM: Introduce PrivateClickMeasurementNetworkLoader
https://bugs.webkit.org/show_bug.cgi?id=222217
<rdar://74817863>

Reviewed by Youenn Fablet.

Source/WebKit:

This patch refactors PrivateClickMeasurementManager to use a newly introduced PrivateClickMeasurementNetworkLoader
instead of the PingLoad to handle network traffics such that PCMM can receive and process response bodies.

PrivateClickMeasurementNetworkLoader is a stripped down version of the ServiceWorkerSoftUpdateLoader, which is also
a derived class of NetworkLoadClient.

Covered by new test contents within existing test files.

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::NetworkSession):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::addPrivateClickMeasurementNetworkLoader):
(WebKit::NetworkSession::removePrivateClickMeasurementNetworkLoader):
Modifies the PCMM to use PCMNL. And then introduces a hash table to manage the lifetime of each PCMNL.

  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::PrivateClickMeasurementManager):
(WebKit::generateNetworkLoadParameters):
(WebKit::generateNetworkLoadParametersForHttpPost):
(WebKit::generateNetworkLoadParametersForHttpGet):
(WebKit::PrivateClickMeasurementManager::getTokenPublicKey):
(WebKit::PrivateClickMeasurementManager::getSignedUnlinkableToken):
(WebKit::PrivateClickMeasurementManager::fireConversionRequestImpl):
(WebKit::generateNetworkResourceLoadParameters): Deleted.
(WebKit::generateNetworkResourceLoadParametersForHttpPost): Deleted.
(WebKit::generateNetworkResourceLoadParametersForHttpGet): Deleted.

  • NetworkProcess/PrivateClickMeasurementManager.h:

(WebKit::PrivateClickMeasurementManager::setNetworkLoadFunction):
(WebKit::PrivateClickMeasurementManager::setPingLoadFunction): Deleted.
Modifies the PCMM to use PCMNL. Specifically, changes the token_public_key and unlinkable_token to be extracted
from the JSON content of the response.

  • NetworkProcess/PrivateClickMeasurementNetworkLoader.cpp: Added.

(WebKit::PrivateClickMeasurementNetworkLoader::start):
(WebKit::PrivateClickMeasurementNetworkLoader::PrivateClickMeasurementNetworkLoader):
(WebKit::PrivateClickMeasurementNetworkLoader::fail):
(WebKit::PrivateClickMeasurementNetworkLoader::willSendRedirectedRequest):
(WebKit::PrivateClickMeasurementNetworkLoader::didReceiveResponse):
(WebKit::PrivateClickMeasurementNetworkLoader::didReceiveBuffer):
(WebKit::PrivateClickMeasurementNetworkLoader::didFinishLoading):
(WebKit::PrivateClickMeasurementNetworkLoader::didFailLoading):
(WebKit::PrivateClickMeasurementNetworkLoader::didComplete):

  • NetworkProcess/PrivateClickMeasurementNetworkLoader.h: Added.

Introduces the PCMNL.

  • NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.h:

Fixes an Unified Build issue.

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:

Some paperwork.

LayoutTests:

  • http/tests/privateClickMeasurement/resources/fraudPreventionTestURL.py:

Changes the token_public_key and unlinkable_token to be returned via JSON contents.

7:34 PM Changeset in webkit [275259] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS Debug ] imported/w3c/web-platform-tests/cors/redirect-preflight.htm is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=223976

Unreviewed test gardening.

  • platform/mac/TestExpectations: Updated test expectations to Pass Failure while test is reviewed.
7:26 PM Changeset in webkit [275258] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Mac ] http/wpt/service-workers/service-worker-spinning-activate.https.html is flaky failing
Nhttps://bugs.webkit.org/show_bug.cgi?id=220754

Unreviewed test gardening.

  • platform/mac/TestExpectations: Updating test expectations to Pass Failure while test is reviewed.
7:21 PM Changeset in webkit [275257] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[mac-wk2] LayoutTest fast/mediastream/getUserMedia-webaudio.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=170960

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test expectations to include Failure.
6:54 PM Changeset in webkit [275256] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS ] inspector/protocol/condition.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=223975

Unreviewed test gardening.

  • platform/mac/TestExpectations: Updated test expectations to Pass Timeout while test is reviewed.
6:50 PM Changeset in webkit [275255] by Alan Coon
  • 3 edits
    2 adds in branches/safari-611.1.21.0-branch

Cherry-pick r275214. rdar://problem/76032705

[LFC][Integration] Elements that overflow inline-blocks are not hit tested correctly
https://bugs.webkit.org/show_bug.cgi?id=223932
rdar://75888718

Reviewed by Zalan Bujtas.
Source/WebCore:

If an inline block has overflowing children (for example due to negative margin) we may fail to hit test them.

Test: fast/inline-block/hit-test-negative-margin-child.html

  • layout/integration/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::hitTest):

Always descend into inline blocks even if their run didn't hit.

LayoutTests:

  • fast/inline-block/hit-test-negative-margin-child-expected.txt: Added.
  • fast/inline-block/hit-test-negative-margin-child.html: Added.

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

6:50 PM Changeset in webkit [275254] by Alan Coon
  • 8 edits in branches/safari-611.1.21.0-branch/Source

Versioning.

WebKit-7611.1.21.0.12

6:35 PM Changeset in webkit [275253] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Nullptr crash in Crash in WebCore::positionInParentBeforeNode(..) where a NULL check is missing.
https://bugs.webkit.org/show_bug.cgi?id=223639

Patch by Venky Dass <yaranamavenkataramana@apple.com> on 2021-03-30
Reviewed by Ryosuke Niwa.

Source/WebCore:

In positionInParentBeforeNode(..) there is a null check missing on a pointer - hence the crash.

Test: LayoutTests/editing/inserting/edit-style-and-insert-image.html

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::doApply):

LayoutTests:

Adding a regression test case.

  • editing/inserting/edit-style-and-insert-image-expected.txt: Added.
  • editing/inserting/edit-style-and-insert-image.html: Added.
6:19 PM Changeset in webkit [275252] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS Debug ] imported/w3c/web-platform-tests/xhr/xhr-timeout-longtask.any.worker.html is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=223973

unreviewed test gardening.

  • platform/mac/TestExpectations: Updated test expectations to Pass Failure while test is reviewed.
5:37 PM Changeset in webkit [275251] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[BigSur WK1 Debug] imported/w3c/web-platform-tests/xhr/event-upload-progress.any.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=223944

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
5:31 PM Changeset in webkit [275250] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ] imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https.html is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=223969

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updated test expectations to Pass Failure while test is reviewed.
4:57 PM Changeset in webkit [275249] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS ] imported/w3c/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=223966

Unreviewed test gardening.

  • platform/mac/TestExpectations: Updated test expectations to Pass Failure while test can be reviewed.
4:25 PM Changeset in webkit [275248] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

Allow WebAuthn process talk to the ASD
https://bugs.webkit.org/show_bug.cgi?id=223947
<rdar://75908828>

Reviewed by Brent Fulgham.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
4:12 PM Changeset in webkit [275247] by mark.lam@apple.com
  • 6 edits in trunk/Source

Add disableForwardingVPrintfStdErrToOSLog() and use it in the jsc shell.
https://bugs.webkit.org/show_bug.cgi?id=223963

Reviewed by Saam Barati.

Source/JavaScriptCore:

This prevents automatic forwarding of vprintf_stderr_common() to os_log_with_args(),
which results in duplicate output when using the jsc shell. As a result, ASSERT
fail messages and crash stack traces will be more readable.

  • jsc.cpp:

(main):

Source/WTF:

  • wtf/Assertions.cpp:

(WTF::disableForwardingVPrintfStdErrToOSLog):

  • wtf/Assertions.h:
  • wtf/WTFConfig.h:
4:05 PM Changeset in webkit [275246] by Ruben Turcios
  • 4 edits in branches/safari-612.1.9-branch/Source/WebKit/FeatureFlags

Apply patch. rdar://problem/76023886

Apply patch. rdar://76023886

4:03 PM Changeset in webkit [275245] by Robert Jenner
  • 3 edits in trunk/LayoutTests

[ Mac wk2 and iOS wk2 ] webrtc/libwebrtc/descriptionGetters.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=214084

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: removed release tag, as it is occurring outside of release.
  • platform/mac-wk2/TestExpectations: removed release tag, as it is occurring outside of release.
4:00 PM Changeset in webkit [275244] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

REGRESSION (r275172): Many com.apple.WebKit.Networking.Development crashes appearing in "other crashes"
https://bugs.webkit.org/show_bug.cgi?id=223952

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

Use OS_REASON_FLAG_NO_CRASH_REPORT to prevent crash reports. xpc_connection_kill didn't generate crash reports.

  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
(IPC::Connection::kill):

  • Platform/spi/Cocoa/ReasonSPI.h:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::ProcessLauncher::platformInvalidate):

3:46 PM Changeset in webkit [275243] by mark.lam@apple.com
  • 6 edits
    2 adds in trunk/Source/JavaScriptCore

Add Options::exitOnResourceExhaustion() to enable exiting instead of crashing on resource exhaustion.
https://bugs.webkit.org/show_bug.cgi?id=223959
rdar://63934158

Reviewed by Tadeu Zagallo.

This is useful to unblock fuzzers from false positive crashes due to resource
exhaustion. Currently, this is only applied to StructureID exhaustion.

Since we're adding this facility, we might as well implement it in such a way that
it can be easily deployed for other types of resource exhaustion as well.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • runtime/OptionsList.h:
  • runtime/ResourceExhaustion.cpp: Added.

(JSC::handleResourceExhaustion):

  • runtime/ResourceExhaustion.h: Added.
  • runtime/StructureIDTable.cpp:

(JSC::StructureIDTable::resize):

3:25 PM Changeset in webkit [275242] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

[macOS] Reduce logging for uninteresting sandbox violations
https://bugs.webkit.org/show_bug.cgi?id=223943
<rdar://problem/76014115>

Reviewed by Per Arne Vollan.

Testing has shown some IOKit properties needed by the macOS Network Process, and a handful of items needed when running in recovery mode. We should
allow these items to support proper function and to reduce telemetry for items that we don't need to learn more about.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
3:01 PM Changeset in webkit [275241] by rniwa@webkit.org
  • 5 edits in trunk/Source/WebCore

Occasional debug assert in GenericTaskQueue::~GenericTaskQueue
https://bugs.webkit.org/show_bug.cgi?id=223913

Reviewed by Eric Carlson.

Eagerly initialize WeakPtrImpl so that we don't hit debug assertions.

Also made Performance object use EventLoop.

No new tests since there is no test case that reliably reproduces this issue.

  • dom/TaskSource.h:

(TaskSource): Added PerformanceTimeline.

  • page/Performance.cpp:

(WebCore::Performance::Performance):
(WebCore::Performance::contextDestroyed):
(WebCore::Performance::queueEntry): Use EventLoopTaskGroup instead of GenericTaskQueue to deliver entries.

  • page/Performance.h:
  • platform/GenericTaskQueue.h:

(WebCore::GenericTaskQueue::GenericTaskQueue): Eagerly initialize WeakPtrImpl.
Also assert that we're creating this object in the main thread.

3:01 PM Changeset in webkit [275240] by mmaxfield@apple.com
  • 4 edits in trunk/Source/WebKit

Address post-commit comments on r275180
https://bugs.webkit.org/show_bug.cgi?id=223915

Reviewed by Kimmo Kinnunen.

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::waitForDidCreateImageBufferBackend):
(WebKit::RemoteRenderingBackendProxy::waitForDidFlush):
(WebKit::RemoteRenderingBackendProxy::sharedMemoryForGetImageData):
(WebKit::RemoteRenderingBackendProxy::waitForGetImageDataToComplete):
(WebKit::RemoteRenderingBackendProxy::getDataURLForImageBuffer):
(WebKit::RemoteRenderingBackendProxy::getDataForImageBuffer):
(WebKit::RemoteRenderingBackendProxy::getBGRADataForImageBuffer):
(WebKit::RemoteRenderingBackendProxy::getShareableBitmap):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
2:51 PM Changeset in webkit [275239] by jonlee@apple.com
  • 5 edits in trunk/Source/WebKit

Remove obsolete WebGL2 feature flag
https://bugs.webkit.org/show_bug.cgi?id=223945

Reviewed by Darin Adler.

  • FeatureFlags/WebKit-appletvos.plist: Feature flag is not referenced anywhere.
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:
2:33 PM Changeset in webkit [275238] by Alan Coon
  • 3 edits
    2 adds in branches/safari-611.1.21.161-branch

Cherry-pick r275214. rdar://problem/76022033

[LFC][Integration] Elements that overflow inline-blocks are not hit tested correctly
https://bugs.webkit.org/show_bug.cgi?id=223932
rdar://75888718

Reviewed by Zalan Bujtas.
Source/WebCore:

If an inline block has overflowing children (for example due to negative margin) we may fail to hit test them.

Test: fast/inline-block/hit-test-negative-margin-child.html

  • layout/integration/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::hitTest):

Always descend into inline blocks even if their run didn't hit.

LayoutTests:

  • fast/inline-block/hit-test-negative-margin-child-expected.txt: Added.
  • fast/inline-block/hit-test-negative-margin-child.html: Added.

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

2:31 PM Changeset in webkit [275237] by Alan Coon
  • 8 edits in branches/safari-611.1.21.161-branch/Source

Versioning.

WebKit-7611.1.21.161.2

2:27 PM Changeset in webkit [275236] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.8.1

Tag Safari-612.1.8.1.

2:23 PM Changeset in webkit [275235] by Peng Liu
  • 7 edits in trunk/Source

[GPUP] Add an IPC message to implement RemoteImageDecoderAVF::clearFrameBufferCache()
https://bugs.webkit.org/show_bug.cgi?id=223707

Reviewed by Youenn Fablet.

Source/WebCore:

No change in observable functionality.

  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:

Export method clearFrameBufferCache() so that we can call it from WebKit.

Source/WebKit:

  • GPUProcess/media/RemoteImageDecoderAVFProxy.cpp:

(WebKit::RemoteImageDecoderAVFProxy::deleteDecoder):
Replace const ImageDecoderIdentifier& with ImageDecoderIdentifier.
(WebKit::RemoteImageDecoderAVFProxy::encodedDataStatusChanged): Ditto.
(WebKit::RemoteImageDecoderAVFProxy::setExpectedContentSize): Ditto.
(WebKit::RemoteImageDecoderAVFProxy::setData): Ditto.
(WebKit::RemoteImageDecoderAVFProxy::createFrameImageAtIndex): Ditto.
(WebKit::RemoteImageDecoderAVFProxy::clearFrameBufferCache):

  • GPUProcess/media/RemoteImageDecoderAVFProxy.h:
  • GPUProcess/media/RemoteImageDecoderAVFProxy.messages.in:

Add IPC message clearFrameBufferCache(), and replace uint32_t with size_t
because IPC messages support it now.

  • WebProcess/GPU/media/RemoteImageDecoderAVF.cpp:

(WebKit::RemoteImageDecoderAVF::setData):
(WebKit::RemoteImageDecoderAVF::clearFrameBufferCache):
Implement the same behavior as ImageDecoderAVFObjC::clearFrameBufferCache().
This change will reduce the peak memory usage.

2:14 PM Changeset in webkit [275234] by Robert Jenner
  • 3 edits in trunk/LayoutTests

[ macOS iOS ] crypto/crypto-random-values-oom.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=223949

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: Updated expectations to Pass Timeout while test is reviewed.
  • platform/mac/TestExpectations: Updated expectations to Pass Timeout while test is reviewed.
1:59 PM Changeset in webkit [275233] by Ryan Haddad
  • 2 edits in trunk/Source/JavaScriptCore

Ensure that GlobalPropertyInfo is allocated on the stack.
https://bugs.webkit.org/show_bug.cgi?id=223911

Unreviewed test gardening.

Rebaseline builtins generator tests after r275212.

  • Scripts/tests/builtins/expected/WebCoreJSBuiltins.h-result:
1:57 PM Changeset in webkit [275232] by Ryan Haddad
  • 2 edits in trunk/JSTests

Unreviewed test gardening.

  • stress/early-return-from-builtin.js: Disable this test for memoryLimited configurations.
1:34 PM Changeset in webkit [275231] by Ruben Turcios
  • 1 delete in tags/Safari-612.1.9

Delete tag.

1:25 PM Changeset in webkit [275230] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Nullptr crash in applyCommonButtonPaddingToStyle
https://bugs.webkit.org/show_bug.cgi?id=223917
rdar://57262957

Reviewed by Zalan Bujtas.

  • rendering/RenderThemeIOS.mm:

(WebCore::applyCommonButtonPaddingToStyle):

Null check frame.

1:21 PM Changeset in webkit [275229] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add more information to GC verifier verbose dumps.
https://bugs.webkit.org/show_bug.cgi?id=223951

Reviewed by Yusuke Suzuki.

  • heap/VerifierSlotVisitor.cpp:

(JSC::VerifierSlotVisitor::dumpMarkerData):

12:47 PM Changeset in webkit [275228] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Release assert in compareAnimationsByCompositeOrder
https://bugs.webkit.org/show_bug.cgi?id=223368

Patch by Frédéric Wang <fwang@igalia.com> on 2021-03-30
Reviewed by Antoine Quint.

Source/WebCore:

AnimationTimeline::cancelDeclarativeAnimationsForStyleable currently only calls cancel() on
the declarative animation, which means the owning element is still associated to the
animation and that one continues to be accessible via Element's getAnimations(). When members
like pause() are called on that animation, one can obtain inconsistent state for
KeyframeEffectStack, leading to a debug ASSERT(!cssAnimationList->isEmpty()); and a
RELEASE_ASSERT_NOT_REACHED() in compareCSSAnimations(). This patch forces the owning element
to be clear during cancelDeclarativeAnimationsForStyleable in order to address these issues.
More code refactoring and cleanup should be done in follow-up patches, though.

Test: animations/animation-remove-element-crash.html

  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::cancelDeclarativeAnimationsForStyleable): Use cancelFromStyle()
so that the owning element is also cleared.

LayoutTests:

Add regression test.

  • animations/animation-remove-element-crash-expected.txt: Added.
  • animations/animation-remove-element-crash.html: Added.
12:42 PM Changeset in webkit [275227] by graouts@webkit.org
  • 6 edits in trunk

CSS properties backed by StyleImage should not interpolate when one of the values is "none"
https://bugs.webkit.org/show_bug.cgi?id=223929

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark 76 new PASS results.

  • web-platform-tests/css/css-backgrounds/animations/background-image-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-image-source-interpolation-expected.txt:
  • web-platform-tests/css/css-lists/animations/list-style-image-interpolation-expected.txt:

Source/WebCore:

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

12:17 PM Changeset in webkit [275226] by Jonathan Bedard
  • 2 edits in trunk/Tools

[resultsdbpy] Return new-style commits (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=223262
<rdar://problem/75483361>

Unreviewed follow-up fix.

  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller.py:

(CommitController.register): Allow branch in commit uploads.

12:14 PM Changeset in webkit [275225] by Peng Liu
  • 5 edits in trunk/Source/WebCore

Rename MediaElementSession::playbackPermitted() to MediaElementSession::playbackStateChangePermitted()
https://bugs.webkit.org/show_bug.cgi?id=220939

Reviewed by Youenn Fablet.

A follow-up patch of r271870 to rename function playbackPermitted() and
the enum class MediaPlaybackOperation.

No new tests as there is no change in functionality.

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::userGestureRequired const):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay const):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::play):
(WebCore::HTMLMediaElement::pause):
(WebCore::HTMLMediaElement::pauseInternal):
(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
(WebCore::HTMLMediaElement::updateShouldPlay):

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackStateChangePermitted const):
(WebCore::MediaElementSession::canShowControlsManager const):
(WebCore::MediaElementSession::updateMediaUsageIfChanged):
(WebCore::MediaElementSession::playbackPermitted const): Deleted.

  • html/MediaElementSession.h:
12:08 PM EarlyWarningSystem edited by aakash_jain@apple.com
(diff)
12:06 PM EarlyWarningSystem edited by aakash_jain@apple.com
(diff)
12:06 PM Changeset in webkit [275224] by graouts@webkit.org
  • 5 edits in trunk

Account for "hanging" and "each-line" when blending text-interpolation
https://bugs.webkit.org/show_bug.cgi?id=223914

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-text/animations/text-indent-composition-expected.txt:
  • web-platform-tests/css/css-text/animations/text-indent-interpolation-expected.txt:

Source/WebCore:

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

12:04 PM Changeset in webkit [275223] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix after r275210. Disambiguate the WeakPtrFactory in RemoteMediaSessionCoordinatorProxy with a using statement.

  • UIProcess/Media/RemoteMediaSessionCoordinatorProxy.h:
12:04 PM Changeset in webkit [275222] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Enable sample_compare operations in Metal ANGLE
Sample_compare operations, and shadow sampling was accidently switched off when initially
setting up ANGLE_Metal. Enabling shadow sampling fixes most of the
webgl/2.0.0/deqp/functional/gles3/textureshadow/ test suite, which is currently failing.

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

Patch by Kyle Piddington <Kyle Piddington> on 2021-03-30
Reviewed by Jon Lee.

  • src/libANGLE/renderer/metal/DisplayMtl.mm:

(rx::DisplayMtl::initializeFeatures):

12:02 PM Changeset in webkit [275221] by graouts@webkit.org
  • 6 edits in trunk

[CSS Backgrounds] WPT test css/css-backgrounds/animations/border-image-width-interpolation.html asserts
https://bugs.webkit.org/show_bug.cgi?id=206578

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update the test output, the remaining failures are due to issues with calc() serialization (see
https://bugs.webkit.org/show_bug.cgi?id=223875).

  • web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation-expected.txt:

Source/WebCore:

Ensure we pass the RenderStyle through the methods eventually calling createValue() for calculated lengths.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForNinePieceImageQuad):
(WebCore::valueForNinePieceImage):
(WebCore::valueForReflection):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

LayoutTests:

Unskip imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation.html
as well as imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-outset-composition.html
and imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-width-composition.html.

11:57 AM Changeset in webkit [275220] by jberlin@webkit.org
  • 2 edits in trunk/Tools

Reinstate my committer status.

Unreviewed.

  • Scripts/webkitpy/common/config/contributors.json:
11:56 AM Changeset in webkit [275219] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r275197.

The change is spooky.

Reverted changeset:

"Safari crashed and lost all tabs, after unlocking sleeping
device"
https://bugs.webkit.org/show_bug.cgi?id=223832
https://commits.webkit.org/r275197

11:54 AM Changeset in webkit [275218] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Make RunWebKitTests class easy to extend
https://bugs.webkit.org/show_bug.cgi?id=223939

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(RunWebKitTests):
(RunWebKitTests.setLayoutTestCommand): Separated out code to set the layout-test command.
(RunWebKitTests.start):

11:47 AM Changeset in webkit [275217] by Andres Gonzalez
  • 11 edits in trunk

Fix for accessibility/textarea-insertion-point-line-number.html.
https://bugs.webkit.org/show_bug.cgi?id=223936
<rdar://problem/76007361>

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/textarea-insertion-point-line-number.html

Added AXCoreObject::insertionPointLineNumber to support this functionality.
This replaces the previous implementation in the wrapper's accessibilityAttributeValue.
There were several problems with the previous implementation that was
doing an unnecessary and buggy round trip from Ranges to indexes and
back to VisiblePositions.

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::insertionPointLineNumber const):

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::insertionPointLineNumber const):
(WebCore::AXIsolatedObject::selectionStart const): Deleted.
(WebCore::AXIsolatedObject::selectionEnd const): Deleted.

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

Updated this test and corrected several issues where the expected
returned values were incorrect.

  • accessibility/textarea-insertion-point-line-number-expected.txt:
  • accessibility/textarea-insertion-point-line-number.html:
11:32 AM Changeset in webkit [275216] by Aditya Keerthi
  • 3 edits
    2 adds in trunk

[iOS] Two taps required to view <select> options on Square Checkout
https://bugs.webkit.org/show_bug.cgi?id=223933
<rdar://problem/74828029>

Reviewed by Wenson Hsieh.

Source/WebKit:

Some sites, such as Square Checkout, wrap all the <option>s in a
<select> element in a single <optgroup>. With the new context menu
appearance for <select> on iOS, this means that users have to tap twice
to view the options on some sites (once to bring up the menu and once
to expand the grouped menu).

To fix, promote the the contents of the grouped submenu to the root menu
if all the options are contained within a single submenu.

Test: fast/forms/ios/form-control-refresh/select/all-options-in-single-optgroup.html

  • UIProcess/ios/forms/WKFormSelectPicker.mm:

(-[WKSelectPicker createMenu]):

LayoutTests:

Added a layout test to exercise the new codepath when a <select>
has a single <optgroup> containing all of the <option>s.

  • fast/forms/ios/form-control-refresh/select/all-options-in-single-optgroup-expected.txt: Added.
  • fast/forms/ios/form-control-refresh/select/all-options-in-single-optgroup.html: Added.
11:14 AM Changeset in webkit [275215] by Simon Fraser
  • 17 edits in trunk

Allow non-60fps display updates to be driven by DisplayRefreshMonitor
https://bugs.webkit.org/show_bug.cgi?id=223912

Reviewed by Sam Weinig.
Source/WebCore:

Previously, RenderingUpdateScheduler::scheduleAnimation() would return false for any
preferredFramesPerSecond which is not 60fps, causing RenderingUpdateScheduler to fall back
to its timer mechanism. This meant that throttled (e.g. by low power) pages and display
updates on non-60fps display would all use timers. This is undesirable because we want
alignment with display refresh, and to avoid timer drift between multiple throttled
documents.

The fix has two parts. First, we need to fix RenderingUpdateScheduler and
ScriptedAnimationController to compute their frame rates in terms of FramesPerSecond, rather
than Seconds, because using the latter requires conversion to Seconds and back via
m_page.preferredRenderingUpdateInterval() which was awkward. So have Page expose
preferredRenderingUpdateFramesPerSecond().

Also add preferredFramesPerSecond(), and have both it and preferredFrameInterval() take the
"near 60fps" flag as an argument, so doing the common math in AnimationFrameRate.

The second part of the fix is to move "preferredFramesPerSecond" from
RenderingUpdateScheduler to DisplayRefreshMonitorClient, since clients should be able to
request different frame rates. Then we pass the DisplayUpdate to
DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded(), and finally use it to do the math
of whether to skip an update for this client.

Tested by API tests in AnimationFrameRate.cpp, and by
fast/animation/request-animation-frame-throttling-lowPowerMode.html

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::interval const): This function (used for testing)
is just a synonym for preferredScriptedAnimationInterval(), but left here because it's exported
and maybe the compiler can inline preferredScriptedAnimationInterval().
(WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const): Just call
preferredFrameInterval() with throttlingReasons(), which is the union of the reasons for
the page and for this ScriptedAnimationController.
(WebCore::ScriptedAnimationController::throttlingReasons const): No reason not to return m_throttlingReasons
if we don't have a page. Should never happen.
(WebCore::ScriptedAnimationController::shouldRescheduleRequestAnimationFrame const): Logging.
(WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks): Logging.

  • page/Page.cpp:

(WebCore::Page::windowScreenDidChange): The display nominal FPS may have changed so recompute the update frequency.
(WebCore::Page::preferredRenderingUpdateFramesPerSecond const): Return the preferred update in FramesPerSecond. Will return
null if throttling results in a < 1fps update.
(WebCore::Page::preferredRenderingUpdateInterval const): Push the "near 60fps" logic into the helper function.
(WebCore::Page::setIsVisuallyIdleInternal): Clearer to use OptionSet<>::set().
(WebCore::Page::handleLowModePowerChange): Ditto.

  • page/Page.h:

(WebCore::Page::displayNominalFramesPerSecond const):
(WebCore::Page::throttlingReasons const):

  • page/RenderingUpdateScheduler.cpp:

(WebCore::RenderingUpdateScheduler::scheduleAnimation): Remove code that fell back to a timer for any non-60fps rate.
(WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency): Compute if we have to use a timer.
(WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
(WebCore::RenderingUpdateScheduler::setPreferredFramesPerSecond): Deleted.

  • page/RenderingUpdateScheduler.h:
  • platform/graphics/AnimationFrameRate.cpp: Simplify some code with halfSpeedThrottlingReasons.

(WebCore::preferredFramesPerSecond): Similar logic to preferredFrameInterval, but for FramesPerSecond values.
(WebCore::preferredFrameInterval):

  • platform/graphics/AnimationFrameRate.h:
  • platform/graphics/DisplayRefreshMonitor.cpp:

(WebCore::DisplayRefreshMonitor::displayDidRefresh):

  • platform/graphics/DisplayRefreshMonitorClient.cpp:

(WebCore::DisplayRefreshMonitorClient::setPreferredFramesPerSecond):
(WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded):

  • platform/graphics/DisplayRefreshMonitorClient.h:

(WebCore::DisplayRefreshMonitorClient::preferredFramesPerSecond const):

  • platform/graphics/DisplayUpdate.cpp:

(WebCore::DisplayUpdate::relevantForUpdateFrequency const): Compute whether this update is relevant
for a client who wants updates at 'preferredFramesPerSecond'.

  • platform/graphics/DisplayUpdate.h:

Source/WebKit:

Improve the logging.

  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::DisplayLink):
(WebKit::DisplayLink::addObserver):

Tools:

New API tests for preferredFramesPerSecond() and
DisplayUpdate::relevantForUpdateFrequency(), and duplicate existing tests for the "use
display nominal FPS" vs "use near-60 FPS" settings.

  • TestWebKitAPI/Tests/WebCore/AnimationFrameRate.cpp:

(TestWebKitAPI::TEST):

10:34 AM Changeset in webkit [275214] by Antti Koivisto
  • 3 edits
    2 adds in trunk

[LFC][Integration] Elements that overflow inline-blocks are not hit tested correctly
https://bugs.webkit.org/show_bug.cgi?id=223932
rdar://75888718

Reviewed by Zalan Bujtas.
Source/WebCore:

If an inline block has overflowing children (for example due to negative margin) we may fail to hit test them.

Test: fast/inline-block/hit-test-negative-margin-child.html

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::hitTest):

Always descend into inline blocks even if their run didn't hit.

LayoutTests:

  • fast/inline-block/hit-test-negative-margin-child-expected.txt: Added.
  • fast/inline-block/hit-test-negative-margin-child.html: Added.
10:32 AM Changeset in webkit [275213] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.7.12

Tag Safari-612.1.7.12.

10:21 AM Changeset in webkit [275212] by mark.lam@apple.com
  • 8 edits in trunk/Source

Ensure that GlobalPropertyInfo is allocated on the stack.
https://bugs.webkit.org/show_bug.cgi?id=223911
rdar://75865742

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

We rely on GlobalPropertyInfo being allocated on the stack to allow its JSValue
value to be scanned by the GC. Unfortunately, an ASAN compilation would choose
to allocate the GlobalPropertyInfo on a side buffer instead of directly on the
stack. This prevents the GC from doing the needed scan.

We'll fix this by suppressing ASAN on the functions that allocated GlobalPropertyInfo
arrays. Also added an ASSERT in the GlobalPropertyInfo constructor to assert that
it is allocated on the stack.

  • Scripts/wkbuiltins/builtins_generate_internals_wrapper_implementation.py:

(BuiltinsInternalsWrapperImplementationGenerator.generate_initialize_method):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::initStaticGlobals):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::exposeDollarVM):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::GlobalPropertyInfo::GlobalPropertyInfo):

Source/WebCore:

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::addBuiltinGlobals):

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::JSDOMWindowBase::initStaticGlobals):

  • bindings/js/JSDOMWindowBase.h:
10:13 AM Changeset in webkit [275211] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Add build step to find list of layout tests modified by a patch
https://bugs.webkit.org/show_bug.cgi?id=223890

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(AnalyzePatch): Created common base class for CheckPatchRelevance and FindModifiedLayoutTests.
(AnalyzePatch._get_patch): Moved to base class.
(AnalyzePatch._addToLog): Ditto.
(AnalyzePatch.getResultSummary): Ditto.
(CheckPatchRelevance):
(FindModifiedLayoutTests): Build step to find list of layout tests modified by the patch being processed.
(FindModifiedLayoutTests.find_test_names_from_patch):
(FindModifiedLayoutTests.start):

  • CISupport/ews-build/steps_unittest.py: Added unit-tests.
10:10 AM Changeset in webkit [275210] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebKit

MediaSessionCoordinatorPrivateProxy should have a Client
https://bugs.webkit.org/show_bug.cgi?id=223935

Reviewed by Eric Carlson.

Similar to the non-proxy MediaSessionCoordinatorPrivate, the Proxy
version should have a client, used for communicating state changes
downstream.

  • UIProcess/Media/MediaSessionCoordinatorPrivateProxy.h:

(WebKit::MediaSessionCoordinatorPrivateProxy::setClient):
(WebKit::MediaSessionCoordinatorPrivateProxy::client const):

  • UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp:

(WebKit::RemoteMediaSessionCoordinatorProxy::seekSessionToTime):
(WebKit::RemoteMediaSessionCoordinatorProxy::playSession):
(WebKit::RemoteMediaSessionCoordinatorProxy::pauseSession):
(WebKit::RemoteMediaSessionCoordinatorProxy::setSessionTrack):

  • UIProcess/Media/RemoteMediaSessionCoordinatorProxy.h:
  • WebProcess/MediaSession/RemoteMediaSessionCoordinator.messages.in:
10:07 AM Changeset in webkit [275209] by Ruben Turcios
  • 8 edits in branches/safari-612.1.8-branch/Source

Versioning.

WebKit-7612.1.8.1

9:40 AM Changeset in webkit [275208] by Ruben Turcios
  • 8 edits in branches/safari-612.1.7-branch/Source

Versioning.

WebKit-7612.1.7.12

9:32 AM Changeset in webkit [275207] by Peng Liu
  • 6 edits in trunk/Source/WebKit

[GPUP] Add "CodeComplete" attribute to some feature flags
https://bugs.webkit.org/show_bug.cgi?id=223907

Reviewed by Daniel Bates.

Add "CodeComplete" attribute for three feature flags:

  • gpu_process_canvas_rendering
  • gpu_process_media
  • gpu_process_webrtc

Also replace tabs in the plist files with spaces.

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:
  • Scripts/combine-feature-flags-plist.py:

(main): Fix an issue to merge "attributes".

9:31 AM Changeset in webkit [275206] by weinig@apple.com
  • 13 edits in trunk/Source/WebCore

Generalize ColorComponents to support an arbritrary number of components (though really we will only ever want 3, 4, or 5)
https://bugs.webkit.org/show_bug.cgi?id=223901

Reviewed by Darin Adler.

Add a length to ColorComponents to allow an arbitrary number of components. This
will be used to support cases where we only want to carry the three color components
(not alpha) and will be useful if we ever need to add back CMYKA support.

A new dedecution guide added allows for cases that currently deduce to remain.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix):
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<HWBA<float>>):
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<HSLA<float>>):
(WebCore::CSSPropertyParserHelpers::fixupHueComponentsPriorToMix):

  • platform/graphics/Color.cpp:

(WebCore::Color::colorSpaceAndComponents const):

  • platform/graphics/Color.h:

(WebCore::Color::OutOfLineComponents::create):
(WebCore::Color::OutOfLineComponents::components const):
(WebCore::Color::OutOfLineComponents::OutOfLineComponents):

  • platform/graphics/ColorComponents.h:

(WebCore::ColorComponents::ColorComponents):
(WebCore::mapColorComponents):
(WebCore::N>::map const):
(WebCore::=):
(WebCore::N>::operator const):
(WebCore::N>::abs const):
(WebCore::N>::get const):
(WebCore::N>::subset const):
(WebCore::perComponentMax):
(WebCore::perComponentMin):
(WebCore::operator==):
(WebCore::operator!=):
(WebCore::ColorComponents<T>::map const): Deleted.
(WebCore::ColorComponents<T>::operator const): Deleted.
(WebCore::ColorComponents<T>::abs const): Deleted.
(WebCore::ColorComponents<T>::get const): Deleted.

  • platform/graphics/ColorMatrix.h:

(WebCore::RowCount>::transformedColorComponents const):
(WebCore::applyMatricesToColorComponents):

  • platform/graphics/ColorSpace.h:

(WebCore::callWithColorType):

  • platform/graphics/ColorTypes.h:

(WebCore::makeFromComponents):
(WebCore::clampedComponent):
(WebCore::clampedComponents):
(WebCore::clampedComponentsExceptAlpha):
(WebCore::makeFromComponentsClamping):
(WebCore::makeFromComponentsClampingExceptAlpha):
(WebCore::asColorComponents):

  • platform/graphics/filters/FEColorMatrix.cpp:
  • platform/graphics/filters/FEMorphology.cpp:

(WebCore::makeColorComponentsfromPixelValue):
(WebCore::makePixelValueFromColorComponents):
(WebCore::minOrMax):
(WebCore::columnExtremum):
(WebCore::kernelExtremum):
(WebCore::FEMorphology::platformApplyGeneric):

  • platform/graphics/filters/FETurbulence.cpp:

(WebCore::FETurbulence::noise2D const):
(WebCore::toIntBasedColorComponents):
(WebCore::FETurbulence::calculateTurbulenceValueForPoint const):

  • platform/graphics/filters/FETurbulence.h:
  • platform/graphics/filters/FilterOperation.cpp:

(WebCore::hueRotate):

9:16 AM Changeset in webkit [275205] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[RenderTreeBuilder] Anonymous table cell collapsing should also cleanup the inline tree
https://bugs.webkit.org/show_bug.cgi?id=223910

Reviewed by Antti Koivisto.

Let's delete the inline tree when the anonymous table cell is collapsed.
It's completely redundant at this point as the content is moved over to a previous sibling.

  • rendering/updating/RenderTreeBuilderTable.cpp:

(WebCore::RenderTreeBuilder::Table::collapseAndDetachAnonymousNextSibling):
(WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingCells):
(WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows):
(WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblings): Deleted.

  • rendering/updating/RenderTreeBuilderTable.h:
8:20 AM Changeset in webkit [275204] by Chris Gambrell
  • 34 edits
    5 moves
    13 adds
    12 deletes in trunk/LayoutTests

[LayoutTests] Convert http/tests/contentextensions convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=223835
<rdar://problem/75912102>

Reviewed by Jonathan Bedard.

  • http/tests/contentextensions/block-cookies-in-csp-report-expected.txt:
  • http/tests/contentextensions/block-cookies-in-csp-report.php: Removed.
  • http/tests/contentextensions/block-cookies-in-csp-report.php.json: Removed.
  • http/tests/contentextensions/block-cookies-in-csp-report.py: Added.
  • http/tests/contentextensions/block-cookies-in-csp-report.py.json: Added.
  • http/tests/contentextensions/block-cookies-in-image-load-in-onunload-expected.txt:
  • http/tests/contentextensions/block-cookies-in-image-load-in-onunload.html:
  • http/tests/contentextensions/block-cookies-in-image-load-in-onunload.html.json:
  • http/tests/contentextensions/block-cookies-in-ping-expected.txt:
  • http/tests/contentextensions/block-cookies-in-ping.html:
  • http/tests/contentextensions/block-cookies-in-ping.html.json:
  • http/tests/contentextensions/block-csp-report-expected.txt:
  • http/tests/contentextensions/block-csp-report.php: Removed.
  • http/tests/contentextensions/block-csp-report.php.json: Removed.
  • http/tests/contentextensions/block-csp-report.py: Added.
  • http/tests/contentextensions/block-csp-report.py.json: Added.
  • http/tests/contentextensions/block-everything-unless-domain-redirect.php: Removed.
  • http/tests/contentextensions/block-everything-unless-domain-redirect.php.json: Removed.
  • http/tests/contentextensions/block-everything-unless-domain-redirect.py: Added.
  • http/tests/contentextensions/block-everything-unless-domain-redirect.py.json: Added.
  • http/tests/contentextensions/block-image-load-in-onunload-expected.txt:
  • http/tests/contentextensions/block-image-load-in-onunload.html:
  • http/tests/contentextensions/block-image-load-in-onunload.html.json:
  • http/tests/contentextensions/block-ping-expected.txt:
  • http/tests/contentextensions/block-ping-resource-type-ping-expected.txt:
  • http/tests/contentextensions/block-ping-resource-type-ping.html:
  • http/tests/contentextensions/block-ping-resource-type-ping.html.json:
  • http/tests/contentextensions/block-ping-resource-type-raw-expected.txt:
  • http/tests/contentextensions/block-ping-resource-type-raw.html:
  • http/tests/contentextensions/block-ping-resource-type-raw.html.json:
  • http/tests/contentextensions/block-ping.html:
  • http/tests/contentextensions/block-ping.html.json:
  • http/tests/contentextensions/fetch-redirect-blocked.html:
  • http/tests/contentextensions/hide-on-csp-report-expected.txt:
  • http/tests/contentextensions/hide-on-csp-report.php: Removed.
  • http/tests/contentextensions/hide-on-csp-report.php.json: Removed.
  • http/tests/contentextensions/hide-on-csp-report.py: Added.
  • http/tests/contentextensions/hide-on-csp-report.py.json: Added.
  • http/tests/contentextensions/hide-on-ping-expected.txt:
  • http/tests/contentextensions/hide-on-ping-with-ping-that-redirects-expected.txt:
  • http/tests/contentextensions/hide-on-ping-with-ping-that-redirects.html:
  • http/tests/contentextensions/hide-on-ping-with-ping-that-redirects.html.json:
  • http/tests/contentextensions/hide-on-ping.html:
  • http/tests/contentextensions/hide-on-ping.html.json:
  • http/tests/contentextensions/main-resource-redirect-blocked.php: Removed.
  • http/tests/contentextensions/main-resource-redirect-blocked.php.json: Removed.
  • http/tests/contentextensions/main-resource-redirect-blocked.py: Added.
  • http/tests/contentextensions/main-resource-redirect-blocked.py.json: Added.
  • http/tests/contentextensions/reload-without-contentextensions.html:
  • http/tests/contentextensions/resources/delete-ping.php: Removed.
  • http/tests/contentextensions/resources/delete-ping.py: Added.
  • http/tests/contentextensions/resources/get-ping-data.php: Removed.
  • http/tests/contentextensions/resources/get-ping-data.py: Added.
  • http/tests/contentextensions/resources/ping-file-path.php: Removed.
  • http/tests/contentextensions/resources/ping_file_path.py: Added.
  • http/tests/contentextensions/resources/redirect.php: Removed.
  • http/tests/contentextensions/resources/redirect.py: Added.
  • http/tests/contentextensions/resources/save-ping-and-redirect-to-save-ping.php: Removed.
  • http/tests/contentextensions/resources/save-ping-and-redirect-to-save-ping.py: Added.
  • http/tests/contentextensions/resources/save-ping.php: Removed.
  • http/tests/contentextensions/resources/save-ping.py: Added.
  • http/tests/contentextensions/resources/save_ping.py: Added.

(not_being_called):
(save_ping):

  • http/tests/contentextensions/resources/subresource-redirect.php: Removed.
  • http/tests/contentextensions/resources/subresource-redirect.py: Added.
  • http/tests/contentextensions/subresource-redirect-blocked.html:
  • http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.py:
  • http/tests/resourceLoadStatistics/ping-to-prevalent-resource-expected.txt:
  • http/tests/resourceLoadStatistics/ping-to-prevalent-resource.html:
7:12 AM Changeset in webkit [275203] by commit-queue@webkit.org
  • 15 edits in trunk/Source

Now Playing content isn't updated when media session's Metadata is modified
https://bugs.webkit.org/show_bug.cgi?id=223795
Source/WebCore:

<rdar://problem/75883478>

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-03-30
Reviewed by Eric Carlson.

Manually tested. Ensuring that immediately after modifying the MediaSession metadata, NowPlaying reflects the change.

  • Modules/mediasession/MediaSession.h:

(WebCore::MediaSession::Observer::metadataChanged): Change method prototype to avoid unnecessary refcount.
(WebCore::MediaSession::Observer::positionStateChanged): Change method prototype to pass argument by reference rather than value (and easier forward declaration).

  • Modules/mediasession/MediaSessionCoordinator.cpp:

(WebCore::MediaSessionCoordinator::positionStateChanged): Pass argument by reference rather than value.

  • Modules/mediasession/MediaSessionCoordinator.h:
  • Modules/mediasession/MediaSessionCoordinatorPrivate.h:
  • html/MediaElementSession.cpp: Add MediaSessionObserver class, we use separate proxy to avoid multiple inheritance of CanMakeWeakPtr.

(WebCore::MediaSessionObserver::MediaSessionObserver):
(WebCore::MediaSessionObserver::~MediaSessionObserver):
(WebCore::MediaSessionObserver::actionHandlersChanged):
(WebCore::MediaElementSession::registerWithDocument): Add MediaElementSession as Media Session observer when it's added to the DOM.
(WebCore::MediaElementSession::unregisterWithDocument): Remove MediaElementSession as Media Session observer when it's removed from the DOM.
(WebCore::MediaElementSession::didReceiveRemoteControlCommand): Simplify with new mediaSession() helper.
(WebCore::MediaElementSession::nowPlayingInfo const): Simplify with new mediaSession() helper.
(WebCore::MediaElementSession::mediaSession const): Helper to retrieve associated mediaSession object.
(WebCore::MediaElementSession::ensureIsObservingMediaSession):
(WebCore::MediaElementSession::metadataChanged): Call clientCharacteristicsChanged which will trigger the PlatformMediaSessionManager to refresh the NowPlayingInfo content.
(WebCore::MediaElementSession::positionStateChanged): Method currently doing nothing. Preparing for future change.
(WebCore::MediaElementSession::playbackStateChanged): Method currently doing nothing. Preparing for future change.
(WebCore::MediaElementSession::actionHandlersChanged): Method currently doing nothing. Preparing for future change.

  • html/MediaElementSession.h: Add methods.
  • platform/cocoa/RemoteCommandListenerCocoa.h: Remove trailing whitespace.
  • testing/MockMediaSessionCoordinator.cpp:

(WebCore::MockMediaSessionCoordinator::positionStateChanged): Update for new method prototyping.

  • testing/MockMediaSessionCoordinator.h:

Source/WebKit:

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-03-30
Reviewed by Eric Carlson.

  • UIProcess/Media/MediaSessionCoordinatorPrivateProxy.h: Update for new method prototyping.
  • UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp:

(WebKit::RemoteMediaSessionCoordinatorProxy::positionStateChanged): Update for new method prototyping.

  • WebProcess/MediaSession/RemoteMediaSessionCoordinator.cpp:

(WebKit::RemoteMediaSessionCoordinator::positionStateChanged): Update for new method prototyping.

  • WebProcess/MediaSession/RemoteMediaSessionCoordinator.h:
3:02 AM Changeset in webkit [275202] by graouts@webkit.org
  • 4 edits in trunk

Account for "cover" and "contain" when interpolating background-size
https://bugs.webkit.org/show_bug.cgi?id=223879

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add 40 PASS results for the background-size interpolation test.

  • web-platform-tests/css/css-backgrounds/animations/background-size-interpolation-expected.txt:

Source/WebCore:

  • animation/CSSPropertyAnimation.cpp:
1:51 AM Changeset in webkit [275201] by commit-queue@webkit.org
  • 1 edit
    19 adds in trunk/LayoutTests

Add webgl/pending/conformance/context/context-attributes-alpha-depth-stencil-antialias.html for test update
https://bugs.webkit.org/show_bug.cgi?id=223735

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-03-30
Reviewed by Dean Jackson.

Add few tests in preparation to fix bugs related to the tested functionality and to add tests
testing the fixes.

  • webgl/pending/README.md: Added.
  • webgl/pending/conformance/context/context-attributes-alpha-depth-stencil-antialias-expected.txt: Added.
  • webgl/pending/conformance/context/context-attributes-alpha-depth-stencil-antialias.html: Added.
  • webgl/pending/resources/js-test-pre.js: Added.
  • webgl/pending/resources/webgl_test_files/conformance/context/context-attributes-alpha-depth-stencil-antialias.html: Added.
  • webgl/pending/resources/webgl_test_files/js/js-test-post.js: Added.
  • webgl/pending/resources/webgl_test_files/js/js-test-pre.js: Added.
  • webgl/pending/resources/webgl_test_files/js/webgl-test-utils.js: Added.
  • webgl/pending/resources/webgl_test_files/resources/js-test-style.css: Added.
  • webgl/pending/resources/webkit-webgl-test-harness.js: Added.
1:30 AM Changeset in webkit [275200] by Lauro Moura
  • 4 edits in trunk

[GTK][WPE] Timeouts on WPT css/css-images ref-tests after updating WPT import
https://bugs.webkit.org/show_bug.cgi?id=214472

Reviewed by Žan Doberšek.

Source/WebCore:

In some cases, degenerated and corner cases of grandient stops might
trigger really slow operations in Cairo due to extremely high bezier
parameters. For example, the normalization-conic-2.html triggered this
by making the conic code calculate the tangent of 90 degrees for an
interpolation stop.

This commit adds some special handling for these cases to make sure the
interpolation will be inside reasonable values.

Covered by existing tests.

  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::createConic): Handle degenerated stops

LayoutTests:

  • platform/glib/TestExpectations: Change expectations back to passes
12:40 AM Changeset in webkit [275199] by graouts@webkit.org
  • 17 edits in trunk

Enable "hanging" and "each-line" keywords for the text-indent CSS property
https://bugs.webkit.org/show_bug.cgi?id=223851

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Mark all tests in the parsing-related tests as PASS results for text-indent.
The animation tests will be dealt with in bug 223914.

  • web-platform-tests/css/css-text/animations/text-indent-composition-expected.txt:
  • web-platform-tests/css/css-text/animations/text-indent-interpolation-expected.txt:
  • web-platform-tests/css/css-text/parsing/text-indent-computed-expected.txt:
  • web-platform-tests/css/css-text/parsing/text-indent-valid-expected.txt:

Source/WebCore:

We've had support for "hanging" and "each-line" behind the ENABLE_CSS3_TEXT flag. Probably by mistake,
"hanging" itself was parsed and Web-exposed by default. Presumably that was the case because that CSS
keyword existed in the context of SVG.

But LineWidth.cpp already knew how to handle these keywords, so there seems to be no reason to keep
these behind a flag.

So we remove all the ENABLE_CSS3_TEXT guards related to they keywords and address some spec compliance
issue, namely:

  1. add the text-indent length or percentage, the "hanging" and "each-line" keywords in that order in consumeTextIndent(),
  2. use that same order for the computed style.
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSValueKeywords.in:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeTextIndent):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::initialConstraintsForLine const):

  • rendering/line/LineWidth.cpp:

(WebCore::requiresIndent):

  • rendering/style/RenderStyle.cpp:

(WebCore::rareInheritedDataChangeRequiresLayout):

  • rendering/style/RenderStyle.h:
  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):

  • rendering/style/StyleRareInheritedData.h:
  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInheritTextIndent):
(WebCore::Style::BuilderCustom::applyInitialTextIndent):
(WebCore::Style::BuilderCustom::applyValueTextIndent):

12:23 AM Changeset in webkit [275198] by commit-queue@webkit.org
  • 4 edits
    7 adds in trunk/LayoutTests

Update WebGL conformance test suite 2021-03-24
https://bugs.webkit.org/show_bug.cgi?id=223736

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-03-30
Reviewed by Dean Jackson.

To commit 44ac38b3b23be26fa8812334ec3e9bf67ecb5a9f Fix whitespace by rerunning IDL extraction scripts. (#3265)
As per it looks like there's been a significant recent regression in the video-related conformance tests
in the test suite.

  • webgl/2.0.y/conformance2/textures/misc/immutable-tex-render-feedback-expected.txt: Added.
  • webgl/2.0.y/conformance2/textures/misc/immutable-tex-render-feedback.html: Added.
  • webgl/resources/webgl_test_files/conformance/extensions/webgl-webcodecs-video-frame.html:
  • webgl/resources/webgl_test_files/conformance/textures/misc/video-rotation.html:
  • webgl/resources/webgl_test_files/conformance2/extensions/oes-draw-buffers-indexed.html:
  • webgl/resources/webgl_test_files/conformance2/textures/misc/immutable-tex-render-feedback.html: Added.
  • webgl/resources/webgl_test_files/js/webgl-test-utils.js:

(destroyContext):

  • webgl/resources/webgl_test_files/resources/video-rotation-0.vp9.mp4: Added.
  • webgl/resources/webgl_test_files/resources/video-rotation-180.vp9.mp4: Added.
  • webgl/resources/webgl_test_files/resources/video-rotation-270.vp9.mp4: Added.
  • webgl/resources/webgl_test_files/resources/video-rotation-90.vp9.mp4: Added.

Mar 29, 2021:

11:35 PM Changeset in webkit [275197] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

Safari crashed and lost all tabs, after unlocking sleeping device
https://bugs.webkit.org/show_bug.cgi?id=223832
<rdar://75555287>

Reviewed by David Kilzer.

A speculative fix for this crash. A possible explanation from the crash log suggests that the protectedThis
could be elided because of compiler optimization given it is not used in the block. To prevent such optimization,
protectedThis is therefore used explicitly in the block.

  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:

(WebKit::SOAuthorizationSession::dismissViewController):

7:42 PM Changeset in webkit [275196] by Cameron McCormack
  • 2 edits in trunk/Tools

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):
(setXcodeSDK):
(xcodeSDKPlatformName):
(determinePortName):

7:27 PM Changeset in webkit [275195] by Jonathan Bedard
  • 34 edits
    2 deletes in trunk/Tools

[resultsdbpy] Return new-style commits
https://bugs.webkit.org/show_bug.cgi?id=223262
<rdar://problem/75483361>

Reviewed by Dewei Zhu.

  • Scripts/libraries/resultsdbpy/resultsdbpy/init.py: Bump version.
  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit.py: Removed.
  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller.py:

(_find_comparison): Replace id with ref.
(uuid_range_for_commit_range_query): Support both id and ref in REST API.
(uuid_range_for_query): Ditto.
(CommitController._find): Ditto.
(CommitController.register): Return webkitscmpy.Commit object.

  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller_unittest.py:

(CommitControllerTest.test_branches): WebKit's default branch is now main.
(CommitControllerTest.test_register_with_full_commit): Registered commits should be webkitscmpy Commit objects.
(CommitControllerTest.test_find_range_id): Returned revisions are now integers.

  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_unittest.py: Removed.
  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/upload_controller_unittest.py:

(UploadControllerPostTest.test_upload): WebKit commits are under-pinned by Git now.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/archive_context.py:

(ArchiveContext.register): Use webkitscmpy Commit objects.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/ci_context.py:

(CIContext.register): Use webkitscmpy Commit objects.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context.py:

(CommitContext.CommitModel): Renamed from CommitModelMk2.
(CommitContext.CommitByUuidAscending): Renamed from CommitByUuidAscendingMk2.
(CommitContext.CommitByUuidDescending): Renamed from CommitByUuidDescendingMk2.
(CommitContext.init): Remove old tables.
(CommitContext.timestamp_to_uuid): Use webkitscmpy Commit objects.
(CommitContext.branch_keys_for_commits): All default branches should be treated the same.
(CommitContext.find_commits_by_ref): Find commits by revision, hash and identifier.
(CommitContext.register):
(CommitContext.register_commit): Save commit to new tables.
(CommitContext.url): Pass commit object to repository url generator.
(CommitContext.CommitByID): Deleted.
(CommitContext.CommitModelMk2): Renamed to CommitModel.
(CommitContext.CommitByUuidAscendingMk2): Renamed to CommitByUuidAscending.
(CommitContext.CommitByUuidDescendingMk2): Renamed to CommitByUuidDescending.
(CommitContext.find_commits_by_id): Deleted.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context_unittest.py:

(CommitContextTest): Use ref instead of id.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/failure_context.py:

(FailureContext.register): Use webkitscmpy Commit objects.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/mock_model_factory.py:

(MockModelFactory):
(MockModelFactory.webkit): Mock both Subversion and GitHub for WebKit.
(MockModelFactory.create):

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/repository.py:

(Repository.commit): By default, fully define commits.
(StashRepository.commit): Ditto.
(StashRepository.url_for_commit): Create a URL for a commit object.
(WebKitRepository.init): Use both GitHub and Subversion.
(WebKitRepository.commit): Determine which remote to use based on provided arguments.
(WebKitRepository.url_for_commit): Create a URL for a commit object.
(WebKitRepository.representations): WebKit commits can be represented by hashes.
(Repository.commit_for_id): Deleted.
(StashRepository.commit_for_id): Deleted.
(WebKitRepository.commit_for_id): Deleted.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/repository_unittest.py:

(RepositoryTest.test_svn): WebKit default branch is now main.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/suite_context.py:

(SuiteContext.register): Use webkitscmpy Commit objects.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/test_context.py:

(TestContext.register): Use webkitscmpy Commit objects.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/upload_context.py:

(UploadContext.UploadsByConfigurationLegacy.unpack): Use webkitscmpy Commit objects.
(UploadContext.UploadsByConfiguration.unpack): Ditto.
(UploadContext._do_job_for_key): Ditto.
(UploadContext.upload_test_results): Ditto.

  • Scripts/libraries/resultsdbpy/resultsdbpy/view/archive_view_unittest.py:

(ArchiveViewUnittest.register_archive): Use webkitscmpy Commit objects.

  • Scripts/libraries/resultsdbpy/resultsdbpy/view/commit_view.py:

(CommitView.commit): Use webkitscmpy Commit objects.
(CommitView.info): Ditto.
(CommitView.previous): Ditto.
(CommitView.next): Ditto.

  • Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:

(Commit):
(Commit.prototype.label): Only print identifier/hash/revision if they are defined.
(_CommitBank.prototype._loadSiblings): Use ref over id.

  • Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/drawer.js: main is a default branch.
  • Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/timeline.js:

(xAxisFromScale): Only print author if the author exists.

  • Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/commit.html: prefer ref over id, use

webkitscmpy Commit object in Jinja template.

  • Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html: Update documentation

to match webkitscmpy Commit object.

  • Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/investigate.html: main is a default branch.
  • Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/search.html: Correct CommitRepresentation callback.
  • Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/suite_results.html: Ditto.
  • Scripts/libraries/resultsdbpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/setup.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/commit.py:

(Commit.Encoder.default): Handle dict and list in JSON correctly.
(Commit.uuid): uuid should be 'None' when timestamp is 'None'.
(Commit.repr): Return a ? for an undefined commit.

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py:

(BitBucket.request): Do not add git-svn-id for undefined revision.

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:

(GitHub._commit_response): Fix unit tests.

  • Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:

(ScmBase): Do not mach git-svn ID with a space before it.

5:52 PM Changeset in webkit [275194] by Alan Coon
  • 1 copy in tags/Safari-612.1.9

Tag Safari-612.1.9.

5:25 PM Changeset in webkit [275193] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Remove unused struct WebCore::AlternativeTextController::AlternativeTextInfo
<https://webkit.org/b/223902>

Reviewed by Wenson Hsieh.

  • editing/AlternativeTextController.h:
  • Remove unused struct definition.
4:28 PM Changeset in webkit [275192] by Robert Jenner
  • 3 edits in branches/safari-611.1.21.161-branch/Tools

Unreviewed build fix, cherry-pick parts of r273181. rdar://75904391

  • TestWebKitAPI/cocoa/TestNavigationDelegate.h:
  • TestWebKitAPI/cocoa/TestNavigationDelegate.mm:

(-[TestNavigationDelegate waitForDidFailProvisionalNavigation]):

4:24 PM Changeset in webkit [275191] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[MacOS Debug] http/tests/security/contentSecurityPolicy/frame-src-cross-origin-load.html is a flakey failure
https://bugs.webkit.org/show_bug.cgi?id=222748

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:21 PM Changeset in webkit [275190] by commit-queue@webkit.org
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Use helper method when possible to store data in the callframe header
https://bugs.webkit.org/show_bug.cgi?id=223432

Patch by Xan López <Xan Lopez> on 2021-03-29
Reviewed by Yusuke Suzuki.

A bunch of the direct stores to the callframe header are zeroing
out the codeblock slot. Create a helper method to do that and use
it accordingly. For the rest, use emitPutToCallFrameHeader, which
already does the right thing. Also, remove a lot of unused helper
methods in AssemblyHelpers (which have been updated for no reason
throughout the years).

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitPutToCallFrameHeaderBeforePrologue): Deleted.
(JSC::AssemblyHelpers::emitPutPayloadToCallFrameHeaderBeforePrologue): Deleted.
(JSC::AssemblyHelpers::emitPutTagToCallFrameHeaderBeforePrologue): Deleted.

  • wasm/js/JSToWasm.cpp:

(JSC::Wasm::createJSToWasmWrapper):

  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

4:18 PM Changeset in webkit [275189] by Chris Dumez
  • 4 edits
    2 adds in trunk

REGRESSION(r274992): Nullptr crash in FontCache::retrieveOrAddCachedFonts
https://bugs.webkit.org/show_bug.cgi?id=223858
<rdar://75883697>

Reviewed by Darin Adler and Ryosuke Niwa.

Source/WebCore:

Stop using a hash as key in the FontCascadeCache. Instead, use HashTraits and use
FontCascadeCacheKey as key.

Test: fonts/font-cache-crash.html

  • platform/graphics/FontCache.cpp:

(WebCore::FontCache::retrieveOrAddCachedFonts):
(WTF::FontCascadeCacheKeyHash::hash):

  • platform/graphics/FontCache.h:

(WebCore::FontCascadeCacheKey::operator== const):
(WTF::FontCascadeCacheKeyHash::equal):
(WTF::HashTraits<WebCore::FontCascadeCacheKey>::emptyValue):
(WTF::HashTraits<WebCore::FontCascadeCacheKey>::constructDeletedValue):
(WTF::HashTraits<WebCore::FontCascadeCacheKey>::isDeletedValue):

LayoutTests:

Add layout test coverage.

  • fonts/font-cache-crash-expected.txt: Added.
  • fonts/font-cache-crash.html: Added.
3:57 PM Changeset in webkit [275188] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

[Big Sur arm64] TestWebKitAPI.WebKit.AccessibilityReduceMotion is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=222824

Reviewed by Tim Horton.

Use smart pointers instead of storing raw ObjC pointers as ivars.

  • UIProcess/Cocoa/PreferenceObserver.mm:

(-[WKUserDefaults findPreferenceChangesAndNotifyForKeys:toValuesForKeys:]):

3:55 PM Changeset in webkit [275187] by Devin Rousso
  • 8 edits
    2 adds in trunk

Propagate user gestures through requestAnimationFrame just like setTimeout
https://bugs.webkit.org/show_bug.cgi?id=223775
<rdar://problem/75860868>

Reviewed by Geoffrey Garen.

Source/WebCore:

setTimeout and requestAnimationFrame are used somewhat interchangeably on the web.
There should be similar features/affordances for both so that if a developer decides to use
a display-linked animation "loop" instead of a strictly time-based delay (or even a "loop")
they're able to do similar things in the callback/handler.

Test: fast/animation/request-animation-frame-propagate-user-gesture.html

  • dom/ScriptedAnimationController.h:
  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::resume):
(WebCore::ScriptedAnimationController::registerCallback):
(WebCore::ScriptedAnimationController::cancelCallback):
(WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
Create a private struct for holding more data in the list of callbacks than just the
callback itself. For now, the only other data saved is a RefPtr<UserGestureToken>.

  • testing/Internals.idl:
  • testing/Internals.h:
  • testing/Internals.cpp:

(WebCore::Internals::withoutUserGesture): Added.
Add a way for tests to guaranteed run arbitrary code without a user gesture.

LayoutTests:

  • editing/pasteboard/dom-paste/dom-paste-requires-user-gesture.html:
  • fast/animation/request-animation-frame-propagate-user-gesture.html: Added.
  • fast/animation/request-animation-frame-propagate-user-gesture-expected.txt: Added.
3:53 PM Changeset in webkit [275186] by Wenson Hsieh
  • 11 edits
    4 adds in trunk

Add a way for internal clients to hit-test for selectable text in user agent shadow roots
https://bugs.webkit.org/show_bug.cgi?id=223894
<rdar://problem/75968068>

Reviewed by Tim Horton.

Source/WebKit:

Augment some Objective-C injected bundle SPI to allow internal clients to hit-test for selectable text,
including content in UA shadow roots. Refer to <rdar://problem/75753666> for more context.

Tests: InjectedBundleHitTest.TextParagraph

InjectedBundleHitTest.ImageOverlay

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:

(-[WKWebProcessPlugInFrame hitTest:options:]):

Add a new version of -hitTest: that takes hit testing options (for now, the only option is whether or not we
should allow UA shadow root content when hit-testing).

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:

(-[WKWebProcessPlugInNodeHandle isSelectableTextNode]):

Add a readonly getter to return whether or not the hit-tested node is a selectable text node.

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::InjectedBundleNodeHandle::isSelectableTextNode const):

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::hitTest const):

  • WebProcess/WebPage/WebFrame.h:

(WebKit::WebFrame::defaultHitTestRequestTypes):

Tools:

Add a new API test to exercise -[WKWebProcessPlugInFrame hitTest:options:].

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/InjectedBundleHitTest.mm: Added.

(-[WKWebViewWithHitTester hasSelectableTextAt:]):
(TestWebKitAPI::createWebViewWithHitTester):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/simple-responsive-page.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleHitTestPlugIn.mm: Added.

(-[InjectedBundleHitTestPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[InjectedBundleHitTestPlugIn webProcessPlugInBrowserContextController:didClearWindowObjectForFrame:inScriptWorld:]):
(-[InjectedBundleHitTestPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]):
(-[InjectedBundleHitTestPlugIn hasSelectableTextAt:completionHandler:]):
(-[InjectedBundleHitTestPlugIn dealloc]):

  • TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleHitTestProtocol.h: Added.
3:38 PM Changeset in webkit [275185] by Said Abou-Hallawa
  • 5 edits in trunk/Source

[GPU Process] Don't record DisplayList items if the GPU Process has been terminated
https://bugs.webkit.org/show_bug.cgi?id=223864
<rdar://73586187>

Reviewed by Simon Fraser.

Source/WebCore:

Consult the DisplayList::Recorder::Delegate before appending the item.
If the GPU Process was terminated, don't append the item.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::canAppendItemOfType):
(WebCore::DisplayList::Recorder::willAppendItemOfType): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.h:

(WebCore::DisplayList::Recorder::Delegate::canAppendItemOfType):
(WebCore::DisplayList::Recorder::append):
(WebCore::DisplayList::Recorder::Delegate::willAppendItemOfType): Deleted.

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
3:09 PM Changeset in webkit [275184] by ChangSeok Oh
  • 5 edits in trunk/Source/WebCore

Implement repetition of animated AVIF
https://bugs.webkit.org/show_bug.cgi?id=223127
<rdar://problem/75629284>

Reviewed by Philippe Normand.

This change implements repeating AVIF animation, reflecting the AVIF sequence spec.
As the libavif does not provide a clear repetition count yet, we calculate it
by dividing the track duration by the sum of each frame duration. If the track duration
is not specified, the animation repeats indefinitely. Chromium just indefinitely
repeats all animated avif images.
The repetition count of avif sequence images is not necessarily an integer.
Since ScalableImageDecoder accepts an integer value for repetition,
we round the repetition count in floating point values to conform the current
image decoder design. Later, when we have more reliable testing environment
for the avifs repetition, we will revisit the repetition count in floating point numbers.

No new tests since no reliable test could be created. The latest avif encoder
does not support the repetition count yet.

  • platform/image-decoders/avif/AVIFImageDecoder.cpp:

(WebCore::AVIFImageDecoder::repetitionCount const):
(WebCore::AVIFImageDecoder::tryDecodeSize):

  • platform/image-decoders/avif/AVIFImageDecoder.h:
  • platform/image-decoders/avif/AVIFImageReader.cpp:

(WebCore::AVIFImageReader::repetitionCount const):

  • platform/image-decoders/avif/AVIFImageReader.h:
3:01 PM Changeset in webkit [275183] by Russell Epstein
  • 1 copy in tags/Safari-612.1.7.11

Tag Safari-612.1.7.11.

3:00 PM Changeset in webkit [275182] by Russell Epstein
  • 1 copy in tags/Safari-612.1.7.10

Tag Safari-612.1.7.10.

2:53 PM Changeset in webkit [275181] by mmaxfield@apple.com
  • 9 edits in trunk

[GPU Process] Simplify DisplayList::Iterator part 2: Rename setItemBufferClient to setItemBuffer{Writing,Reading}Client
https://bugs.webkit.org/show_bug.cgi?id=223863

Reviewed by Wenson Hsieh.

Source/WebCore:

Currently, we have:
void setItemBufferClient(ItemBufferReadingClient*);
void setItemBufferClient(ItemBufferWritingClient*);

This is unfortunate, because if you want to set one of these clients to nullptr, you have to do:
setItemBufferClient(static_cast<ItemBufferReadingClient*>(nullptr));

Instead, we can just rename these functions to:
void setItemBufferReadingClient(ItemBufferReadingClient*);
void setItemBufferWritingClient(ItemBufferWritingClient*);

So you can just do
setItemBufferReadingClient(nullptr);

No new tests because there is no behavior change.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::setItemBufferReadingClient):
(WebCore::DisplayList::DisplayList::setItemBufferWritingClient):
(WebCore::DisplayList::DisplayList::setItemBufferClient): Deleted.

  • platform/graphics/displaylists/DisplayList.h:

Source/WebKit:

  • GPUProcess/graphics/DisplayListReaderHandle.cpp:

(WebKit::DisplayListReaderHandle::displayListForReading const):

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

(WebKit::RemoteImageBufferProxy::RemoteImageBufferProxy):

Tools:

  • TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:

(TestWebKitAPI::TEST):

2:49 PM Changeset in webkit [275180] by mmaxfield@apple.com
  • 10 edits in trunk/Source/WebKit

[GPU Process]: Improve getImageData() perf part 2: Use shared memory and a semaphore
https://bugs.webkit.org/show_bug.cgi?id=223732

Reviewed by Ryosuke Niwa.

This patch implements a design for getImageData() where the web process and the GPU process
set up a shmem + semaphore ahead-of-time, so that when we encounter a call to getImageData(),
the GPU process can just write into the shmem and signal the semaphore. The web process just
encodes the getImageData() call into the regular display list, flushAsync()s to kick the GPU
process, then just waits on the semaphore. Initial performance testing shows that this is
way, way faster than sending messages containing pixel color data payloads.

This patch causes a ~40% progression on the Images test in MotionMark on my Mac with the GPU
process enabled. When compared to the GPU process disabled, the results after just running
just a few times seem to be pretty close (within the noise).

If we need more performance, the next step is to try to reduce the memcpy()s.

No new tests because there is no behavior change.

  • GPUProcess/graphics/RemoteImageBuffer.h:
  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::updateSharedMemoryForGetImageDataHelper):
(WebKit::RemoteRenderingBackend::updateSharedMemoryForGetImageData):
(WebKit::RemoteRenderingBackend::semaphoreForGetImageData):
(WebKit::RemoteRenderingBackend::updateSharedMemoryAndSemaphoreForGetImageData):
(WebKit::RemoteRenderingBackend::destroyGetImageDataSharedMemory):
(WebKit::RemoteRenderingBackend::populateGetImageDataSharedMemory):
(WebKit::RemoteRenderingBackend::getImageData): Deleted.

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:
  • Platform/IPC/IPCSemaphore.h:
  • Platform/IPC/darwin/IPCSemaphoreDarwin.cpp:

(IPC::Semaphore::waitFor):

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::sharedMemoryForGetImageData):
(WebKit::RemoteRenderingBackendProxy::waitForGetImageDataToComplete):
(WebKit::RemoteRenderingBackendProxy::destroyGetImageDataSharedMemory):
(WebKit::RemoteRenderingBackendProxy::getImageData): Deleted.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
2:03 PM Changeset in webkit [275179] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur Debug wk2 ] compositing/video/video-update-rendering.html is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=223900

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updated expectations to Pass Failure while test is reviewed.
2:02 PM Changeset in webkit [275178] by Alan Coon
  • 2 edits in branches/safari-612.1.9-branch/Source/WebCore/PAL

Cherry-pick r275173. rdar://problem/75971415

The header file NotifySPI.h should not be private
https://bugs.webkit.org/show_bug.cgi?id=223893
<rdar://75942308>

Unreviewed build fix.

  • PAL.xcodeproj/project.pbxproj:

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

1:58 PM Changeset in webkit [275177] by Alan Coon
  • 1 copy in branches/safari-612.1.9-branch

New branch.

1:58 PM Changeset in webkit [275176] by eric.carlson@apple.com
  • 8 edits
    2 adds in trunk

[macOS] Playback is paused after scrubbing with the touch bar
https://bugs.webkit.org/show_bug.cgi?id=223887
rdar://75597684

Reviewed by Jer Noble.

Source/WebCore:

Test: media/remote-control-command-scrubbing.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::pauseInternal): Don't pause if m_pausedInternal is true.
(WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): Support BeginScrubbingCommand
and EndScrubbingCommand.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::didReceiveRemoteControlCommand): Update enum names.

  • platform/audio/PlatformMediaSession.cpp:

(WebCore::convertEnumerationToString): Ditto.

  • platform/audio/PlatformMediaSession.h: Add "Command" suffix to BeginScrubbing

and EndScrubbing so they math the enum's naming pattern.

  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager beginTouchBarScrubbing]): Update enum names.
(-[WebPlaybackControlsManager endTouchBarScrubbing]): Update enum names.

  • testing/Internals.cpp:

(WebCore::Internals::postRemoteControlCommand): Add "beginscrubbing" and "endscrubbing".

LayoutTests:

  • media/remote-control-command-scrubbing-expected.txt: Added.
  • media/remote-control-command-scrubbing.html: Added.
1:47 PM Changeset in webkit [275175] by Ryan Haddad
  • 2 edits in trunk/Tools

Unreviewed, reverting r275170.

Broke the build

Reverted changeset:

"[Big Sur arm64]
TestWebKitAPI.WebKit.AccessibilityReduceMotion is a flaky
crash"
https://bugs.webkit.org/show_bug.cgi?id=222824
https://commits.webkit.org/r275170

1:46 PM Changeset in webkit [275174] by Fujii Hironori
  • 11 edits
    1 copy in trunk/Source

[WinCairo] Custom fonts don't work in GPU process mode
https://bugs.webkit.org/show_bug.cgi?id=223861

Reviewed by Don Olmstead.

Source/WebCore:

Custom fonts didn't work in GPU process mode of WinCairo port
because FontCustomPlatformData was destructed soon. In non-GPU
process mode, FontCustomPlatformData is retained by CachedFont. In
GPU process mode, there is no CachedFont. So, the font resource
handle should be ref-counted and retained by FontPlatformData.

Added a new class FontMemoryResource to ref-count the font
resource handle. Added a new member of Ref<FontMemoryResource> to
FontPlatformData::CreationData struct.

Converted by existing canvas custom font tests.

  • PlatformWin.cmake:
  • platform/graphics/FontPlatformData.h:
  • platform/graphics/opentype/FontMemoryResource.h:

(WebCore::FontMemoryResource::create):
(WebCore::FontMemoryResource::~FontMemoryResource):
(WebCore::FontMemoryResource::FontMemoryResource):

  • platform/graphics/opentype/OpenTypeUtilities.cpp:

(WebCore::renameAndActivateFont):

  • platform/graphics/opentype/OpenTypeUtilities.h:
  • platform/graphics/win/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::FontCustomPlatformData):
(WebCore::FontCustomPlatformData::fontPlatformData):
(WebCore::createFontCustomPlatformData):
(WebCore::FontCustomPlatformData::~FontCustomPlatformData): Deleted.

  • platform/graphics/win/FontCustomPlatformData.h:

(WebCore::FontCustomPlatformData::FontCustomPlatformData): Deleted.

  • platform/graphics/win/FontCustomPlatformDataCairo.cpp:

(WebCore::FontCustomPlatformData::FontCustomPlatformData):
(WebCore::createFontCustomPlatformData):
(WebCore::FontCustomPlatformData::~FontCustomPlatformData): Deleted.

  • platform/graphics/win/FontPlatformDataWin.cpp:

(WebCore::FontPlatformData::FontPlatformData):

Source/WebKit:

  • Shared/win/WebCoreArgumentCodersWin.cpp:

(IPC::ArgumentCoder<Ref<Font>>::decodePlatformData):

1:42 PM Changeset in webkit [275173] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

The header file NotifySPI.h should not be private
https://bugs.webkit.org/show_bug.cgi?id=223893
<rdar://75942308>

Unreviewed build fix.

  • PAL.xcodeproj/project.pbxproj:
1:31 PM Changeset in webkit [275172] by achristensen@apple.com
  • 6 edits
    1 add in trunk/Source

Use terminate_with_reason instead of xpc_connection_kill
https://bugs.webkit.org/show_bug.cgi?id=223618

Reviewed by Darin Adler.

Source/WebKit:

The former was deprecated in rdar://70461770
This does the same thing but adds debugging information so that people looking at process terminations have more information about what is going on.

  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
(IPC::Connection::kill):

  • Platform/spi/Cocoa/ReasonSPI.h: Added.
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::ProcessLauncher::platformInvalidate):

  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/spi/darwin/XPCSPI.h:
1:20 PM Changeset in webkit [275171] by eric.carlson@apple.com
  • 26 edits
    3 copies
    7 adds
    2 deletes in trunk/Source

[macOS] Add remote MediaSessionCoordinator
https://bugs.webkit.org/show_bug.cgi?id=223854
<rdar://problem/75934650>

Reviewed by Jer Noble.

Source/WebCore:

Rename PlatformMediaSessionCoordinator to MediaSessionCoordinatorPrivate and make
it possible for the MediaSessionCoordinator implementation to be located in another
process.

  • Modules/mediasession/MediaPositionState.h:

(WebCore::MediaPositionState::encode const):
(WebCore::MediaPositionState::decode):

  • Modules/mediasession/MediaSession.cpp:
  • Modules/mediasession/MediaSession.h:
  • Modules/mediasession/MediaSessionActionHandler.h:
  • Modules/mediasession/MediaSessionCoordinator.cpp:

(WebCore::MediaSessionCoordinator::create):
(WebCore::MediaSessionCoordinator::MediaSessionCoordinator):
(WebCore::MediaSessionCoordinator::seekTo):
(WebCore::MediaSessionCoordinator::play):
(WebCore::MediaSessionCoordinator::pause):
(WebCore::MediaSessionCoordinator::setTrack):
(WebCore::MediaSessionCoordinator::positionStateChanged):
(WebCore::MediaSessionCoordinator::playbackStateChanged):
(WebCore::MediaSessionCoordinator::readyStateChanged):
(WebCore::MediaSessionCoordinator::seekSessionToTime):
(WebCore::MediaSessionCoordinator::playSession):
(WebCore::MediaSessionCoordinator::pauseSession):
(WebCore::MediaSessionCoordinator::setSessionTrack):
(WebCore::MediaSessionCoordinator::internalSeekTo):
(WebCore::MediaSessionCoordinator::internalPlay):
(WebCore::MediaSessionCoordinator::internalPause):
(WebCore::MediaSessionCoordinator::internalSetTrack):

  • Modules/mediasession/MediaSessionCoordinator.h:
  • Modules/mediasession/MediaSessionCoordinatorPrivate.cpp: Copied from Source/WebCore/platform/graphics/PlatformMediaSessionCoordinator.cpp

(WebCore::MediaSessionCoordinatorPrivate::setLogger):

  • Modules/mediasession/MediaSessionCoordinatorPrivate.h: Copied from Source/WebCore/platform/graphics/PlatformMediaSessionCoordinator.h

(WebCore::MediaSessionCoordinatorPrivate::setClient):
(WebCore::MediaSessionCoordinatorPrivate::loggerPtr const):
(WebCore::MediaSessionCoordinatorPrivate::logIdentifier const):
(WebCore::MediaSessionCoordinatorPrivate::client const):

  • Modules/mediasession/MediaSessionPlaybackState.h:
  • Modules/mediasession/MediaSessionReadyState.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/PlatformMediaSession.h:
  • platform/graphics/PlatformMediaSessionCoordinator.cpp: Removed.
  • platform/graphics/PlatformMediaSessionCoordinator.h: Removed.
  • testing/MockMediaSessionCoordinator.cpp:

(WebCore::MockMediaSessionCoordinator::seekTo):
(WebCore::MockMediaSessionCoordinator::play):
(WebCore::MockMediaSessionCoordinator::pause):
(WebCore::MockMediaSessionCoordinator::setTrack):
(WebCore::MockMediaSessionCoordinator::positionStateChanged):
(WebCore::MockMediaSessionCoordinator::readyStateChanged):
(WebCore::MockMediaSessionCoordinator::playbackStateChanged):
(WebCore::MockMediaSessionCoordinator::logChannel const):

  • testing/MockMediaSessionCoordinator.h:

(WebCore::MockMediaSessionCoordinator::logClassName const):

Source/WebKit:

Define the interface for a remote MediaSessionCoordinatorPrivate and implement
message senders and receivers RemoteMediaSessionCoordinator and
RemoteMediaSessionCoordinatorProxy.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • SourcesCocoa.txt:
  • UIProcess/Media/MediaSessionCoordinatorPrivateProxy.h:
  • UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp: Added.

(WebKit::RemoteMediaSessionCoordinatorProxy::create):
(WebKit::RemoteMediaSessionCoordinatorProxy::RemoteMediaSessionCoordinatorProxy):
(WebKit::RemoteMediaSessionCoordinatorProxy::~RemoteMediaSessionCoordinatorProxy):
(WebKit::RemoteMediaSessionCoordinatorProxy::coordinateSeekTo):
(WebKit::RemoteMediaSessionCoordinatorProxy::coordinatePlay):
(WebKit::RemoteMediaSessionCoordinatorProxy::coordinatePause):
(WebKit::RemoteMediaSessionCoordinatorProxy::::coordinateSetTrack):
(WebKit::RemoteMediaSessionCoordinatorProxy::positionStateChanged):
(WebKit::RemoteMediaSessionCoordinatorProxy::playbackStateChanged):
(WebKit::RemoteMediaSessionCoordinatorProxy::readyStateChanged):

  • UIProcess/Media/RemoteMediaSessionCoordinatorProxy.h:
  • UIProcess/Media/RemoteMediaSessionCoordinatorProxy.messages.in: Added.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::createMediaSessionCoordinator):

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/MediaSession/RemoteMediaSessionCoordinator.cpp: Added.

(WebKit::RemoteMediaSessionCoordinator::create):
(WebKit::RemoteMediaSessionCoordinator::RemoteMediaSessionCoordinator):
(WebKit::RemoteMediaSessionCoordinator::~RemoteMediaSessionCoordinator):
(WebKit::RemoteMediaSessionCoordinator::seekTo):
(WebKit::RemoteMediaSessionCoordinator::play):
(WebKit::RemoteMediaSessionCoordinator::pause):
(WebKit::RemoteMediaSessionCoordinator::setTrack):
(WebKit::RemoteMediaSessionCoordinator::positionStateChanged):
(WebKit::RemoteMediaSessionCoordinator::readyStateChanged):
(WebKit::RemoteMediaSessionCoordinator::playbackStateChanged):
(WebKit::RemoteMediaSessionCoordinator::seekSessionToTime):
(WebKit::RemoteMediaSessionCoordinator::playSession):
(WebKit::RemoteMediaSessionCoordinator::pauseSession):
(WebKit::RemoteMediaSessionCoordinator::setSessionTrack):
(WebKit::RemoteMediaSessionCoordinator::logChannel const):

  • WebProcess/MediaSession/RemoteMediaSessionCoordinator.h: Added.
  • WebProcess/MediaSession/RemoteMediaSessionCoordinator.messages.in:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::createMediaSessionCoordinator):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
1:01 PM Changeset in webkit [275170] by Ryan Haddad
  • 2 edits in trunk/Tools

[Big Sur arm64] TestWebKitAPI.WebKit.AccessibilityReduceMotion is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=222824

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm: Disable the test for arm64 Macs.
1:01 PM Changeset in webkit [275169] by Devin Rousso
  • 15 edits in trunk/Source/WebCore

[Payment Request] move added object data to ApplePayModifier
https://bugs.webkit.org/show_bug.cgi?id=223621
<rdar://problem/75720879>

Reviewed by Wenson Hsieh.

The object data in PaymentDetailsModifier has a sibling property required DOMString supportedMethods
which acts as a "guard" to make sure that the structure of data is only limited to that supportedMethods
meaning that there's no concern over naming collisions between two different supportedMethods. As such,
the object data added to PaymentItem and PaymentDetailsBase and PaymentShippingOption should really
be part of ApplePayModifier (which is what the object data in PaymentDetailsModifier is parsed into).

  • Modules/applepay/paymentrequest/ApplePayModifier.idl:
  • Modules/applepay/paymentrequest/ApplePayModifier.h:
  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::convertAndValidate):
(WebCore::merge):
(WebCore::ApplePayPaymentHandler::show):
(WebCore::ApplePayPaymentHandler::computeShippingMethods const):
(WebCore::ApplePayPaymentHandler::computeTotalAndLineItems const):
(WebCore::validate):
(WebCore::ApplePayPaymentHandler::firstApplicableModifier const): Added.
(WebCore::ApplePayPaymentHandler::shippingAddressUpdated):
(WebCore::ApplePayPaymentHandler::shippingOptionUpdated):
(WebCore::ApplePayPaymentHandler::paymentMethodUpdated):
Instead of validating and merging data from the various ApplePay*Data objects, get the
first applicable ApplePayModifier from the list of PaymentDetailsModifier and use that
for validation and data merging (since, as explained above, it now contains the data).

  • Modules/paymentrequest/PaymentDetailsBase.idl:
  • Modules/paymentrequest/PaymentDetailsBase.h:
  • Modules/paymentrequest/PaymentItem.idl:
  • Modules/paymentrequest/PaymentItem.h:
  • Modules/paymentrequest/PaymentShippingOption.idl:
  • Modules/paymentrequest/PaymentShippingOption.h:
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::checkAndCanonicalizePaymentItem):
(WebCore::checkAndCanonicalizeTotal):
(WebCore::checkAndCanonicalizeDetails):
(WebCore::PaymentRequest::create):
(WebCore::PaymentRequest::settleDetailsPromise):
Remove the IDL object data; and associated members/logic now that the parsed data is all
part of ApplePayModifier. These objects are now back to being spec compliant.

  • Modules/applepay/ApplePayDetailsUpdateBase.idl:

Drive-by: Add missing inheritance to ApplePayDetailsUpdateData.

  • Modules/applepay/ApplePayLineItemData.idl:
  • Modules/applepay/ApplePayShippingMethodData.idl:

Drive-by: Remove unnecessary attributes.

12:51 PM Changeset in webkit [275168] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Make a Ref to HTMLPlugInElement when resolving callback
https://bugs.webkit.org/show_bug.cgi?id=223846

Patch by Ian Gilbert <iang@apple.com> on 2021-03-29
Reviewed by Ryosuke Niwa.

Take a Ref to the HTMLPlugInElement to keep it alive while invoking HTMLPlugInElement::swapRendererTimerFired()

  • html/HTMLPlugInElement.cpp:

(WebCore::HTMLPlugInElement::swapRendererTimerFired):

12:19 PM Changeset in webkit [275167] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ] media/pip-video-going-into-fullscreen.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=223762

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test expectations to Pass timeout while test is being reviewed.
11:12 AM Changeset in webkit [275166] by commit-queue@webkit.org
  • 14 edits in trunk

Migrate _WKUserContentExtension and older versions of WKContentRuleList to WKContentRuleList during lookup
https://bugs.webkit.org/show_bug.cgi?id=223831

Patch by Alex Christensen <achristensen@webkit.org> on 2021-03-29
Reviewed by Brady Eidson.

Source/WebKit:

r275078 incremented CurrentContentRuleListFileVersion for the first time in a few years.
As a result, we will get a WKErrorContentRuleListStoreVersionMismatch during lookup for existing compiled WKContentRuleLists.
To make this as compatible as possible, if we see such a WKContentRuleList, try extracting its source and recompiling.

Also, _WKUserContentExtension is used by Safari and being migrated from in rdar://75889414.
To make this succeed and not leave any files behind, we move legacy files to modern filenames during lookup.
We also remove them if they're there when removing the WKContentRuleList from the WKContentRuleListStore,
and we include them in getAvailableContentRuleListIdentifiers. compileContentRuleList only compiles to the modern locations,
and invalidateContentRuleListVersion is only used for tests. All this is done on non-main WorkQueues, so the few additional
file reads/writes aren't an issue.

Luckily, _WKUserContentExtensionStore was only used by Safari, and its defaultStore was never used.

All this is covered by API tests.

  • UIProcess/API/APIContentRuleListStore.cpp:

(API::ContentRuleListStore::defaultStore):
(API::ContentRuleListStore::storeWithPath):
(API::ContentRuleListStore::ContentRuleListStore):
(API::openAndMapContentRuleList):
(API::getContentRuleListSourceFromMappedFile):
(API::ContentRuleListStore::lookupContentRuleList):
(API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):
(API::ContentRuleListStore::compileContentRuleList):
(API::ContentRuleListStore::removeContentRuleList):
(API::ContentRuleListStore::invalidateContentRuleListVersion):
(API::ContentRuleListStore::getContentRuleListSource):
(API::ContentRuleListStore::legacyDefaultStore): Deleted.
(API::ContentRuleListStore::nonLegacyDefaultStore): Deleted.
(API::ContentRuleListStore::~ContentRuleListStore): Deleted.
(API::openAndMapOrCopyContentRuleList): Deleted.

  • UIProcess/API/APIContentRuleListStore.h:
  • UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:

(WKUserContentExtensionStoreCreate):

  • UIProcess/API/Cocoa/APIContentRuleListStoreCocoa.mm:

(API::ContentRuleListStore::defaultStorePath):

  • UIProcess/API/Cocoa/WKContentRuleListStore.h:
  • UIProcess/API/Cocoa/WKContentRuleListStore.mm:

(+[WKContentRuleListStore defaultStore]):
(+[WKContentRuleListStore storeWithURL:]):
(+[WKContentRuleListStore defaultStoreWithLegacyFilename]):
(+[WKContentRuleListStore storeWithURLAndLegacyFilename:]):

  • UIProcess/API/Cocoa/WKContentRuleListStorePrivate.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:

(respond):
(TEST):

  • TestWebKitAPI/cocoa/TestNavigationDelegate.h:
  • TestWebKitAPI/cocoa/TestNavigationDelegate.mm:

(-[WKWebView _test_waitForDidFailProvisionalNavigation]):

10:46 AM Changeset in webkit [275165] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix.

  • platform/graphics/SourceBufferPrivateClient.h:

I have a build that can't find the MediaDescription destructor from the AudioTrackInformation declaration.
Including MediaDescription.h fixes it.

10:34 AM Changeset in webkit [275164] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Release assert in Vector::at in RenderLayoutState::establishLineGrid
Source/WebCore:

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

Patch by Frédéric Wang <fwang@igalia.com> on 2021-03-29
Reviewed by Zalan Bujtas.

Fix out-of-bound access for layoutStateStack and ensure the whole vector is browsed.

Test: fast/line-grid/establish-line-grid-crash.html

  • rendering/RenderLayoutState.cpp:

(WebCore::RenderLayoutState::establishLineGrid): Fix the exit condition.

LayoutTests:

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

Patch by Frédéric Wang <fwang@igalia.com> on 2021-03-29
Reviewed by Zalan Bujtas.

Add regression test.

  • fast/line-grid/establish-line-grid-crash-expected.txt: Added.
  • fast/line-grid/establish-line-grid-crash.html: Added.
10:21 AM Changeset in webkit [275163] by Simon Fraser
  • 34 edits
    2 copies in trunk/Source

Plumb DisplayUpdate through the display refresh monitors
https://bugs.webkit.org/show_bug.cgi?id=223847

Reviewed by Sam Weinig.

Future work will allow DisplayRefreshMonitorClients to request different frame rates, which
are whole fractions of the display's nominal refresh rate. These various frame rate requests
flow up through the DisplayRefreshMonitors, and in WebKit2, up through IPC to the
per-display DisplayLink which may even service multiple processes.

For power reasons, we don't want to trigger display refresh notifications down the chain at
the highest possible frequency; at various stages of propagation the rate might be halved if
that's necessary for downstream clients.

To make this frequency splitting logic simple, this patch introduces DisplayUpdate, which
represents an update of the display, and contains data about it in the form of a numerator
is the frame index, and the denominator is the nominal frame rate. Frame index wraps to zero
every second.

For example, a 60Hz display will generate display refreshes with DisplayUpdates which
sequentially will be { 0, 60 }, { 1, 60 }, { 2, 60 } ... { 59, 60 }, { 0, 60 }. The
zeroth frame is at some arbitrary time and not aligned with wallclock time.

Thus a client with a 30Hz update requirement can simply ignore every odd-numbered frame, and
a client downstream from it with a 15Hz requirement, which only receives those even-numbered
frames, still has enough information to compute which frames to ignore.

Classes which are sources of callbacks for DisplayRefreshMonitor need to generate these
DisplayUpdates; that includes the various platform DisplayRefreshMonitor subclasses in
WebCore, and those in WebKit that live in the UI process and trigger updates over IPC.

Source/WebCore:

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/EmptyClients.cpp:
  • platform/graphics/AnimationFrameRate.cpp:
  • platform/graphics/AnimationFrameRate.h:
  • platform/graphics/DisplayRefreshMonitor.cpp:

(WebCore::DisplayRefreshMonitor::displayLinkFired):
(WebCore::DisplayRefreshMonitor::dispatchDisplayDidRefresh):
(WebCore::DisplayRefreshMonitor::displayDidRefresh):

  • platform/graphics/DisplayRefreshMonitor.h:
  • platform/graphics/DisplayRefreshMonitorManager.cpp:

(WebCore::DisplayRefreshMonitorManager::displayWasUpdated):

  • platform/graphics/DisplayRefreshMonitorManager.h:
  • platform/graphics/DisplayUpdate.cpp: Copied from Source/WebCore/platform/graphics/win/DisplayRefreshMonitorWin.h.

(WebCore::operator<<):

  • platform/graphics/DisplayUpdate.h: Copied from Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.h.

(WebCore::DisplayUpdate::didUpdate):
(WebCore::DisplayUpdate::encode const):
(WebCore::DisplayUpdate::decode):

  • platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp: Assume a 60fps refresh rate but this code

should probably use gdk_frame_clock_get_refresh_info() to get the correct rate.
(WebCore::onFrameClockUpdate):
(WebCore::DisplayRefreshMonitorGtk::displayLinkCallbackFired):
(WebCore::DisplayRefreshMonitorGtk::startNotificationMechanism):

  • platform/graphics/gtk/DisplayRefreshMonitorGtk.h:
  • platform/graphics/ios/DisplayRefreshMonitorIOS.h:
  • platform/graphics/ios/DisplayRefreshMonitorIOS.mm:

(-[WebDisplayLinkHandler initWithMonitor:]):
(-[WebDisplayLinkHandler handleDisplayLink:]):
(WebCore::DisplayRefreshMonitorIOS::displayLinkCallbackFired):
(WebCore::DisplayRefreshMonitorIOS::startNotificationMechanism):
(-[WebDisplayLinkHandler setPreferredFramesPerSecond:]): Deleted.

  • platform/graphics/mac/LegacyDisplayRefreshMonitorMac.cpp:

(WebCore::displayLinkCallback):
(WebCore::LegacyDisplayRefreshMonitorMac::displayLinkCallbackFired):
(WebCore::LegacyDisplayRefreshMonitorMac::dispatchDisplayDidRefresh):
(WebCore::LegacyDisplayRefreshMonitorMac::nominalFramesPerSecondFromDisplayLink):
(WebCore::LegacyDisplayRefreshMonitorMac::startNotificationMechanism):

  • platform/graphics/mac/LegacyDisplayRefreshMonitorMac.h:

(WebCore::LegacyDisplayRefreshMonitorMac::currentUpdate const):

  • platform/graphics/win/DisplayRefreshMonitorWin.cpp:

(WebCore::DisplayRefreshMonitorWin::DisplayRefreshMonitorWin):
(WebCore::DisplayRefreshMonitorWin::displayLinkCallbackFired):

  • platform/graphics/win/DisplayRefreshMonitorWin.h:

Source/WebKit:

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:

(WebKit::ThreadedDisplayRefreshMonitor::invalidate):
(WebKit::ThreadedDisplayRefreshMonitor::displayRefreshCallback):
(WebKit::ThreadedDisplayRefreshMonitor::ThreadedDisplayRefreshMonitor): Deleted.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h:
  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::addObserver):
(WebKit::DisplayLink::notifyObserversDisplayWasRefreshed):

  • UIProcess/mac/DisplayLink.h:
  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::displayWasRefreshed):

  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/EventDispatcher.messages.in:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm:

(WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::setPreferredFramesPerSecond):
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::didUpdateLayers):

  • WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp:

(WebKit::DisplayRefreshMonitorMac::dispatchDisplayDidRefresh):

  • WebProcess/WebPage/mac/DisplayRefreshMonitorMac.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::displayWasRefreshed):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
9:32 AM Changeset in webkit [275162] by youenn@apple.com
  • 20 edits in trunk

Promote WKWebView getUserMedia SPI to API
https://bugs.webkit.org/show_bug.cgi?id=223806

Reviewed by Eric Carlson.

Source/WebKit:

Move SPI to API.
Update delegate to take an enumeration instead of two booleans.
Make setters completion handlers nullable.
Covered by API tests.

  • UIProcess/API/Cocoa/WKUIDelegate.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView cameraCaptureState]):
(-[WKWebView microphoneCaptureState]):
(-[WKWebView setMicrophoneCaptureState:completionHandler:]):
(-[WKWebView setCameraCaptureState:completionHandler:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::decidePolicyForGeolocationPermissionRequest):
(WebKit::UIDelegate::UIClient::shouldAllowDeviceOrientationAndMotionAccess):
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):

Tools:

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(-[UserMediaCaptureUIDelegateForParameters webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:

(-[NavigationWhileGetUserMediaPromptDisplayedUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/MediaStreamTrackDetached.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm:

(-[DeviceOrientationPermissionUIDelegate _webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):
(-[DeviceOrientationPermissionValidationDelegate _webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:

(-[SpeechRecognitionUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:

(-[GeolocationDelegateNew _webView:requestGeolocationPermissionForOrigin:initiatedByFrame:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm:

(-[UserMediaUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:

(-[SimulateFailedSandboxUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[WebsitePoliciesDeviceOrientationUIDelegate _webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):

  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h:
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:

(-[UserMediaCaptureUIDelegate init]):
(-[UserMediaCaptureUIDelegate setAudioDecision:]):
(-[UserMediaCaptureUIDelegate setVideoDecision:]):
(-[UserMediaCaptureUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):

9:31 AM Changeset in webkit [275161] by Aditya Keerthi
  • 14 edits in trunk/Source/WebCore

Use enum classes and OptionSets for ControlStates::States
https://bugs.webkit.org/show_bug.cgi?id=223647

Reviewed by Sam Weinig.

No behavior change.

  • dom/Element.cpp:

(WebCore::Element::setActive):
(WebCore::Element::setHovered):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::focusedOrActiveStateChanged):

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::disabledStateChanged):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setIndeterminate):

  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::parseAttribute):

  • platform/ControlStates.h:

(WebCore::ControlStates::ControlStates):
(WebCore::ControlStates::states const):
(WebCore::ControlStates::setStates):

  • platform/adwaita/ThemeAdwaita.cpp:

(WebCore::ThemeAdwaita::paintCheckbox):
(WebCore::ThemeAdwaita::paintRadio):
(WebCore::ThemeAdwaita::paintButton):
(WebCore::ThemeAdwaita::paintSpinButton):

  • platform/mac/ThemeMac.mm:

(WebCore::updateStates):
(WebCore::paintToggleButton):
(WebCore::button):
(WebCore::paintButton):
(WebCore::paintStepper):
(WebCore::ThemeMac::ensuredView):
(WebCore::paintColorWell):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::stateChanged const):
(WebCore::RenderTheme::extractControlStatesForRenderer const):

  • rendering/RenderTheme.h:
  • rendering/RenderThemeAdwaita.cpp:

(WebCore::RenderThemeAdwaita::paintMenuList):

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::checkboxRadioBackgroundColor):
(WebCore::RenderThemeIOS::checkboxRadioIndicatorColor):
(WebCore::RenderThemeIOS::paintCheckbox):
(WebCore::RenderThemeIOS::paintRadio):

9:30 AM Changeset in webkit [275160] by graouts@webkit.org
  • 14 edits in trunk

Add support for animating the vertical-align CSS property
https://bugs.webkit.org/show_bug.cgi?id=223853

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add 161 PASS results in the WPT suite now that we support animating vertical-align.

  • web-platform-tests/css/css-transitions/animations/vertical-align-composition-expected.txt:
  • web-platform-tests/css/css-transitions/animations/vertical-align-interpolation-expected.txt:
  • web-platform-tests/css/css-transitions/properties-value-001-expected.txt:
  • web-platform-tests/css/css-transitions/properties-value-implicit-001-expected.txt:
  • web-platform-tests/css/css-transitions/properties-value-inherit-001-expected.txt:
  • web-platform-tests/css/css-transitions/properties-value-inherit-002-expected.txt:

Source/WebCore:

Adding support for animating vertical-align revealed a couple of long-standing issues with
regards to our support for this property.

First off, we didn't honor the "inherit" value since it required a custom builder method
to deal with both RenderStyle::verticalAlign() (the type) and RenderStyle::verticalAlignLength()
(the value).

Then, we would hit an assertion when obtaining the computed style for this property and a
calculated value since we didn't pass the RenderStyle to createValue().

We now correctly interpolate this property per the dedicated WPT test, the only issues remaining
being about how our calc serialization (https://bugs.webkit.org/show_bug.cgi?id=223875).

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json:
  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInheritVerticalAlign):

LayoutTests:

  • TestExpectations: Unskip tests related to vertical-align interpolation since they are

no longer crashing.

6:50 AM CSSContainment edited by rwlbuis@webkit.org
(diff)
6:49 AM CSSContainment edited by rwlbuis@webkit.org
(diff)
6:43 AM CSSContainment created by rwlbuis@webkit.org
6:34 AM WikiStart edited by rwlbuis@webkit.org
(diff)
Note: See TracTimeline for information about the timeline view.