Timeline



Apr 2, 2021:

4:27 PM Changeset in webkit [275450] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

PendingImageBitmap gets created on a stopped script execution context.
https://bugs.webkit.org/show_bug.cgi?id=223971

Reviewed by Youenn Fablet.

Don't create a PendingImageBitmap in PendingImageBitmap::fetch
if the associated script execution context had already been stoppped.

The new behavior matches of Chrome although it's technically incorrect.

Correcting it to match the spec & Firefox will refactor a larger fix around
how script execution context is used by the threaded loader.

  • html/ImageBitmap.cpp:

(WebCore::PendingImageBitmap::fetch):

3:57 PM Changeset in webkit [275449] by Simon Fraser
  • 2 edits in trunk/Source/WTF

Enable PreferPageRenderingUpdatesNear60FPSEnabled by default
https://bugs.webkit.org/show_bug.cgi?id=224133

Reviewed by Tim Horton.

Turn the PreferPageRenderingUpdatesNear60FPSEnabled internal setting on by default. This
means that requestAnimationFrame on 144Hz displays will fire at 72Hz. 60Hz displays are
unaffected.

Firing at "close to 60fps" was determined to be necessary for web compatibility and power.

  • Scripts/Preferences/WebPreferencesInternal.yaml:
3:44 PM Changeset in webkit [275448] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

[GPUP] Power regression: audio hardware is configured for 128 frame preferred buffer size during VideoAudio playback
https://bugs.webkit.org/show_bug.cgi?id=224122

Reviewed by Eric Carlson.

The RemoteAudioHardwareListenerProxy tracks when audio hardware changes, and updates the WebContent process with
the supported properies of the new default audio device, including supported buffer sizes. However, it only does
so when the current audio devices changes, and not initially. Instead, ensure the WebContent process is immediately
update with the correct values for supported buffer sizes. This allows VideoAudio playback to enter a lower-power
playback mode by specifying a large preferred buffer size (4096).

  • GPUProcess/media/RemoteAudioHardwareListenerProxy.cpp:

(WebKit::RemoteAudioHardwareListenerProxy::RemoteAudioHardwareListenerProxy):

3:39 PM Changeset in webkit [275447] by beidson@apple.com
  • 17 edits in trunk

Add WKURLSchemeTask redirect API.
https://bugs.webkit.org/show_bug.cgi?id=224119

Reviewed by Alex Christensen.

Source/WebKit:

Covered by new API tests.

Instead of the existing "did do a redirect" SPI without completion handler, this one has
a completion handler with a new request for the task, proposed by WebKit.

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

(raiseExceptionIfNecessary):
(-[WKURLSchemeTaskImpl willPerformRedirection:newRequest:completionHandler:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setURLSchemeHandlerForScheme):

  • UIProcess/WebURLSchemeTask.cpp:

(WebKit::WebURLSchemeTask::willPerformRedirection):
(WebKit::WebURLSchemeTask::didPerformRedirection):
(WebKit::WebURLSchemeTask::didReceiveResponse):
(WebKit::WebURLSchemeTask::didReceiveData):
(WebKit::WebURLSchemeTask::didComplete):

  • UIProcess/WebURLSchemeTask.h:

(WebKit::WebURLSchemeTask::waitingForRedirectCompletionHandlerCallback const):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::urlSchemeTaskWillPerformRedirection):
(WebKit::WebPage::urlSchemeTaskDidPerformRedirection):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:

(WebKit::WebURLSchemeHandlerProxy::taskDidPerformRedirection):

  • WebProcess/WebPage/WebURLSchemeHandlerProxy.h:
  • WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:

(WebKit::WebURLSchemeTaskProxy::didPerformRedirection):

  • WebProcess/WebPage/WebURLSchemeTaskProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

(-[TaskSchemeHandler webView:startURLSchemeTask:]):
(TEST):
(-[HTTPRedirectTest webView:startURLSchemeTask:]):
(-[HTTPRedirectTest webView:stopURLSchemeTask:]):

3:33 PM Changeset in webkit [275446] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[ MacOS ] media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=224123

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:24 PM Changeset in webkit [275445] by Alexey Shvayka
  • 12 edits in trunk

Remove [Replaceable] extended attribute from document.all
https://bugs.webkit.org/show_bug.cgi?id=223883

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/dom/idlharness.https-expected.txt:

Source/WebCore:

[Replaceable] semantics was introduced around 2003 to work around a web-compat issue.
Since then, document.all was revised multiple times and standardized as IsHTMLDDA?
object without a setter, which was proven to be compatible with the web.

This patch aligns WebKit with the spec [1], Blink, and Gecko.

iOS apps are unlikely to accidentally depend on subtleties in document.all behavior since
they were authored long after it became obsolete.

Old versions of libraries, originally designed for the web, are also unlikely to rely on
previous behavior, because document.all was never replaceable in some popular browsers.

[1] https://html.spec.whatwg.org/multipage/obsolete.html#Document-partial

Tests: fast/dom/undetectable-document-all.html

imported/w3c/web-platform-tests/html/dom/idlharness.https.html

  • dom/Document+HTMLObsolete.idl:

LayoutTests:

  • fast/dom/undetectable-document-all-expected.txt:
  • fast/dom/undetectable-document-all.html:
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
3:20 PM Changeset in webkit [275444] by Jonathan Bedard
  • 3 edits in trunk/Tools

[check-webkit-style] Check python files in LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=224079
<rdar://problem/76122813>

Reviewed by Dewei Zhu.

  • Scripts/webkitpy/style/checker.py:

(CheckerDispatcher.should_skip_without_warning): Never skip style checks on .py files.

  • Scripts/webkitpy/style/checker_unittest.py:

(CheckerDispatcherSkipTest.test_should_skip_without_warningfalse):

2:53 PM Changeset in webkit [275443] by Chris Dumez
  • 35 edits
    2 adds in trunk/Source

Introduce ScriptBuffer class to wrap SharedBuffer containing a script
https://bugs.webkit.org/show_bug.cgi?id=224092

Reviewed by Yusuke Suzuki and Geoff Garen.

Introduce ScriptBuffer class to wrap SharedBuffer containing a script. We started using SharedBuffer to represent
worker scripts instead of String, so that they can hold file mapped data and be shared across processes.
This patch introduces a new ScriptBuffer to wrap those SharedBuffers. The type makes it clearer what type of
data we're dealing with. The helper functions used to convert between String and SharedBuffer can now simply
be member functions on ScriptBuffer. This also simplifies IPC code.

Source/WebCore:

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

Add new ScriptBuffer class to project files.

  • inspector/agents/worker/ServiceWorkerAgent.cpp:

(WebCore::ServiceWorkerAgent::getInitializationInfo):
Use ScriptBuffer::toString() instead of scriptBufferToString().

  • workers/ScriptBuffer.cpp: Added.

(WebCore::ScriptBuffer::ScriptBuffer):
(WebCore::ScriptBuffer::toString const):
(WebCore::ScriptBuffer::containsSingleFileMappedSegment const):
(WebCore::operator==):

  • workers/ScriptBuffer.h: Added.

(WebCore::ScriptBuffer::ScriptBuffer):
(WebCore::ScriptBuffer::buffer const):
(WebCore::ScriptBuffer::isolatedCopy const):
(WebCore::ScriptBuffer::operator bool const):
New ScriptBuffer class that wraps a SharedBuffer representation of a script.
This class helps make it clear what data we're dealing with. It also facilitates
conversion to and from a String when needed. The class also has its own IPC
coder at WebKit layer to encode the script as a ShareableResource when file
mapped.

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadSynchronously):
Use ScriptBuffer::toString() instead of scriptBufferToString().
And use StringBuffer constructor that takes a String instead of stringToScriptBuffer().

  • workers/service/SWClientConnection.h:
  • workers/service/ServiceWorkerContextData.cpp:

(WebCore::ServiceWorkerContextData::isolatedCopy const):

  • workers/service/ServiceWorkerContextData.h:

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

  • Use ScriptBuffer instead of RefPtr<SharedBuffer> for scripts.
  • Drop scriptBufferToString() & stringToScriptBuffer() as they are no longer needed.
  • Move IPC coders for ServiceWorkerContextData back from WebCoreArgumentCoders back to the WebCore class, now that the coders no longer need to deal with ShareableResource directly. We now encode / decode ScriptBuffer objects and its coder takes care of using a ShareableResource whenever possible.
  • workers/service/ServiceWorkerGlobalScope.cpp:

(WebCore::ServiceWorkerGlobalScope::didSaveScriptsToDisk):

  • workers/service/ServiceWorkerGlobalScope.h:
  • workers/service/context/SWContextManager.cpp:

(WebCore::SWContextManager::didSaveScriptsToDisk):

  • workers/service/context/SWContextManager.h:
  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::ServiceWorkerThread):

  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::ServiceWorkerThreadProxy::didSaveScriptsToDisk):

  • workers/service/context/ServiceWorkerThreadProxy.h:
  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::doPushChanges):
(WebCore::RegistrationDatabase::importRecords):

  • workers/service/server/RegistrationStore.cpp:

(WebCore::RegistrationStore::didSaveWorkerScriptsToDisk):

  • workers/service/server/RegistrationStore.h:
  • workers/service/server/SWScriptStorage.cpp:

(WebCore::SWScriptStorage::store):
(WebCore::SWScriptStorage::retrieve):

  • workers/service/server/SWScriptStorage.h:
  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::didSaveWorkerScriptsToDisk):
(WebCore::SWServer::updateWorker):

  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerJobQueue.cpp:

(WebCore::SWServerJobQueue::scriptFetchFinished):

  • workers/service/server/SWServerToContextConnection.h:
  • workers/service/server/SWServerWorker.cpp:

(WebCore::SWServerWorker::SWServerWorker):
(WebCore::SWServerWorker::didSaveScriptsToDisk):

  • workers/service/server/SWServerWorker.h:

(WebCore::SWServerWorker::script const):
Use ScriptBuffer instead of SharedBuffer.

Source/WebKit:

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:

(WebKit::WebSWServerToContextConnection::didSaveScriptsToDisk):

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:

Use ScriptBuffer instead SharedBuffer.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::tryConvertToShareableResourceHandle):
(IPC::decodeScriptBufferAsShareableResourceHandle):
(IPC::ArgumentCoder<WebCore::ScriptBuffer>::encode):
(IPC::ArgumentCoder<WebCore::ScriptBuffer>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • Add IPC encoder / decoder for ScriptBuffer which tries to encode / decode as a ShareableResource whenever possible (single segment that is file mapped). This logic used to be in the ServiceWorkerContextData coders. Now that the logic is in the ScriptBuffer coder, the ServiceWorkerContextData encoding / decoding becomes much simpler.
  • Moved ServiceWorkerContextData coders from WebCoreArgumentCoders back to its class in WebCore, now that they no longer need to deal with ShareableResource directly.
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::didSaveScriptsToDisk):

  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/Storage/WebSWContextManagerConnection.messages.in:

Send scripts over IPC as ScriptBuffer instead of using ShareableResource directly. The new IPC encoder /
decoder for ScriptBuffer takes care of using ShareableResource for us.

2:39 PM Changeset in webkit [275442] by Chris Dumez
  • 20 edits
    2 deletes in trunk/Source

Unreviewed, reverting r275434.

Need to figure out a better strategy to chose the color

Reverted changeset:

"Make sure we are no longer show the previous page when
running a JS prompt"
https://bugs.webkit.org/show_bug.cgi?id=215782
https://commits.webkit.org/r275434

2:32 PM Changeset in webkit [275441] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[MacOS Debug] imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test.html is a flakey crash and failure
https://bugs.webkit.org/show_bug.cgi?id=222750

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:29 PM Changeset in webkit [275440] by Simon Fraser
  • 14 edits in trunk/Source

Allow wheel events to trigger high frequency DisplayLinks
https://bugs.webkit.org/show_bug.cgi?id=224095

Reviewed by Sam Weinig.

Source/WebCore:

Adjust some logging so it's clear which process code is running in.

  • platform/graphics/DisplayRefreshMonitor.cpp:

(WebCore::DisplayRefreshMonitor::displayLinkFired):

  • platform/graphics/DisplayRefreshMonitorManager.cpp:

(WebCore::DisplayRefreshMonitorManager::ensureMonitorForDisplayID):

Source/WebKit:

When scrolling via wheel events, we may want to drive scrolling tree updates
(which are driven by EventDispatcher::displayWasRefreshed()) at a higher rate
than the main thread does rendering updates.

To support this, give DisplayLink a count of "full speed" clients, and when this count is
greater than zero, have DisplayLink::notifyObserversDisplayWasRefreshed() send
EventDispatcher IPC at full framerate, while passing a flag based on the usual
relevantForUpdateFrequency() about whether to update the main thread for a given update.

Allow DisplayLink connection info objects with non-zero fullSpeedUpdatesClientCount
to stick around, because that fullSpeedUpdatesClientCount needs to be stored for
connections that may not yet have observers.

Since DisplayLink might have info for connections with no observers, adjust the logic in
DisplayLink::notifyObserversDisplayWasRefreshed() to do the CVDisplayLinkStop
after traversing the observers.

The "full speed" client count is maintained by a HysteresisActivity on WebPageProxy,
whose impulse is wheel events. This replaces a singleton HysteresisActivity which
was used to determine whether IPC goes to EventDispatcher or the main thread of
the web process.

WebPageProxy needs to track the PlatformDisplayID for the screen that its view is on,
so it knows which DisplayLink to message.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::setDisplayLinkForDisplayWantsFullSpeedUpdates):

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_wheelEventActivityHysteresis):
(WebKit::WebPageProxy::wheelEventHysteresisUpdated):
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::windowScreenDidChange):
(WebKit::ScrollingObserver::willSendWheelEvent): Deleted.
(WebKit::ScrollingObserver::ScrollingObserver): Deleted.
(WebKit::ScrollingObserver::singleton): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessPool.h:
  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::DisplayLink):
(WebKit::DisplayLink::~DisplayLink):
(WebKit::DisplayLink::addObserver):
(WebKit::DisplayLink::removeObserver):
(WebKit::DisplayLink::removeInfoForConnectionIfPossible):
(WebKit::DisplayLink::incrementFullSpeedRequestClientCount):
(WebKit::DisplayLink::decrementFullSpeedRequestClientCount):
(WebKit::DisplayLink::setPreferredFramesPerSecond):
(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/mac/DisplayRefreshMonitorMac.cpp:

(WebKit::DisplayRefreshMonitorMac::startNotificationMechanism):
(WebKit::DisplayRefreshMonitorMac::adjustPreferredFramesPerSecond):

2:20 PM Changeset in webkit [275439] by Alexey Shvayka
  • 17 edits in trunk

Reduce bytecode instruction count emitted for class extends
https://bugs.webkit.org/show_bug.cgi?id=223884

Reviewed by Yusuke Suzuki.

JSTests:

  • ChakraCore/test/Error/validate_line_column.baseline-jsc:

Source/JavaScriptCore:

This patch adds a variant of globalFuncSetPrototypeDirect() that throws on
invalid Prototype? values (instead of ignoring them) and utilizes it in
ClassExprNode::emitBytecode(), removing equivalent checks.

Throwing for invalid superclass.prototype value after setting the Prototype?
of constructor is unobservable because it's a newly created extensible object
and superclass is a proven object.

The fact that Prototype? set can throw only in case of superclass.prototype
allows keeping descriptive error message via custom appender. To find "extends"
in a source code, ClassExprNode is made an instance of ThrowableExpressionData.

This change reduces the number of emitted bytecodes by 4, and fixes IsConstructor's
error [1] to point to correct source code location.

[1]: https://tc39.es/ecma262/#sec-runtime-semantics-classdefinitionevaluation (step 5.f)

  • builtins/BuiltinNames.h:
  • bytecode/LinkTimeConstant.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitDirectSetPrototypeOf):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::PropertyListNode::emitPutConstantProperty):
(JSC::ClassExprNode::emitBytecode):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createClassExpr):

  • parser/Nodes.h:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseClass):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createClassExpr):

  • runtime/ExceptionHelpers.cpp:

(JSC::invalidPrototypeSourceAppender):
(JSC::createInvalidPrototypeError):

  • runtime/ExceptionHelpers.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSGlobalObjectFunctions.h:
2:10 PM Changeset in webkit [275438] by commit-queue@webkit.org
  • 21 edits
    5 adds in trunk

JSTests:
Add tests for the new type method on certain JS-API wasm objects.
https://bugs.webkit.org/show_bug.cgi?id=222412

Patch by Jessica Tallon <jtallon@igalia.com> on 2021-04-02
Reviewed by Yusuke Suzuki.

  • wasm/js-api/global.js: Added.

(assert.throws):

  • wasm/js-api/table.js:

(assert.truthy):

  • wasm/js-api/test_memory.js:

LayoutTests/imported/w3c:
Update wasm JS-API tests for the type method to latest upstream.
https://bugs.webkit.org/show_bug.cgi?id=222412

Patch by Jessica Tallon <jtallon@igalia.com> on 2021-04-02
Reviewed by Yusuke Suzuki.

The upstream tests has recently added a test for the table type method and
updated the other type tests to methods to keep up with a recent spec change.
This adds those updated tests as well as now expectations they pass.

  • web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt:
  • web-platform-tests/wasm/jsapi/global/type.tentative.any.js:

(assert_type):
(string_appeared_here.test):

  • web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/memory/type.tentative.any-expected.txt:
  • web-platform-tests/wasm/jsapi/memory/type.tentative.any.js:

(assert_type):

  • web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker-expected.txt:

Source/JavaScriptCore:
Add type method to WebAssembly.Memory, WebAssembly.Table & WebAssembly.Global objects
https://bugs.webkit.org/show_bug.cgi?id=222412

Patch by Jessica Tallon <jtallon@igalia.com> on 2021-04-02
Reviewed by Yusuke Suzuki.

This adds a type method to several WASM objects as part of the work to add WASM
type reflections to the JS-API. The methods return a JSON object which describes
the type of the object and can be passed to the constructor to create a new wasm
object of that type.

  • wasm/js/JSWebAssemblyGlobal.cpp:

(JSC::JSWebAssemblyGlobal::type):

  • wasm/js/JSWebAssemblyGlobal.h:
  • wasm/js/JSWebAssemblyMemory.cpp:

(JSC::JSWebAssemblyMemory::type):

  • wasm/js/JSWebAssemblyMemory.h:
  • wasm/js/JSWebAssemblyTable.cpp:

(JSC::JSWebAssemblyTable::type):

  • wasm/js/JSWebAssemblyTable.h:
  • wasm/js/WebAssemblyGlobalPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyGlobalPrototype.h:
  • wasm/js/WebAssemblyMemoryPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyTablePrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

2:07 PM Changeset in webkit [275437] by Russell Epstein
  • 1 copy in tags/Safari-612.1.9

Tag Safari-612.1.9.

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

UBSan: AlternativeTextController::dismiss()/dismissSoon(): runtime error: load of value nnn, which is not a valid value for type 'bool'
<https://webkit.org/b/223903>

Reviewed by Wenson Hsieh.

Covered by 449 layout tests using WebKit compiled with UBSan.

  • editing/AlternativeTextController.h:
  • Initialize m_isActive and m_isDismissedByEditing.
1:23 PM Changeset in webkit [275435] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ EWS iOS wk2 ] css2.1/20110323/replaced-intrinsic-ratio-001.htm is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=224121

Uneviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: Updated test expectations to Pass Failure because it was slowing down EWS. Keeping expectation while test is reviewed.
12:37 PM Changeset in webkit [275434] by Chris Dumez
  • 20 edits
    2 adds in trunk/Source

Make sure we are no longer show the previous page when running a JS prompt
https://bugs.webkit.org/show_bug.cgi?id=215782
<rdar://problem/67698601>

Reviewed by Simon Fraser.

Source/WebCore:

Add linked-on-after check for the behavior change to minimize the risk of
breakage.

  • platform/cocoa/VersionChecks.h:

Source/WebKit:

Make sure we are no longer show the previous page when running a JS prompt.
If we have not yet done a layer tree commit since the last load commit, then
we are likely still showing the previous page. If we are asked to run a JS
prompt / alert / confirm at this point, it would be confusing to still show
the previous page. In order to address the issue, we now make the view blank
in such scenario (ideally, we'd have painted the new page but this is
currently not a trivial thing to do).

To make the view blank, the approach chosen was to add a blank overlay view
on top of the content. This overlay view gets taken down as soon as we
paint the view again.

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _hasBlankOverlay]):
(-[WKWebView _setHasBlankOverlay:]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/PageClientImplCocoa.h:
  • UIProcess/Cocoa/PageClientImplCocoa.mm:

(WebKit::PageClientImplCocoa::setHasBlankOverlay):

  • UIProcess/Cocoa/WKBlankOverlayView.h: Added.
  • UIProcess/Cocoa/WKBlankOverlayView.mm: Added.

(-[WKBlankOverlayView initWithFrame:]):

  • UIProcess/PageClient.h:

(WebKit::PageClient::setHasBlankOverlay):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::stopMakingViewBlankDueToLackOfRenderingUpdate):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didCommitLayerTree):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::didUpdateRenderingAfterCommittingLoad):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didCommitLoad):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::updateRendering):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::didUpdateRendering):

12:33 PM Changeset in webkit [275433] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Add IOKit method filter telemetry
https://bugs.webkit.org/show_bug.cgi?id=223652
<rdar://problem/75751391>

Reviewed by Brent Fulgham.

Add IOKit method filter telemetry in the WebContent sandbox on macOS and iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
12:32 PM Changeset in webkit [275432] by Russell Epstein
  • 1 edit in branches/safari-612.1.9-branch/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml

Apply patch. rdar://problem/76159515

12:32 PM Changeset in webkit [275431] by Devin Rousso
  • 6 edits in trunk/Source/WebCore

[iPadOS] unable to reorder tabs on *.mybinder.org
https://bugs.webkit.org/show_bug.cgi?id=224034
<rdar://problem/51770057>

Reviewed by Brent Fulgham.

  • page/Quirks.h:
  • page/Quirks.cpp:

(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
(WebCore::Quirks::shouldDispatchedSimulatedMouseEventsAssumeDefaultPrevented const):
(WebCore::Quirks::simulatedMouseEventTypeForTarget const):
Modify Quirks::shouldDispatchSimulatedMouseEvents to accept an EventTarget so that we
can limit dispatching touch events as mouse events on *.mybinder.org to only the tab bar.

  • dom/EventNames.h:

(WebCore::EventNames::isTouchRelatedEventType const):

  • dom/Node.cpp:

(WebCore::Node::moveNodeToNewDocument):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::defaultEventHandler):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::removeEventListener):
Pass in the EventTarget when calling Quirks::shouldDispatchSimulatedMouseEvents.

12:30 PM Changeset in webkit [275430] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[AspectRatio] Out-of-flow box with intrinsic width (e.g. <img>) may trigger infinite recursion
https://bugs.webkit.org/show_bug.cgi?id=224113

Reviewed by Rob Buis.

Source/WebCore:

This covers the case when the out-of-flow box has intrinsic width (replaced box) and
the max-width is also set to "intrinsic" meaning content size dependent. In such cases
the aspect ratio computation ends up recursing around RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth.
This path checks if the out-of-flow box's horizontal size is also constrained by the intrinsic width.

Test: fast/replaced/infinite-recursion-with-intrinsic-width.html

  • rendering/RenderBox.cpp:

(WebCore::shouldComputeLogicalWidthFromAspectRatioAndInsets):

LayoutTests:

  • fast/replaced/infinite-recursion-with-intrinsic-width-expected.txt: Added.
  • fast/replaced/infinite-recursion-with-intrinsic-width.html: Added.
11:52 AM Changeset in webkit [275429] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Capture rotation is wrong after Safari is backgrounded then foregrounded
https://bugs.webkit.org/show_bug.cgi?id=224103

Reviewed by Eric Carlson.

WebPage computes rotation either based on rotation notification or viewport notification.
Apply the same technique in UIProcess to let GPUProcess get the right information.
Manually tested.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::dynamicViewportSizeUpdate):

11:40 AM Changeset in webkit [275428] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Delete JS code and trigger garbage collection in worker threads on memory pressure
https://bugs.webkit.org/show_bug.cgi?id=224110

Reviewed by Geoffrey Garen.

Delete JS code and trigger garbage collection in worker threads on memory pressure,
to release as much memory as possible. We were previously only doing this in the
common (main thread) VM.

For the garbage collection logic, I tried to match what the GCController is doing
for the commonVM but apply it to worker VMs.

  • page/MemoryRelease.cpp:

(WebCore::releaseCriticalMemory):

  • workers/WorkerGlobalScope.cpp:

(WebCore::allWorkerGlobalScopeIdentifiers):
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::~WorkerGlobalScope):
(WebCore::WorkerGlobalScope::releaseMemory):
(WebCore::WorkerGlobalScope::releaseMemoryInWorkers):

  • workers/WorkerGlobalScope.h:
11:35 AM Changeset in webkit [275427] by Chris Gambrell
  • 68 edits
    5 adds
    5 deletes in trunk/LayoutTests

[LayoutTests] Convert http/tests/referrer-policy convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=223234
<rdar://problem/75460136>

Reviewed by Jonathan Bedard.

  • http/tests/cache/resources/svg-defs-vary.py:
  • http/tests/css/resources/webfont-request.py:

(get_request_count):
(set_request_count):
(getRequestCount): Deleted.
(setRequestCount): Deleted.

  • http/tests/eventsource/resources/status-codes.py:
  • http/tests/misc/resources/dns-prefetch-control.py:
  • http/tests/misc/resources/protected/protected-image.py:
  • http/tests/navigation/ping-attribute/resources/utilities.js:

(clearLastPingResultAndRunTest):

  • http/tests/navigation/resources/post-goback-same-url.py:
  • http/tests/navigation/resources/randomredirects/randomredirect.py:
  • http/tests/referrer-policy-anchor/no-referrer-when-downgrade/cross-origin-http-http.html:
  • http/tests/referrer-policy-anchor/no-referrer-when-downgrade/cross-origin-http.https.html:
  • http/tests/referrer-policy-anchor/no-referrer-when-downgrade/same-origin.html:
  • http/tests/referrer-policy-anchor/no-referrer/cross-origin-http-http.html:
  • http/tests/referrer-policy-anchor/no-referrer/cross-origin-http.https.html:
  • http/tests/referrer-policy-anchor/no-referrer/same-origin.html:
  • http/tests/referrer-policy-anchor/origin-when-cross-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-anchor/origin-when-cross-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-anchor/origin-when-cross-origin/same-origin.html:
  • http/tests/referrer-policy-anchor/origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-anchor/origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-anchor/origin/same-origin.html:
  • http/tests/referrer-policy-anchor/same-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-anchor/same-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-anchor/same-origin/same-origin.html:
  • http/tests/referrer-policy-anchor/strict-origin-when-cross-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-anchor/strict-origin-when-cross-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-anchor/strict-origin-when-cross-origin/same-origin.html:
  • http/tests/referrer-policy-anchor/strict-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-anchor/strict-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-anchor/strict-origin/same-origin.html:
  • http/tests/referrer-policy-anchor/unsafe-url/cross-origin-http-http.html:
  • http/tests/referrer-policy-anchor/unsafe-url/cross-origin-http.https.html:
  • http/tests/referrer-policy-anchor/unsafe-url/same-origin.html:
  • http/tests/referrer-policy-img/no-referrer-when-downgrade/cross-origin-http-http.html:
  • http/tests/referrer-policy-img/no-referrer-when-downgrade/cross-origin-http.https-expected.txt:
  • http/tests/referrer-policy-img/no-referrer-when-downgrade/cross-origin-http.https.html:
  • http/tests/referrer-policy-img/no-referrer-when-downgrade/same-origin.html:
  • http/tests/referrer-policy-img/no-referrer/cross-origin-http-http.html:
  • http/tests/referrer-policy-img/no-referrer/cross-origin-http.https-expected.txt:
  • http/tests/referrer-policy-img/no-referrer/cross-origin-http.https.html:
  • http/tests/referrer-policy-img/no-referrer/same-origin.html:
  • http/tests/referrer-policy-img/origin-when-cross-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-img/origin-when-cross-origin/cross-origin-http.https-expected.txt:
  • http/tests/referrer-policy-img/origin-when-cross-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-img/origin-when-cross-origin/same-origin.html:
  • http/tests/referrer-policy-img/origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-img/origin/cross-origin-http.https-expected.txt:
  • http/tests/referrer-policy-img/origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-img/origin/same-origin.html:
  • http/tests/referrer-policy-img/same-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-img/same-origin/cross-origin-http.https-expected.txt:
  • http/tests/referrer-policy-img/same-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-img/same-origin/same-origin.html:
  • http/tests/referrer-policy-img/strict-origin-when-cross-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-img/strict-origin-when-cross-origin/cross-origin-http.https-expected.txt:
  • http/tests/referrer-policy-img/strict-origin-when-cross-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-img/strict-origin-when-cross-origin/same-origin.html:
  • http/tests/referrer-policy-img/strict-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-img/strict-origin/cross-origin-http.https-expected.txt:
  • http/tests/referrer-policy-img/strict-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-img/strict-origin/same-origin.html:
  • http/tests/referrer-policy-img/unsafe-url/cross-origin-http-http.html:
  • http/tests/referrer-policy-img/unsafe-url/cross-origin-http.https-expected.txt:
  • http/tests/referrer-policy-img/unsafe-url/cross-origin-http.https.html:
  • http/tests/referrer-policy-img/unsafe-url/same-origin.html:
  • http/tests/referrer-policy/resources/check-referrer.php: Removed.
  • http/tests/referrer-policy/resources/check-referrer.py: Added.
  • http/tests/referrer-policy/resources/image.php: Removed.
  • http/tests/referrer-policy/resources/image.py: Added.
  • http/tests/referrer-policy/resources/script.php: Removed.
  • http/tests/referrer-policy/resources/script.py: Added.
  • http/tests/security/xssAuditor/resources/tag-with-pause.py:
  • http/tests/websocket/tests/hybi/contentextensions/block-cookies-worker.php.json: Removed.
  • http/tests/websocket/tests/hybi/contentextensions/block-cookies-worker.py.json: Added.
  • http/tests/websocket/tests/hybi/contentextensions/block-cookies.php.json: Removed.
  • http/tests/websocket/tests/hybi/contentextensions/block-cookies.py.json: Added.
  • imported/blink/http/tests/misc/input-image-fallback-content-crash.html:
  • resources/js-test.js:

(downgradeReferrerCallback):

11:17 AM Changeset in webkit [275426] by Aditya Keerthi
  • 10 edits in trunk

Do not paint native decorations for search fields without '-webkit-appearance: searchfield'
https://bugs.webkit.org/show_bug.cgi?id=223946
<rdar://problem/75621365>

Reviewed by Antti Koivisto.

Source/WebCore:

On iOS, sites that use <input type="search"> have been observed to draw
their own icons next to the field. Since we draw our own icon for
search fields, this results in an unwanted icon on some sites, such as
on chanel.com. However, in this case, the site specifies
"-webkit-appearance: textfield" on the search input, indicating a desire
to remove the native search field appearance. To remove the unwanted
icon, we should not paint decorations for search fields without
"-webkit-appearance: searchfield".

To achieve this behavior, adjust the -webkit-appearance value on the
pseudo element containing the icon when the search field has a different
-webkit-appearance value, so that the native painting is elided. The
decision to not simply set "display: none" on the element was made so
that sites can still customize the decoration should they choose to do
so. Note that on macOS, Web Inspector paints their own search icon
using the pseudo element.

No new tests. A layout test is not possible since SearchFieldResultsButtonElement
is inaccessible through DOM APIs. A reference mismatch test is not
possible since changing the -webkit-appearance property on a search field
already results in visual changes. Existing tests were rebaselined to
account for the fact that the decoration is removed when changing
-webkit-appearance, so we do have test coverage.

  • html/HTMLElement.h:

(WebCore::HTMLElement::isSearchFieldResultsButtonElement const):

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
(WebCore::SearchFieldResultsButtonElement::resolveCustomStyle):

If the searchfield's appearance is not "searchfield", adjust the
appearance of the results button to NoControlPart. For compatibility
reasons, the adjustment is skipped if the author has specified the
results attribute on the searchfield. This is determined by checking
the maxResults of the input element.

If the adjustment needs to be performed, we elide standard style
adjustments from the theme by setting canAdjustStyleForAppearance to
false. Without this, the call to resolveStyle will apply native styles
to the element, since it does not know we are about to reset appearance.

  • html/shadow/TextControlInnerElements.h:

(isType):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::adjustSearchFieldDecorationStyle const):

Skip style adjustment and reset the appearance when necessary.

  • rendering/RenderTheme.h:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):

Resolve all descendants if the appearance property of a search input is
changed. Without this change, the style of the results button is not
resolved when making a dynamic style change to the appearance of the
search input.

LayoutTests:

Rebaselined tests to account for the removal of the native decoration
when a different -webkit-appearance is specified on a search field.

  • platform/ios/fast/css/input-search-padding-expected.txt:
  • platform/mac/fast/css/text-input-with-webkit-border-radius-expected.txt:
10:41 AM Changeset in webkit [275425] by Chris Fleizach
  • 10 edits
    2 adds in trunk

AX: textRectsFromMarkers always fails
https://bugs.webkit.org/show_bug.cgi?id=223556
<rdar://74256003>

Reviewed by Zalan Bujtas.

Source/WebCore:

The textRectsFromMarkers:text: method is always failing to return a valid answer because when we try to extend
the search range of text to search, we're creating a range that can't be iterated with a CharacterIterator.

Test: accessibility/ios-simulator/text-rects-for-range-matches.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::rangeMatchesTextNearRange):

Tools:

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::rectsForTextMarkerRange):

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::rectsForTextMarkerRange):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::rectsForTextMarkerRange):

  • WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:

(WTR::AccessibilityUIElement::rectsForTextMarkerRange):

LayoutTests:

  • accessibility/ios-simulator/text-rects-for-range-matches-expected.txt: Added.
  • accessibility/ios-simulator/text-rects-for-range-matches.html: Added.
10:01 AM Changeset in webkit [275424] by Chris Gambrell
  • 6 edits
    1 add
    1 delete in trunk/LayoutTests

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

Reviewed by Alex Christensen.

  • http/tests/multipart/invalid-image-data-standalone.html:
  • http/tests/multipart/invalid-image-data.html:
  • http/tests/multipart/multipart-async-image.html:
  • http/tests/multipart/multipart-image.html:
  • http/tests/multipart/resources/multipart.php: Removed.
  • http/tests/multipart/resources/multipart.py: Added.

(send_part):

  • http/tests/multipart/stop-crash.html:
9:48 AM Changeset in webkit [275423] by clopez@igalia.com
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Gardening of flaky tests

Unreviewed gardening.

Update list of flaky tests.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
9:23 AM Changeset in webkit [275422] by commit-queue@webkit.org
  • 39 edits in trunk/Source/WebCore

Non-unified build fixes, early April 2021
https://bugs.webkit.org/show_bug.cgi?id=224091

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-04-02
Reviewed by Alex Christensen.

Non-unified build fixes, April 2021.

  • bindings/scripts/CodeGeneratorJS.pm:

(AddToIncludesForIDLType):
For IDLs that have a property with a type of undefined, also add #include "JSDOMConvertBase.h" to
the generated binding source file. This fixes a build error in
DerivedSources/JSWebGLLoseContext.cpp that looked like:

WebCore/DerivedSources/JSWebGLLoseContext.cpp:147:78: error: expected primary-expression before ‘>’ token
RELEASE_AND_RETURN(throwScope, JSValue::encode(toJS<IDLUndefined>(*lexicalGlobalObject, throwScope, [&]() -> decltype(auto) { return impl.loseContext(); })));

Thanks to Darin Adler for figuring this out.

To see the full error, go here: https://bugs.webkit.org/show_bug.cgi?id=223150#c14

  • dom/EventContext.h:
  • dom/FocusOptions.h:
  • loader/ResourceLoadInfo.cpp:
  • page/scrolling/ScrollSnapOffsetsInfo.cpp:
  • platform/network/soup/SoupNetworkSession.cpp:
  • rendering/RenderLayerModelObject.cpp:
  • style/Styleable.cpp:
  • workers/service/server/SWScriptStorage.cpp:
  • workers/service/server/SWScriptStorage.h:
  • Modules/mediastream/RTCDataChannelRemoteSource.h:

Fix 'invalid use of incomplete type <TYPE>' or '<TYPE> does not name a type' errors.

  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestCallTracer.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
  • bindings/scripts/test/JS/JSTestConditionalIncludes.cpp:
  • bindings/scripts/test/JS/JSTestDomainSecurity.cpp:
  • bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.cpp:
  • bindings/scripts/test/JS/JSTestMapLikeWithOverriddenOperations.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestOperationConditional.cpp:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
  • bindings/scripts/test/JS/JSTestSetLikeWithOverriddenOperations.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:

Update bindings via run-bindings-tests --reset-results to add new "JSDOMConvertBase.h" include.

7:56 AM Changeset in webkit [275421] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

Do not send samples to GPUProcess if mediastream video is not playing
https://bugs.webkit.org/show_bug.cgi?id=224100
<rdar://74809558>

Reviewed by Eric Carlson.

In case video is paused, there is no need to send samples to GPUProcess.
Instead, we can just exit early.
This fixes the issue of freezing camera in case a hidden video element tries to play the camera feed.
Manually tested.

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:

(WebKit::SampleBufferDisplayLayer::play):
(WebKit::SampleBufferDisplayLayer::pause):
(WebKit::SampleBufferDisplayLayer::enqueueSample):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:
7:06 AM Changeset in webkit [275420] by Chris Lord
  • 30 edits in trunk

Implement text rendering on OffscreenCanvas in a Worker
https://bugs.webkit.org/show_bug.cgi?id=202793

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Adjust test expectations.

  • web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.basic.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.complex.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.worker-expected.txt:

Source/WebCore:

Add a CSSFontSelector and FontCache to WorkerGlobalScope and via
interface changes to ScriptExecutionContext and FontSelector, use them
as appropriate after enabling text functions on Worker threads with
OffscreenCanvas.

No new tests, rebaselined existing tests.

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::m_version):
(WebCore::CSSFontSelector::~CSSFontSelector):
(WebCore::CSSFontSelector::fontRangesForFamily):
(WebCore::CSSFontSelector::fallbackFontAt):

  • css/CSSFontSelector.h:
  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::genericFontFamily):
(WebCore::CSSPropertyParserHelpers::genericFontFamilyIndex):

  • css/parser/CSSPropertyParserHelpers.h:
  • dom/Document.h:
  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::fontCache):

  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::cssFontSelector):

  • dom/make_names.pl:
  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::canDrawText):

  • html/canvas/OffscreenCanvasRenderingContext2D.cpp:

(WebCore::OffscreenCanvasRenderingContext2D::setFont):

  • platform/graphics/FontCache.cpp:

(WebCore::FontDataCacheKeyHash::hash):
(WebCore::FontDataCacheKeyHash::equal):
(WebCore::FontDataCacheKeyTraits::emptyValue):
(WebCore::FontDataCacheKeyTraits::constructDeletedValue):
(WebCore::FontDataCacheKeyTraits::isDeletedValue):
(WebCore::FontCache::create):
(WebCore::FontCache::singleton):
(WebCore::FontCache::FontCache):
(WebCore::FontCache::getCachedFontPlatformData):
(WebCore::FontCache::fontForPlatformData):
(WebCore::FontCache::purgeInactiveFontDataIfNeeded):
(WebCore::FontCache::purgeInactiveFontData):
(WebCore::FontCache::verticalData):
(WebCore::FontCache::fontCount):
(WebCore::FontCache::inactiveFontCount):
(WebCore::FontCache::invalidate):

  • platform/graphics/FontCache.h:

(WebCore::FontCache::fontCacheFallbackToSingleton):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::isCurrent const):
(WebCore::FontCascade::update const):

  • platform/graphics/FontCascadeFonts.cpp:

(WebCore::FontCascadeFonts::FontCascadeFonts):
(WebCore::realizeNextFallback):
(WebCore::FontCascadeFonts::realizeFallbackRangesAt):

  • platform/graphics/FontSelector.h:
  • platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:

(WebCore::FontCascade::fontForCombiningCharacterSequence const):

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::getFamilyNameStringFromFamily):

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyValueFontFamily):

  • style/StyleResolveForFontRaw.cpp:

(WebCore::Style::useFixedDefaultSize):
(WebCore::Style::resolveForFontRaw):

  • style/StyleResolveForFontRaw.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::~WorkerGlobalScope):
(WebCore::WorkerGlobalScope::cssFontSelector):
(WebCore::WorkerGlobalScope::fontCache):

  • workers/WorkerGlobalScope.h:

LayoutTests:

Adjust expectations for manual OffscreenCanvas worker text test.

  • platform/glib/TestExpectations:
7:01 AM Changeset in webkit [275419] by wilander@apple.com
  • 3 edits in trunk/Source/WebKit

PCM: PrivateClickMeasurementManager::getTokenPublicKey() should not use PrivateClickMeasurement::PcmDataCarried::PersonallyIdentifiable when validating the token before the attribution report is sent
https://bugs.webkit.org/show_bug.cgi?id=223956
<rdar://problem/76086936>

Reviewed by Youenn Fablet.

No new tests. This just changes the NetworkLoadParameters field pcmDataCarried
for the initial public key load and for PCM Debug Mode. This network load setting
is not observable in tests.

  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::storeUnattributed):

Now sends PrivateClickMeasurement::PcmDataCarried::PersonallyIdentifiable
to PrivateClickMeasurementManager::getTokenPublicKey() since it's required.

(WebKit::generateNetworkLoadParameters):

Now takes the parameter isDebugModeEnabled and if it's true, forces
PrivateClickMeasurement::PcmDataCarried::PersonallyIdentifiable since
Debug Mode disables privacy measures making PCM network requests likely
to be personally identifiable.

(WebKit::generateNetworkLoadParametersForHttpPost):

Now forwards isDebugModeEnabled to generateNetworkLoadParameters().

(WebKit::generateNetworkLoadParametersForHttpGet):

Now forwards isDebugModeEnabled to generateNetworkLoadParameters().

(WebKit::PrivateClickMeasurementManager::getTokenPublicKey):

Now takes a PrivateClickMeasurement::PcmDataCarried parameter to be able
to request the public key in either network load mode.
Now also forwards isDebugModeEnabled to generateNetworkLoadParameters().

(WebKit::PrivateClickMeasurementManager::fireConversionRequest):

Now sends PrivateClickMeasurement::PcmDataCarried::NonPersonallyIdentifiable
to PrivateClickMeasurementManager::getTokenPublicKey() since it's required.

(WebKit::PrivateClickMeasurementManager::fireConversionRequestImpl):

Now forwards isDebugModeEnabled to generateNetworkLoadParameters().

  • NetworkProcess/PrivateClickMeasurementManager.h:
6:26 AM Changeset in webkit [275418] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Use webrtc GPU Process feature flag for audio capture on MacOS
https://bugs.webkit.org/show_bug.cgi?id=223682

Reviewed by Eric Carlson.

Manually tested.

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultCaptureAudioInGPUProcessEnabled):

6:19 AM Changeset in webkit [275417] by youenn@apple.com
  • 12 edits
    2 adds in trunk

No audio output when unplugged wired headset during a call
https://bugs.webkit.org/show_bug.cgi?id=216389
<rdar://problem/68692800>

Reviewed by Eric Carlson.

Source/WebCore:

Implement shouldOverridePauseDuringRouteChange for media elements.
If it is a media stream backed video element, do not pause on active audio route change.

Implement internal API to write a layout test.

Refactoring to share more code between WebCore and WebKit and implement the internal API.
Improve isolation of MediaSessionHelper by moving all its members from protected to private.

Test: fast/mediastream/MediaStream-video-element-change-audio-route.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::shouldOverridePauseDuringRouteChange const):

  • html/HTMLMediaElement.h:
  • platform/audio/ios/MediaSessionHelperIOS.h:

(WebCore::MediaSessionHelper::MediaSessionHelper):

  • platform/audio/ios/MediaSessionHelperIOS.mm:

(MediaSessionHelper::activeAudioRouteDidChange):
(MediaSessionHelper::applicationWillEnterForeground):
(MediaSessionHelper::applicationDidEnterBackground):
(MediaSessionHelper::applicationWillBecomeInactive):
(MediaSessionHelper::applicationDidBecomeActive):
(MediaSessionHelper::mediaServerConnectionDied):
(MediaSessionHelper::externalOutputDeviceAvailableDidChange):
(MediaSessionHelper::isPlayingToAutomotiveHeadUnitDidChange):
(MediaSessionHelper::activeVideoRouteDidChange):
(MediaSessionHelper::startMonitoringWirelessRoutes):
(MediaSessionHelper::stopMonitoringWirelessRoutes):
(MediaSessionHelperiOS::MediaSessionHelperiOS):
(MediaSessionHelperiOS::startMonitoringWirelessRoutesInternal):
(MediaSessionHelperiOS::stopMonitoringWirelessRoutesInternal):
(MediaSessionHelperiOS::mediaServerConnectionDied):
(MediaSessionHelperiOS::setIsPlayingToAutomotiveHeadUnit):
(MediaSessionHelperiOS::activeAudioRouteDidChange):
(MediaSessionHelperiOS::activeVideoRouteDidChange):
(MediaSessionHelperiOS::externalOutputDeviceAvailableDidChange):
(MediaSessionHelperiOS::startMonitoringWirelessRoutes): Deleted.
(MediaSessionHelperiOS::stopMonitoringWirelessRoutes): Deleted.
(MediaSessionHelperiOS::applicationDidBecomeActive): Deleted.
(MediaSessionHelperiOS::applicationDidEnterBackground): Deleted.
(MediaSessionHelperiOS::applicationWillBecomeInactive): Deleted.
(MediaSessionHelperiOS::applicationWillEnterForeground): Deleted.

  • testing/Internals.cpp:

(WebCore::Internals::activeAudioRouteDidChange):

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

Source/WebKit:

Make use of WebCore methods instead of reimplementing them here.

  • WebProcess/GPU/media/ios/RemoteMediaSessionHelper.cpp:

(WebKit::RemoteMediaSessionHelper::startMonitoringWirelessRoutesInternal):
(WebKit::RemoteMediaSessionHelper::stopMonitoringWirelessRoutesInternal):
(WebKit::RemoteMediaSessionHelper::activeVideoRouteDidChange):
(WebKit::RemoteMediaSessionHelper::startMonitoringWirelessRoutes): Deleted.
(WebKit::RemoteMediaSessionHelper::stopMonitoringWirelessRoutes): Deleted.
(WebKit::RemoteMediaSessionHelper::applicationWillEnterForeground): Deleted.
(WebKit::RemoteMediaSessionHelper::applicationDidEnterBackground): Deleted.
(WebKit::RemoteMediaSessionHelper::applicationWillBecomeInactive): Deleted.
(WebKit::RemoteMediaSessionHelper::applicationDidBecomeActive): Deleted.
(WebKit::RemoteMediaSessionHelper::externalOutputDeviceAvailableDidChange): Deleted.
(WebKit::RemoteMediaSessionHelper::isPlayingToAutomotiveHeadUnitDidChange): Deleted.
(WebKit::RemoteMediaSessionHelper::activeAudioRouteDidChange): Deleted.

  • WebProcess/GPU/media/ios/RemoteMediaSessionHelper.h:

LayoutTests:

  • fast/mediastream/MediaStream-video-element-change-audio-route-expected.txt: Added.
  • fast/mediastream/MediaStream-video-element-change-audio-route.html: Added.
3:59 AM Changeset in webkit [275416] by svillar@igalia.com
  • 7 edits in trunk/LayoutTests

[css-flexbox] align-content issues
https://bugs.webkit.org/show_bug.cgi?id=221468

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-flexbox/align-content_center-expected.html: Fixed stylesheet link.
  • web-platform-tests/css/css-flexbox/align-content_flex-end-expected.html: Ditto.
  • web-platform-tests/css/css-flexbox/align-content_space-around-expected.html: Ditto.
  • web-platform-tests/css/css-flexbox/align-content_stretch-expected.html: Ditto.

LayoutTests:

Fix the relative path to a stylesheet in 4 expected results. The tests were working as expected
but the expected results were wrong without those CSS rules.

3:44 AM Changeset in webkit [275415] by youenn@apple.com
  • 6 edits in trunk

[MacOS] Enable NSURLSession WebSocket code path in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=220973
<rdar://problem/73655870>

Reviewed by Darin Adler.

Source/WebKit:

Disable a debug assert until it gets fixed below WebKit.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:webSocketTask:didOpenWithProtocol:]):

Source/WTF:

  • wtf/PlatformHave.h:

Bump NSURLSessionWebSocket path to above BigSur and iOS14.

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

2:14 AM Changeset in webkit [275414] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Start observing outgoing audio/video sources asynchronously
https://bugs.webkit.org/show_bug.cgi?id=224040

Reviewed by Eric Carlson.

We delay sending media a little bit to guarantee that senders can be
assigned a transform synchronously at creation time.
This guarantees all sent media will go through the transform.
Difficult to test in practice as this would be very racy.

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

(WebCore::operator==):
(WebCore::LibWebRTCRtpSenderBackend::startSource):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
2:08 AM WebKitGTK/2.32.x edited by Philippe Normand
(diff)
2:07 AM Changeset in webkit [275413] by commit-queue@webkit.org
  • 57 edits in trunk/Source/WebCore

Subpixel layout: Switch inlines' baseline positioning from int to LayoutUnit.
https://bugs.webkit.org/show_bug.cgi?id=133932

Patch by Rob Buis <rbuis@igalia.com> on 2021-04-02
Reviewed by Zalan Bujtas.

This change converts the int returns type to LayoutUnit.
To match the old behavior, the implicit toInt() calls
have been replaced by explicit toInt() calls.

  • rendering/GridBaselineAlignment.cpp:

(WebCore::GridBaselineAlignment::ascentForChild const):

  • rendering/InlineBox.cpp:

(WebCore::InlineBox::baselinePosition const):

  • rendering/InlineBox.h:
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::baselinePosition const):

  • rendering/InlineTextBox.h:
  • rendering/RenderAttachment.cpp:

(WebCore::RenderAttachment::baselinePosition const):

  • rendering/RenderAttachment.h:
  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::baselinePosition const):
(WebCore::RenderBlock::firstLineBaseline const):
(WebCore::RenderBlock::inlineBlockBaseline const):

  • rendering/RenderBlock.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::firstLineBaseline const):
(WebCore::RenderBlockFlow::inlineBlockBaseline const):

  • rendering/RenderBlockFlow.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::baselinePosition const):

  • rendering/RenderBox.h:

(WebCore::RenderBox::firstLineBaseline const):
(WebCore::RenderBox::inlineBlockBaseline const):

  • rendering/RenderBoxModelObject.h:
  • rendering/RenderButton.cpp:

(WebCore::RenderButton::baselinePosition const):

  • rendering/RenderButton.h:
  • rendering/RenderFlexibleBox.cpp:

(WebCore::synthesizedBaselineFromBorderBox):
(WebCore::RenderFlexibleBox::baselinePosition const):
(WebCore::RenderFlexibleBox::firstLineBaseline const):
(WebCore::RenderFlexibleBox::inlineBlockBaseline const):

  • rendering/RenderFlexibleBox.h:
  • rendering/RenderGrid.cpp:

(WebCore::synthesizedBaselineFromBorderBox):
(WebCore::RenderGrid::baselinePosition const):
(WebCore::RenderGrid::firstLineBaseline const):
(WebCore::RenderGrid::inlineBlockBaseline const):

  • rendering/RenderGrid.h:
  • rendering/RenderInline.cpp:

(WebCore::RenderInline::baselinePosition const):

  • rendering/RenderInline.h:
  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::baselinePosition const):

  • rendering/RenderLineBreak.h:
  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::baselinePosition const):

  • rendering/RenderListBox.h:
  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::baselinePosition const):

  • rendering/RenderListMarker.h:
  • rendering/RenderMenuList.h:
  • rendering/RenderSlider.cpp:

(WebCore::RenderSlider::baselinePosition const):

  • rendering/RenderSlider.h:
  • rendering/RenderTable.cpp:

(WebCore::RenderTable::baselinePosition const):
(WebCore::RenderTable::inlineBlockBaseline const):
(WebCore::RenderTable::firstLineBaseline const):

  • rendering/RenderTable.h:
  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::firstLineBaseline const):

  • rendering/RenderTableSection.h:
  • rendering/RenderTextControl.h:
  • rendering/RenderTextControlMultiLine.cpp:

(WebCore::RenderTextControlMultiLine::baselinePosition const):

  • rendering/RenderTextControlMultiLine.h:
  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::baselinePosition const):

  • rendering/RootInlineBox.h:
  • rendering/mathml/RenderMathMLBlock.cpp:

(WebCore::RenderMathMLBlock::baselinePosition const):
(WebCore::RenderMathMLTable::firstLineBaseline const):

  • rendering/mathml/RenderMathMLBlock.h:

(WebCore::RenderMathMLBlock::ascentForChild):

  • rendering/mathml/RenderMathMLFraction.cpp:

(WebCore::RenderMathMLFraction::firstLineBaseline const):

  • rendering/mathml/RenderMathMLFraction.h:
  • rendering/mathml/RenderMathMLOperator.cpp:

(WebCore::RenderMathMLOperator::firstLineBaseline const):

  • rendering/mathml/RenderMathMLOperator.h:
  • rendering/mathml/RenderMathMLPadded.cpp:

(WebCore::RenderMathMLPadded::firstLineBaseline const):

  • rendering/mathml/RenderMathMLPadded.h:
  • rendering/mathml/RenderMathMLRow.cpp:

(WebCore::RenderMathMLRow::firstLineBaseline const):

  • rendering/mathml/RenderMathMLRow.h:
  • rendering/mathml/RenderMathMLScripts.cpp:

(WebCore::RenderMathMLScripts::firstLineBaseline const):

  • rendering/mathml/RenderMathMLScripts.h:
  • rendering/mathml/RenderMathMLSpace.cpp:

(WebCore::RenderMathMLSpace::firstLineBaseline const):

  • rendering/mathml/RenderMathMLSpace.h:
  • rendering/mathml/RenderMathMLToken.cpp:

(WebCore::RenderMathMLToken::firstLineBaseline const):

  • rendering/mathml/RenderMathMLToken.h:
2:06 AM WebKitGTK/2.32.x edited by Philippe Normand
(diff)
1:55 AM Changeset in webkit [275412] by Philippe Normand
  • 6 edits in trunk

REGRESSION(r268176): [GStreamer] media/video-orientation-canvas.html fails
https://bugs.webkit.org/show_bug.cgi?id=223850

Reviewed by Carlos Alberto Lopez Perez.

Source/WebCore:

The GL pipeline used by the player is now able to handle image rotation tags itself. Manual
handling of the image rotation tags is now performed only when the pipeline is not able to
do it by itself.

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(webKitGLVideoSinkConstructed):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
(WebCore::getVideoOrientation):
(WebCore::MediaPlayerPrivateGStreamer::updateVideoSizeAndOrientationFromCaps):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

LayoutTests:

  • platform/gtk/TestExpectations: Unflag now-passing test.
1:50 AM Changeset in webkit [275411] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WTF

Unreviewed, fix passing hash value
https://bugs.webkit.org/show_bug.cgi?id=223895

  • wtf/RobinHoodHashTable.h:

(WTF::SizePolicy>::addPassingHashCode):

1:33 AM Changeset in webkit [275410] by ysuzuki@apple.com
  • 86 edits
    2 copies
    3 adds in trunk

[WTF] Introduce RobinHoodHashTable
https://bugs.webkit.org/show_bug.cgi?id=223895

Reviewed by Fil Pizlo.

Source/JavaScriptCore:

  • builtins/BuiltinNames.cpp:

(JSC::lookUpPrivateNameImpl):
(JSC::lookUpWellKnownSymbolImpl):

  • builtins/BuiltinNames.h:
  • bytecode/BytecodeIntrinsicRegistry.h:
  • runtime/Identifier.h:
  • runtime/IntlCollator.cpp:

(JSC::IntlCollator::initializeCollator):
(JSC::IntlCollator::checkICULocaleInvariants):

  • runtime/IntlCollator.h:
  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::initializeDateTimeFormat):

  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/IntlDisplayNames.cpp:

(JSC::IntlDisplayNames::initializeDisplayNames):

  • runtime/IntlDisplayNamesConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/IntlListFormat.cpp:

(JSC::IntlListFormat::initializeListFormat):

  • runtime/IntlListFormatConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::initializeNumberFormat):

  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/IntlObject.cpp:

(JSC::addScriptlessLocaleIfNeeded):
(JSC::intlAvailableLocales):
(JSC::intlCollatorAvailableLocales):
(JSC::intlSegmenterAvailableLocales):
(JSC::bestAvailableLocale):
(JSC::lookupMatcher):
(JSC::bestFitMatcher):
(JSC::resolveLocale):
(JSC::lookupSupportedLocales):
(JSC::bestFitSupportedLocales):
(JSC::supportedLocales):

  • runtime/IntlObject.h:

(JSC::intlDateTimeFormatAvailableLocales):
(JSC::intlDisplayNamesAvailableLocales):
(JSC::intlNumberFormatAvailableLocales):
(JSC::intlPluralRulesAvailableLocales):
(JSC::intlRelativeTimeFormatAvailableLocales):
(JSC::intlListFormatAvailableLocales):

  • runtime/IntlPluralRules.cpp:

(JSC::IntlPluralRules::initializePluralRules):

  • runtime/IntlPluralRulesConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/IntlRelativeTimeFormat.cpp:

(JSC::IntlRelativeTimeFormat::initializeRelativeTimeFormat):

  • runtime/IntlRelativeTimeFormatConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/IntlSegmenter.cpp:

(JSC::IntlSegmenter::initializeSegmenter):

  • runtime/IntlSegmenterConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/RegExpCache.h:
  • runtime/RegExpKey.h:

Source/WebCore:

  • Modules/mediacapabilities/MediaCapabilities.cpp:

(WebCore::bucketMIMETypes):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::popupValue const):

  • dom/Element.cpp:

(WebCore::canAttachAuthorShadowRoot):

  • dom/QualifiedName.h:
  • dom/make_names.pl:

(printNamesHeaderFile):
(printFactoryCppFile):
(printWrapperFactoryCppFile):

  • editing/FormatBlockCommand.cpp:

(WebCore::isElementForFormatBlock):

  • editing/RemoveFormatCommand.cpp:

(WebCore::isElementForRemoveFormatCommand):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::isProhibitedParagraphChild):

  • html/Autofill.cpp:

(WebCore::fieldNameMap):

  • html/HTMLDocument.cpp:

(WebCore::HTMLDocument::isCaseSensitiveAttribute):

  • html/HTMLObjectElement.cpp:

(WebCore::preventsParentObjectFromExposure):

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::createCaseMap):
(WebCore::adjustSVGTagNameCase):
(WebCore::adjustAttributes):
(WebCore::createForeignAttributesMap):
(WebCore::adjustForeignAttributes):
(WebCore::addNamesWithPrefix): Deleted.

  • page/DebugPageOverlays.cpp:

(WebCore::touchEventRegionColors):
(WebCore::NonFastScrollableRegionOverlay::drawRect):

  • page/PerformanceUserTiming.cpp:

(WebCore::restrictedMarkNamesToNavigationTimingFunctionMap):

  • platform/cocoa/MIMETypeRegistryCocoa.mm:

(WebCore::extensionsForMIMETypeMap):

  • platform/graphics/FontCascade.cpp:

(WebCore::useBackslashAsYenSignForFamily):
(WebCore::FontCascade::hasValidAverageCharWidth const):

  • platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:

(WebCore::validInitDataTypes):

  • platform/graphics/cg/UTIRegistry.cpp:

(WebCore::defaultSupportedImageTypes):

  • platform/graphics/cg/UTIRegistry.h:
  • platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:

(WebCore::codecTypeForDoViCodecString):

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::supportedVideoCodecs):
(WebCore::SourceBufferParserWebM::supportedAudioCodecs):

  • platform/graphics/cocoa/SourceBufferParserWebM.h:
  • rendering/svg/SVGResources.cpp:

(WebCore::clipperFilterMaskerTags):
(WebCore::markerTags):
(WebCore::fillAndStrokeTags):
(WebCore::chainableResourceTags):

  • style/StyleAdjuster.cpp:

(WebCore::Style::hasEffectiveDisplayNoneForDisplayContents):

  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::isSupportedAttribute):

  • svg/SVGElement.cpp:

(WebCore::createAttributeNameToCSSPropertyIDMap):
(WebCore::SVGElement::animatableAttributeForName):
(WebCore::SVGElement::cssPropertyIdForSVGAttributeName):

  • svg/SVGTests.cpp:

(WebCore::SVGTests::addSupportedAttributes):

  • svg/SVGTests.h:
  • svg/SVGUseElement.cpp:

(WebCore::createAllowedElementSet):
(WebCore::isDisallowedElement):

  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::isSupportedAttribute):

  • xml/XPathFunctions.cpp:

(WebCore::XPath::createFunctionMap):

  • xml/XPathParser.cpp:

(WebCore::XPath::createAxisNamesMap):

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ObservedDomainsTableSchemaV1Alternate):
(WebKit::expectedUnattributedColumns):
(WebKit::expectedAttributedColumns):
(WebKit::createTableQueries):

  • Platform/IPC/ArgumentCoders.h:
  • Shared/Cocoa/DefaultWebBrowserChecks.mm:

(WebKit::getAppBoundDomainsTesting):

  • Shared/WebPreferencesStore.cpp:

(WebKit::WebPreferencesStore::decode):

  • Shared/WebPreferencesStore.h:
  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::platformPathsWithAssumedReadAccess):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::platformPathsWithAssumedReadAccess):

  • UIProcess/WebProcessProxy.h:

Source/WTF:

This patch implements RobinHoodHashTable[1]. We don't use it as a default hashtable since it has different performance v.s. memory-saving characteristics,
and this patch's goal is not tackling on making this default. Rather, the goal of this patch is introducing it to non-performance sensitive area quickly
so that we can save memory. RobinHoodHashTable more frequently computes hash value compared to HashTable, so this is not drop-in replacement for the existing
one. But still, this is useful since we know that "while there are many small HashTables and they holds much memory, there are super large HashTables and
they holds almost same amount of memory while they are a few.". This patch's goal is applying this RobinHoodHashTable to these "large, but a few" singleton tables.

RobinHoodHashTable maintains distance-from-initial-bucket (DIB) small by adjusting existing entries when inserting. When inserting, if we found that the
existing entry has less DIB than the current inserting entry's DIB, then we swap entries, and insert the existing entry to the other place. This is giving
some good DIB from rich entry to poor entry (that's why it is called RobinHood Hashing), and making average DIB lower. And this algorithm adds good invariant
that, when looking up an entry, and we found that existing entry has smaller DIB, then we can stop searching in the middle of the chain since we know that
we should swap entries when this happened when inserting. These two tricks maintain HashTable performance even under significantly high load factor: 90% load-factor
just works. 95% load-factor regress adding performance, but still it does not become catastrophic compared to normal open-addressing HashTable.

We introduce RobinHoodHashTable, and adding several kinds of tables based on load-factors.

  1. MemoryCompactLookupOnlyRobinHoodHashSet / HashMap

This has 95% load-factor. This is suitable for sets and maps which is mostly-constant: constructing once, and looking up repeatedly. In WebKit, there are so
many this kind of tables e.g. singleton HashMap for various kinds of things. We can use this super high load-factor table so that we can save memory even while
we are maintains fast HashTable lookup.

  1. MemoryCompactRobinHoodHashSet / HashMap

This has 90% load-factor. It just works, and we can try using it if sets and maps are significantly performance intensive.

  1. FastRobinHoodHashSet / HashMap

This has 75% load-factor. This is still good compared to HashSet and HashMap since they are using 50% load-factor for large sized tables. This has very slightly performance regressed
compared to 50% load-factor large HashSet and HashMap, but if that is not performance intensive (e.g. AtomStringTable is one of the most performance intensive table), this is good.

In this patch, we replace many singleton HashSet / HashMap with RobinHoodHashTable.

[1]: https://www.sebastiansylvan.com/post/robin-hood-hashing-should-be-your-default-hash-table-implementation/

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Forward.h:
  • wtf/HashMap.h:

(WTF::Y>::swap):
(WTF::Y>::size const):
(WTF::Y>::capacity const):
(WTF::Y>::isEmpty const):
(WTF::Y>::begin):
(WTF::Y>::end):
(WTF::Y>::begin const):
(WTF::Y>::end const):
(WTF::Y>::find):
(WTF::Y>::find const):
(WTF::Y>::contains const):
(WTF::Y>::get const):
(WTF::Y>::inlineGet const):
(WTF::TableTraitsArg>::inlineSet):
(WTF::TableTraitsArg>::inlineAdd):
(WTF::TableTraitsArg>::inlineEnsure):
(WTF::TableTraitsArg>::set):
(WTF::TableTraitsArg>::add):
(WTF::TableTraitsArg>::fastAdd):
(WTF::TableTraitsArg>::ensure):
(WTF::Y>::remove):
(WTF::Y>::removeIf):
(WTF::Y>::clear):
(WTF::Y>::take):
(WTF::Y>::checkConsistency const):
(WTF::Y>::isValidKey):
(WTF::operator==):
(WTF::operator!=):
(WTF::X>::swap): Deleted.
(WTF::X>::size const): Deleted.
(WTF::X>::capacity const): Deleted.
(WTF::X>::isEmpty const): Deleted.
(WTF::X>::begin): Deleted.
(WTF::X>::end): Deleted.
(WTF::X>::begin const): Deleted.
(WTF::X>::end const): Deleted.
(WTF::X>::find): Deleted.
(WTF::X>::find const): Deleted.
(WTF::X>::contains const): Deleted.
(WTF::X>::get const): Deleted.
(WTF::X>::inlineGet const): Deleted.
(WTF::MappedTraitsArg>::inlineSet): Deleted.
(WTF::MappedTraitsArg>::inlineAdd): Deleted.
(WTF::MappedTraitsArg>::inlineEnsure): Deleted.
(WTF::MappedTraitsArg>::set): Deleted.
(WTF::MappedTraitsArg>::add): Deleted.
(WTF::MappedTraitsArg>::fastAdd): Deleted.
(WTF::MappedTraitsArg>::ensure): Deleted.
(WTF::MappedTraits>::get const): Deleted.
(WTF::MappedTraits>::inlineGet const): Deleted.
(WTF::X>::remove): Deleted.
(WTF::X>::removeIf): Deleted.
(WTF::X>::clear): Deleted.
(WTF::MappedTraits>::take): Deleted.
(WTF::X>::take): Deleted.
(WTF::X>::checkConsistency const): Deleted.
(WTF::X>::isValidKey): Deleted.

  • wtf/HashSet.h:

(WTF::W>::swap):
(WTF::W>::size const):
(WTF::W>::capacity const):
(WTF::W>::isEmpty const):
(WTF::W>::begin const):
(WTF::W>::end const):
(WTF::W>::find const):
(WTF::W>::contains const):
(WTF::TableTraits>::find const):
(WTF::TableTraits>::contains const):
(WTF::TableTraits>::ensure):
(WTF::W>::add):
(WTF::W>::addVoid):
(WTF::TableTraits>::add):
(WTF::W>::remove):
(WTF::W>::removeIf):
(WTF::W>::clear):
(WTF::W>::take):
(WTF::W>::takeAny):
(WTF::TableTraits>::remove):
(WTF::TableTraits>::take):
(WTF::W>::isValidValue):
(WTF::= const):
(WTF::W>::checkConsistency const):
(WTF::V>::swap): Deleted.
(WTF::V>::size const): Deleted.
(WTF::V>::capacity const): Deleted.
(WTF::V>::isEmpty const): Deleted.
(WTF::V>::begin const): Deleted.
(WTF::V>::end const): Deleted.
(WTF::V>::find const): Deleted.
(WTF::V>::contains const): Deleted.
(WTF::Traits>::find const): Deleted.
(WTF::Traits>::contains const): Deleted.
(WTF::Traits>::ensure): Deleted.
(WTF::V>::add): Deleted.
(WTF::V>::addVoid): Deleted.
(WTF::Traits>::add): Deleted.
(WTF::V>::remove): Deleted.
(WTF::V>::removeIf): Deleted.
(WTF::V>::clear): Deleted.
(WTF::V>::take): Deleted.
(WTF::V>::takeAny): Deleted.
(WTF::Traits>::remove): Deleted.
(WTF::Traits>::take): Deleted.
(WTF::V>::isValidValue): Deleted.
(WTF::V>::checkConsistency const): Deleted.

  • wtf/HashTable.h:

(WTF::addIterator):
(WTF::removeIterator):
(WTF::invalidateIterators):
(WTF::HashTable::~HashTable):
(WTF::HashTable::random):
(WTF::KeyTraits>::inlineLookup):
(WTF::KeyTraits>::lookupForWriting):
(WTF::KeyTraits>::fullLookupForWriting):
(WTF::KeyTraits>::addUniqueForInitialization):
(WTF::KeyTraits>::add):
(WTF::KeyTraits>::addPassingHashCode):
(WTF::KeyTraits>::removeAndInvalidateWithoutEntryConsistencyCheck):
(WTF::KeyTraits>::removeAndInvalidate):
(WTF::KeyTraits>::clear):
(WTF::KeyTraits>::swap):
(WTF::KeyTraits>::HashTable):
(WTF::HashTable::invalidateIterators): Deleted.
(WTF::KeyTraits>::invalidateIterators): Deleted.

  • wtf/RobinHoodHashMap.h: Added.
  • wtf/RobinHoodHashSet.h: Added.
  • wtf/RobinHoodHashTable.h: Added.

(WTF::RobinHoodHashTable::~RobinHoodHashTable):
(WTF::RobinHoodHashTable::begin):
(WTF::RobinHoodHashTable::end):
(WTF::RobinHoodHashTable::begin const):
(WTF::RobinHoodHashTable::end const):
(WTF::RobinHoodHashTable::random):
(WTF::RobinHoodHashTable::random const):
(WTF::RobinHoodHashTable::size const):
(WTF::RobinHoodHashTable::capacity const):
(WTF::RobinHoodHashTable::isEmpty const):
(WTF::RobinHoodHashTable::reserveInitialCapacity):
(WTF::RobinHoodHashTable::add):
(WTF::RobinHoodHashTable::find):
(WTF::RobinHoodHashTable::find const):
(WTF::RobinHoodHashTable::contains const):
(WTF::RobinHoodHashTable::isEmptyBucket):
(WTF::RobinHoodHashTable::isEmptyOrDeletedBucket):
(WTF::RobinHoodHashTable::lookup):
(WTF::RobinHoodHashTable::checkTableConsistency):
(WTF::RobinHoodHashTable::internalCheckTableConsistency const):
(WTF::RobinHoodHashTable::internalCheckTableConsistencyExceptSize const):
(WTF::RobinHoodHashTable::internalCheckTableConsistencyExceptSize):
(WTF::RobinHoodHashTable::internalCheckTableConsistency):
(WTF::RobinHoodHashTable::shouldExpand):
(WTF::RobinHoodHashTable::computeTableHash):
(WTF::RobinHoodHashTable::shouldExpand const):
(WTF::RobinHoodHashTable::shouldShrink const):
(WTF::RobinHoodHashTable::shrink):
(WTF::RobinHoodHashTable::deleteBucket):
(WTF::RobinHoodHashTable::desiredIndex):
(WTF::RobinHoodHashTable::probeDistance):
(WTF::RobinHoodHashTable::makeIterator):
(WTF::RobinHoodHashTable::makeConstIterator const):
(WTF::RobinHoodHashTable::makeKnownGoodIterator):
(WTF::RobinHoodHashTable::makeKnownGoodConstIterator const):
(WTF::RobinHoodHashTable::checkTableConsistencyExceptSize):
(WTF::RobinHoodHashTable::tableSize const):
(WTF::RobinHoodHashTable::tableSizeMask const):
(WTF::RobinHoodHashTable::keyCount const):
(WTF::RobinHoodHashTable::tableHash const):
(WTF::SizePolicy>::checkKey):
(WTF::SizePolicy>::lookup):
(WTF::SizePolicy>::inlineLookup):
(WTF::SizePolicy>::initializeBucket):
(WTF::SizePolicy>::add):
(WTF::SizePolicy>::maintainProbeDistanceForAdd):
(WTF::SizePolicy>::addPassingHashCode):
(WTF::SizePolicy>::reinsert):
(WTF::SizePolicy>::find):
(WTF::SizePolicy>::find const):
(WTF::SizePolicy>::contains const):
(WTF::SizePolicy>::removeAndInvalidateWithoutEntryConsistencyCheck):
(WTF::SizePolicy>::removeAndInvalidate):
(WTF::SizePolicy>::remove):
(WTF::SizePolicy>::removeWithoutEntryConsistencyCheck):
(WTF::SizePolicy>::allocateTable):
(WTF::SizePolicy>::deallocateTable):
(WTF::SizePolicy>::expand):
(WTF::SizePolicy>::computeBestTableSize):
(WTF::SizePolicy>::shrinkToBestSize):
(WTF::SizePolicy>::rehash):
(WTF::SizePolicy>::clear):
(WTF::SizePolicy>::RobinHoodHashTable):
(WTF::SizePolicy>::swap):
(WTF::=):
(WTF::SizePolicy>::checkTableConsistency const):
(WTF::SizePolicy>::checkTableConsistencyExceptSize const):

  • wtf/text/AtomStringHash.h:
  • wtf/text/AtomStringImpl.cpp:
  • wtf/text/AtomStringTable.cpp:

(WTF::AtomStringTable::~AtomStringTable):

  • wtf/text/AtomStringTable.h:

(WTF::AtomStringTable::table):

  • wtf/text/StringHash.h:

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/DeletedAddressOfOperator.h:
  • TestWebKitAPI/Tests/WTF/HashMap.cpp:

(TestWebKitAPI::testMovingUsingEnsure):
(TestWebKitAPI::testMovingUsingAdd):

  • TestWebKitAPI/Tests/WTF/HashSet.cpp:

(TestWebKitAPI::generateTestCapacityUpToSize<0>):
(TestWebKitAPI::generateTestCapacityUpToSize):

  • TestWebKitAPI/Tests/WTF/MoveOnly.h:
  • TestWebKitAPI/Tests/WTF/RobinHoodHashMap.cpp: Copied from Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp.

(TestWebKitAPI::TEST):
(TestWebKitAPI::bucketForKey):
(TestWebKitAPI::ZeroHash::hash):
(TestWebKitAPI::ObjectWithRefLogger::ObjectWithRefLogger):
(TestWebKitAPI::testMovingUsingEnsure):
(TestWebKitAPI::testMovingUsingAdd):
(TestWebKitAPI::DerefObserver::ref):
(TestWebKitAPI::DerefObserver::deref):
(TestWebKitAPI::TestObjectWithCustomDestructor::TestObjectWithCustomDestructor):
(TestWebKitAPI::TestObjectWithCustomDestructor::~TestObjectWithCustomDestructor):

  • TestWebKitAPI/Tests/WTF/RobinHoodHashSet.cpp: Copied from Tools/TestWebKitAPI/Tests/WTF/HashSet.cpp.

(TestWebKitAPI::capacityForSize):
(TestWebKitAPI::testInitialCapacity):
(TestWebKitAPI::generateTestCapacityUpToSize<0>):
(TestWebKitAPI::generateTestCapacityUpToSize):
(TestWebKitAPI::TEST):
(TestWebKitAPI::DerefObserver::ref):
(TestWebKitAPI::DerefObserver::deref):

1:19 AM Changeset in webkit [275409] by clopez@igalia.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

[CMake][GStremer] Fails to build if OpenH264 is not present
https://bugs.webkit.org/show_bug.cgi?id=224089

Reviewed by Philippe Normand.

  • CMakeLists.txt: Only try to link with OpenH264 when it is found.
1:11 AM Changeset in webkit [275408] by youenn@apple.com
  • 3 edits
    3 adds in trunk

Bail out early if encoded frame is written twice
https://bugs.webkit.org/show_bug.cgi?id=224041

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/wpt/webrtc/write-twice-transform.html

  • Modules/mediastream/libwebrtc/LibWebRTCRtpTransformBackend.cpp:

(WebCore::LibWebRTCRtpTransformBackend::processTransformedFrame):
In case the frame is written twice, the second write is considered as a no-op.

LayoutTests:

  • http/wpt/webrtc/write-twice-transform-expected.txt: Added.
  • http/wpt/webrtc/write-twice-transform.html: Added.
  • http/wpt/webrtc/write-twice-transform.js: Added.

(onrtctransform.process):
(onrtctransform):

1:07 AM Changeset in webkit [275407] by youenn@apple.com
  • 5 edits in trunk/Source/WebKit

Pass the main frame URL to requestGeolocationAuthorizationForURL delegate SPI
https://bugs.webkit.org/show_bug.cgi?id=224045

Reviewed by Alex Christensen.

Simplify code path using requestGeolocationAuthorizationForURL SPI.
We store the URL in the GeolocationRequestData since it might change over time given the requests may be processed asynchronously.
Once geolocation access check is done, we then process each request one at a time using a Deque.
We pass the main frame URL instead of the URL of the frame that called the API, following getUserMedia and device motion orientation.
Manually tested in the simulator.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

Remove shouldRequestGeolocationAuthorizationForURL SPI that is not used.

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
Remove unneeded origin creation.

  • UIProcess/ios/WKGeolocationProviderIOS.mm:

(-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:completionHandler:view:]):
(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
(-[WKGeolocationProviderIOS geolocationAuthorizationDenied]):

  • UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm:

(WebKit::decidePolicyForGeolocationRequestFromOrigin):

Apr 1, 2021:

11:12 PM Changeset in webkit [275406] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r275387.
https://bugs.webkit.org/show_bug.cgi?id=224094

IOKit method list not complete

Reverted changeset:

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

10:10 PM Changeset in webkit [275405] by Cameron McCormack
  • 2 edits in trunk/Source/WebCore

Remove redundant #if in RuntimeApplicationChecks.h.
https://bugs.webkit.org/show_bug.cgi?id=224037

Reviewed by Alexey Proskuryakov.

  • platform/RuntimeApplicationChecks.h:
10:00 PM Changeset in webkit [275404] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebKit

Add a macro to help staging logDiagnosticMessageWithDomain in Safari
https://bugs.webkit.org/show_bug.cgi?id=224081

Reviewed by Wenson Hsieh.

Checking this macro will allow the webkit clients to implement this API
and build with or without r275103.

  • UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
9:42 PM Changeset in webkit [275403] by commit-queue@webkit.org
  • 14 edits
    4 copies
    2 adds in trunk/Source

RemoteRenderingBackend should clean up CG resources after last Canvas is destroyed in Gpu process
https://bugs.webkit.org/show_bug.cgi?id=223885
<rdar://problem/75637356>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-01
Reviewed by Simon Fraser.

Source/WebCore/PAL:

Add SPI interface _MTLDevice for its _purgeDevice method.

  • pal/spi/cocoa/MetalSPI.h:

Source/WebKit:

Release CoreGraphics resources (Metal device command buffers,
and other per-device resources) 1s after last

  • RemoteRenderingBackend drawable resource
  • RemoteGraphicsContextGL instance
  • RemoteMediaPlayerProxy instance

has been destroyed.

Adds ScopedRenderingResourcesRequest and
ScopedWebGLRenderingResourcesRequest to hold the intent to
use the global rendering resources. The names are called 'Request'
because the implementation is not guaranteed to do anything specific.
E.g. ResourcesRequest == "I'd like the resources to be available"

ResourcesLock, ResourcesHolder, ... = "The resources are guaranteed
to be held."

The naming tries to be consistent with the similar class
ScopedHighPerformanceGPURequest.

For sequence like:
1) Visit a page with simple Context2D usage
2) Close the page (but leave the browser running)
This saves 2mb of IOAccelMemory at step 2 on a tested device.

  • Configurations/WebKit.xcconfig:

Link WebKit to Metal in order to use the RemoteRenderingRequest
(_MTLCopyAllDevices symbol).

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::didClose):
Clear the map containing RemoteGraphicsContextGL objects
when connection to WebContent process is closed.
This stops the RemoteGraphicsContextGL listening for IPC
and destroys them in scenarios where the connection is
closed but the GPUConnectionToWebProcess is staying alive
for some reason. In this patch, this would happen for example
during reload of the page.

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::remoteGraphicsContextGLStreamWorkQueue):
(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::initialize):
(WebKit::RemoteGraphicsContextGL::stopListeningForIPC):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:

Hold the ScopedWebGLRenderingResourcesRequest for
the duration of the RemoteGraphicsContextGL context lifetime.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::~RemoteRenderingBackend):
(WebKit::RemoteRenderingBackend::createImageBuffer):
(WebKit::RemoteRenderingBackend::releaseRemoteResource):
(WebKit::RemoteRenderingBackend::updateRenderingResourceRequest):

  • GPUProcess/graphics/RemoteRenderingBackend.h:

Hold the ScopedRenderingResourcesRequest for the duration that
there are ImageBuffers or NativeImages in the RemoteResourceCache.

A RemoteRenderingBackend might exist without any drawable due to
a) Context2D being created and then destroyed
b) WebGL taking a reference to the RemoteRenderingBackend in order
to submit work in case the caller would request Image -> texture
upload.

In case of WebGL context being created and then destroyed, there is
a RRB instance alive but not doing any rendering. In these cases,
we want the rendering resources to be released and not held by
the empty RRB.

  • GPUProcess/graphics/ScopedRenderingResourcesRequest.cpp: Copied from Source/WebCore/PAL/pal/spi/cocoa/MetalSPI.h.

(WebKit::ScopedRenderingResourcesRequest::scheduleFreeRenderingResources):
(WebKit::ScopedRenderingResourcesRequest::freeRenderingResources):

  • GPUProcess/graphics/ScopedRenderingResourcesRequest.h: Added.

(WebKit::ScopedRenderingResourcesRequest::ScopedRenderingResourcesRequest):
(WebKit::ScopedRenderingResourcesRequest::~ScopedRenderingResourcesRequest):
(WebKit::ScopedRenderingResourcesRequest::operator=):
(WebKit::ScopedRenderingResourcesRequest::isRequested const):
(WebKit::ScopedRenderingResourcesRequest::acquire):
(WebKit::ScopedRenderingResourcesRequest::reset):

  • GPUProcess/graphics/ScopedRenderingResourcesRequestCocoa.mm: Copied from Source/WebCore/PAL/pal/spi/cocoa/MetalSPI.h.

(WebKit::ScopedRenderingResourcesRequest::scheduleFreeRenderingResources):
(WebKit::ScopedRenderingResourcesRequest::freeRenderingResources):
Add a scoped holder for the rendering resources. Currently it purges
all Metal device memory.

  • GPUProcess/graphics/ScopedWebGLRenderingResourcesRequest.cpp: Copied from Source/WebCore/PAL/pal/spi/cocoa/MetalSPI.h.

(WebKit::ScopedWebGLRenderingResourcesRequest::scheduleFreeWebGLRenderingResources):
(WebKit::ScopedWebGLRenderingResourcesRequest::freeWebGLRenderingResources):

  • GPUProcess/graphics/ScopedWebGLRenderingResourcesRequest.h: Added.

(WebKit::ScopedWebGLRenderingResourcesRequest::ScopedWebGLRenderingResourcesRequest):
(WebKit::ScopedWebGLRenderingResourcesRequest::~ScopedWebGLRenderingResourcesRequest):
(WebKit::ScopedWebGLRenderingResourcesRequest::operator=):
(WebKit::ScopedWebGLRenderingResourcesRequest::isRequested const):
(WebKit::ScopedWebGLRenderingResourcesRequest::acquire):
(WebKit::ScopedWebGLRenderingResourcesRequest::reset):

  • GPUProcess/graphics/ScopedWebGLRenderingResourcesRequestCocoa.cpp: Copied from Source/WebCore/PAL/pal/spi/cocoa/MetalSPI.h.

(WebKit::ScopedWebGLRenderingResourcesRequest::scheduleFreeWebGLRenderingResources):
(WebKit::ScopedWebGLRenderingResourcesRequest::freeWebGLRenderingResources):
Add a scoped holder for the WebGL global resources. Currently it frees
the ANGLE related global data. It also purges all Metal device memory
via RenderingResourcesRequest.

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::RemoteMediaPlayerProxy):
(WebKit::RemoteMediaPlayerProxy::invalidate):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:

Hold RenderingResourcesRequest for the duration of a media player
existing in the GPU process. It's not known if media playback needs
Metal. At least some videos do not need it. However, this is erring
on the side of caution in order to avoid potential video frame skips
the video playback using Metal but then the devices being purged by
a Context2D or WebGL -related destruction.

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
9:02 PM Changeset in webkit [275402] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

Expand on shouldComputeLogicalWidthFromAspectRatioAndInsets return logic
https://bugs.webkit.org/show_bug.cgi?id=224057

Reviewed by Rob Buis.

In this patch we also start checking against logicalWidth/height instead of just width/height.

  • rendering/RenderBox.cpp:

(WebCore::shouldComputeLogicalWidthFromAspectRatioAndInsets):
(WebCore::RenderBox::shouldComputeLogicalHeightFromAspectRatio const):
(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatio const):
(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatioAndInsets const): Deleted.

  • rendering/RenderBox.h:
8:19 PM Changeset in webkit [275401] by Kate Cheney
  • 8 edits in trunk/Source

Clear network website data when a user clears history/website data
https://bugs.webkit.org/show_bug.cgi?id=224030
<rdar://problem/75288338>

Reviewed by David Kilzer.

Source/WebKit:

Clear network-related website data for domains when clearing history/
website data.

No new tests. Unable to test due to recent changes in a dependent
framework's infrastructure for setting network website data for
testing. Will post a followup test once that is resolved.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::deleteWebsiteData):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::removeNetworkWebsiteData):

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(NetworkSessionCocoa::removeNetworkWebsiteData):

  • Scripts/process-entitlements.sh:

Source/WTF:

  • wtf/cocoa/SoftLinking.h:

Add a new soft link macro to link umbrella private frameworks. We need
this to support internal additions we need to clear network domain data.

6:37 PM Changeset in webkit [275400] by Russell Epstein
  • 10 edits in branches/safari-612.1.9-branch/Source/JavaScriptCore

Cherry-pick r275392. rdar://problem/76132877

REGRESSION(r274724): JITCage trampoline needs to be adjusted
https://bugs.webkit.org/show_bug.cgi?id=224065

Reviewed by Saam Barati.

r274724 introduced a new parameter to custom setters, but it didn't change the parameter recognization of JITCage trampolines for custom accessors.
As a result, we are jumping with the wrong pointer, and crash when custom setter is called with JITCage.

This patch fixes the above bug.

  1. Now, custom getter and custom setter have different number of parameters. We should have two different trampolines to invoke it. We remove vmEntryCustomAccessor, and add vmEntryCustomGetter/vmEntryCustomSetter.
  2. vmEntryCustomSetter should use a4 parameter as a executable address for trampoline.
  • bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileCallDOMGetter):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCallDOMGetter):
  • llint/LLIntThunks.cpp:
  • llint/LLIntThunks.h:
  • llint/LowLevelInterpreter.asm:
  • offlineasm/arm64.rb:
  • offlineasm/registers.rb:
  • runtime/PropertySlot.h:

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

6:07 PM Changeset in webkit [275399] by Chris Gambrell
  • 5 edits
    2 adds
    3 deletes in trunk/LayoutTests

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

Reviewed by Jonathan Bedard.

  • http/tests/cache/cache-redirections.html:
  • http/tests/cache/resources/cache-control-redirect.php: Removed.
  • http/tests/cache/resources/cache-control-redirect.py: Added.
  • http/tests/cache/resources/permanent-redirect.php: Removed.
  • http/tests/cache/resources/x-frame-options.php: Removed.
  • http/tests/cache/resources/x-frame-options.py: Added.
  • http/tests/cache/x-frame-options-304.html:
  • http/tests/navigation/window-open-redirect-and-remove-opener.html:
  • http/tests/xmlhttprequest/cacheable-cross-origin-redirect-crash.html:
6:03 PM Changeset in webkit [275398] by Chris Gambrell
  • 11 edits
    2 moves
    1 add
    1 delete in trunk/LayoutTests

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

Reviewed by Jonathan Bedard.

  • http/tests/history/back-to-post.php: Removed.
  • http/tests/history/back-to-post.py: Added.
  • http/tests/history/back-with-fragment-change-expected.txt:
  • http/tests/history/back-with-fragment-change.php: Removed.
  • http/tests/history/back-with-fragment-change.py: Added.
  • http/tests/history/resources/back-during-onload-hung-page.php: Removed.
  • http/tests/history/resources/back-during-onload-hung-page.py: Added.
  • http/tests/history/resources/back-during-onload-middle.html:
  • http/tests/navigation/resources/back-twice-page-2.html:
  • platform/glib/TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/win/TestExpectations:
5:52 PM Changeset in webkit [275397] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[watchOS] Contact AutoFill suggestions no longer show up in non-username or password fields
https://bugs.webkit.org/show_bug.cgi?id=224087
<rdar://problem/76080205>

Reviewed by Tim Horton.

For the time being, limit use of PUICQuickboardController to text content types that would allow for login
credential AutoFill in Quickboard. We can remove this logic when PUICQuickboardController can be updated with
and present arbitrary text suggestion values.

  • UIProcess/ios/WKContentViewInteraction.mm:

(canUseQuickboardControllerFor):
(-[WKContentView presentViewControllerForCurrentFocusedElement]):

5:40 PM Changeset in webkit [275396] by Robert Jenner
  • 2 edits in trunk/LayoutTests

inspector/animation/lifecycle-css-transition.html is a flakey timeout on EWS
https://bugs.webkit.org/show_bug.cgi?id=222195

Unreviewed test gardening.

  • platform/mac/TestExpectations: Removing test expectations to see if it is still an issue on EWS.
5:38 PM Changeset in webkit [275395] by commit-queue@webkit.org
  • 4 edits in trunk

REGRESSION(r272469) QuickLook previews broken in some places on macOS
https://bugs.webkit.org/show_bug.cgi?id=224086

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-01
Reviewed by Tim Horton.

Source/WebCore:

The linked-on-or-after check saves us from most compatibility problems, but QuickLook on macOS was broken.
It uses schemes x-apple-ql-id and x-apple-ql-magic, which we allow to continue to have non-null origins.
Covered by API tests.

  • page/SecurityOrigin.cpp:

(WebCore::shouldTreatAsUniqueOrigin):

Tools:

  • TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp:

(TestWebKitAPI::TEST_F):

5:19 PM Changeset in webkit [275394] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Add more deprecation macros.

I missed one in r275298

  • platform/network/cocoa/CertificateInfoCocoa.mm:

(WebCore::CertificateInfo::dump const):

4:32 PM Changeset in webkit [275393] by BJ Burg
  • 10 edits
    2 deletes in trunk

v2: REGRESSION(r266890): [Cocoa] Fix API::InspectorClient leak
https://bugs.webkit.org/show_bug.cgi?id=223899
<rdar://problem/75249282>

Reviewed by Devin Rousso.

Refactor to *not* use the helper ObjC class InspectorDelegate.
Instead, store the _WKInspectorDelegate in _WKInspector directly
using a WeakObjCPtr ivar. Move the C++ bridge class to be defined
inside _WKInspector.mm since it's only used there. Adapt it to
work better with a nil delegate.

  • UIProcess/API/APIInspectorClient.h:

(API::InspectorClient::openURLExternally):

  • UIProcess/API/Cocoa/_WKInspectorInternal.h:
  • UIProcess/API/Cocoa/_WKInspector.mm:

(-[_WKInspector delegate]):
(-[_WKInspector setDelegate:]):
(-[_WKInspector dealloc]):

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • UIProcess/Inspector/Cocoa/InspectorDelegate.h: Removed.
  • UIProcess/Inspector/Cocoa/InspectorDelegate.mm: Removed.
  • UIProcess/Inspector/mac/WKInspectorViewController.mm:

(-[WKInspectorViewController initWithConfiguration:inspectedPage:]):
Drive-by, fix the leak of _WKInspectorConfiguration.

4:06 PM Changeset in webkit [275392] by ysuzuki@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

REGRESSION(r274724): JITCage trampoline needs to be adjusted
https://bugs.webkit.org/show_bug.cgi?id=224065

Reviewed by Saam Barati.

r274724 introduced a new parameter to custom setters, but it didn't change the parameter recognization of JITCage trampolines for custom accessors.
As a result, we are jumping with the wrong pointer, and crash when custom setter is called with JITCage.

This patch fixes the above bug.

  1. Now, custom getter and custom setter have different number of parameters. We should have two different trampolines to invoke it. We remove vmEntryCustomAccessor, and add vmEntryCustomGetter/vmEntryCustomSetter.
  2. vmEntryCustomSetter should use a4 parameter as a executable address for trampoline.
  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCallDOMGetter):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCallDOMGetter):

  • llint/LLIntThunks.cpp:
  • llint/LLIntThunks.h:
  • llint/LowLevelInterpreter.asm:
  • offlineasm/arm64.rb:
  • offlineasm/registers.rb:
  • runtime/PropertySlot.h:
3:50 PM Changeset in webkit [275391] by Devin Rousso
  • 5 edits in trunk/LayoutTests

REGRESSION (r275358): [ macOS ] 2X media/modern-media-controls layout-tests are text failing
https://bugs.webkit.org/show_bug.cgi?id=224061
<rdar://problem/76115550>

Unreviewed test fix.

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt:

Set a maximumRightContainerButtonCountOverride so that the collapsing behavior of the
overflow button doesn't affect the test (and force a layout to ensure it's picked up).

3:30 PM Changeset in webkit [275390] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[BigSur Wk1 Release] webanimations/accelerated* tests are flaky image failing
https://bugs.webkit.org/show_bug.cgi?id=224066

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
3:27 PM Changeset in webkit [275389] by Chris Dumez
  • 7 edits in trunk/Source/WebKit

Share same code between network process termination and crash handling
https://bugs.webkit.org/show_bug.cgi?id=224056

Reviewed by Darin Adler.

Share same code between network process termination and crash handling. This would avoid
bugs such as Bug 224022.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::terminate):
(WebKit::NetworkProcessProxy::networkProcessDidTerminate):
(WebKit::NetworkProcessProxy::didClose):
(WebKit::NetworkProcessProxy::didFinishLaunching):
(WebKit::NetworkProcessProxy::didTerminate): Deleted.
(WebKit::NetworkProcessProxy::networkProcessCrashed): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::networkProcessDidTerminate):
(WebKit::WebProcessPool::networkProcessCrashed): Deleted.

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::networkProcessDidTerminate):
(WebKit::WebsiteDataStore::terminateNetworkProcess):
(WebKit::WebsiteDataStore::networkProcessCrashed): Deleted.

  • UIProcess/WebsiteData/WebsiteDataStore.h:
3:26 PM Changeset in webkit [275388] by commit-queue@webkit.org
  • 8 edits
    2 deletes in trunk

Unreviewed, reverting r274381.
https://bugs.webkit.org/show_bug.cgi?id=224080

Caused stuttery select scrolling

Reverted changeset:

"Add basic (non-momentum) wheel event handling for scroll
snap"
https://bugs.webkit.org/show_bug.cgi?id=222594
https://trac.webkit.org/changeset/274381

3:19 PM Changeset in webkit [275387] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Add IOKit method filter telemetry
https://bugs.webkit.org/show_bug.cgi?id=223652
<rdar://problem/75751391>

Reviewed by Brent Fulgham.

Add IOKit method filter telemetry in the WebContent sandbox on macOS and iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
3:19 PM Changeset in webkit [275386] by Ruben Turcios
  • 3 edits in branches/safari-612.1.9-branch/Source/JavaScriptCore

Cherry-pick r275374. rdar://problem/76124167

Remove use of ENABLE from API header
https://bugs.webkit.org/show_bug.cgi?id=224060
<rdar://76111678>

Reviewed by Mark Lam.

The use of the ENABLE macro in these API headers has caused build failures. Instead of
conditionally exposing these API methods we make them into no-ops if DFG is disabled.

  • API/JSVirtualMachine.mm: (+[JSVirtualMachine setNumberOfDFGCompilerThreads:]): (+[JSVirtualMachine setNumberOfFTLCompilerThreads:]):
  • API/JSVirtualMachinePrivate.h:

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

2:51 PM Changeset in webkit [275385] by Ross Kirsling
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Use ucal_getTimeZoneOffsetFromLocal if ICU 69 is present
https://bugs.webkit.org/show_bug.cgi?id=224075

Reviewed by Yusuke Suzuki.

Apple ICU 68 cherry picked ucal_getTimeZoneOffsetFromLocal (see r223783),
but now that ICU 69 is in RC, we can go ahead and update the #if for non-Apple platforms.

  • runtime/JSDateMath.cpp:
2:25 PM Changeset in webkit [275384] by Russell Epstein
  • 1 copy in tags/Safari-612.1.8.4

Tag Safari-612.1.8.4.

2:23 PM Changeset in webkit [275383] by Russell Epstein
  • 3 edits in branches/safari-612.1.8-branch/Source/JavaScriptCore

Cherry-pick r275374. rdar://problem/76111678

Remove use of ENABLE from API header
https://bugs.webkit.org/show_bug.cgi?id=224060
<rdar://76111678>

Reviewed by Mark Lam.

The use of the ENABLE macro in these API headers has caused build failures. Instead of
conditionally exposing these API methods we make them into no-ops if DFG is disabled.

  • API/JSVirtualMachine.mm: (+[JSVirtualMachine setNumberOfDFGCompilerThreads:]): (+[JSVirtualMachine setNumberOfFTLCompilerThreads:]):
  • API/JSVirtualMachinePrivate.h:

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

2:21 PM Changeset in webkit [275382] by Russell Epstein
  • 8 edits in branches/safari-612.1.8-branch/Source

Versioning.

WebKit-7612.1.8.4

2:21 PM Changeset in webkit [275381] by dino@apple.com
  • 2 edits in trunk/Source/WebKit

Add #import for when unified sources doesn't import it first.

  • Shared/ios/WebIconUtilities.h:
2:12 PM Changeset in webkit [275380] by Chris Gambrell
  • 9 edits
    2 adds
    2 deletes in trunk/LayoutTests

LayoutTests] Convert http/tests/download convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=222618
<rdar://problem/74949253>

Reviewed by Jonathan Bedard.

  • http/tests/download/default-encoding-expected.txt:
  • http/tests/download/default-encoding.html:
  • http/tests/download/inherited-encoding-expected.txt:
  • http/tests/download/inherited-encoding-form-submission-result-expected.txt:
  • http/tests/download/inherited-encoding-form-submission-result.html:
  • http/tests/download/inherited-encoding.html:
  • http/tests/download/literal-utf-8-expected.txt:
  • http/tests/download/literal-utf-8.html:
  • http/tests/download/resources/literal-koi8-r.php: Removed.
  • http/tests/download/resources/literal-koi8-r.py: Added.
  • http/tests/download/resources/literal-utf-8.php: Removed.
  • http/tests/download/resources/literal-utf-8.py: Added.
1:59 PM Changeset in webkit [275379] by Chris Dumez
  • 2 edits in trunk/Source/WTF

REGRESSION(r275267): [GTK][WPE] 12 new crashes on service-workers layout tests
https://bugs.webkit.org/show_bug.cgi?id=224059

Reviewed by Carlos Alberto Lopez Perez.

Have the glib implementation of FileSystem::writeToFile() return early when the size to
write is 0, instead of calling g_output_stream_write_all(). It appears that passing a
NULL buffer to g_output_stream_write_all() crashes, even if size is 0.

  • wtf/glib/FileSystemGlib.cpp:

(WTF::FileSystemImpl::writeToFile):

1:56 PM Changeset in webkit [275378] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Enable ews status bubble for stress tests ews
https://bugs.webkit.org/show_bug.cgi?id=224069

Reviewed by Jonathan Bedard.

  • CISupport/ews-app/ews/views/statusbubble.py:

(StatusBubble):

1:52 PM Changeset in webkit [275377] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

aspect-ratio not recomputed on hover
https://bugs.webkit.org/show_bug.cgi?id=224028

Patch by Rob Buis <rbuis@igalia.com> on 2021-04-01
Reviewed by Zalan Bujtas.

LayoutTests/imported/w3c:

Add test for this.

  • web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-dynamic-aspect-ratio-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-dynamic-aspect-ratio.html: Added.

Source/WebCore:

Detect change in aspect-ratio on hover.

Test: imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-dynamic-aspect-ratio.html

  • rendering/style/RenderStyle.cpp:

(WebCore::rareNonInheritedDataChangeRequiresLayout):

1:43 PM Changeset in webkit [275376] by clopez@igalia.com
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Gardening of layout tests.

Unreviewed gardening.

Report and mark new failures.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
1:05 PM Changeset in webkit [275375] by Chris Dumez
  • 22 edits in trunk/Source

Have the ServiceWorker process hold on to a file mapped version of the service worker scripts to save dirty memory
https://bugs.webkit.org/show_bug.cgi?id=224015
<rdar://75637679>

Reviewed by Geoffrey Garen.

Source/WebCore:

Since r275267, the Network process holds on the file mapped (mmap'd) versions of the service worker
scripts instead of heap allocated versions, in order to decrease its dirty memory use. However, the
ServiceWorker process (which is often a regular WebProcess) was still using heap allocated service
worker scripts. This patch is a follow-up to make sure the NetworkProcess sends its file mapped
scripts to the ServiceWorker processes as ShareableResource handles in order to decrease the dirty
memory usage of the ServiceWorker processes as well.

No new tests, no Web-facing behavior change, just a decrease in dirty memory use in the ServiceWorker
processes (which may be WebProcesses). I have done local testing with a very large service worker
that uses a ~100MB main script, which imports another ~100MB sub-script. With my change, dirty
memory usage goes from ~440MB to ~230MB in both the cold and warm cases ("Cold" meaning that the
service worker was just registed and downloaded from the network and "Warm" meaning that the
service worker had been previously registed and was loaded straight from the SWScriptStorage).

  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::hasOneSegment const):
Add a utility function to SharedBuffer to check if it contains a single data segment.

(WebCore::SharedBuffer::DataSegment::containsMappedFileData const):
Add a utility function to check if a SharedBuffer DataSegment contains a MappedFileData object.

  • platform/SharedBuffer.h:
  • workers/service/ServiceWorkerContextData.h:

(WebCore::ServiceWorkerContextData::ImportedScript::isolatedCopy const):
Move IPC encoders / decoders for ServiceWorkerContextData and ServiceWorkerContextData::ImportedScript
to the WebKit layer, in WebCoreArgumentCoders. This allows us to encode / decode the scripts as
WebKit::ShareableHandle whenever possible. This way, when the NetworkProcess sends a
ServiceWorkerContextData to the ServiceWorker process to launch a service worker, both the
ServiceWorker process and the Network process share the same mmap'd versions of the scripts and we
save on dirty memory use. This helps reduce dirty memory use in the ServiceWorker process in the
warm case, where the scripts are loaded straight from the disk (via SWScriptStorage).

  • workers/service/ServiceWorkerGlobalScope.cpp:

(WebCore::ServiceWorkerGlobalScope::didSaveScriptsToDisk):

  • workers/service/ServiceWorkerGlobalScope.h:
  • workers/service/context/SWContextManager.cpp:

(WebCore::SWContextManager::didSaveScriptsToDisk):

  • workers/service/context/SWContextManager.h:
  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::ServiceWorkerThreadProxy::didSaveScriptsToDisk):

  • workers/service/context/ServiceWorkerThreadProxy.h:
  • workers/service/server/SWServerToContextConnection.h:
  • workers/service/server/SWServerWorker.cpp:

(WebCore::SWServerWorker::didSaveScriptsToDisk):
In the cold case, once the NetworkProcess is done saving the scripts to disk, it now sends the
file mapped version of the scripts to the ServiceWorker process, so that it can also replace
its heap-allocated copies and save on dirty memory use.

Source/WebKit:

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:

(WebKit::WebSWServerToContextConnection::didSaveScriptsToDisk):

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::didSaveScriptsToDisk):

  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/Storage/WebSWContextManagerConnection.messages.in:

When the NetworkProcess is done saving the service worker scripts to disk and it gets
a file mapped version, it now sends them to the ServiceWorker process as ShareableResource
handles via IPC. This allows the ServiceWorker process to replace its heap-allocated
versions of the script and save on dirty memory use (in the cold case).

  • Shared/ShareableResource.h:

Fix bug where 2 of ShareableResource data members were not properly initialized by the default
constructor.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::encodeServiceWorkerContextDataScript):
(IPC::decodeServiceWorkerContextDataScript):
(IPC::ArgumentCoder<ServiceWorkerContextData::ImportedScript>::encode):
(IPC::ArgumentCoder<ServiceWorkerContextData::ImportedScript>::decode):
(IPC::ArgumentCoder<ServiceWorkerContextData>::encode):
(IPC::ArgumentCoder<ServiceWorkerContextData>::decode):
(IPC::tryConvertToShareableResourceHandle):

  • Shared/WebCoreArgumentCoders.h:

Moved IPC encoders / decoders for ServiceWorkerContextData and ServiceWorkerContextData::ImportedScript
to the WebKit layer, in WebCoreArgumentCoders. This allows us to encode / decode the scripts as
WebKit::ShareableHandle whenever possible. This way, when the NetworkProcess sends a
ServiceWorkerContextData to the ServiceWorker process to launch a service worker, both the
ServiceWorker process and the Network process share the same mmap'd versions of the scripts and we
save on dirty memory use. This helps reduce dirty memory use in the ServiceWorker process in the
warm case, where the scripts are loaded straight from the disk (via SWScriptStorage).

1:02 PM Changeset in webkit [275374] by Tadeu Zagallo
  • 3 edits in trunk/Source/JavaScriptCore

Remove use of ENABLE from API header
https://bugs.webkit.org/show_bug.cgi?id=224060
<rdar://76111678>

Reviewed by Mark Lam.

The use of the ENABLE macro in these API headers has caused build failures. Instead of
conditionally exposing these API methods we make them into no-ops if DFG is disabled.

  • API/JSVirtualMachine.mm:

(+[JSVirtualMachine setNumberOfDFGCompilerThreads:]):
(+[JSVirtualMachine setNumberOfFTLCompilerThreads:]):

  • API/JSVirtualMachinePrivate.h:
1:01 PM Changeset in webkit [275373] by Fujii Hironori
  • 6 edits in trunk/Source/WebCore

[WebGL] Use GraphicsContextGLOpenGLManager for ports using TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=224035

Reviewed by Don Olmstead.

Use GraphicsContextGLOpenGLManager for GTK, WPE and WinCairo ports
to reduce duplicated code.

GraphicsContextGLOpenGLBase.cpp isn't used by Cocoa ports.

No behavior change.

  • PlatformMac.cmake:
  • Sources.txt:
  • SourcesCocoa.txt:
  • platform/graphics/opengl/GraphicsContextGLOpenGLManager.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::GraphicsContextGLOpenGL::create):
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
(WebCore::activeContexts): Deleted.

11:53 AM Changeset in webkit [275372] by Ruben Turcios
  • 5 edits in branches/safari-612.1.9-branch/Source

Cherry-pick r275370. rdar://problem/76113438

Allow ASCWebKitSPISupport to be used on macOS
https://bugs.webkit.org/show_bug.cgi?id=224036
<rdar://76028645>

Reviewed by Brent Fulgham.

Source/WebKit:

  • UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.h:
  • UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.mm:

Source/WTF:

  • wtf/PlatformHave.h:

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

11:50 AM Changeset in webkit [275371] by mmaxfield@apple.com
  • 6 edits
    1 add in trunk

[Cocoa] REGRESSION(r272999): User-installed fonts no longer work in Mail
https://bugs.webkit.org/show_bug.cgi?id=223985
<rdar://problem/75975210>

Reviewed by Per Arne Vollan.

Source/WebKit:

The sandbox extension which allows user-installed fonts to work was part of the WebPage,
but XType may already have been initialized to use the static registry by the time the WebPage
has been created. Therefore, simply _having_ a sandbox extension isn't sufficient; instead,
WebPage's constructor needs to call CTFontManagerEnableAllUserFonts() to switch to using fontd
in addition to using the sandbox extension.

Test: WebKit.UserInstalledFontsWork

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_lastNavigationWasAppBound):
(WebKit::WebPage::~WebPage):

  • WebProcess/WebPage/WebPage.h:

Tools:

  • TestWebKitAPI/Tests/WebKit/FontRegistrySandboxCheck.mm:

(TEST):

11:09 AM Changeset in webkit [275370] by jiewen_tan@apple.com
  • 5 edits in trunk/Source

Allow ASCWebKitSPISupport to be used on macOS
https://bugs.webkit.org/show_bug.cgi?id=224036
<rdar://76028645>

Reviewed by Brent Fulgham.

Source/WebKit:

  • UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.h:
  • UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.mm:

Source/WTF:

  • wtf/PlatformHave.h:
10:44 AM Changeset in webkit [275369] by Russell Epstein
  • 1 copy in tags/Safari-612.1.7.14

Tag Safari-612.1.7.14.

10:40 AM Changeset in webkit [275368] by Russell Epstein
  • 8 edits in branches/safari-612.1.7-branch/Source

Versioning.

WebKit-7612.1.7.14

10:38 AM Changeset in webkit [275367] by pvollan@apple.com
  • 4 edits in trunk/Source/WebKit

[GPU process] Enable CFPrefs direct mode
https://bugs.webkit.org/show_bug.cgi?id=223817
<rdar://74748933>

Reviewed by Brent Fulgham.

Enable CFPrefs direct mode in the GPU process.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(WebKit::shouldEnableCFPrefsDirectMode):
(WebKit::XPCServiceMain):

10:25 AM Changeset in webkit [275366] by Chris Gambrell
  • 6 edits in trunk/LayoutTests

Flaky LayoutTests in http/tests/appcache
https://bugs.webkit.org/show_bug.cgi?id=224054
<rdar://problem/76108352>

Reviewed by Jonathan Bedard.

  • http/tests/appcache/fail-on-update-2.html:
  • http/tests/appcache/fail-on-update.html:
  • http/tests/appcache/resources/abort-cache-onchecking.manifest.py:
  • http/tests/appcache/resources/abort-cache-ondownloading.text.py:
  • http/tests/appcache/resources/not-exist.vob.py:
10:17 AM Changeset in webkit [275365] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit

Use sendWithAsyncReply for NetworkProcess messages with async replies
https://bugs.webkit.org/show_bug.cgi?id=224025

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-01
Reviewed by Youenn Fablet.

This will prevent us from having to manually store and handle the callback IDs and other things.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::~NetworkProcessProxy):
(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcessProxy::networkProcessCrashed):
(WebKit::NetworkProcessProxy::clearCallbackStates): Deleted.
(WebKit::NetworkProcessProxy::didFetchWebsiteData): Deleted.
(WebKit::NetworkProcessProxy::didDeleteWebsiteData): Deleted.
(WebKit::NetworkProcessProxy::didDeleteWebsiteDataForOrigins): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
9:10 AM Changeset in webkit [275364] by Chris Lord
  • 8 edits in trunk/Source/WebCore

Make FontCache constructable and safe to use off the main thread
https://bugs.webkit.org/show_bug.cgi?id=223997

Reviewed by Darin Adler.

So that we can have a separate FontCache for use with OffscreenCanvas
on Worker threads, make FontCache constructable/destructable and
ref-counted.

This also changes some functions so that they no longer rely on static
AtomString variables, as these paths would not be safe to use off the
main thread, and changes main-thread checks to creation-thread checks.

No new tests, no change in behavior.

  • platform/graphics/FontCache.cpp:

(WebCore::FontCache::alternateFamilyName):
(WebCore::FontCache::getCachedFontPlatformData):
(WebCore::FontCache::fontForFamily):
(WebCore::FontCache::similarFont):

  • platform/graphics/FontCache.h:

(WebCore::FontCache::fontForFamily):
(WebCore::FontCache::getCachedFontPlatformData):

  • platform/graphics/FontCascadeFonts.cpp:

(WebCore::FontCascadeFonts::FontCascadeFonts):
(WebCore::FontCascadeFonts::glyphDataForCharacter):

  • platform/graphics/FontCascadeFonts.h:

(WebCore::FontCascadeFonts::primaryFont):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::similarFont):
(WebCore::FontCache::platformAlternateFamilyName):

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::FontCache::lastResortFallbackFont):
(WebCore::getFamilyNameStringFromFamily):
(WebCore::FontCache::platformAlternateFamilyName):

  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::FontCache::fontFromDescriptionAndLogFont):
(WebCore::FontCache::lastResortFallbackFont):
(WebCore::FontCache::platformAlternateFamilyName):

9:07 AM Changeset in webkit [275363] by Alexey Shvayka
  • 10 edits
    2 adds in trunk

Optimize createListFromArrayLike() and Proxy's OwnPropertyKeys? method
https://bugs.webkit.org/show_bug.cgi?id=223928

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/json-stringify-array-replacer.js:

Reduce running time from over 350ms to ~60ms.

  • microbenchmarks/reflect-own-keys-proxy-2.js: Added.
  • microbenchmarks/reflect-own-keys-proxy.js: Added.

Source/JavaScriptCore:

createListFromArrayLike() changes:

  1. Use toLength() / getIndex() methods that have fast paths.
  2. Remove RuntimeTypeMask and error messages from its signature: type checks are better performed in advance / inside a functor to keep the helper more versatile.
  3. Invert functor's return value to align with Structure::forEachProperty() and friends.
  4. Rename it to forEachInArrayLike() as no list is actually returned.

ProxyObject::performGetOwnPropertyNames() changes:

  1. Remove RuntimeTypeMask filtering as it's already performed by PropertyNameArray::add().
  2. Store target's keys in a HashSet for faster insertion / search.
  3. Don't populate targetConfigurableKeys for extensible target as it won't be used [1].
  4. Leverage return value of HashSet::remove() instead of using a helper.

This patch advances Proxy's OwnPropertyKeys? microbenchmarks by 20-30%,
mainly due to createListFromArrayLike() changes. No behavior changes.

Also, utilizes forEachInArrayLike() for allow list of JSON.stringify().

[1]: https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys (step 20)

  • runtime/JSONObject.cpp:

(JSC::Stringifier::Stringifier):

  • runtime/JSObject.h:

(JSC::JSObject::getIndex const):

  • runtime/JSObjectInlines.h:

(JSC::forEachInArrayLike):
(JSC::createListFromArrayLike): Deleted.

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performGetOwnPropertyNames):

  • runtime/ReflectObject.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

8:48 AM Changeset in webkit [275362] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r275350.
https://bugs.webkit.org/show_bug.cgi?id=224048

Introduced perf regression

Reverted changeset:

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

8:35 AM Changeset in webkit [275361] by mark.lam@apple.com
  • 3 edits
    2 adds in trunk

Fix some missing exception checks in HTMLMediaElement methods.
https://bugs.webkit.org/show_bug.cgi?id=224038
rdar://69573092

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/missing-exception-checks-in-HTMLMediaElement-methods.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setupAndCallJS):
(WebCore::HTMLMediaElement::updateCaptionContainer):
(WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
(WebCore::HTMLMediaElement::setControllerJSProperty):
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
(WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
(WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):

LayoutTests:

  • media/missing-exception-checks-in-HTMLMediaElement-methods-expected.txt: Added.
  • media/missing-exception-checks-in-HTMLMediaElement-methods.html: Added.
8:19 AM Changeset in webkit [275360] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

Previous artwork isn't cleared when NowPlaying info doesn't contain an artwork
https://bugs.webkit.org/show_bug.cgi?id=224031
<rdar://76044544>

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-04-01
Reviewed by Youenn Fablet.

Source/WebCore:

Manually tested, no framework available to test such change.

  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(WebCore::MediaSessionManagerCocoa::setNowPlayingInfo): use MRMediaRemoteSetNowPlayingInfoWithMergePolicy instead.

  • platform/mac/MediaRemoteSoftLink.h: Soft link MRMediaRemoteSetNowPlayingInfoWithMergePolicy
  • platform/mac/MediaRemoteSoftLink.mm:

Source/WebCore/PAL:

  • pal/spi/mac/MediaRemoteSPI.h: Add MRMediaRemoteMergePolicy enum definitions.
8:17 AM Changeset in webkit [275359] by commit-queue@webkit.org
  • 14 edits
    1 add in trunk/Source/WebCore

Now Playing artwork doesn't update when changed.
https://bugs.webkit.org/show_bug.cgi?id=223731
<rdar://problem/75823923>

Source/WebCore:

Now Playing and Media Remote requires a unique identifier for the currently playing item.
If the same identifier is provided for every call to MRMediaRemoteSetNowPlayingInfo,
then some updates may be skipped.
In earlier changes, the MediaSessionElement identifier was combined with the Media Element
identifier which broke Now Playing as the MediaSession identifier never changes for the
lifetime of the web content process.
So we create a new method HTMLMediaElement::mediaUniqueIdentifier with a new MediaUniqueIdentifier
that willthat will be updated whenever the source of a media element changes and stop
using the MediaSession identifier when dealing with Now Playing.

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-04-01
Reviewed by Eric Carlson.

Manually tested, no framework available to test such change.

  • WebCore.xcodeproj/project.pbxproj: Add MediaUniqueIdentifier.h
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::prepareForLoad): Use setCurrentSrc instead of directly modifying m_currentSrc.
(WebCore::HTMLMediaElement::selectMediaResource): Use setCurrentSrc instead of directly modifying m_currentSrc.
(WebCore::HTMLMediaElement::loadResource): Use setCurrentSrc instead of directly modifying m_currentSrc.
(WebCore::HTMLMediaElement::setCurrentSrc): Add convenience method, generate new MediaUniqueIdentifier each time m_currentSrc is modified.
(WebCore::HTMLMediaElement::mediaUniqueIdentifier const): Return unique media identifier.
(WebCore::HTMLMediaElement::mediaSessionUniqueIdentifier const): Deleted.

  • html/HTMLMediaElement.h:
  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::nowPlayingInfo const):

  • platform/audio/NowPlayingInfo.h: Use MediaUniqueIdentifier for uniqueIdentifier member.

(WebCore::NowPlayingInfo::decode):

  • platform/audio/PlatformMediaSessionManager.h: Use MediaUniqueIdentifier instead.

(WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingInfoUniqueIdentifier const):
set kMRMediaRemoteNowPlayingInfoArtworkIdentifier in CFDictionary to the source of the artwork.
Workaround a bug in Media Controller component.

  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(WebCore::MediaSessionManagerCocoa::setNowPlayingInfo):

  • platform/mac/MediaRemoteSoftLink.h: Soft-link kMRMediaRemoteNowPlayingInfoArtworkIdentifier symbol.
  • platform/mac/MediaRemoteSoftLink.mm:
  • testing/Internals.h: Add missing header.

Source/WebCore/PAL:

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-04-01
Reviewed by Eric Carlson.

  • pal/spi/mac/MediaRemoteSPI.h:
8:05 AM Changeset in webkit [275358] by Devin Rousso
  • 29 edits
    2 deletes in trunk

Limit the number of buttons shown in media controls
https://bugs.webkit.org/show_bug.cgi?id=223909

Reviewed by Eric Carlson.

Source/WebCore:

When in fullscreen, it's possible to have five different buttons to the right of "Play":

  • AirPlay
  • Enter Picture in Picture
  • Audio/Languages
  • Exit Full Screen
  • More...

This turns the UI into something of an "icon soup" and should really be avoided, especially
now that OverflowButton allows for a single button to have multiple actions (via a native
contextmenu). This matches AVKit behavior.

Tests: media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls.html:

media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html:

  • Modules/modern-media-controls/controls/inline-media-controls.js:

(InlineMediaControls.prototype.layout):
(InlineMediaControls.prototype._droppableButtons):
(InlineMediaControls.prototype._collapsableButtons): Added.

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:

(MacOSFullscreenMediaControls):
(MacOSFullscreenMediaControls.prototype.layout):
(MacOSFullscreenMediaControls.prototype._collapsableButtons): Added.
Limit the number of visible buttons in rightContainer.children by iteratively marking
dropped = true on buttons that are also in _collapsableButtons until either there are
no iterations left (i < 0) or the number of visible buttons is below the maximum (2 for
inline and 3 for fullscreen).

  • Modules/modern-media-controls/controls/pip-button.js:

(PiPButton.prototype.get contextMenuOptions): Added.

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::showMediaControlsContextMenu):
Add support for includePictureInPicture to the native contextmenu.

  • en.lproj/Localizable.strings:
  • testing/Internals.idl:
  • testing/Internals.h:
  • testing/Internals.cpp:

(WebCore::Internals::setMediaControlsMaximumRightContainerButtonCountOverride): Added.

  • html/HTMLMediaElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setMediaControlsMaximumRightContainerButtonCountOverride): Added.

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype.set maximumRightContainerButtonCountOverride): Added.
Add a way to override the default maximum right container button count for testing. This is
useful for testing the functionality of a specific button when not in the collapsed state,
allowing for tests to not have to worry about other state that may affect collapsing (e.g.
the AirPlay button is shown when there are AirPlay targets).

LayoutTests:

  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls.html:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html: Removed.
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt: Removed.

macOS fullscreen controls don't adjust the buttonMargin anymore as buttons are moved into
the overflow menu instead.

  • 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/show-contextmenu-then-double-click-on-tracks-button.html:
  • media/modern-media-controls/tracks-support/text-track-selected-via-media-api.html:

Override the default maximum right container button count so that the tracks button is shown.

7:47 AM Changeset in webkit [275357] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Cleanup shouldComputeLogicalWidthFromAspectRatio and shouldComputeLogicalWidthFromAspectRatioAndInsets
https://bugs.webkit.org/show_bug.cgi?id=224044

Reviewed by Antti Koivisto.

Let's use "return foo()" (or "return !foo()") instead of
if (!foo())

return true;

return false;

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatio const):
(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatioAndInsets const):

7:02 AM Changeset in webkit [275356] by aakash_jain@apple.com
  • 9 edits
    2 adds
    2 deletes in trunk/LayoutTests

Unreviewed, reverting r275295.
https://bugs.webkit.org/show_bug.cgi?id=224046

Broken 3 layout tests on wk1

Reverted changeset:

"[LayoutTests] Convert http/tests/download convert PHP to
Python"
https://bugs.webkit.org/show_bug.cgi?id=222618
https://trac.webkit.org/changeset/275295

Patch by Commit Queue <commit-queue@webkit.org> on 2021-04-01

6:37 AM Changeset in webkit [275355] by Aditya Keerthi
  • 19 edits
    2 adds in trunk

[iOS] '-webkit-appearance: none' is not respected for searchfield decorations
https://bugs.webkit.org/show_bug.cgi?id=224018

Reviewed by Antti Koivisto.

Source/WebCore:

Specifying '-webkit-appearance: none' on a searchfield decoration
pseudo-element fails to hide the native icon. This issue arises from
the fact that we add the icon in the UA stylesheet, rather than painting
it in the theme.

To fix, remove the styles from the UA stylesheet, and paint the icon in
RenderThemeIOS. If a different '-webkit-appearance' is specified the
theme will not adjust styles or paint the icon.

Test: fast/forms/ios/form-control-refresh/search/search-decoration-appearance.html

  • css/html.css:

Remove the UA styles for searchfield decorations so that they are not
applied when specifying a different -webkit-appearance.

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

(WebCore::RenderThemeIOS::adjustSearchFieldDecorationPartStyle const):

Adjust the style to match the native appearance.

(WebCore::RenderThemeIOS::paintSearchFieldDecorationPart):

Paint the native icon.

(WebCore::RenderThemeIOS::adjustSearchFieldResultsDecorationPartStyle const):
(WebCore::RenderThemeIOS::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeIOS::adjustSearchFieldResultsButtonStyle const):
(WebCore::RenderThemeIOS::paintSearchFieldResultsButton):

LayoutTests:

Rebaselined tests to account for the change to the way we paint
searchfield decorations on iOS. Added a new test to verify that
'-webkit-appearance: none' is respected.

  • fast/forms/ios/form-control-refresh/search/search-decoration-appearance-expected-mismatch.html: Added.
  • fast/forms/ios/form-control-refresh/search/search-decoration-appearance.html: Added.
  • platform/ios-simulator/fast/forms/datalist/datalist-searchinput-appearance-expected.txt:
  • platform/ios/fast/css/focus-ring-exists-for-search-field-expected.txt:
  • platform/ios/fast/css/input-search-padding-expected.txt:
  • platform/ios/fast/css/text-input-with-webkit-border-radius-expected.txt:
  • platform/ios/fast/css/text-overflow-input-expected.txt:
  • platform/ios/fast/forms/box-shadow-override-expected.txt:
  • platform/ios/fast/forms/control-restrict-line-height-expected.txt:
  • platform/ios/fast/forms/input-appearance-height-expected.txt:
  • platform/ios/fast/forms/placeholder-pseudo-style-expected.txt:
  • platform/ios/fast/forms/search-cancel-button-style-sharing-expected.txt:
  • platform/ios/fast/forms/search-display-none-cancel-button-expected.txt:
  • platform/ios/fast/forms/search-input-rtl-expected.txt:
  • platform/ios/fast/forms/search-styled-expected.txt:
  • platform/ios/fast/replaced/width100percent-searchfield-expected.txt:
4:45 AM Changeset in webkit [275354] by commit-queue@webkit.org
  • 16 edits in trunk/Source

Expose an alias for ScrollSnapOffsetInfo<T> to make it easier to use
https://bugs.webkit.org/show_bug.cgi?id=223986

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-04-01
Reviewed by Sergio Villar Senin.

Source/WebCore:

No new tests. This should not change behavior.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::setStateScrollingNodeSnapOffsetsAsFloat): Use new aliases.

  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::FloatScrollSnapOffsetsInfo::convertUnits const): Ditto.
(WebCore::LayoutScrollSnapOffsetsInfo::convertUnits const): Ditto.
(WebCore::LayoutScrollSnapOffsetsInfo::closestSnapOffset const): Ditto.
(WebCore::FloatScrollSnapOffsetsInfo::closestSnapOffset const): Ditto.
(WebCore::ScrollSnapOffsetsInfo<float>::convertUnits const): Deleted.
(WebCore::ScrollSnapOffsetsInfo<LayoutUnit>::convertUnits const): Deleted.
(WebCore::ScrollSnapOffsetsInfo<LayoutUnit>::closestSnapOffset const): Deleted.
(WebCore::ScrollSnapOffsetsInfo<float>::closestSnapOffset const): Deleted.

  • page/scrolling/ScrollSnapOffsetsInfo.h: Ditto.
  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::setSnapOffsetsInfo): Ditto.

  • page/scrolling/ScrollingStateScrollingNode.h:

(WebCore::ScrollingStateScrollingNode::snapOffsetsInfo const): Ditto.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::snapOffsetsInfo const): Ditto.

  • page/scrolling/ScrollingTreeScrollingNode.h: Ditto.
  • platform/ScrollController.cpp:

(WebCore::ScrollController::updateScrollSnapPoints): Ditto.

  • platform/ScrollController.h: Ditto.
  • platform/ScrollSnapAnimatorState.h:

(WebCore::ScrollSnapAnimatorState::snapOffsetInfo const): Ditto.
(WebCore::ScrollSnapAnimatorState::setSnapOffsetInfo): Ditto.

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::ensureSnapOffsetsInfo): Ditto.
(WebCore::ScrollableArea::snapOffsetInfo const): Ditto.
(WebCore::ScrollableArea::setScrollSnapOffsetInfo): Ditto.

  • platform/ScrollableArea.h: Ditto.
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::gestureShouldBeginSnap): Ditto.

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<ScrollingStateScrollingNode>::decode): Use new aliases.
(ArgumentCoder<FloatScrollSnapOffsetsInfo>::encode): Ditto.
(ArgumentCoder<FloatScrollSnapOffsetsInfo>::decode): Ditto.
(ArgumentCoder<ScrollSnapOffsetsInfo<float>>::encode): Deleted.
(ArgumentCoder<ScrollSnapOffsetsInfo<float>>::decode): Deleted.

4:36 AM Changeset in webkit [275353] by Jonathan Bedard
  • 8 edits in trunk/Tools

[webkitscmpy] Improve git-svn-id regex
https://bugs.webkit.org/show_bug.cgi?id=224008
<rdar://problem/76062561>

Rubber-stamped by Aakash Jain.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.commit): Strip leading spaces before parsing the commit message.

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Ensure that git-svn-id lines

are printed to stdout with leading spaces.

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

(ScmBase): Only match git-svn-id lines if they are at the beginning of a line.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py:
  • Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py:
4:06 AM Changeset in webkit [275352] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Support case where contributor did not define email
https://bugs.webkit.org/show_bug.cgi?id=224005
<rdar://problem/76058258>

Rubber-stamped by Aakash Jain.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:

(Contributor):
(Contributor.Mapping.create): An email of 'None' should not be indexed.
(Contributor.from_scm_log): Handle case where contributor is defined, but email isn't.

3:26 AM Changeset in webkit [275351] by commit-queue@webkit.org
  • 10 edits
    6 adds in trunk

Use Element for checking Settings in CSSComputedStyleDeclaration
https://bugs.webkit.org/show_bug.cgi?id=223598

Patch by Rob Buis <rbuis@igalia.com> on 2021-04-01
Reviewed by Darin Adler.

Source/WebCore:

Use Element for checking Settings in CSSComputedStyleDeclaration.
Right now renderer is used but this will not work for non-rendered elements.

Tests: fast/css/rotate-invalidate-if-disabled.html

fast/css/scale-invalidate-if-disabled.html
fast/css/translate-invalidate-if-disabled.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

LayoutTests:

Adapt tests to verify that non-rendered elements do not expose
contain/aspect-ratio when these features are disabled.
Add tests for rotate, scale and translate as well.

  • fast/css/aspect-ratio-invalidate-if-disabled-expected.txt:
  • fast/css/aspect-ratio-invalidate-if-disabled.html:
  • fast/css/contain-invalidate-if-disabled-expected.txt:
  • fast/css/contain-invalidate-if-disabled.html:
  • fast/css/overscroll-behavior-invalidate-if-disabled-expected.txt:
  • fast/css/overscroll-behavior-invalidate-if-disabled.html:
  • fast/css/rotate-invalidate-if-disabled-expected.txt: Added.
  • fast/css/rotate-invalidate-if-disabled.html: Added.
  • fast/css/scale-invalidate-if-disabled-expected.txt: Added.
  • fast/css/scale-invalidate-if-disabled.html: Added.
  • fast/css/translate-invalidate-if-disabled-expected.txt: Added.
  • fast/css/translate-invalidate-if-disabled.html: Added.
  • platform/win/TestExpectations:
3:07 AM Changeset in webkit [275350] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Add IOKit method filter telemetry
https://bugs.webkit.org/show_bug.cgi?id=223652
<rdar://problem/75751391>

Reviewed by Brent Fulgham.

Add IOKit method filter telemetry in the WebContent sandbox on macOS and iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
2:04 AM Changeset in webkit [275349] by Said Abou-Hallawa
  • 4 edits in trunk/Source/WebKit

[GPU Process] Process the pending messages of GPUProcessProxy before its destructor is called
https://bugs.webkit.org/show_bug.cgi?id=224017

Reviewed by Simon Fraser.

Ensure all the pending messages of the singleton GPUProcessProxy are
processed every time a WebProcessPool is about to be deleted. When calling
the completion handlers of these messages, the GPUProcessProxy and the
WebProcessPool have to be valid

  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::~AuxiliaryProcessProxy):
(WebKit::AuxiliaryProcessProxy::replyToPendingMessages):

  • UIProcess/AuxiliaryProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::~WebProcessPool):

1:05 AM Changeset in webkit [275348] by youenn@apple.com
  • 8 edits in trunk/Source/WebCore

Add some logging to RTCRtpSender and RTCRtpReceiver
https://bugs.webkit.org/show_bug.cgi?id=223991

Reviewed by Eric Carlson.

Add some logging around transforms.
No change of behavior.

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):

  • Modules/mediastream/RTCRtpReceiver.cpp:

(WebCore::RTCRtpReceiver::RTCRtpReceiver):
(WebCore::RTCRtpReceiver::setTransform):
(WebCore::RTCRtpReceiver::logChannel const):

  • Modules/mediastream/RTCRtpReceiver.h:
  • Modules/mediastream/RTCRtpReceiver.idl:
  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::RTCRtpSender):
(WebCore::RTCRtpSender::setTransform):
(WebCore::RTCRtpSender::logChannel const):

  • Modules/mediastream/RTCRtpSender.h:
  • Modules/mediastream/RTCRtpSender.idl:

Mar 31, 2021:

11:38 PM Changeset in webkit [275347] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests/imported/w3c

Unreviewed. Import WPT test modified in https://github.com/web-platform-tests/wpt/pull/28315
with updated expectation showing a slight progression in a failing test (we fail the second
assertion instead of the first one).

  • web-platform-tests/css/css-fonts/animations/font-stretch-interpolation-expected.txt:
  • web-platform-tests/css/css-fonts/animations/font-stretch-interpolation.html:
11:33 PM Changeset in webkit [275346] by graouts@webkit.org
  • 12 edits
    1 copy in trunk/Source/WebCore

Move AnimationTimeline methods related to Styleable to Styleable
https://bugs.webkit.org/show_bug.cgi?id=224012

Reviewed by Dean Jackson.

A number of public methods on AnimationTimeline make no use of any AnimationTimeline instance
variables and instead call into Styleable:

void elementWasRemoved(const Styleable&);
void willChangeRendererForStyleable(const Styleable&);
void cancelDeclarativeAnimationsForStyleable(const Styleable&);
void animationWasAddedToStyleable(WebAnimation&, const Styleable&);
void animationWasRemovedFromStyleable(WebAnimation&, const Styleable&);
void removeDeclarativeAnimationFromListsForOwningElement(WebAnimation&, const Styleable&);
void updateCSSAnimationsForStyleable(const Styleable&, const RenderStyle* currentStyle, const RenderStyle& afterChangeStyle, const RenderStyle* parentElementStyle);
void updateCSSTransitionsForStyleable(const Styleable&, const RenderStyle& currentStyle, const RenderStyle& newStyle);

These really belong on Styleable so we move them all over to that class with a new .cpp class
for these non-trivial methods.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::removeAnimation):
(WebCore::AnimationTimeline::animationWasAddedToStyleable): Deleted.
(WebCore::removeCSSTransitionFromMap): Deleted.
(WebCore::AnimationTimeline::animationWasRemovedFromStyleable): Deleted.
(WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement): Deleted.
(WebCore::AnimationTimeline::removeCSSAnimationCreatedByMarkup): Deleted.
(WebCore::AnimationTimeline::elementWasRemoved): Deleted.
(WebCore::AnimationTimeline::willChangeRendererForStyleable): Deleted.
(WebCore::AnimationTimeline::cancelDeclarativeAnimationsForStyleable): Deleted.
(WebCore::shouldConsiderAnimation): Deleted.
(WebCore::AnimationTimeline::updateCSSAnimationsForStyleable): Deleted.
(WebCore::keyframeEffectForElementAndProperty): Deleted.
(WebCore::propertyInStyleMatchesValueForTransitionInMap): Deleted.
(WebCore::transitionCombinedDuration): Deleted.
(WebCore::transitionMatchesProperty): Deleted.
(WebCore::compileTransitionPropertiesInStyle): Deleted.
(WebCore::AnimationTimeline::updateCSSTransitionsForStyleableAndProperty): Deleted.
(WebCore::AnimationTimeline::updateCSSTransitionsForStyleable): Deleted.

  • animation/AnimationTimeline.h:
  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::disassociateFromOwningElement):

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::setEffectInternal):
(WebCore::WebAnimation::setTimeline):
(WebCore::WebAnimation::effectTargetDidChange):
(WebCore::WebAnimation::persist):

  • dom/Element.cpp:

(WebCore::Element::removedFromAncestor):

  • dom/PseudoElement.cpp:

(WebCore::PseudoElement::clearHostElement):

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::tearDownRenderers):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

  • style/Styleable.cpp: Copied from Source/WebCore/animation/AnimationTimeline.cpp.

(WebCore::Styleable::animationWasAdded const):
(WebCore::removeCSSTransitionFromMap):
(WebCore::Styleable::removeDeclarativeAnimationFromListsForOwningElement const):
(WebCore::Styleable::animationWasRemoved const):
(WebCore::removeCSSAnimationCreatedByMarkup):
(WebCore::Styleable::elementWasRemoved const):
(WebCore::Styleable::willChangeRenderer const):
(WebCore::Styleable::cancelDeclarativeAnimations const):
(WebCore::shouldConsiderAnimation):
(WebCore::Styleable::updateCSSAnimations const):
(WebCore::keyframeEffectForElementAndProperty):
(WebCore::propertyInStyleMatchesValueForTransitionInMap):
(WebCore::transitionCombinedDuration):
(WebCore::transitionMatchesProperty):
(WebCore::compileTransitionPropertiesInStyle):
(WebCore::updateCSSTransitionsForStyleableAndProperty):
(WebCore::Styleable::updateCSSTransitions const):

  • style/Styleable.h:
9:03 PM Changeset in webkit [275345] by Simon Fraser
  • 18 edits in trunk/Source

Feed preferred frames per second back to the UI process for each DisplayRefreshMonitor
https://bugs.webkit.org/show_bug.cgi?id=224023

Reviewed by Sam Weinig.

Source/WebCore:

DisplayRefreshMonitors should be responsive to the frame rate demands of their clients,
so move from a model where DisplayRefreshMonitor has setPreferredFramesPerSecond()
to one where it computes maxClientPreferredFramesPerSecond().

DisplayRefreshMonitor needs to recompute maxClientPreferredFramesPerSecond when clients
are added, removed, or when the preferred frame rate of a client changes.

For now, just one of the DisplayRefreshMonitor implementations responds to adjustPreferredFramesPerSecond:
DisplayRefreshMonitorMac sends IPC to the UI process, which DisplayLink can use on a per-connection
basis to throttle the frequency of display updates sent to that process (which is important
for power).

  • platform/graphics/DisplayRefreshMonitor.cpp:

(WebCore::DisplayRefreshMonitor::addClient):
(WebCore::DisplayRefreshMonitor::removeClient):
(WebCore::DisplayRefreshMonitor::maximumClientPreferredFramesPerSecond const):
(WebCore::DisplayRefreshMonitor::computeMaxPreferredFramesPerSecond):
(WebCore::DisplayRefreshMonitor::clientPreferredFramesPerSecondChanged):

  • platform/graphics/DisplayRefreshMonitor.h:

(WebCore::DisplayRefreshMonitor::maxClientPreferredFramesPerSecond const):
(WebCore::DisplayRefreshMonitor::adjustPreferredFramesPerSecond):
(WebCore::DisplayRefreshMonitor::setPreferredFramesPerSecond): Deleted.

  • platform/graphics/DisplayRefreshMonitorClient.cpp:

(WebCore::DisplayRefreshMonitorClient::setPreferredFramesPerSecond):

  • platform/graphics/DisplayRefreshMonitorManager.cpp:

(WebCore::DisplayRefreshMonitorManager::clientPreferredFramesPerSecondChanged):
(WebCore::DisplayRefreshMonitorManager::setPreferredFramesPerSecond): Deleted.

  • platform/graphics/DisplayRefreshMonitorManager.h:

Source/WebKit:

DisplayLink needs to track the preferredFramesPerSecond of each of its client
observers. notifyObserversDisplayWasRefreshed() can then avoid sending IPC to
a process a frequency which is higher than that process needs.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::startDisplayLink):
(WebKit::WebProcessPool::setDisplayLinkPreferredFramesPerSecond):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:
  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::addObserver):
(WebKit::DisplayLink::removeObserver):
(WebKit::DisplayLink::removeObservers):
(WebKit::DisplayLink::setPreferredFramesPerSecond):
(WebKit::DisplayLink::notifyObserversDisplayWasRefreshed):

  • UIProcess/mac/DisplayLink.h:
  • UIProcess/mac/WebProcessProxyMac.mm:

(WebKit::WebProcessProxy::startDisplayLink):
(WebKit::WebProcessProxy::setDisplayLinkPreferredFramesPerSecond):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm:

(WebKit::RemoteLayerTreeDisplayRefreshMonitor::adjustPreferredFramesPerSecond):
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::setPreferredFramesPerSecond): Deleted.

  • WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp:

(WebKit::DisplayRefreshMonitorMac::startNotificationMechanism):
(WebKit::DisplayRefreshMonitorMac::adjustPreferredFramesPerSecond):

  • WebProcess/WebPage/mac/DisplayRefreshMonitorMac.h:
8:18 PM Changeset in webkit [275344] by Chris Dumez
  • 2 edits in trunk/Tools

Add API test for Bug 224022
https://bugs.webkit.org/show_bug.cgi?id=224024

Reviewed by Alex Christensen.

The way to reproduce the bug was to make sure that the NetworkProcessProxy was not associated
with any datastore at the time of the crash, then construct a new view and do a load, which
would hang.

If the NetworkProcessProxy was associated with a datastore and the WKWebSiteDataStore's
m_networkProcess was not null, then WebsiteDataStore::networkProcessCrashed() would take
care of calling m_networkProcess->didTerminate(), which would destroy the NetworkProcessProxy
singleton.

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

(TEST):

7:55 PM Changeset in webkit [275343] by ddkilzer@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

UBSan: JSC::Parser<LexerType>::parseProperty(): runtime error: load of value nnn, which is not a valid value for type 'bool'
<https://webkit.org/b/223896>
<rdar://problem/75970132>

Reviewed by Darin Adler.

Based on a suggestion by Darin Adler.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseProperty):

  • Change 'escaped' to 'wasUnescapedIdent' to avoid the undefined behavior since m_token.m_data.escaped is only set in the case when an identifer is parsed (in Lexer<>::parseIdentifer()), not a string (in Lexer<>::parseString()). This simplifies the logic later in the method.
7:32 PM Changeset in webkit [275342] by Kocsen Chung
  • 1 copy in tags/Safari-612.1.7.13

Tag Safari-612.1.7.13.

7:31 PM Changeset in webkit [275341] by Patrick Angle
  • 2 edits in trunk/Source/WebKit

Web Inspector: [Cocoa] WKInspectorResourceURLSchemeHandler can exceed the soft thread limit when opening multiple inspectors simultaneously.
https://bugs.webkit.org/show_bug.cgi?id=223958

Reviewed by BJ Burg.

In engineering builds, the Web Inspector is loaded as hundreds of separate resources instead of the handful of
minified sources used for released builds. When two Web Inspector windows are opened their loads can overlap
and it is possible for the sum total of file load operations to exceed the dispatch soft thread limit. To
resolve this, we set a sensible limit to the number of simultaneous inspector loading operations. A higher
number of allowed concurrent operations yielded no noticeable increase in load speeds.

  • UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm:

(-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]):

7:30 PM Changeset in webkit [275340] by Kocsen Chung
  • 8 edits in branches/safari-612.1.7-branch/Source

Versioning.

WebKit-7612.1.7.13

7:26 PM Changeset in webkit [275339] by Kocsen Chung
  • 1 copy in tags/Safari-612.1.8.3

Tag Safari-612.1.8.3.

7:21 PM Changeset in webkit [275338] by Kocsen Chung
  • 8 edits in branches/safari-612.1.8-branch/Source

Versioning.

WebKit-7612.1.8.3

7:02 PM Changeset in webkit [275337] by Patrick Angle
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Regression (r270134) Timeline recordings 2 and beyond do not show a timescale.
https://bugs.webkit.org/show_bug.cgi?id=222930

Reviewed by Devin Rousso.

When a new TimelineOverview is created, it calls TimelineOverview.prototype._viewModeDidChange inside the
constructor, which in turn called updateLayout. This was problematic in that a TimelineRuler would have
sizeDidChange invoked before it was attached to the DOM, which meant that there was no width to cache. Because
sizeDidChange is only invoked during the first layout and on resize events, the cached width is not updated
when the ruler is attached to the view hierarchy, having already performed an early initial layout.

This patch now checks if the TimelineOverview has performed its initial layout before updating the layout
inside _viewModeDidChange, which means that the initial layout on the child TimelineRuler will be done while
attached, thus producing a valid width value to cache.

  • UserInterface/Views/TimelineOverview.js:

(WI.TimelineRuler.prototype._viewModeDidChange):

6:53 PM Changeset in webkit [275336] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Debug wk2 ] ASSERTION FAILED: willBeComposited == needsToBeComposited(layer, queryData)
https://bugs.webkit.org/show_bug.cgi?id=223750

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Adding the Failure back to the test expectations that I removed during the prior update.
6:42 PM Changeset in webkit [275335] by Robert Jenner
  • 3 edits in trunk/LayoutTests

ASSERTION FAILED: CustomElementReactionDisallowedScope::isReactionAllowed() ./dom/CustomElementReactionQueue.cpp(175) : static void WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded(WebCore::Element &)
https://bugs.webkit.org/show_bug.cgi?id=224033

Uneviewed test gardening.

  • platform/ios-simulator/TestExpectations: Updated test expectations while test is reviewed.
  • platform/mac/TestExpectations:
6:39 PM Changeset in webkit [275334] by Wenson Hsieh
  • 9 edits in trunk

List of extents should be bounds-checked when iterating display list items
https://bugs.webkit.org/show_bug.cgi?id=224019
<rdar://problem/71851600>

Reviewed by Tim Horton.

Source/WebCore:

Add a bounds check before attempting to access the vector of display list drawing item extents. In the case
where we would've otherwise attempted to access an out-of-bounds item, we instead flag ourselves as invalid and
stop early with StopReplayReason::InvalidItemOrExtent.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::setTracksDrawingItemExtents):

Drive-by fix: use isEmpty() in the release assertion instead of duplicating code.

(WebCore::DisplayList::DisplayList::iterator::updateCurrentDrawingItemExtent):
(WebCore::DisplayList::DisplayList::iterator::updateCurrentItem):

  • platform/graphics/displaylists/DisplayList.h:
  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::Replayer::applyItem):
(WebCore::DisplayList::Replayer::replay):

  • platform/graphics/displaylists/DisplayListReplayer.h:

Rename the StopReplayReason::InvalidItem to StopReplayReason::InvalidItemOrExtent, to reflect that we may
also stop replay when encountering invalid item extents.

Source/WebKit:

Rename InvalidItem to InvalidItemOrExtent.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):

Tools:

Rename InvalidItem to InvalidItemOrExtent.

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

(TestWebKitAPI::TEST):

6:38 PM Changeset in webkit [275333] by Tadeu Zagallo
  • 3 edits
    2 adds in trunk

Missing scope release in JSDOMBuiltinConstructorBase
https://bugs.webkit.org/show_bug.cgi?id=216851
<rdar://problem/69144642>

Reviewed by Yusuke Suzuki.

Source/WebCore:

In JSDOMBuiltinConstructorBase::callFunctionWithCurrentArguments, we should release the
ThrowScope before calling into JavaScript since we don't intend to handle the exception.

Test: js/transform-stream.html

  • bindings/js/JSDOMBuiltinConstructorBase.cpp:

(WebCore::JSDOMBuiltinConstructorBase::callFunctionWithCurrentArguments):

LayoutTests:

  • js/dom/transform-stream-expected.txt: Added.
  • js/dom/transform-stream.html: Added.
6:16 PM Changeset in webkit [275332] by Chris Gambrell
  • 42 edits
    4 moves
    28 adds
    29 deletes in trunk/LayoutTests

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

Reviewed by Jonathan Bedard.

  • TestExpectations:
  • http/tests/appcache/404-resource-with-slow-main-resource.php: Removed.
  • http/tests/appcache/404-resource-with-slow-main-resource.py: Added.
  • http/tests/appcache/abort-cache-onchecking-manifest-404.html:
  • http/tests/appcache/abort-cache-onchecking.html:
  • http/tests/appcache/access-via-redirect.php: Removed.
  • http/tests/appcache/access-via-redirect.py: Added.
  • http/tests/appcache/auth.html:
  • http/tests/appcache/document-cookie-http-only.php: Removed.
  • http/tests/appcache/document-cookie-http-only.py: Added.
  • http/tests/appcache/document-cookie.php: Removed.
  • http/tests/appcache/document-cookie.py: Added.
  • http/tests/appcache/fail-on-update-2.html:
  • http/tests/appcache/fail-on-update.html:
  • http/tests/appcache/fallback.html:
  • http/tests/appcache/identifier-test.html:
  • http/tests/appcache/main-resource-redirect.html:
  • http/tests/appcache/manifest-redirect-2.html:
  • http/tests/appcache/manifest-redirect.html:
  • http/tests/appcache/online-whitelist.html:
  • http/tests/appcache/remove-cache.html:
  • http/tests/appcache/resource-redirect-2-expected.txt:
  • http/tests/appcache/resource-redirect-expected.txt:
  • http/tests/appcache/resources/abort-cache-onchecking-resource-404.manifest:
  • http/tests/appcache/resources/abort-cache-onchecking.manifest.php: Removed.
  • http/tests/appcache/resources/abort-cache-onchecking.manifest.py: Added.
  • http/tests/appcache/resources/abort-cache-ondownloading.manifest:
  • http/tests/appcache/resources/abort-cache-ondownloading.text.php: Removed.
  • http/tests/appcache/resources/abort-cache-ondownloading.text.py: Added.
  • http/tests/appcache/resources/abort-cache-onprogress.manifest:
  • http/tests/appcache/resources/access-via-redirect.html:
  • http/tests/appcache/resources/appcache-cookies-test.html:
  • http/tests/appcache/resources/auth/iframe.php: Removed.
  • http/tests/appcache/resources/auth/iframe.py: Added.
  • http/tests/appcache/resources/auth/manifest.php: Removed.
  • http/tests/appcache/resources/auth/manifest.py: Added.
  • http/tests/appcache/resources/auth/setup.php: Removed.
  • http/tests/appcache/resources/auth/setup.py: Added.
  • http/tests/appcache/resources/auth/subresource.php: Removed.
  • http/tests/appcache/resources/auth/subresource.py: Added.
  • http/tests/appcache/resources/cookie-protected-script.php: Removed.
  • http/tests/appcache/resources/cookie-protected-script.py: Added.
  • http/tests/appcache/resources/document-cookie.manifest:
  • http/tests/appcache/resources/fail-on-update-2.html:
  • http/tests/appcache/resources/fail-on-update-2.php: Removed.
  • http/tests/appcache/resources/fail-on-update-2.py: Added.
  • http/tests/appcache/resources/fail-on-update.php: Removed.
  • http/tests/appcache/resources/fail-on-update.py: Added.
  • http/tests/appcache/resources/fallback-redirect.php: Removed.
  • http/tests/appcache/resources/fallback-redirect.py: Added.
  • http/tests/appcache/resources/identifier-test-real.php: Removed.
  • http/tests/appcache/resources/identifier-test-real.py: Added.
  • http/tests/appcache/resources/identifier-test.php: Removed.
  • http/tests/appcache/resources/identifier-test.py: Added.
  • http/tests/appcache/resources/intercept/.htaccess:
  • http/tests/appcache/resources/main-resource-redirect-frame.php: Removed.
  • http/tests/appcache/resources/main-resource-redirect-frame.py: Added.
  • http/tests/appcache/resources/manifest-if-cookie.php: Removed.
  • http/tests/appcache/resources/manifest-if-cookie.py: Added.
  • http/tests/appcache/resources/manifest-protected-script.php: Removed.
  • http/tests/appcache/resources/manifest-redirect-2.php: Removed.
  • http/tests/appcache/resources/manifest-redirect-2.py: Added.
  • http/tests/appcache/resources/manifest-redirect.php: Removed.
  • http/tests/appcache/resources/manifest-redirect.py: Added.
  • http/tests/appcache/resources/navigating-away-while-cache-attempt-in-progress.manifest:
  • http/tests/appcache/resources/not-exist.vob.php: Removed.
  • http/tests/appcache/resources/not-exist.vob.py: Added.
  • http/tests/appcache/resources/online-allowlist.manifest:
  • http/tests/appcache/resources/online-allowlist.php: Removed.
  • http/tests/appcache/resources/online-allowlist.py: Added.
  • http/tests/appcache/resources/print-uri.php: Removed.
  • http/tests/appcache/resources/print-uri.py: Added.
  • http/tests/appcache/resources/remove-cache-frame-2.html:
  • http/tests/appcache/resources/remove-cache-frame.html:
  • http/tests/appcache/resources/remove-cache.php: Removed.
  • http/tests/appcache/resources/remove-cache.py: Added.
  • http/tests/appcache/resources/resource-redirect-2.manifest:
  • http/tests/appcache/resources/resource-redirect-2.php: Removed.
  • http/tests/appcache/resources/resource-redirect-2.py: Added.
  • http/tests/appcache/resources/resource-redirect.manifest:
  • http/tests/appcache/resources/resource-redirect.php: Removed.
  • http/tests/appcache/resources/resource-redirect.py: Added.
  • http/tests/appcache/resources/scope1/cookie-protected-manifest.php: Removed.
  • http/tests/appcache/resources/scope1/cookie-protected-manifest.py: Added.
  • http/tests/appcache/resources/scope2/cookie-protected-script.php: Removed.
  • http/tests/appcache/resources/scope2/cookie-protected-script.py: Added.
  • http/tests/appcache/resources/slow-resource.php: Removed.
  • http/tests/appcache/resources/slow-resource.py: Added.
  • http/tests/appcache/resources/uncacheable-resource.php: Removed.
  • http/tests/appcache/resources/uncacheable-resource.py: Added.
  • http/tests/appcache/resources/update-cache.php: Removed.
  • http/tests/appcache/resources/update-cache.py: Added.
  • http/tests/appcache/resources/x-frame-options-prevents-framing-test.html:
  • http/tests/appcache/update-cache.html:
  • http/tests/appcache/x-frame-options-prevents-framing-expected.txt:
  • http/tests/appcache/x-frame-options-prevents-framing.php: Removed.
  • http/tests/appcache/x-frame-options-prevents-framing.py: Added.
  • http/tests/resources/portabilityLayer.py:

(get_count):
(get_state):
(set_state):
(step_state):
(setState): Deleted.
(getState): Deleted.

  • http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache-invalidation.py:
  • http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache-timeout.py:
  • http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache.py:
  • http/tests/xmlhttprequest/resources/access-control-preflight-denied-xsrf.py:
  • http/tests/xmlhttprequest/resources/no-custom-header.py:
  • http/tests/xmlhttprequest/resources/redirect-cross-origin-tripmine.py:
  • http/tests/xmlhttprequest/resources/remember-bad-password/count-failures.py:
  • platform/ios-wk2/TestExpectations:
6:12 PM Changeset in webkit [275331] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ARM64 ] tiled-drawing/top-content-inset-fixed-attachment-cover-local.html is a flakey Image failure
https://bugs.webkit.org/show_bug.cgi?id=224032

Uneviewed test garending.

  • platform/mac-wk2/TestExpectations: Updated test expectations to Pass ImageOnlyFailure while test is reviewed.
5:58 PM Changeset in webkit [275330] 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

Patch by Peng Liu <Peng Liu> on 2021-03-31
Reviewed by Eric Carlson.

Fix a flaky test related to video fullscreen by:
1) Wait for a video presentation mode change to complete before moving to the next step in the test.
2) Request the video to exit fullscreen before endTest() (to avoid interference with other tests).

  • media/pip-video-going-into-fullscreen-expected.txt:
  • media/pip-video-going-into-fullscreen.html:
  • platform/mac-wk2/TestExpectations:
5:50 PM Changeset in webkit [275329] by zhifei_fang@apple.com
  • 12 edits in trunk/Websites/perf.webkit.org

Add commit revision label support
https://bugs.webkit.org/show_bug.cgi?id=222897

Reviewed by Ryosuke Niwa.

Add new column revision label.
Make all commit api also can work with revision label.
Change the commit label display with commit revision label.

  • browser-tests/commit-log-viewer-tests.js: Fix a failed test case, while requesting the remote api,

we should wait for those promises resolved and then wait for commponent to render.

  • init-database.sql: Add new column revision_identifier.
  • migrate-database.sql: Add new column revision_identifier.
  • public/include/commit-log-fetcher.php: Make api that works with revision should work with revision label.
  • public/include/commit-updater.php: Ditto.
  • public/include/report-processor.php: Make the processor can also insert revision label.
  • public/v3/models/commit-log.js:

(CommitLog.prototype.updateSingleton):
(CommitLog.prototype.revisionIdentifier):
(CommitLog.prototype.label): Make the label include revision label and revision.
(CommitLog.prototype.diff): Make the diff label include revision label and revision.

  • server-tests/api-commits-tests.js:
  • server-tests/api-report-commits-tests.js:
  • server-tests/api-report-tests.js:

(reportWithRevisionIdentifierCommit):

  • unit-tests/commit-log-tests.js:
5:47 PM Changeset in webkit [275328] by Peng Liu
  • 4 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

Reviewed by Eric Carlson.

Fix a flaky test related to video fullscreen by:
1) Wait for a video presentation mode change to complete before moving to the next step in the test.
2) Request the video to exit fullscreen before endTest() (to avoid interference with other tests).

  • media/pip-video-going-into-fullscreen-expected.txt:
  • media/pip-video-going-into-fullscreen.html:
  • platform/mac-wk2/TestExpectations:
5:39 PM Changeset in webkit [275327] by Chris Dumez
  • 6 edits in trunk/Source

Use MACH_PORT_VALID() when wanting to check if a mach port is valid
https://bugs.webkit.org/show_bug.cgi?id=224004

Reviewed by Darin Adler.

Use MACH_PORT_VALID() when wanting to check if a mach port is valid, instead of checking for
MACH_PORT_NULL. MACH_PORT_VALID() is the correct way to check for validity since it also checks
for the MACH_PORT_DEAD value.

Source/WebCore:

  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::ResourceUsageThread::platformCollectCPUData):

  • platform/graphics/mac/GraphicsChecksMac.cpp:

(WebCore::attachToAppleGraphicsControl):
(WebCore::hasMuxCapability):

Source/WebKitLegacy/mac:

  • Plugins/Hosted/NetscapePluginHostManager.mm:

(WebKit::NetscapePluginHostManager::spawnPluginHost):

  • Plugins/Hosted/NetscapePluginHostProxy.mm:

(WebKit::NetscapePluginHostProxy::processRequests):

5:33 PM Changeset in webkit [275326] by Cameron McCormack
  • 3 edits
    2 adds in trunk

Avoid creating any complex text runs when font-size is zero.
https://bugs.webkit.org/show_bug.cgi?id=223983

Reviewed by Myles C. Maxfield.

Source/WebCore:

We have existing checks to handle font-size: 0 on the simple
text path, but not for complex text. Handle this by creating
no complex text runs for text with zero size.

Test: fast/text/font-size-zero-complex.html

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::collectComplexTextRuns):

LayoutTests:

  • fast/text/font-size-zero-complex-expected.html: Added.
  • fast/text/font-size-zero-complex.html: Added.
5:30 PM Changeset in webkit [275325] by Russell Epstein
  • 1 copy in tags/Safari-611.1.21.161.3

Tag Safari-611.1.21.161.3.

5:29 PM Changeset in webkit [275324] by mark.lam@apple.com
  • 3 edits
    2 adds in trunk

Placate exception check validation below convertVariadicArguments().
https://bugs.webkit.org/show_bug.cgi?id=224027
rdar://68912995

Reviewed by Saam Barati.

Source/WebCore:

Test: js/dom/missing-exception-check-in-convertVariadicArguments.html

  • bindings/js/JSDOMConvertVariadic.h:

(WebCore::convertVariadicArguments):

LayoutTests:

  • js/dom/missing-exception-check-in-convertVariadicArguments-expected.txt: Added.
  • js/dom/missing-exception-check-in-convertVariadicArguments.html: Added.
5:18 PM Changeset in webkit [275323] by Russell Epstein
  • 2 edits in branches/safari-611.1.21.161-branch/Source/WebKit

Cherry-pick r275316. rdar://problem/76078629

REGRESSION: The NetworkProcess fails to relaunch after it crashes
https://bugs.webkit.org/show_bug.cgi?id=224022
<rdar://75148724>

Reviewed by Darin Adler.

NetworkProcessProxy::networkProcessCrashed() failed to clear defaultNetworkProcess() like we do on
network process termination (in NetworkProcessProxy::didTerminate()). As a result, upon a
network process crash, WebsiteDataStore::networkProcessCrashed() would get called and
properly clear WebsiteDataStore::m_networkProcess. However, when calling
WebsiteDataStore::networkProcess() later on, it would re-initialize m_networkProcess with
the same dead NetworkProcessProxy, since networkProcessForSession() relies on
NetworkProcessProxy::defaultNetworkProcess().

No new tests, will land an API test shortly as a follow-up.

  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::networkProcessCrashed):

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

5:16 PM Changeset in webkit [275322] by Russell Epstein
  • 8 edits in branches/safari-611.1.21.161-branch/Source

Versioning.

WebKit-7611.1.21.161.3

5:12 PM Changeset in webkit [275321] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION (Metal ANGLE): [Catalina] 6 consistent WebGL failures / timeouts
https://bugs.webkit.org/show_bug.cgi?id=224016

Unreviewed test gardening.

  • platform/mac/TestExpectations: Mark tests as failing / skipped.
4:38 PM Changeset in webkit [275320] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Null pointer access crash in WebCore::makeBoundaryPoint(..)
https://bugs.webkit.org/show_bug.cgi?id=223977

Patch by Venky Dass <yaranamavenkataramana@apple.com> on 2021-03-31
Reviewed by Darin Adler.

Source/WebCore:

In makeBoundaryPoint, position.containerNode() can be nullptr even if position.isNull() was false

Test: LayoutTests/editing/inserting/crash-make-boundary-point.html

  • dom/Position.cpp:

(WebCore::makeBoundaryPoint):

LayoutTests:

Adding a refression test case.

  • editing/inserting/crash-make-boundary-point-expected.txt: Added.
  • editing/inserting/crash-make-boundary-point.html: Added.
4:35 PM Changeset in webkit [275319] by Russell Epstein
  • 1 copy in tags/Safari-611.1.21.0.13

Tag Safari-611.1.21.0.13.

4:34 PM Changeset in webkit [275318] by Russell Epstein
  • 2 edits in branches/safari-611.1.21.0-branch/Source/WebKit

Cherry-pick r275316. rdar://problem/76077169

REGRESSION: The NetworkProcess fails to relaunch after it crashes
https://bugs.webkit.org/show_bug.cgi?id=224022
<rdar://75148724>

Reviewed by Darin Adler.

NetworkProcessProxy::networkProcessCrashed() failed to clear defaultNetworkProcess() like we do on
network process termination (in NetworkProcessProxy::didTerminate()). As a result, upon a
network process crash, WebsiteDataStore::networkProcessCrashed() would get called and
properly clear WebsiteDataStore::m_networkProcess. However, when calling
WebsiteDataStore::networkProcess() later on, it would re-initialize m_networkProcess with
the same dead NetworkProcessProxy, since networkProcessForSession() relies on
NetworkProcessProxy::defaultNetworkProcess().

No new tests, will land an API test shortly as a follow-up.

  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::networkProcessCrashed):

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

4:32 PM Changeset in webkit [275317] by Russell Epstein
  • 8 edits in branches/safari-611.1.21.0-branch/Source

Versioning.

WebKit-7611.1.21.0.13

4:19 PM Changeset in webkit [275316] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

REGRESSION: The NetworkProcess fails to relaunch after it crashes
https://bugs.webkit.org/show_bug.cgi?id=224022
<rdar://75148724>

Reviewed by Darin Adler.

NetworkProcessProxy::networkProcessCrashed() failed to clear defaultNetworkProcess() like we do on
network process termination (in NetworkProcessProxy::didTerminate()). As a result, upon a
network process crash, WebsiteDataStore::networkProcessCrashed() would get called and
properly clear WebsiteDataStore::m_networkProcess. However, when calling
WebsiteDataStore::networkProcess() later on, it would re-initialize m_networkProcess with
the same dead NetworkProcessProxy, since networkProcessForSession() relies on
NetworkProcessProxy::defaultNetworkProcess().

No new tests, will land an API test shortly as a follow-up.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::networkProcessCrashed):

4:15 PM Changeset in webkit [275315] by Chris Gambrell
  • 53 edits
    19 adds
    24 deletes in trunk/LayoutTests

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

Reviewed by Jonathan Bedard.

  • http/tests/contentextensions/block-cookies-basic.html:
  • http/tests/contentextensions/block-cookies-basic.html.json:
  • http/tests/contentextensions/block-cookies-in-image-load-in-onunload.html:
  • http/tests/contentextensions/block-cookies-in-ping.html:
  • http/tests/contentextensions/block-cookies-send.html:
  • http/tests/contentextensions/resources/save_ping.py:

(not_being_called):

  • http/tests/cookies/cookie-with-multiple-level-path.html:
  • http/tests/cookies/document-cookie-after-showModalDialog.html:
  • http/tests/cookies/document-cookie-during-iframe-parsing.html:
  • http/tests/cookies/only-accept-first-party-cookies.html:
  • http/tests/cookies/resources/cookie-utilities.js:
  • http/tests/cookies/resources/cookie-utility.php: Removed.
  • http/tests/cookies/resources/cookie-utility.py: Added.

(delete_cookie):

  • http/tests/cookies/resources/cookie-with-multiple-level-path.php: Removed.
  • http/tests/cookies/resources/cookie-with-multiple-level-path.py: Added.
  • http/tests/cookies/resources/echo-cookies.php: Removed.
  • http/tests/cookies/resources/echo-cookies.py: Added.
  • http/tests/cookies/resources/echo-http-and-dom-cookies-and-notify-done.php: Removed.
  • http/tests/cookies/resources/echo-http-and-dom-cookies-and-notify-done.py: Added.
  • http/tests/cookies/resources/echo-json.php: Removed.
  • http/tests/cookies/resources/echo-json.py: Added.
  • http/tests/cookies/resources/post-cookies-onmessage.php: Removed.
  • http/tests/cookies/resources/post-cookies-onmessage.py: Added.
  • http/tests/cookies/resources/post-cookies-to-opener.php: Removed.
  • http/tests/cookies/resources/post-cookies-to-opener.py: Added.
  • http/tests/cookies/resources/resetCookies.js:

(resetCookies):

  • http/tests/cookies/resources/set-cookie-and-redirect-back.php: Removed.
  • http/tests/cookies/resources/set-cookie-and-redirect-back.py: Added.
  • http/tests/cookies/resources/set-cookie-and-serve.php: Removed.
  • http/tests/cookies/resources/set-cookie-and-serve.py: Added.
  • http/tests/cookies/resources/set-cookie-on-redirect.php: Removed.
  • http/tests/cookies/resources/set-cookie-on-redirect.py: Added.
  • http/tests/cookies/resources/set-http-only-cookie.php: Removed.
  • http/tests/cookies/resources/set-http-only-cookie.py: Added.
  • http/tests/cookies/resources/setArraycookies-result.php: Removed.
  • http/tests/cookies/resources/setArraycookies.php: Removed.
  • http/tests/cookies/resources/setUtf8Cookies-result.php: Removed.
  • http/tests/cookies/resources/setUtf8Cookies.php: Removed.
  • http/tests/cookies/resources/third-party-cookie-relaxing-iframe.html:
  • http/tests/cookies/same-site/fetch-after-navigating-iframe-in-cross-origin-page.html:
  • http/tests/cookies/same-site/fetch-after-top-level-cross-origin-redirect.html:
  • http/tests/cookies/same-site/fetch-after-top-level-navigation-from-cross-origin-page.html:
  • http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.html:
  • http/tests/cookies/same-site/fetch-after-top-level-same-origin-redirect.html:
  • http/tests/cookies/same-site/fetch-in-same-origin-service-worker.html:
  • http/tests/cookies/same-site/lax-samesite-cookie-after-cross-site-history-load.php: Removed.
  • http/tests/cookies/same-site/lax-samesite-cookie-after-cross-site-history-load.py: Added.
  • http/tests/cookies/same-site/popup-cross-site-post.html:
  • http/tests/cookies/same-site/popup-cross-site.html:
  • http/tests/cookies/same-site/popup-same-site-post.html:
  • http/tests/cookies/same-site/popup-same-site-via-cross-site-redirect.html:
  • http/tests/cookies/same-site/popup-same-site-via-same-site-redirect.html:
  • http/tests/cookies/same-site/popup-same-site.html:
  • http/tests/cookies/same-site/resources/click-hyperlink.php: Removed.
  • http/tests/cookies/same-site/resources/click-hyperlink.py: Added.
  • http/tests/cookies/same-site/resources/fetch-after-navigating-iframe-in-cross-origin-page.php: Removed.
  • http/tests/cookies/same-site/resources/fetch-after-navigating-iframe-in-cross-origin-page.py: Added.
  • http/tests/cookies/same-site/resources/fetch-after-top-level-cross-origin-redirect.php: Removed.
  • http/tests/cookies/same-site/resources/fetch-after-top-level-cross-origin-redirect.py: Added.
  • http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-from-cross-origin-page.php: Removed.
  • http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-from-cross-origin-page.py: Added.
  • http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.php: Removed.
  • http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.py: Added.
  • http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.php: Removed.
  • http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.py: Added.
  • http/tests/cookies/same-site/resources/fetch-in-same-origin-service-worker.php: Removed.
  • http/tests/cookies/same-site/resources/fetch-in-same-origin-service-worker.py: Added.
  • http/tests/cookies/same-site/resources/post-from-popup.html:
  • http/tests/cookies/same-site/set-first-party-cross-site-cookies.php:
  • http/tests/cookies/same-site/set-first-party-same-site-cookies.php:
  • http/tests/cookies/set-cookie-on-redirect.html:
  • http/tests/cookies/third-party-cookie-relaxing-expected.txt:
  • http/tests/plugins/resources/third-party-cookie-accept-policy-iframe.html:
  • http/tests/privateClickMeasurement/send-attribution-conversion-request.html:
  • http/tests/resourceLoadStatistics/delete-script-accessible-cookies.html:
  • http/tests/resourceLoadStatistics/exemptDomains/app-bound-domains-exempt-from-website-data-deletion-database.html:
  • http/tests/resourceLoadStatistics/exemptDomains/app-bound-domains-exempt-from-website-data-deletion.html:
  • http/tests/resourceLoadStatistics/operating-dates-all-but-cookies-not-removed-with-user-interaction-6-days-ago.html:
  • http/tests/resourceLoadStatistics/operating-dates-all-but-cookies-removed-with-user-interaction-7-days-ago.html:
  • http/tests/resourceLoadStatistics/operating-dates-all-website-data-removed.html:
  • http/tests/resourceLoadStatistics/resources/set-all-kinds-of-cookies.py:
  • http/tests/resourceLoadStatistics/resources/set-cookie-on-redirect.py:
  • http/tests/resourceLoadStatistics/resources/set-cookie.py:
  • http/tests/resourceLoadStatistics/standalone-web-application-exempt-from-website-data-deletion.html:
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html:
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-without-user-interaction.html:
  • http/tests/resources/init.py: Removed.
  • http/tests/resources/portabilityLayer.py:

(get_cookies):
(getState):

  • http/tests/security/cookies/third-party-cookie-blocking-redirect.html:
  • http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party.html:
  • http/tests/websocket/tests/hybi/websocket-blocked-from-setting-cookie-as-third-party.html:
  • http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html:
  • http/tests/xmlhttprequest/access-control-preflight-credential-async-expected.txt:
  • http/tests/xmlhttprequest/access-control-preflight-credential-sync-expected.txt:
4:11 PM Changeset in webkit [275314] by eric.carlson@apple.com
  • 36 edits
    2 copies
    1 move in trunk

[macOS] MediaSessionCoordinator should have join and leave methods
https://bugs.webkit.org/show_bug.cgi?id=223955
<rdar://problem/76021588>

Reviewed by Jer Noble.
Source/WebCore:

Add 'join' and 'leave' methods to MediaSessionCoordinator so a page has to opt-in
to participating in a coordinated session and can leave at any time. Don't have
the coordinator automatically call session methods when the private coordinator
finishes, just signal the promise and let the page handle it.

No new tests, updated media/media-session/mock-coordinator.html.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/mediasession/MediaMetadata.idl: Fix Conditional.
  • Modules/mediasession/MediaMetadataPlaylistMixin.idl: Ditto.
  • Modules/mediasession/MediaPositionState.h: Add logging template.

(WTF::LogArgument<WebCore::MediaPositionState>::toString):

  • Modules/mediasession/MediaSession.cpp:

(WebCore::MediaSession::MediaSession): Switch from beging a ContextDestructionObserver
to an ActiveDOMObject to the wrapper won't be collected while an event dispatch
is pending.
(WebCore::MediaSession::virtualHasPendingActivity const): Prevent collection while
event dispatch is pending.
(WebCore::MediaSession::setPositionState): Improve logging.
(WebCore::MediaPositionState::toJSONString const):

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

(WebCore::MediaSessionCoordinator::join): New.
(WebCore::MediaSessionCoordinator::leave): New.
(WebCore::MediaSessionCoordinator::seekTo): Reject unless state is 'joined'. Don't
call session method.
(WebCore::MediaSessionCoordinator::play): Ditto.
(WebCore::MediaSessionCoordinator::pause): Ditto.
(WebCore::MediaSessionCoordinator::setTrack): Ditto.
(WebCore::MediaSessionCoordinator::positionStateChanged):
(WebCore::MediaSessionCoordinator::playbackStateChanged):
(WebCore::MediaSessionCoordinator::readyStateChanged): Do nothing unless state is
'joined'. Improve logging.
(WebCore::MediaSessionCoordinator::seekSessionToTime): Ditto.
(WebCore::MediaSessionCoordinator::playSession): Ditto.
(WebCore::MediaSessionCoordinator::pauseSession): Ditto.
(WebCore::MediaSessionCoordinator::setSessionTrack): Ditto.

  • Modules/mediasession/MediaSessionCoordinator.h:

(WebCore::MediaSessionCoordinator::identifier const):
(WebCore::MediaSessionCoordinator::state const):

  • Modules/mediasession/MediaSessionCoordinator.idl:
  • Modules/mediasession/MediaSessionCoordinatorMixin.idl: Fix Conditional.
  • Modules/mediasession/MediaSessionCoordinatorPrivate.h: Declare new required methods.
  • Modules/mediasession/MediaSessionCoordinatorState.h: Define states.
  • Modules/mediasession/MediaSessionCoordinatorState.idl:
  • Modules/mediasession/MediaSessionPlaylistMixin.idl: Fix Conditional.
  • Sources.txt: Add JSMediaSessionCoordinatorState.cpp.
  • WebCore.xcodeproj/project.pbxproj:
  • testing/MockMediaSessionCoordinator.cpp:

(WebCore::MockMediaSessionCoordinator::join):
(WebCore::MockMediaSessionCoordinator::leave):
(WebCore::MockMediaSessionCoordinator::coordinatorStateChanged):

  • testing/MockMediaSessionCoordinator.h:

Source/WebKit:

  • UIProcess/Media/MediaSessionCoordinatorProxyPrivate.h: Renamed from Source/WebKit/UIProcess/Media/MediaSessionCoordinatorPrivateProxy.h.
  • UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp:

(WebKit::RemoteMediaSessionCoordinatorProxy::create):
(WebKit::RemoteMediaSessionCoordinatorProxy::RemoteMediaSessionCoordinatorProxy):
(WebKit::RemoteMediaSessionCoordinatorProxy::join):
(WebKit::RemoteMediaSessionCoordinatorProxy::leave):
(WebKit::RemoteMediaSessionCoordinatorProxy::coordinatorStateChanged):

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

(WebKit::WebPageProxy::createMediaSessionCoordinator):

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

(WebKit::RemoteMediaSessionCoordinator::create):
(WebKit::RemoteMediaSessionCoordinator::RemoteMediaSessionCoordinator):
(WebKit::RemoteMediaSessionCoordinator::join):
(WebKit::RemoteMediaSessionCoordinator::leave):
(WebKit::RemoteMediaSessionCoordinator::coordinatorStateChanged):

  • WebProcess/MediaSession/RemoteMediaSessionCoordinator.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::createMediaSessionCoordinator):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • UIProcess/Media/MediaSessionCoordinatorProxyPrivate.h: Renamed from Source/WebKit/UIProcess/Media/MediaSessionCoordinatorPrivateProxy.h.
  • UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp:

(WebKit::RemoteMediaSessionCoordinatorProxy::create):
(WebKit::RemoteMediaSessionCoordinatorProxy::RemoteMediaSessionCoordinatorProxy):
(WebKit::RemoteMediaSessionCoordinatorProxy::coordinatorStateChanged):

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

(WebKit::WebPageProxy::createMediaSessionCoordinator):

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

(WebKit::RemoteMediaSessionCoordinator::create):
(WebKit::RemoteMediaSessionCoordinator::RemoteMediaSessionCoordinator):
(WebKit::RemoteMediaSessionCoordinator::coordinatorStateChanged):

  • WebProcess/MediaSession/RemoteMediaSessionCoordinator.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::createMediaSessionCoordinator):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

LayoutTests:

  • media/media-session/mock-coordinator-expected.txt:
  • media/media-session/mock-coordinator.html:
4:05 PM Changeset in webkit [275313] by BJ Burg
  • 4 edits in trunk/Tools

Style checker should warn about use of future OS versions in WK_API_AVAILABLE
https://bugs.webkit.org/show_bug.cgi?id=223881

Reviewed by Jonathan Bedard.

Add some more brains to the WK_API_AVAILABLE style checker. It is now more
fussy and won't allow anything except a valid version string or a TBA macro.
There is also a mechanism to prevent adding version numbers that exceed the
publicly available SDK version for the relevant OS.

  • Scripts/webkitpy/common/version_name_map.py:

(VersionNameMap.mapping_for_platform): Add 'macos' as an alias for 'mac'.
(VersionNameMap.max_public_version): Added.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_arguments_for_wk_api_available):
(check_arguments_for_wk_api_available.max_version_for_platform):
(check_arguments_for_wk_api_available.check_version_string):
(check_style):
(check_min_versions_of_wk_api_available): Deleted.

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(WebKitStyleTest):

3:36 PM Changeset in webkit [275312] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Remove misleading FIXME comment in RenderBox::shouldComputeLogicalWidthFromAspectRatioAndInsets
https://bugs.webkit.org/show_bug.cgi?id=224020

Reviewed by Simon Fraser.

RenderStyle should not contain such logic (or any layout related logic for that matter).

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatioAndInsets const):

3:32 PM Changeset in webkit [275311] by Robert Jenner
  • 2 edits in trunk/LayoutTests/imported/w3c

REGRESSION (r275227): [ macOS iOS Release ] imported/w3c/web-platform-tests/css/css-transitions/properties-value-003.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=224006

Uneviewed test gardening.

Rebaseline test that started to consantly fail.

  • web-platform-tests/css/css-transitions/properties-value-003-expected.txt:
3:31 PM Changeset in webkit [275310] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Autocomplete experimental CSS Color values (hwb, lch, lab, color-mix, color-contrast)
https://bugs.webkit.org/show_bug.cgi?id=224010
<rdar://problem/76065217>

Reviewed by BJ Burg.

  • UserInterface/Models/CSSKeywordCompletions.js:
3:11 PM Changeset in webkit [275309] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION (r275227): [ macOS iOS Release ] imported/w3c/web-platform-tests/css/css-transitions/properties-value-003.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=224006

Uneviewed test gardening.

  • platform/mac/TestExpectations: Removed test expectations because EWS was not flagging this failure.
3:03 PM Changeset in webkit [275308] by Chris Lord
  • 3 edits in trunk/Source/WebCore

Make FontCache self-contained (remove static global variables)
https://bugs.webkit.org/show_bug.cgi?id=223995

Reviewed by Darin Adler.

This refactors FontCache so that the iOS font lock, the
FontPlatformDataCache, the FontDataCache, the FontVerticalDataCache,
the FontSelector clients list and the generation counter all live on
FontCache instead of in static global variables.

No new tests, no change in behavior.

  • platform/graphics/FontCache.cpp:

(WebCore::FontCache::FontCache):
(WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue const):
(WebCore::FontCache::getCachedFontPlatformData):
(WebCore::FontCache::verticalData):
(WebCore::FontCache::fontForPlatformData):
(WebCore::FontCache::purgeInactiveFontDataIfNeeded):
(WebCore::FontCache::purgeInactiveFontData):
(WebCore::FontCache::fontCount):
(WebCore::FontCache::inactiveFontCount):
(WebCore::FontCache::addClient):
(WebCore::FontCache::removeClient):
(WebCore::FontCache::invalidate):

  • platform/graphics/FontCache.h:

(WebCore::FontCache::generation const):

2:48 PM Changeset in webkit [275307] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

EWS should stress test newly added tests
https://bugs.webkit.org/show_bug.cgi?id=223938

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/config.json:
  • CISupport/ews-build/factories.py:

(Factory):
(StressTestFactory):

  • CISupport/ews-build/factories_unittest.py: Added unit-tests.
  • CISupport/ews-build/loadConfig.py:
2:45 PM Changeset in webkit [275306] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[iOS] Update a couple of icons in the file upload context menu
https://bugs.webkit.org/show_bug.cgi?id=224013
<rdar://problem/73234218>

Reviewed by Tim Horton.

Use updated symbols for the "Photo Library" and "Take Photo or Video" menu items.

  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel contextMenuInteraction:configurationForMenuAtLocation:]):

1:36 PM Changeset in webkit [275305] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r275150): set-webkit-configuration is too aggressive at deleting config files when switch is not set
<https://webkit.org/b/224009>

Reviewed by Mark Lam.

  • Scripts/set-webkit-configuration:
  • Partially revert changes in r275150 when the config file wasn't always deleted for $architecture, $configuration, $forceOptimizationLevel and $ltoMode.
1:32 PM Changeset in webkit [275304] by weinig@apple.com
  • 2 edits in trunk/Source/WTF

Ease experimentation by enabling <model> if SEPARATED_MODEL is being used
https://bugs.webkit.org/show_bug.cgi?id=224011

Reviewed by Tim Horton.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

There is little point to experimenting with SEPARATED_MODEL if <model> is disabled.

1:15 PM Changeset in webkit [275303] by weinig@apple.com
  • 9 edits
    2 moves
    1 add
    4 deletes in trunk/Source/WebCore

Merge DOMWindow+IndexedDatabase.idl and WorkerGlobalScope+IndexedDatabase.idl into a single WindowOrWorkerGlobalScope+IndexedDatabase.idl to match the IndexedDB spec
https://bugs.webkit.org/show_bug.cgi?id=223856

Reviewed by Sihui Liu.

Replaces DOMWindow+IndexedDatabase.idl and WorkerGlobalScope+IndexedDatabase.idl with
WindowOrWorkerGlobalScope+IndexedDatabase.idl which contains a partial mixin interface
like specified. Also moves implementations of supplements into the cpp file, as the only
use of them is by the two indexedDB static functions.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/indexeddb/DOMWindow+IndexedDatabase.idl: Removed.
  • Modules/indexeddb/DOMWindowIndexedDatabase.cpp: Removed.
  • Modules/indexeddb/DOMWindowIndexedDatabase.h: Removed.
  • Modules/indexeddb/WindowOrWorkerGlobalScope+IndexedDatabase.idl: Added.
  • Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.cpp: Added.

(WebCore::DOMWindowIndexedDatabase::supplementName):
(WebCore::WorkerGlobalScopeIndexedDatabase::supplementName):
(WebCore::WindowOrWorkerGlobalScopeIndexedDatabase::indexedDB):
(WebCore::DOMWindowIndexedDatabase::DOMWindowIndexedDatabase):
(WebCore::DOMWindowIndexedDatabase::from):
(WebCore::DOMWindowIndexedDatabase::indexedDB):
(WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
(WebCore::WorkerGlobalScopeIndexedDatabase::from):
(WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):

  • Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.h: Added.
  • Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl: Removed.
  • Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: Removed.
  • Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h: Removed.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMWindowCustom.cpp:
  • inspector/agents/InspectorIndexedDBAgent.cpp:
1:13 PM Changeset in webkit [275302] by Simon Fraser
  • 15 edits in trunk/Source

Assertions in DisplayUpdate when dragging WebView windows between screens with different refresh rates
https://bugs.webkit.org/show_bug.cgi?id=223984

Reviewed by Sam Weinig.

Source/WebCore:

There are various reasons why rigorous assertions in DisplayUpdate::relevantForUpdateFrequency()
are ill advised.

When WebKitLegacy calls windowScreenDidChange() it does not pass in a nominal display
refresh rate, so we assume 60fps. If the screen actually has a non-60fps refresh rate, then
we can get mixed 60/50 state in various places; this change fixes one of them, but such bugs
have to not result in assertions or divide by zero crashes in
DisplayUpdate::relevantForUpdateFrequency().

The second reason is webkit.org/b/212120; we may start DisplayRefreshMonitors with DisplayID
0 before we know what screen we're on, again risking a situation where the actual screen has
a non-60fps refresh rate.

To fix the case where no nominal refresh rate is passed through
Chrome::windowScreenDidChange(), allow a DisplayRefreshMonitor to supply a rate; often, a
DisplayRefreshMonitor can compute one from its knowledge of the display. This requires
DisplayRefreshMonitorManager is able to create a DisplayRefreshMonitor with no client, so
support that with a little refactoring.

Have some DisplayRefreshMonitor implementations supply their nominal display refresh rate
when known.

  • page/Chrome.cpp:

(WebCore::Chrome::windowScreenDidChange): No need to early return here; Page does the same check.

  • page/Page.cpp:

(WebCore::Page::windowScreenDidChange): Push the call to adjustRenderingUpdateFrequency() into
renderingUpdateScheduler().windowScreenDidChange() as suggested in a previous review.

  • page/RenderingUpdateScheduler.cpp:

(WebCore::RenderingUpdateScheduler::windowScreenDidChange):

  • platform/graphics/DisplayRefreshMonitor.h:

(WebCore::DisplayRefreshMonitor::displayNominalFramesPerSecond):

  • platform/graphics/DisplayRefreshMonitorManager.cpp:

(WebCore::DisplayRefreshMonitorManager::ensureMonitorForDisplayID):
(WebCore::DisplayRefreshMonitorManager::nominalFramesPerSecondForDisplay):
(WebCore::DisplayRefreshMonitorManager::monitorForClient):

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

(WebCore::DisplayUpdate::relevantForUpdateFrequency const):

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

(WebCore::DisplayRefreshMonitorIOS::displayNominalFramesPerSecond):

  • platform/graphics/mac/LegacyDisplayRefreshMonitorMac.cpp:

(WebCore::LegacyDisplayRefreshMonitorMac::ensureDisplayLink):
(WebCore::LegacyDisplayRefreshMonitorMac::startNotificationMechanism):
(WebCore::LegacyDisplayRefreshMonitorMac::displayNominalFramesPerSecond):

  • platform/graphics/mac/LegacyDisplayRefreshMonitorMac.h:

Source/WebKit:

RemoteLayerTreeDisplayRefreshMonitor knows its m_preferredFramesPerSecond so can
return that.

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm:

(WebKit::RemoteLayerTreeDisplayRefreshMonitor::displayNominalFramesPerSecond):

12:34 PM Changeset in webkit [275301] by sihui_liu@apple.com
  • 7 edits in trunk/Source

Add logging in IndexedDB to help debug flaky quota tests
https://bugs.webkit.org/show_bug.cgi?id=223578
<rdar://problem/75956789>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

With r274323, we know that the tests fail because of IndexedDB. IndexedDB data should be cleared between tests,
so let's add more logging to see what databases are left.

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::diskUsage):

  • Modules/indexeddb/server/IDBServer.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForDirectory):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::storageQuotaManager):

12:25 PM Changeset in webkit [275300] by youenn@apple.com
  • 5 edits
    2 adds in trunk

In case WebRTC VTB decoder returns a null frame, mark the decoder as failing
https://bugs.webkit.org/show_bug.cgi?id=223993
<rdar://problem/76049206>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

In case VTB does not return any pixel buffer, consider decoding is failing.
Set the error so that we we will send the error on the next frame we try to decode.

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.mm:

(decompressionOutputCallback):

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm:

(h265DecompressionOutputCallback):
(-[RTCVideoDecoderH265 setError:]):

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderVTBVP9.mm:

(vp9DecompressionOutputCallback):

LayoutTests:

  • http/wpt/webrtc/webrtc-late-transform-expected.txt: Added.
  • http/wpt/webrtc/webrtc-late-transform.html: Added.
11:45 AM Changeset in webkit [275299] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Missing exception check in HashMapImpl::add().
https://bugs.webkit.org/show_bug.cgi?id=224007
rdar://76053163

Reviewed by Saam Barati.

JSTests:

  • stress/missing-exception-check-in-HashMapImpl-add.js: Added.

Source/JavaScriptCore:

  • runtime/HashMapImpl.h:

(JSC::HashMapImpl::add):

11:37 AM Changeset in webkit [275298] by achristensen@apple.com
  • 8 edits in trunk

Add deprecation macros.

Source/WebCore:

  • platform/network/cf/CertificateInfoCFNet.cpp:

(WebCore::certificatesMatch):
(WebCore::CertificateInfo::certificateChainFromSecTrust):
(WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate const):

Source/WebKit:

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::encodeNSError):

  • UIProcess/Authentication/mac/WebCredentialMac.mm:

(WebKit::leafCertificate):
(WebKit::chain):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(verifyCertificateAndPublicKey):

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
11:33 AM Changeset in webkit [275297] by Wenson Hsieh
  • 7 edits
    1 add in trunk

WKContentView should support UIKit protocol methods for becoming focused
https://bugs.webkit.org/show_bug.cgi?id=224003
<rdar://problem/75313658>

Reviewed by Megan Gardner.

Source/WebKit:

Implement a few protocol methods on UIFocusEnvironment. See below for more details.

Test: UIFocusTests.OverrideCanBecomeFocused

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView canBecomeFocused]):

  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView canBecomeFocused]):
(-[WKContentView canBecomeFocusedForWebView]):

Implement -canBecomeFocused, and return YES by default. If -canBecomeFocused is overridden on WKWebView,
then defer to that overridden method instead.

(-[WKContentView didUpdateFocusInContext:withAnimationCoordinator:]):

Handle the focus environment change by advancing to the next or previous focusable element, depending on the
focus context's heading direction.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):

Add a null check so that callers that don't need to know when the focus change is complete are able to pass in a
nil completion handler.

Tools:

Add a test to verify that the vaue of -[WKContentView canBecomeFocused] can be overridden by subclassing
-[WKWebView canBecomeFocused].

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/UIFocusTests.mm: Added.

(-[UIFocusTestWKWebView canBecomeFocused]):

11:29 AM Changeset in webkit [275296] by graouts@webkit.org
  • 4 edits in trunk/Source

Remove CA_WHERE_ADDITIVE_TRANSFORMS_ARE_REVERSED
https://bugs.webkit.org/show_bug.cgi?id=224000

Reviewed by Simon Fraser.

Since trunk is no longer maintained on macOS versions earlier than 10.15,
we can remove this compile-time flag.

Source/WebCore:

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateAnimations):

Source/WTF:

  • wtf/PlatformHave.h:
11:14 AM Changeset in webkit [275295] by Chris Gambrell
  • 9 edits
    2 adds
    2 deletes in trunk/LayoutTests

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

Reviewed by Jonathan Bedard.

  • http/tests/download/default-encoding-expected.txt:
  • http/tests/download/default-encoding.html:
  • http/tests/download/inherited-encoding-expected.txt:
  • http/tests/download/inherited-encoding-form-submission-result-expected.txt:
  • http/tests/download/inherited-encoding-form-submission-result.html:
  • http/tests/download/inherited-encoding.html:
  • http/tests/download/literal-utf-8-expected.txt:
  • http/tests/download/literal-utf-8.html:
  • http/tests/download/resources/literal-koi8-r.php: Removed.
  • http/tests/download/resources/literal-koi8-r.py: Added.
  • http/tests/download/resources/literal-utf-8.php: Removed.
  • http/tests/download/resources/literal-utf-8.py: Added.
11:13 AM Changeset in webkit [275294] by youenn@apple.com
  • 4 edits in trunk/Source

Make use of NSURLSessionWebSocket.sendCloseCode if available
https://bugs.webkit.org/show_bug.cgi?id=223999

Reviewed by Alex Christensen.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

If available, we just call sendCloseCode, cancel will happen when NetworkSocketChannel is destroyed.
Covered by LayoutTests/http/tests/websocket/tests/hybi/client-close-2.html.

  • NetworkProcess/cocoa/WebSocketTaskCocoa.mm:

(WebKit::WebSocketTask::close):

10:49 AM Changeset in webkit [275293] by Patrick Angle
  • 2 edits in trunk/Source/WebCore

Web Inspector: CSS Grid overlay track sizes are incorrect when inline styles are applied to the element
https://bugs.webkit.org/show_bug.cgi?id=223908

Reviewed by BJ Burg.

Add checking the inline style attributes on an element when collecting authored track sizes for grid overlays.

  • inspector/InspectorOverlay.cpp:

(WebCore::authoredGridTrackSizes):

10:39 AM Changeset in webkit [275292] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.8.2

Tag Safari-612.1.8.2.

10:37 AM Changeset in webkit [275291] by Ruben Turcios
  • 8 edits in branches/safari-612.1.8-branch/Source

Versioning.

WebKit-7612.1.8.2

10:25 AM Changeset in webkit [275290] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add test for SOCKS5 proxy SPI
https://bugs.webkit.org/show_bug.cgi?id=223964

Patch by Alex Christensen <achristensen@webkit.org> on 2021-03-31
Reviewed by Sam Weinig.

  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:

(TestWebKitAPI::TEST):

10:21 AM Changeset in webkit [275289] by youenn@apple.com
  • 4 edits in trunk/Source/WebKit

Send WebSocket cocoa authentication challenge to AuthenticationManager
https://bugs.webkit.org/show_bug.cgi?id=223998

Reviewed by Alex Christensen.

In case of authentication challenge related to WebSocketTask, send it to the AuthenticationManager for evaluation.
Minor refactoring to reuse the same completion handler as for network data tasks.
Covered by LayoutTests/http/tests/websocket/tests/hybi/simple-wss.html with NSURLSessionWebSocket code path enabled.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost):
(WebKit::CompletionHandler<void):
(WebKit::NetworkSessionCocoa::continueDidReceiveChallenge):
(WebKit::NetworkSessionCocoa::createWebSocketTask):

  • NetworkProcess/cocoa/WebSocketTaskCocoa.h:

(WebKit::WebSocketTask::pageID const):
(WebKit::WebSocketTask::partition const):

  • NetworkProcess/cocoa/WebSocketTaskCocoa.mm:
10:15 AM Changeset in webkit [275288] by Chris Dumez
  • 12 edits in trunk/Source

ServiceWorkerContextData should not be saved both on ServiceWorkerThread & ServiceWorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=224001

Reviewed by Geoffrey Garen.

Source/WebCore:

ServiceWorkerContextData should not be saved both on ServiceWorkerThread & ServiceWorkerGlobalScope.
ServiceWorkerContextData contains script sources and may use a large amount of memory.

To address the issue, we now clear ServiceWorkerThread's context data once the ServiceWorkerGlobalScope
has been constructed.

  • inspector/agents/worker/ServiceWorkerAgent.cpp:

(WebCore::ServiceWorkerAgent::getInitializationInfo):

  • workers/service/ServiceWorkerGlobalScope.cpp:

(WebCore::ServiceWorkerGlobalScope::create):
(WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):

  • workers/service/ServiceWorkerGlobalScope.h:
  • workers/service/context/SWContextManager.cpp:

(WebCore::SWContextManager::registerServiceWorkerThreadForInstall):

  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::ServiceWorkerThread):
(WebCore::ServiceWorkerThread::createWorkerGlobalScope):
(WebCore::ServiceWorkerThread::heartBeatTimerFired):
(WebCore::ServiceWorkerThread::finishedFiringInstallEvent):

  • workers/service/context/ServiceWorkerThread.h:

(WebCore::ServiceWorkerThread::identifier const):
(WebCore::ServiceWorkerThread::jobDataIdentifier const):
(WebCore::ServiceWorkerThread::contextData const): Deleted.

  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):

  • workers/service/context/ServiceWorkerThreadProxy.h:

Source/WebKit:

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::installServiceWorker):

  • WebProcess/Storage/WebSWContextManagerConnection.h:
10:10 AM Changeset in webkit [275287] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Add build step to run layout tests for multiple iterations in guard malloc mode
https://bugs.webkit.org/show_bug.cgi?id=224002

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(RunWebKitTests):
(RunWebKitTests.setLayoutTestCommand):
(RunWebKitTestsInStressGuardmallocMode):

  • CISupport/ews-build/steps_unittest.py:
10:06 AM Changeset in webkit [275286] by Russell Epstein
  • 4 edits in branches/safari-612.1.9-branch/Source/WebKit/FeatureFlags

Unreviewed build fix after r275246.

Conflict markers in source.

9:15 AM Changeset in webkit [275285] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Remove warnings about unnecessary operator= for ARMv7Assembler LinkRecord
https://bugs.webkit.org/show_bug.cgi?id=223916

Patch by Xan Lopez <Xan Lopez> on 2021-03-31
Reviewed by Darin Adler.

Many years ago we defined an assignment operator for LinkRecord in
order to speed up build times (see #90930). Recent GCC versions
tell us that if we do that we almost certainly want to define a
copy constructor too. The ARM64Assembler file already does it, so
do it too for ARMv7 to remove the warnings.

  • assembler/ARM64Assembler.h:
  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::LinkRecord::LinkRecord):
(JSC::ARMv7Assembler::LinkRecord::operator=):

9:10 AM Changeset in webkit [275284] by Ruben Turcios
  • 2 edits in branches/safari-612.1.9-branch/Source/WebKit

Cherry-pick r275248. rdar://problem/76054448

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:

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

9:10 AM Changeset in webkit [275283] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Add build step to run layout tests for multiple iterations
https://bugs.webkit.org/show_bug.cgi?id=223950

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(RunWebKitTestsInStressMode):
(RunWebKitTestsInStressMode.setLayoutTestCommand):
(RunWebKitTestsInStressMode.evaluateCommand):

  • CISupport/ews-build/steps_unittest.py: Added unit-tests.
9:03 AM Changeset in webkit [275282] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Add a fast-cq mode for commit-queue which will skip build and test
https://bugs.webkit.org/show_bug.cgi?id=223954

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py: Enable fast-cq mode when patch name on bugzilla starts with [fast-cq].

(BugzillaMixin):
(BugzillaMixin._is_patch_obsolete):
(CompileWebKit.doStepIf): Skip building on commit-queue when fast_commit_queue property is set.
(RunWebKitTests.doStepIf): Skip testing on commit-queue when fast_commit_queue property is set.

  • CISupport/ews-build/steps_unittest.py:
8:52 AM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
8:40 AM Changeset in webkit [275281] by graouts@webkit.org
  • 8 edits in trunk

font-stretch should support 0% and disallow animating to a value below 0%
https://bugs.webkit.org/show_bug.cgi?id=223994

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Mark 23 tests as PASS results.

  • web-platform-tests/css/css-fonts/animations/font-stretch-interpolation-expected.txt:
  • web-platform-tests/css/css-fonts/variations/at-font-face-descriptors-expected.txt:
  • web-platform-tests/css/css-fonts/variations/font-parse-numeric-stretch-style-weight-expected.txt:
  • web-platform-tests/css/css-fonts/variations/font-stretch-expected.txt:

Source/WebCore:

Trying to fix css/css-fonts/animations/font-stretch-interpolation.html showed two issues:

  1. we disallowed 0% as a valid value when parsing font-stretch,
  2. we allowed negative values when blending.

This patch addresses both.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::fontStretchIsWithinRange):

8:38 AM Changeset in webkit [275280] by graouts@webkit.org
  • 8 edits in trunk/Source/WebCore

Remove the Silently argument to WebAnimation::cancel()
https://bugs.webkit.org/show_bug.cgi?id=223992

Reviewed by Frédéric Wang.

The recent commit r275228 removed the use of the Silently argument in
AnimationTimeline::cancelDeclarativeAnimationsForStyleable(), which
was the only function that would eventually call into WebAnimation::cancel()
with a value other than the default, Silently::No.

So we remove that argument to WebAnimation::cancel(), its call sites and
WebAnimation::resetPendingTasks() which was called from it.

And since the Silently enum is no longer used outside of WebAnimation.cpp,
we move it to be private.

  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::elementWasRemoved):
(WebCore::AnimationTimeline::cancelDeclarativeAnimationsForStyleable):

  • animation/AnimationTimeline.h:
  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::cancel):

  • animation/DeclarativeAnimation.h:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::cancel):
(WebCore::WebAnimation::resetPendingTasks):

  • animation/WebAnimation.h:
  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::tearDownRenderers):

7:10 AM Changeset in webkit [275279] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Use :is() instead of :matches() on UA stylesheet
https://bugs.webkit.org/show_bug.cgi?id=223996

Reviewed by Antoine Quint.

Use the standard name.

  • css/html.css:

(:is(article, aside, nav, section) h1):
(:is(article, aside, nav, section) :is(article, aside, nav, section) h1):
(:is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) h1):
(:is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) h1):
(:is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) h1):
(#endif):
(#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY):
(input:is([type="hidden"], [type="image"], [type="file"])):
(input:is([type="radio"], [type="checkbox"])):
(input:is([type="button"], [type="submit"], [type="reset"])):
(input:is([type="button"], [type="submit"], [type="reset"]), input[type="file"]::file-selector-button, button):
(input:is([type="button"], [type="submit"], [type="reset"]):active, input[type="file"]::file-selector-button:active, button:active):
(input:is([type="button"], [type="submit"], [type="reset"]):active, input[type="file"]:active::file-selector-button, button:active):
(input:is([type="button"], [type="submit"], [type="reset"]):active:disabled,):
(input:is([type="button"], [type="submit"], [type="reset"]):disabled,):
(input:is([type="checkbox"], [type="radio"]):checked):
(input:is([type="checkbox"], [type="radio"]):disabled):
(input:is([type="checkbox"], [type="radio"]):checked:disabled):
(:matches(article, aside, nav, section) h1): Deleted.
(:matches(article, aside, nav, section) :matches(article, aside, nav, section) h1): Deleted.
(:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1): Deleted.
(:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1): Deleted.
(:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1): Deleted.
(input:matches([type="hidden"], [type="image"], [type="file"])): Deleted.
(input:matches([type="radio"], [type="checkbox"])): Deleted.
(input:matches([type="button"], [type="submit"], [type="reset"])): Deleted.
(input:matches([type="button"], [type="submit"], [type="reset"]), input[type="file"]::file-selector-button, button): Deleted.
(input:matches([type="button"], [type="submit"], [type="reset"]):active, input[type="file"]::file-selector-button:active, button:active): Deleted.
(input:matches([type="button"], [type="submit"], [type="reset"]):active, input[type="file"]:active::file-selector-button, button:active): Deleted.
(input:matches([type="button"], [type="submit"], [type="reset"]):active:disabled,): Deleted.
(input:matches([type="button"], [type="submit"], [type="reset"]):disabled,): Deleted.
(input:matches([type="checkbox"], [type="radio"]):checked): Deleted.
(input:matches([type="checkbox"], [type="radio"]):disabled): Deleted.
(input:matches([type="checkbox"], [type="radio"]):checked:disabled): Deleted.

6:40 AM Changeset in webkit [275278] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[RenderTreeBuilder] Do not merge anonymous table cells with mismatching children types
https://bugs.webkit.org/show_bug.cgi?id=223979
<rdar://76003320>

Reviewed by Antti Koivisto.

A table cell (as it establishes a block formatting context) should only contain either
inline or block level inflow boxes.

  • rendering/RenderElement.h:

(WebCore::RenderElement::firstInFlowChild const):
(WebCore::RenderElement::lastInFlowChild const):

  • rendering/RenderObject.h:

(WebCore::RenderObject::isInFlow const):
(WebCore::RenderObject::previousInFlowSibling const):
(WebCore::RenderObject::nextInFlowSibling const):

  • rendering/updating/RenderTreeBuilderTable.cpp:

(WebCore::canCollapseNextSibling):
(WebCore::RenderTreeBuilder::Table::collapseAndDetachAnonymousNextSibling):

5:16 AM Changeset in webkit [275277] by Antti Koivisto
  • 4 edits
    2 adds in trunk

Animated pseudo element style resolved against wrong parent style
https://bugs.webkit.org/show_bug.cgi?id=223990
rdar://74997361

Reviewed by Antoine Quint.
Source/WebCore:

In createAnimatedElementUpdate we get the parent and parent box styles from the parent stack.
This is wrong for pseudo elements. Their parent style should the host style which is not pushed to the stack.

This matters in style adjuster which may apply wrong adjustments as a result.

Test: fast/animation/pseudo-element-style-adjuster.html

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::resolvePseudoStyle):
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

Make static and provide the parent and parent box styles as parameters.

  • style/StyleTreeResolver.h:

LayoutTests:

  • fast/animation/pseudo-element-style-adjuster-expected.html: Added.
  • fast/animation/pseudo-element-style-adjuster.html: Added.
4:16 AM Changeset in webkit [275276] by youenn@apple.com
  • 9 edits in trunk

Apply permission policy to geolocation
https://bugs.webkit.org/show_bug.cgi?id=223248

Reviewed by Eric Carlson.

Source/WebCore:

Only allow third-party iframes if allowed by permission policy,
following https://w3c.github.io/geolocation-api/#permissions-policy.
Covered by API tests.

  • Modules/geolocation/Geolocation.cpp:

(WebCore::Geolocation::shouldBlockGeolocationRequests):

  • html/FeaturePolicy.cpp:

(WebCore::policyTypeName):
(WebCore::FeaturePolicy::parse):
(WebCore::FeaturePolicy::allows const):

  • html/FeaturePolicy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:

(-[GeolocationDelegateNew setValidationHandler:]):
(-[GeolocationDelegateNew _webView:requestGeolocationPermissionForOrigin:initiatedByFrame:decisionHandler:]):
(-[GeolocationPermissionMessageHandler userContentController:didReceiveScriptMessage:]):

LayoutTests:

  • http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition-expected.txt:
  • http/tests/security/sandboxed-iframe-geolocation-watchPosition-expected.txt:
4:11 AM Changeset in webkit [275275] by commit-queue@webkit.org
  • 12 edits
    2 adds in trunk/Source

[WebRTC][GStreamer] Build and use the openh264 based encoder if present on the system
https://bugs.webkit.org/show_bug.cgi?id=202538

Patch by Thibault Saunier <tsaunier@igalia.com> and Philippe Normand <pnormand@igalia.com> on 2021-03-31
Reviewed by Xabier Rodriguez-Calvar and Adrian Perez de Castro.

Source/ThirdParty/libwebrtc:

In WPE/GTK we would like to have the libwebrtc openh264 encoder enabled if libopenh264 is
present on the host (eg not vendored).

  • CMakeLists.txt:
  • Source/webrtc/modules/video_coding/codecs/h264/h264.cc:
  • Source/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc:
  • Source/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h:

Source/WebCore:

Enable the openh264 encoder if it is available, it would be preferred over existing
GStreamer H.264 encoders in such case.

  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:

(WebCore::GStreamerVideoEncoder::AddCodecIfSupported):
(WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder):

1:41 AM Changeset in webkit [275274] by clopez@igalia.com
  • 4 edits in trunk/LayoutTests

REGRESSION(r274244): [GTK][WPE] Two http/tests/security/contentSecurityPolicy tests crash
https://bugs.webkit.org/show_bug.cgi?id=223978

Reviewed by Philippe Normand.

Apache not longer sends a Content-Length header with the cgi/python version of this tests,
but it used chunked transfer encoding.
It seems this confuses libsoup causing a critical event.
Add an empty \r\n at the end of the test to indicate that the server has finished sending
the data.

  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy.py:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy.py:
1:30 AM Changeset in webkit [275273] by graouts@webkit.org
  • 6 edits in trunk

Computed style for a border-radius corner should never be 0px when the provided width isn't 0px
https://bugs.webkit.org/show_bug.cgi?id=223927

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark 5 tests as PASS results as a result of returning the correct computed style for
"border-top-left-radius: 40px 0px". This is importing a change made to WPT via
https://github.com/web-platform-tests/wpt/pull/28310.

  • web-platform-tests/css/css-backgrounds/animations/border-radius-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/parsing/border-radius-computed-expected.txt:
  • web-platform-tests/css/css-backgrounds/parsing/border-radius-computed.html:

Source/WebCore:

If "border-top-left-radius: 40px 0px" is provided, the computed style would return "0px" since
BuilderConverter::convertRadius() would treat either of the dimensions for the radius being 0
as both being 0.

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertRadius):

12:44 AM Changeset in webkit [275272] by graouts@webkit.org
  • 8 edits in trunk

Fix interpolation of box-shadow and text-shadow CSS properties
https://bugs.webkit.org/show_bug.cgi?id=223924

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark all interpolation tests for box-shadow and text-shadow as PASS results.

  • web-platform-tests/css/css-backgrounds/animations/box-shadow-composition-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt:
  • web-platform-tests/css/css-transitions/animations/text-shadow-composition-expected.txt:
  • web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt:

Source/WebCore:

There were three issues with interpolation of ShadowData-backed properties such
as box-shadow and text-shadow:

  1. the blur radius should not be allowed to be negative,
  2. blending LayoutUnit had accuracy issues,
  3. we would allow interpolation to happen when items in lists did not have matching shadow styles ("inset" vs. unspecified).
  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

  • platform/animation/AnimationUtilities.h:

(WebCore::blend):

12:21 AM Changeset in webkit [275271] by Alexey Shvayka
  • 22 edits
    5 adds in trunk

Optimize constructors of ES6 collections
https://bugs.webkit.org/show_bug.cgi?id=223953

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/map-constructor.js:
  • microbenchmarks/set-constructor.js: Added.
  • microbenchmarks/weak-map-constructor.js: Added.
  • microbenchmarks/weak-set-constructor.js: Added.
  • stress/map-constructor-adder.js:
  • stress/set-constructor-adder.js:
  • stress/weak-map-constructor-adder-error-cross-realm.js: Added.
  • stress/weak-map-constructor-adder.js:
  • stress/weak-set-constructor-adder-error-cross-realm.js: Added.
  • stress/weak-set-constructor-adder.js:
  • stress/weak-set-constructor.js:

Source/JavaScriptCore:

This patch speeds up the constructors by avoiding call() for non-observable
"set" / "add" methods and using getIndex() for Map / WeakMap collections.

For Map / Set, this change leverages existing cloning helpers, which rely on
watchpoints, to avoid even a method lookup. However, slower path is used for
subclasses. Results in 1.9x speed-up for common case.

For WeakMap / WeakSet, adder function is checked by C++ pointer, which enables
fast path even for cross-realm subclasses. Results in 2.3x progression.

Both approaches require special handling of a cross-realm NewTarget to ensure
that raised exceptions (OOM / TypeError) belong to realm of the adder function,
and not to constructor's or NewTarget's.

Also, adds descriptve error messages for non-callable "set" / "add" properties.

  • runtime/JSMap.cpp:

(JSC::JSMap::isSetFastAndNonObservable):
(JSC::JSMap::canCloneFastAndNonObservable): Deleted.

  • runtime/JSMap.h:
  • runtime/JSSet.cpp:

(JSC::JSSet::isAddFastAndNonObservable):
(JSC::JSSet::canCloneFastAndNonObservable): Deleted.

  • runtime/JSSet.h:
  • runtime/MapConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/SetConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/WeakMapConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/WeakMapPrototype.cpp:

(JSC::WeakMapPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/WeakMapPrototype.h:
  • runtime/WeakSetConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/WeakSetPrototype.cpp:

(JSC::WeakSetPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/WeakSetPrototype.h:

LayoutTests:

  • js/dom/basic-weakset-expected.txt:

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 <kpiddington@apple.com> 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.