Timeline



Mar 22, 2022:

11:47 PM Changeset in webkit [291737] by Ben Nham
  • 19 edits
    1 copy
    3 adds in trunk

Only show notification permission prompt on transient activation
https://bugs.webkit.org/show_bug.cgi?id=238188

Reviewed by Youenn Fablet.

Source/WebCore:

In r291427, we changed Notification.requestPermission and PushManager.subscribe to only show
a permission prompt when processing a user gesture. This ended up being too restrictive and
causes compatibility problems with some large sites.

Instead, match Chrome and Firefox by allowing these prompts after a transient activiation,
i.e. a user gesture within the past second.

Per Maciej's suggestion, we also consume the activation to help combat prompt spam.

Covered by new and existing layout tests.

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::requestPermission):

  • Modules/push-api/PushManager.cpp:

(WebCore::PushManager::subscribe):

Tools:

Add an internal API denyWebNotificationPermissionOnPrompt to WebKitTestRunner that allows a
notification permission prompt to first be displayed and then rejected. This differs from
the existing denyNotificationPermission call, which denied notification permissions before
prompting.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::denyWebNotificationPermission):
(WTR::TestRunner::denyWebNotificationPermissionOnPrompt):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::originUserVisibleName):
(WTR::TestController::denyNotificationPermissionOnPrompt):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::decidePolicyForNotificationPermissionRequest):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Add test cases to make sure that showing a permission prompt consumes a user gesture.

  • http/tests/notifications/notification-request-permission-no-callback.html:
  • http/tests/notifications/notification-request-permission.html:
  • http/tests/notifications/request-consumes-activation-expected.txt: Added.
  • http/tests/notifications/request-consumes-activation.html: Added.
  • http/tests/push-api/resources/subscribe-tests.js:

(async testDocumentSubscribeWithUserGesture):
(async testDocumentSubscribeWithoutUserGesture):
(async testDocumentSubscribeImpl):

  • http/tests/push-api/subscribe-deny-permissions-expected.txt:
  • http/tests/push-api/subscribe-deny-permissions-on-prompt-expected.txt:
  • http/tests/push-api/subscribe-deny-permissions-on-prompt.html: Added.
  • http/tests/push-api/subscribe-deny-permissions.html:
  • platform/gtk/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
11:45 PM Changeset in webkit [291736] by ysuzuki@apple.com
  • 17 edits in trunk

[JSC] Test DFG / FTL DataIC
https://bugs.webkit.org/show_bug.cgi?id=231224

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/deltablue-varargs.js:
  • microbenchmarks/richards-try-catch.js:

Source/JavaScriptCore:

This patch revives DataIC in DFG and FTL, and re-enable testing to make it usable
for unlinked DFG. Currently, only x64 / ARM64 are supported.

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::isCacheableArrayLength):
(JSC::InlineAccess::isCacheableStringLength):
(JSC::InlineAccess::rewireStubAsJumpInAccess):
(JSC::InlineAccess::resetStubAsJumpInAccess):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetById):
(JSC::DFG::SpeculativeJIT::compileGetByIdFlush):
(JSC::DFG::SpeculativeJIT::compileInById):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::cachedPutById):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • jit/JITCode.h:

(JSC::JITCode::useDataIC):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITByIdGenerator::generateFastCommon):
(JSC::generateGetByIdInlineAccess):
(JSC::JITGetByIdGenerator::generateFastPath):
(JSC::JITGetByIdWithThisGenerator::generateFastPath):
(JSC::generatePutByIdInlineAccess):
(JSC::JITPutByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITPutByIdGenerator::generateFastPath):
(JSC::JITDelByValGenerator::generateFastPath):
(JSC::JITDelByIdGenerator::generateFastPath):
(JSC::JITInByValGenerator::generateFastPath):
(JSC::generateInByIdInlineAccess):
(JSC::JITInByIdGenerator::generateFastPath):
(JSC::JITInByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITInstanceOfGenerator::generateFastPath):
(JSC::JITGetByValGenerator::generateFastPath):
(JSC::JITPutByValGenerator::generateFastPath):
(JSC::JITPrivateBrandAccessGenerator::generateFastPath):

  • jit/JITInlineCacheGenerator.h:

(JSC::JITInlineCacheGenerator::reportSlowPathCall):
(JSC::JITInlineCacheGenerator::slowPathBegin const):
(JSC::JITByIdGenerator::slowPathJump const):
(JSC::JITInByValGenerator::slowPathJump const):

  • runtime/Options.cpp:

(JSC::Options::recomputeDependentOptions):

  • runtime/OptionsList.h:

Tools:

  • Scripts/run-jsc-stress-tests:
10:26 PM Changeset in webkit [291735] by achristensen@apple.com
  • 19 edits
    1 add in trunk

Implement PCM to SKAdNetwork bridge
https://bugs.webkit.org/show_bug.cgi?id=237969
<rdar://82988054>

Reviewed by John Wilander.

Source/WebCore:

When clicking on an app store link that has been decorated with the necessary PCM attributes,
we give information about the click to SKAdNetwork to send an anonymous attribution report later
if the user buys the app because of the click. That part has not been implemented yet, so to test
we simply report the information that we are giving to SKAdNetwork in an API test which uses an HTTPS
proxy so we don't actually connect to apps.apple.com when running the test.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::attributionDestinationURLForPCM const):
(WebCore::HTMLAnchorElement::mainDocumentRegistrableDomainForPCM const):
(WebCore::HTMLAnchorElement::attributionSourceNonceForPCM const):
(WebCore::HTMLAnchorElement::parsePrivateClickMeasurementForSKAdNetwork const):
(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):
(WebCore::HTMLAnchorElement::handleClick):

  • html/HTMLAnchorElement.h:
  • loader/PrivateClickMeasurement.cpp:

(WebCore::PrivateClickMeasurement::appStoreURLAdamID):

  • loader/PrivateClickMeasurement.h:

(WebCore::PrivateClickMeasurement::adamID const):
(WebCore::PrivateClickMeasurement::setAdamID):
(WebCore::PrivateClickMeasurement::encode const):
(WebCore::PrivateClickMeasurement::decode):

Source/WebKit:

The WebKit parts of this just introduce a new information flow to SKAdNetwork to send the app purchase attribution
kind of like WebKit sends a PCM attribution report 24-48 hours after a non-app-purchase click with attribution.

  • Configurations/WebKit.xcconfig:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::storePrivateClickMeasurement):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::donateToSKAdNetwork):

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

(WebKit::NetworkSessionCocoa::donateToSKAdNetwork):

  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Scripts/process-entitlements.sh:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):

  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

9:25 PM Changeset in webkit [291734] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

Add a few more WEBCORE_EXPORT macros
https://bugs.webkit.org/show_bug.cgi?id=238214

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-22
Reviewed by Eric Carlson.

These are needed to successfully link when building with -fsanitize=fuzzer,address

  • dom/Document.h:
  • html/HTMLCollection.h:
  • html/HTMLOptionsCollection.h:
  • platform/Pasteboard.h:
  • platform/mediastream/mac/CoreAudioCaptureSource.h:
7:06 PM Changeset in webkit [291733] by Simon Fraser
  • 14 edits
    1 add in trunk/Source/WebKit

Swap all RemoteLayerBackingStore buffers in a single IPC
https://bugs.webkit.org/show_bug.cgi?id=238210

Reviewed by Tim Horton.

PrepareBuffersForDisplay is a sync IPC (since we need the result before painting), and sync
IPC per-layer has performance impact. So group all the swapping into a single IPC with the
GPU Process.

The PrepareBuffersForDisplay message now takes a vector of
PrepareBackingStoreBuffersInputData, and returns a vector of
PrepareBackingStoreBuffersOutputData. Swapped buffers are applied to the
RemoteLayerBackingStore as before, with a minor change in the place that setNeedsDisplay()
is called in the case where we need a full display.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::prepareBuffersForDisplay):
(WebKit::RemoteRenderingBackend::prepareLayerBuffersForDisplay):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:
  • Scripts/webkit/messages.py:

(headers_for_type):

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::applySwappedBuffers):
(WebKit::RemoteLayerBackingStore::performDelegatedLayerDisplay):
(WebKit::RemoteLayerBackingStore::prepareToDisplay):
(WebKit::RemoteLayerBackingStore::ensureFrontBuffer):
(WebKit::RemoteLayerBackingStore::prepareBuffers):
(WebKit::operator<<): Deleted.

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:

(WebKit::RemoteLayerBackingStoreCollection::prepareBackingStoreBuffers): Deleted.

  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm:

(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::prepareBackingStoresForDisplay):
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::prepareBackingStoreBuffers): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/PrepareBackingStoreBuffersData.h: Added.

(WebKit::PrepareBackingStoreBuffersInputData::encode const):
(WebKit::PrepareBackingStoreBuffersInputData::decode):
(WebKit::PrepareBackingStoreBuffersOutputData::encode const):
(WebKit::PrepareBackingStoreBuffersOutputData::decode):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::prepareBuffersForDisplay):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
6:39 PM Changeset in webkit [291732] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (248499@main): [iOS] ASSERTION FAILED: Completion handler should always be called under WebKit::NetworkProcess::prepareToSuspend()
https://bugs.webkit.org/show_bug.cgi?id=238234
<rdar://problem/90665237>

Reviewed by Chris Dumez.

Invoke completion handler on early return.

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::suspend):

6:27 PM Changeset in webkit [291731] by Chris Dumez
  • 5 edits in trunk/Source

Use ASCIILiteral in a few more places where it is useful
https://bugs.webkit.org/show_bug.cgi?id=238235

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::toStringSlow):

Source/WebCore:

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::setValueCommon):

  • platform/animation/TimingFunction.cpp:

(WebCore::TimingFunction::cssText const):

5:58 PM Changeset in webkit [291730] by Chris Dumez
  • 6 edits in trunk/Source

Add URL::stringWithoutFragmentIdentifier() overload which returns a String instead of a StringView
https://bugs.webkit.org/show_bug.cgi?id=238221

Reviewed by Geoffrey Garen.

Source/WebCore:

  • page/History.cpp:

(WebCore::History::stateObjectAdded):

  • platform/network/BlobRegistryImpl.cpp:

(WebCore::BlobRegistryImpl::getBlobDataFromURL const):
(WebCore::BlobRegistryImpl::registerBlobURLHandle):
(WebCore::BlobRegistryImpl::unregisterBlobURLHandle):
(WebCore::blobURLWithoutFragment): Deleted.

Source/WTF:

  • wtf/URL.cpp:

(WTF::URL::viewWithoutQueryOrFragmentIdentifier const):
(WTF::URL::viewWithoutFragmentIdentifier const):
(WTF::URL::stringWithoutFragmentIdentifier const):
(WTF::equalIgnoringFragmentIdentifier):
(WTF::URL::stringWithoutQueryOrFragmentIdentifier const): Deleted.

  • wtf/URL.h:
5:19 PM Changeset in webkit [291729] by Patrick Angle
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Elements tab: selection variable not displayed after losing focus
https://bugs.webkit.org/show_bug.cgi?id=238226

Reviewed by Devin Rousso.

When rebuilding the underlying DOMTreeElements, we should make sure the inspected node is marked as such,
otherwise we won't update this until a different element becomes the inspected node.

  • UserInterface/Views/DOMTreeOutline.js:

(WI.DOMTreeOutline.prototype.update):

5:11 PM Changeset in webkit [291728] by Megan Gardner
  • 2 edits in trunk/Source/WebKit

Expand autocorrect context for more accurate results.
https://bugs.webkit.org/show_bug.cgi?id=237990
rdar://87353381

Expand autocorrect context to at least 10 words instead of 3, and with a min/max length of 40/100 instead of 12/30
and start context at the beginning of sentences to help with having more accurate autocorrect suggestions.

Reviewed by Tim Horton.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::autocorrectionContext):

5:00 PM Changeset in webkit [291727] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Expose the AX tree of PDFs loaded via iframes on the Mac
https://bugs.webkit.org/show_bug.cgi?id=238168

Patch by Tyler Wilcock <Tyler Wilcock> on 2022-03-22
Reviewed by Chris Fleizach.

  • accessibility/mac/iframe-pdf-expected.txt: Added.
  • accessibility/mac/iframe-pdf.html: Added.
  • platform/mac-wk1/TestExpectations:

Skip new test as it always times out in WK1 (similar to
accessibility/mac/basic-embed-pdf-accessibility.html)

4:53 PM Changeset in webkit [291726] by sihui_liu@apple.com
  • 6 edits in trunk

Check if origin can access storage in Storage API
https://bugs.webkit.org/show_bug.cgi?id=238158

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/opaque-origin.https.window-expected.txt:
  • web-platform-tests/storage/opaque-origin.https.window-expected.txt:

Source/WebCore:

According to spec https://storage.spec.whatwg.org/#obtain-a-storage-key, origin should not access Storage API if
it's opaque. Also, origin should not access storage if it's blocked by storage policy, so we use
SecurityOrigin::canAccessStorage to perform the origin check, like what we do for the other storage APIs.

Updated expectation for imported tests.

  • Modules/storage/StorageManager.cpp:

(WebCore::connectionInfo):

  • page/SecurityOrigin.h:

(WebCore::SecurityOrigin::canAccessStorageManager const):

4:46 PM Changeset in webkit [291725] by Alan Bujtas
  • 3 edits
    1 move in trunk/Source/WebCore

[IFC][Integration] Rename InlineIteratorLine.cpp to InlineIteratorLineBox.cpp
https://bugs.webkit.org/show_bug.cgi?id=238219

Unreviewed.

r291548 should have included this rename.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/integration/InlineIteratorLineBox.cpp: Renamed from Source/WebCore/layout/integration/InlineIteratorLine.cpp.

(WebCore::InlineIterator::LineBoxIterator::LineBoxIterator):
(WebCore::InlineIterator::LineBoxIterator::atEnd const):
(WebCore::InlineIterator::LineBoxIterator::traverseNext):
(WebCore::InlineIterator::LineBoxIterator::traversePrevious):
(WebCore::InlineIterator::LineBoxIterator::operator== const):
(WebCore::InlineIterator::firstLineBoxFor):
(WebCore::InlineIterator::lastLineBoxFor):
(WebCore::InlineIterator::LineBox::next const):
(WebCore::InlineIterator::LineBox::previous const):
(WebCore::InlineIterator::LineBox::firstLeafBox const):
(WebCore::InlineIterator::LineBox::lastLeafBox const):
(WebCore::InlineIterator::closestBoxForHorizontalPosition):

4:37 PM Changeset in webkit [291724] by Tyler Wilcock
  • 4 edits
    2 adds in trunk

Expose the AX tree of PDFs loaded via iframes on the Mac
https://bugs.webkit.org/show_bug.cgi?id=238168

Reviewed by Chris Fleizach.

Source/WebKit:

Given this markup:

<iframe src="/path/to/paystub.pdf">

An accessibility tree is built for paystub.pdf, but we don't expose it
to AX clients, making the PDF entirely inaccessible.

This happens because we were setting the AX parent to be the webpage
for full-frame PDF plugins (which an iframe with this markup is).
This behavior is correct only for main-frame (i.e. not iframe)
full-frame plugins, so this patch adds an extra condition to that logic.

Test: accessibility/mac/iframe-pdf.html

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::PDFPlugin):

LayoutTests:

  • accessibility/mac/iframe-pdf-expected.txt: Added.
  • accessibility/mac/iframe-pdf.html: Added.
  • platform/mac-wk1/TestExpectations:

Skip new test as it always times out in WK1 (similar to
accessibility/mac/basic-embed-pdf-accessibility.html)

4:25 PM Changeset in webkit [291723] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[macOS WK2] LayoutTest webaudio/silent-audio-interrupted-in-background.html is a flaky timeout on older OSes (El Capitan / Sierra) (172201)
https://bugs.webkit.org/show_bug.cgi?id=172201

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:24 PM Changeset in webkit [291722] by Russell Epstein
  • 1 copy in tags/Safari-614.1.6.2

Tag Safari-614.1.6.2.

4:22 PM Changeset in webkit [291721] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ EWS iOS ] fast/text/emoji-num-glyphs.html is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=238233

Unreviewed test gardening.

  • platform/ios/TestExpectations:
4:19 PM Changeset in webkit [291720] by Russell Epstein
  • 6 edits in branches/safari-614.1.6-branch/Source/WebKit

Cherry-pick r291691. rdar://problem/90654598

Prefer WK_EXTERN to WK_EXPORT in Cocoa API headers
https://bugs.webkit.org/show_bug.cgi?id=238129

Reviewed by Wenson Hsieh.

  • UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h:
  • UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
  • UIProcess/API/Cocoa/_WKElementAction.h:
  • UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h: WK_EXPORT comes from WKDeclarationSpecifiers.h, which is a legacy C SPI header. WK_EXTERN comes from WKFoundation.h, part of the modern public API. We should prefer the modern version in Cocoa-only headers (even in private headers).

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

4:13 PM Changeset in webkit [291719] by Kocsen Chung
  • 1 copy in tags/Safari-611.3.10.1.16

Tag Safari-611.3.10.1.16.

4:09 PM Changeset in webkit [291718] by Kocsen Chung
  • 1 copy in tags/Safari-609.4.1.1.1

Tag Safari-609.4.1.1.1.

4:01 PM Changeset in webkit [291717] by Russell Epstein
  • 9 edits in branches/safari-614.1.6-branch/Source

Versioning.

WebKit-7614.1.6.2

4:00 PM Changeset in webkit [291716] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Do not re-prompt configuration options during setup
https://bugs.webkit.org/show_bug.cgi?id=237571
<rdar://problem/89940351>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:

(Setup.git): Skip already configured options by default.
(Setup.parser): Add option to re-prompt for previously configured options.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:

Canonical link: https://commits.webkit.org/248753@main

3:34 PM Changeset in webkit [291715] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ EWS iOS ] imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-050.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=238229

Unreviewed test gardening.

  • platform/ios/TestExpectations:
3:34 PM Changeset in webkit [291714] by Russell Epstein
  • 2 edits in branches/safari-614.1.7-branch/Source/ThirdParty/libwebrtc

Cherry-pick r291713. rdar://problem/90604028

REGRESSION(r291455): libwebrtc has the wrong install name when using override frameworks directory
https://bugs.webkit.org/show_bug.cgi?id=238212
rdar://90604028

Reviewed by Alexey Proskuryakov.

r291455 introduced a default definition of DYLIB_INSTALL_NAME_BASE for non-macOS platforms that
stays defined as /S/L/PF/WebCore.framework/Frameworks. This explicit definition (rather than
falling back to the build system default of $INSTALL_PATH) is fine for those platforms but
clashes with the macOS definition of this variable when building with an override frameworks path:

DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(DYLIB_INSTALL_NAME_BASE);

Because of the new default definition of DYLIB_INSTALL_NAME_BASE, the semantics of this line
were changed from "use the install path as the install name when there's an override frameworks
directory" to "use /S/L/PF/WebCore.frameworks/Frameworks as the install name when there's an
override frameworks directory", which completely bypasses the point of the *override* directory.

Resolve this by redefining DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_YES to explicitly
use the INSTALL_PATH as the base of the install name, which was the original intent before
r291455 changed the behavior of falling back to DYLIB_INSTALL_NAME_BASE.

  • Configurations/libwebrtc.xcconfig:

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

3:28 PM Changeset in webkit [291713] by david_quesada@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

REGRESSION(r291455): libwebrtc has the wrong install name when using override frameworks directory
https://bugs.webkit.org/show_bug.cgi?id=238212
rdar://90604028

Reviewed by Alexey Proskuryakov.

r291455 introduced a default definition of DYLIB_INSTALL_NAME_BASE for non-macOS platforms that
stays defined as /S/L/PF/WebCore.framework/Frameworks. This explicit definition (rather than
falling back to the build system default of $INSTALL_PATH) is fine for those platforms but
clashes with the macOS definition of this variable when building with an override frameworks path:

DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(DYLIB_INSTALL_NAME_BASE);

Because of the new default definition of DYLIB_INSTALL_NAME_BASE, the semantics of this line
were changed from "use the install path as the install name when there's an override frameworks
directory" to "use /S/L/PF/WebCore.frameworks/Frameworks as the install name when there's an
override frameworks directory", which completely bypasses the point of the *override* directory.

Resolve this by redefining DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_YES to explicitly
use the INSTALL_PATH as the base of the install name, which was the original intent before
r291455 changed the behavior of falling back to DYLIB_INSTALL_NAME_BASE.

  • Configurations/libwebrtc.xcconfig:
3:22 PM Changeset in webkit [291712] by Patrick Angle
  • 5 edits in trunk

Source/WebInspectorUI:
Web Inspector: console.log format strings containing invalid specifiers results in [Object object] replacing the specifier instead of ignoring the invalid specifier
https://bugs.webkit.org/show_bug.cgi?id=235061

Reviewed by Devin Rousso.

Logged console messages previously allows an specifier, even invalid ones, to be replaced with values. We should
instead ignore the invalid specifier to match Firefox's behavior. (Chrome's behavior currently is to remove the
invalid specifier from the result without replacing it with the first next available substitution value.)

Other call sites using String.format are handling localized strings or other backend-provided strings that
should always be well-formatted, so falling back to handling a format specifier as a string is not a particularly
useful behavior.

  • UserInterface/Base/Utilities.js:

(value):

LayoutTests:
Web Inspector: console.log print strings contains '%_' result is Object
https://bugs.webkit.org/show_bug.cgi?id=235061

Reviewed by Devin Rousso.

  • inspector/unit-tests/string-utilities-expected.txt:
  • inspector/unit-tests/string-utilities.html:
3:18 PM Changeset in webkit [291711] by achristensen@apple.com
  • 24 edits in branches/safari-613-branch/Source

Fix build on safari-613-branch

Source/WebCore:

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::addToLine):

  • rendering/LegacyLineLayout.cpp:

(WebCore::repaintSelfPaintInlineBoxes):

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:
  • pal/spi/cocoa/AVFoundationSPI.h:

Source/WebKit:

Most of this is just merging most of https://github.com/WebKit/WebKit/commit/ecdbbe0b667c3231bbbf93ab3a5d4df29a6df985
for rdar://problem/89972004

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::createSocketChannel):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::transferToNewWebProcess):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::createWebSocketTask):

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/NetworkSocketChannel.cpp:

(WebKit::NetworkSocketChannel::create):
(WebKit::NetworkSocketChannel::NetworkSocketChannel):

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

(WebKit::NetworkSessionCocoa::createWebSocketTask):

  • NetworkProcess/soup/NetworkSessionSoup.cpp:

(WebKit::NetworkSessionSoup::createWebSocketTask):

  • NetworkProcess/soup/NetworkSessionSoup.h:
  • Shared/Cocoa/AuxiliaryProcessCocoa.mm:

(WebKit::handleAXPreferenceChange):

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::connect):

Source/WebKitLegacy/mac:

  • Plugins/WebBasePluginPackage.mm:

(-[WebBasePluginPackage isNativeLibraryData:]):

3:18 PM Changeset in webkit [291710] by Matteo Flores
  • 2 edits in trunk/LayoutTests

REGRESSION(r291523-r291501): [ iOS ] fast/dom/intersection-observer-document-leak.html is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=238227

Unreviewed test gardening.

  • platform/ios/TestExpectations:
3:04 PM Changeset in webkit [291709] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[iOS] editing/spelling/editing-word-with-marker-1.html causes the subsequent test to time out
https://bugs.webkit.org/show_bug.cgi?id=237812

Unreviewed test gardening.

  • platform/ios/TestExpectations:
2:52 PM Changeset in webkit [291708] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.16

Tag Safari-614.1.5.16.

2:51 PM Changeset in webkit [291707] by Russell Epstein
  • 6 edits in branches/safari-614.1.5-branch/Source

Revert r291458. rdar://problem/90655518

2:50 PM Changeset in webkit [291706] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ iOS ] fast/text/text-shadow-ink-overflow-missing.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=238211

Unreviewed test gardening.

  • platform/ios/TestExpectations:
2:47 PM Changeset in webkit [291705] by Matteo Flores
  • 2 edits in trunk/LayoutTests

Unreviewed, reverting r291679.

Expectation should be ImageOnlyFailure

Reverted changeset:

"[ iOS EWS ] fast/text/text-shadow-ink-overflow-missing.html
is a flaky image failure"
https://bugs.webkit.org/show_bug.cgi?id=238211
https://commits.webkit.org/r291679

2:27 PM Changeset in webkit [291704] by Robert Jenner
  • 2 edits in trunk/LayoutTests

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

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: Removing no longer needed test expectation.
2:16 PM Changeset in webkit [291703] by Robert Jenner
  • 2 edits
    5 adds in trunk/LayoutTests

[ BigSur+ ] imported/w3c/web-platform-t ests/media-source/mediasour ce-addsourcebuffer.html (layout-test) is consistently failing (221230)
https://bugs.webkit.org/show_bug.cgi?id=221230

Unreviewed test gardening. Rebaseline for test.

  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Added.
  • platform/mac-wk2/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Added.
  • platform/mac/TestExpectations: Removing old expectations.
2:15 PM Changeset in webkit [291702] by Cameron McCormack
  • 3 edits in trunk/LayoutTests

Disable remaining HEIC tests
https://bugs.webkit.org/show_bug.cgi?id=238191
<rdar://88980849>

Reviewed by Simon Fraser.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
2:11 PM Changeset in webkit [291701] by mmaxfield@apple.com
  • 7 edits in trunk/Source/WebGPU

[WebGPU] Allocating a buffer of size 0 crashes
https://bugs.webkit.org/show_bug.cgi?id=238165

Reviewed by Kimmo Kinnunen.

Metal requires buffer sizes to be > 0, but WebGPU allows for = 0.
This patch simply clamps all buffer sizes to 1. In the future, if this
causes performance problems, we could consider some more invasive change
where the MTLBuffer member of a WebGPU::Buffer is nil. But, for now,
just clamping the size to 1 is enough to get the test to stop crashing.

Test: api/validation/buffer/mapping.spec.ts. (We can't actually enable the test
until WebCore links with WebGPU.)

  • WebGPU/BindGroup.mm:

(WebGPU::Device::createBindGroup):

  • WebGPU/Buffer.mm:

(WebGPU::Device::safeCreateBuffer const):
(WebGPU::Device::createBuffer):

  • WebGPU/ComputePipeline.mm:
  • WebGPU/Device.h:
  • WebGPU/Instance.mm:

(wgpuGetProcAddress):

  • WebGPU/ShaderModule.mm:

(WebGPU::ShaderModule::createLibrary):

2:09 PM Changeset in webkit [291700] by Russell Epstein
  • 9 edits in branches/safari-614.1.5-branch/Source

Versioning.

WebKit-7614.1.5.16

2:09 PM Changeset in webkit [291699] by Fujii Hironori
  • 6 edits in trunk/Source

[WinCairo] RemoteGraphicsContextGL.h(78): error C2027: use of undefined type 'WebCore::GraphicsContextGL'
https://bugs.webkit.org/show_bug.cgi?id=238223

Unreviewed build fix.
r291610 renamed GraphicsContextGLTextureMapper to GraphicsContextGLTextureMapperANGLE.

Source/WebCore:

  • platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp:

(WebCore::TextureMapperGCGLPlatformLayer::TextureMapperGCGLPlatformLayer):

  • platform/graphics/texmap/TextureMapperGCGLPlatformLayer.h:

Source/WebKit:

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGLWin.cpp:

(WebKit::RemoteGraphicsContextGLWin::platformWorkQueueInitialize):

1:45 PM Changeset in webkit [291698] by Matteo Flores
  • 2 edits in trunk/LayoutTests

REGRESSION(r289402-r289376): [ Debug iOS ] webgl/1.0.3/conformance/uniforms/uniform-samplers-test.html is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=237694

Unreviewed test gardening.

  • platform/ios/TestExpectations:
1:38 PM Changeset in webkit [291697] by Robert Jenner
  • 1 edit
    4 adds in trunk/LayoutTests

imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html fails (221819)
https://bugs.webkit.org/show_bug.cgi?id=221819

Unreviewed test gardening. Re-baseline for wk1.

  • platform/mac-wk1/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest-expected.txt: Added.
1:37 PM Changeset in webkit [291696] by Said Abou-Hallawa
  • 19 edits in trunk/Source

[GPU Process] Make GraphicsContextState a class
https://bugs.webkit.org/show_bug.cgi?id=238192

Reviewed by Simon Fraser.

Source/WebCore:

This will make the members be private so we have to provide getters for
all of them. This change will prevent changing the members without going
through the setters.

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::GraphicsContext):

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::fillBrush const):
(WebCore::GraphicsContext::fillColor const):
(WebCore::GraphicsContext::fillGradient const):
(WebCore::GraphicsContext::fillGradientSpaceTransform const):
(WebCore::GraphicsContext::fillPattern const):
(WebCore::GraphicsContext::fillRule const):
(WebCore::GraphicsContext::strokeBrush const):
(WebCore::GraphicsContext::strokeColor const):
(WebCore::GraphicsContext::strokeGradient const):
(WebCore::GraphicsContext::strokeGradientSpaceTransform const):
(WebCore::GraphicsContext::strokePattern const):
(WebCore::GraphicsContext::strokeThickness const):
(WebCore::GraphicsContext::strokeStyle const):
(WebCore::GraphicsContext::dropShadow const):
(WebCore::GraphicsContext::compositeMode const):
(WebCore::GraphicsContext::alpha const):
(WebCore::GraphicsContext::textDrawingMode const):
(WebCore::GraphicsContext::imageInterpolationQuality const):
(WebCore::GraphicsContext::shouldAntialias const):
(WebCore::GraphicsContext::shouldSmoothFonts const):
(WebCore::GraphicsContext::shouldSubpixelQuantizeFonts const):
(WebCore::GraphicsContext::shadowsIgnoreTransforms const):
(WebCore::GraphicsContext::drawLuminanceMask const):
(WebCore::GraphicsContext::useDarkAppearance const):

  • platform/graphics/GraphicsContextState.cpp:

(WebCore::GraphicsContextState::GraphicsContextState):
(WebCore::GraphicsContextState::containsOnlyInlineChanges const):
(WebCore::GraphicsContextState::mergeChanges):
(WebCore::GraphicsContextState::didBeginTransparencyLayer):
(WebCore::GraphicsContextState::didEndTransparencyLayer):
(WebCore::GraphicsContextState::dump const):

  • platform/graphics/GraphicsContextState.h:

(WebCore::GraphicsContextState::GraphicsContextState):
(WebCore::GraphicsContextState::changes const):
(WebCore::GraphicsContextState::didApplyChanges):
(WebCore::GraphicsContextState::fillBrush const):
(WebCore::GraphicsContextState::setFillBrush):
(WebCore::GraphicsContextState::setFillColor):
(WebCore::GraphicsContextState::setFillGradient):
(WebCore::GraphicsContextState::setFillPattern):
(WebCore::GraphicsContextState::fillRule const):
(WebCore::GraphicsContextState::setFillRule):
(WebCore::GraphicsContextState::strokeBrush const):
(WebCore::GraphicsContextState::setStrokeBrush):
(WebCore::GraphicsContextState::setStrokeColor):
(WebCore::GraphicsContextState::setStrokeGradient):
(WebCore::GraphicsContextState::setStrokePattern):
(WebCore::GraphicsContextState::strokeThickness const):
(WebCore::GraphicsContextState::setStrokeThickness):
(WebCore::GraphicsContextState::strokeStyle const):
(WebCore::GraphicsContextState::setStrokeStyle):
(WebCore::GraphicsContextState::compositeMode const):
(WebCore::GraphicsContextState::setCompositeMode):
(WebCore::GraphicsContextState::dropShadow const):
(WebCore::GraphicsContextState::setDropShadow):
(WebCore::GraphicsContextState::alpha const):
(WebCore::GraphicsContextState::setAlpha):
(WebCore::GraphicsContextState::imageInterpolationQuality const):
(WebCore::GraphicsContextState::setImageInterpolationQuality):
(WebCore::GraphicsContextState::textDrawingMode const):
(WebCore::GraphicsContextState::setTextDrawingMode):
(WebCore::GraphicsContextState::shouldAntialias const):
(WebCore::GraphicsContextState::setShouldAntialias):
(WebCore::GraphicsContextState::shouldSmoothFonts const):
(WebCore::GraphicsContextState::setShouldSmoothFonts):
(WebCore::GraphicsContextState::shouldSubpixelQuantizeFonts const):
(WebCore::GraphicsContextState::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContextState::shadowsIgnoreTransforms const):
(WebCore::GraphicsContextState::setShadowsIgnoreTransforms):
(WebCore::GraphicsContextState::drawLuminanceMask const):
(WebCore::GraphicsContextState::setDrawLuminanceMask):
(WebCore::GraphicsContextState::useDarkAppearance const):
(WebCore::GraphicsContextState::setUseDarkAppearance):
(WebCore::GraphicsContextState::setProperty):
(WebCore::GraphicsContextState::encode const):
(WebCore::GraphicsContextState::decode):

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::FillSource::FillSource):
(WebCore::Cairo::StrokeSource::StrokeSource):
(WebCore::Cairo::ShadowState::ShadowState):

  • platform/graphics/cairo/FontCairo.cpp:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContextCairo::drawNativeImage):
(WebCore::GraphicsContextCairo::didUpdateState):
(WebCore::GraphicsContextCairo::drawGlyphs):

  • platform/graphics/cairo/ImageBufferCairoBackend.cpp:

(WebCore::ImageBufferCairoBackend::draw):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::coreInterpolationQuality):
(WebCore::GraphicsContextCG::GraphicsContextCG):
(WebCore::GraphicsContextCG::didUpdateState):
(WebCore::GraphicsContextCG::strokeRect):
(WebCore::GraphicsContextCG::canUseShadowBlur const):

  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::populateInternalState):
(WebCore::DrawGlyphsRecorder::populateInternalContext):

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::shouldDumpForFlags):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::endTransparencyLayer):

  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::applySetStateItem):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::didUpdateState):
(Nicosia::CairoOperationRecorder::fillRect):
(Nicosia::CairoOperationRecorder::fillRoundedRect):
(Nicosia::CairoOperationRecorder::drawGlyphs):
(Nicosia::CairoOperationRecorder::drawNativeImage):
(Nicosia::CairoOperationRecorder::drawRect):
(Nicosia::CairoOperationRecorder::drawLine):
(Nicosia::CairoOperationRecorder::drawLinesForText):
(Nicosia::CairoOperationRecorder::drawEllipse):

Source/WebKit:

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::setState):

  • Shared/cairo/ShareableBitmapCairo.cpp:

(WebKit::ShareableBitmap::paint):

  • WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:

(WebKit::convertCairoSurfaceToShareableBitmap):

1:33 PM Changeset in webkit [291695] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ iOS GPUP arm64 ] 5 webaudio/* are constant text failures since being unskipped.
https://bugs.webkit.org/show_bug.cgi?id=238220

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
1:24 PM Changeset in webkit [291694] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

REGRESSION(r288307): instanceof value wrong in MutationObserver callback for Safari extensions
https://bugs.webkit.org/show_bug.cgi?id=237912
<rdar://90333276>

Patch by Alexey Shvayka <ashvayka@apple.com> on 2022-03-22
Reviewed by Saam Barati.

ScriptExecutionContext::globalObject() returns stray global object if called on an object
that was created inside a Safari extension. I am unsure whether this is a bug, and if so,
how to promptly fix it, so this patch changes the way callback functions / interfaces
resolve lexical global object, which is used to create DOM wrappers.

Now they rely only on their JSCallbackData, which was proven to return correct
global object for Safari extensions.

For [IsWeakCallback] interfaces, liveness of the callback object is guaranteed
by the canInvokeCallback() check above.

No new tests: Safari extensions are covered in internal repo.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallbackImplementationContent):

  • bindings/scripts/test/JS/*: Updated.
1:17 PM Changeset in webkit [291693] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS Debug ] inspector/console/queryInstances.html is a flaky failure (215814)
https://bugs.webkit.org/show_bug.cgi?id=215814

Unreviewed test gardening.

  • platform/mac/TestExpectations: Removing no longer needed test expectation.
1:11 PM Changeset in webkit [291692] by Robert Jenner
  • 2 edits in trunk/LayoutTests

inspector/canvas/setRecordingAutoCaptureFrameCount.html is flaky failing (228011)
https://bugs.webkit.org/show_bug.cgi?id=228011

Unreviewed test gardening.

  • platform/mac/TestExpectations: Removing no longer needed test expectation.
1:03 PM Changeset in webkit [291691] by timothy_horton@apple.com
  • 6 edits in trunk/Source/WebKit

Prefer WK_EXTERN to WK_EXPORT in Cocoa API headers
https://bugs.webkit.org/show_bug.cgi?id=238129

Reviewed by Wenson Hsieh.

  • UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h:
  • UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
  • UIProcess/API/Cocoa/_WKElementAction.h:
  • UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:

WK_EXPORT comes from WKDeclarationSpecifiers.h, which is a legacy C SPI header.
WK_EXTERN comes from WKFoundation.h, part of the modern public API.
We should prefer the modern version in Cocoa-only headers (even in private headers).

12:54 PM Changeset in webkit [291690] by commit-queue@webkit.org
  • 9 edits
    2 deletes in trunk

Unreviewed, reverting r291546.
https://bugs.webkit.org/show_bug.cgi?id=238218

7% regression in Speedometer2/jQuery-TodoMVC

Reverted changeset:

"Fix CSS cascade regarding logical properties"
https://bugs.webkit.org/show_bug.cgi?id=236199
https://commits.webkit.org/r291546

12:51 PM Changeset in webkit [291689] by Chris Dumez
  • 6 edits
    2 adds in trunk

REGRESSION (iOS 15.1 / r280824) QuickLook - model not loading when passing extra parameters
https://bugs.webkit.org/show_bug.cgi?id=236069
<rdar://problem/88461772>

Reviewed by Darin Adler.

Source/WebCore:

To extend the lifetime of Blob objects while loading/downloading is pending, we rely to
BlobURLHandle objects, which tell the NetworkProcess that we still need this blob data,
even if the corresponding Blob object gets GC'd by JS. The issue here is that the load
was not using the vanilla blob URL but was intead appending a fragment to the URL. As
a result, BlobRegistryImpl::registerBlobURLHandle() would fail to look up the
corresponding blob data and would fail to extend its lifetime.

To address the issue, BlobRegistryImpl::registerBlobURLHandle() / unregisterBlobURLHandle()
now strip fragments from the blob URL, similarly to what was already done inside
BlobRegistryImpl::getBlobDataFromURL().

Test: fast/files/blob-with-fragment-as-frame-url.html

  • platform/network/BlobRegistryImpl.cpp:

(WebCore::blobURLWithoutFragment):
(WebCore::BlobRegistryImpl::registerBlobURLHandle):
(WebCore::BlobRegistryImpl::unregisterBlobURLHandle):

Source/WebKit:

Fix theoretical blob data leak. A WebContent process could create several BlobURLHandles for
the same blob URL. This would result in several calls to NetworkConnectionToWebProcess::registerBlobURLHandle()
for the same URL and several calls to to BlobRegistryImpl::registerBlobURLHandle() for the
same URL as well. BlobRegistryImpl is using a HashCountedSet for m_blobReferences in order
to deal with this fact. However, NetworkConnectionToWebProcess was using a simple HashSet
for m_blobURLHandles. As a result, if the WebContent process would exit and didClose()
would get called, the NetworkConnectionToWebProcess may call BlobRegistryImpl::unregisterBlobURLHandle()
only once even though the WebContent process had several handles for this URL, which would
not fully remove the URL from BlobRegistryImpl's HashCountedSet. To address the issue,
NetworkConnectionToWebProcess::m_blobURLHandles is now a HashCountedSet too and we call
BlobRegistryImpl::unregisterBlobURLHandle() as many times as needed in didClose().

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didClose):

  • NetworkProcess/NetworkConnectionToWebProcess.h:

LayoutTests:

Add layout test coverage.

  • fast/files/blob-with-fragment-as-frame-url-expected.txt: Added.
  • fast/files/blob-with-fragment-as-frame-url.html: Added.
12:45 PM Changeset in webkit [291688] by mmaxfield@apple.com
  • 5 edits in trunk/Source/WebGPU

[WebGPU] Implement Queue::writeBuffer()
https://bugs.webkit.org/show_bug.cgi?id=238194

Reviewed by Kimmo Kinnunen.

The semantics of writeBuffer() are that the data should be written, but specifically
at the current point in the queue. So, we can't just naively memcpy(), for 2 reasons:

  1. If the buffer is in-use, memcpy() will clobber its current contents, leading to

corruption. Instead, it's supposed to populate the buffer at the current point
in the queue, as-if it was a queue item.

  1. If the buffer is a private buffer, we can't memcpy() to it anyway

So, the implementation of this function first tries to see if we can memcpy(): if the
buffer is shared or managed, and if the queue is idle. If it can, then it does so, but
if it can't, it creates a temporary buffer and enqueues a queue command to copy the
contents of the temporary buffer into the destination buffer.

That copy command is part of a lazily created command buffer.

Test: api/validation/queue/writeBuffer.spec.ts

  • WebGPU/Buffer.h:

(WebGPU::Buffer::state const):

  • WebGPU/Device.h:

(WebGPU::Device::device const):

  • WebGPU/Queue.h:

(WebGPU::Queue::isIdle const):

  • WebGPU/Queue.mm:

(WebGPU::Queue::~Queue):
(WebGPU::Queue::ensureBlitCommandEncoder):
(WebGPU::Queue::finalizeBlitCommandEncoder):
(WebGPU::Queue::onSubmittedWorkDone):
(WebGPU::Queue::commitMTLCommandBuffer):
(WebGPU::Queue::submit):
(WebGPU::validateWriteBufferInitial):
(WebGPU::Queue::validateWriteBuffer const):
(WebGPU::Queue::writeBuffer):

12:04 PM Changeset in webkit [291687] by mmaxfield@apple.com
  • 48 edits in trunk/Source/WebGPU

[WebGPU] Remove the double pointer indirection in front of all objects
https://bugs.webkit.org/show_bug.cgi?id=238001

Reviewed by Kimmo Kinnunen.

Instead of doing

class Buffer {

...

};
struct WGPUBufferImpl {

Ref<Buffer> buffer;

}

we can instead do

struct WGPUBufferImpl {
};
struct Buffer : public WGPUBufferImpl {

...

};

so we don't have to do pointer chasing to interact with objects.

  • WebGPU/APIConversions.h:

(WebGPU::fromAPI):
(WebGPU::releaseToAPI):

  • WebGPU/Adapter.h:
  • WebGPU/Adapter.mm:

(wgpuAdapterRelease):
(wgpuAdapterRequestDevice):
(wgpuAdapterRequestDeviceWithBlock):

  • WebGPU/BindGroup.h:
  • WebGPU/BindGroup.mm:

(wgpuBindGroupRelease):

  • WebGPU/BindGroupLayout.h:
  • WebGPU/BindGroupLayout.mm:

(wgpuBindGroupLayoutRelease):

  • WebGPU/Buffer.h:
  • WebGPU/Buffer.mm:

(wgpuBufferRelease):

  • WebGPU/CommandBuffer.h:
  • WebGPU/CommandBuffer.mm:

(wgpuCommandBufferRelease):

  • WebGPU/CommandEncoder.h:
  • WebGPU/CommandEncoder.mm:

(wgpuCommandEncoderRelease):
(wgpuCommandEncoderBeginComputePass):
(wgpuCommandEncoderBeginRenderPass):
(wgpuCommandEncoderFinish):

  • WebGPU/ComputePassEncoder.h:
  • WebGPU/ComputePassEncoder.mm:

(wgpuComputePassEncoderRelease):

  • WebGPU/ComputePipeline.h:
  • WebGPU/ComputePipeline.mm:

(WebGPU::ComputePipeline::getBindGroupLayout):
(wgpuComputePipelineRelease):
(wgpuComputePipelineGetBindGroupLayout):

  • WebGPU/Device.h:
  • WebGPU/Device.mm:

(wgpuDeviceRelease):
(wgpuDeviceCreateBindGroup):
(wgpuDeviceCreateBindGroupLayout):
(wgpuDeviceCreateBuffer):
(wgpuDeviceCreateCommandEncoder):
(wgpuDeviceCreateComputePipeline):
(wgpuDeviceCreateComputePipelineAsync):
(wgpuDeviceCreateComputePipelineAsyncWithBlock):
(wgpuDeviceCreatePipelineLayout):
(wgpuDeviceCreateQuerySet):
(wgpuDeviceCreateRenderBundleEncoder):
(wgpuDeviceCreateRenderPipeline):
(wgpuDeviceCreateRenderPipelineAsync):
(wgpuDeviceCreateRenderPipelineAsyncWithBlock):
(wgpuDeviceCreateSampler):
(wgpuDeviceCreateShaderModule):
(wgpuDeviceCreateSwapChain):
(wgpuDeviceCreateTexture):
(wgpuDeviceGetQueue):

  • WebGPU/Instance.h:
  • WebGPU/Instance.mm:

(wgpuInstanceRelease):
(wgpuCreateInstance):
(wgpuInstanceCreateSurface):
(wgpuInstanceRequestAdapter):
(wgpuInstanceRequestAdapterWithBlock):

  • WebGPU/PipelineLayout.h:
  • WebGPU/PipelineLayout.mm:

(wgpuPipelineLayoutRelease):

  • WebGPU/QuerySet.h:
  • WebGPU/QuerySet.mm:

(wgpuQuerySetRelease):

  • WebGPU/Queue.h:
  • WebGPU/Queue.mm:

(wgpuQueueRelease):

  • WebGPU/RenderBundle.h:
  • WebGPU/RenderBundle.mm:

(wgpuRenderBundleRelease):

  • WebGPU/RenderBundleEncoder.h:
  • WebGPU/RenderBundleEncoder.mm:

(wgpuRenderBundleEncoderRelease):
(wgpuRenderBundleEncoderFinish):

  • WebGPU/RenderPassEncoder.h:
  • WebGPU/RenderPassEncoder.mm:

(wgpuRenderPassEncoderRelease):

  • WebGPU/RenderPipeline.h:
  • WebGPU/RenderPipeline.mm:

(WebGPU::RenderPipeline::getBindGroupLayout):
(wgpuRenderPipelineRelease):
(wgpuRenderPipelineGetBindGroupLayout):

  • WebGPU/Sampler.h:
  • WebGPU/Sampler.mm:

(wgpuSamplerRelease):

  • WebGPU/ShaderModule.h:
  • WebGPU/ShaderModule.mm:

(WebGPU::earlyCompileShaderModule):
(wgpuShaderModuleRelease):

  • WebGPU/Surface.h:
  • WebGPU/Surface.mm:

(wgpuSurfaceRelease):

  • WebGPU/SwapChain.h:
  • WebGPU/SwapChain.mm:

(WebGPU::SwapChain::getCurrentTextureView):
(wgpuSwapChainRelease):
(wgpuSwapChainGetCurrentTextureView):

  • WebGPU/Texture.h:
  • WebGPU/Texture.mm:

(wgpuTextureRelease):
(wgpuTextureCreateView):

  • WebGPU/TextureView.h:
  • WebGPU/TextureView.mm:

(wgpuTextureViewRelease):

11:58 AM Changeset in webkit [291686] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] Implement GPUBufferDescriptor.mappedAtCreation
https://bugs.webkit.org/show_bug.cgi?id=238190

Reviewed by Kimmo Kinnunen.

On Macs, we can use MTLStorageModeManaged to implement mappedAtCreation.
On non-Macs, all resources are shared, so they're already mapped.
This patch turned out to be surprisingly easy to write, because Metal has
already implemented all the heavy lifting.

Test: api/validation/buffer/mapping.spec.ts

  • WebGPU/Buffer.mm:

(WebGPU::storageMode):
(WebGPU::Device::createBuffer):
(WebGPU::Buffer::getMappedRange):
(WebGPU::Buffer::unmap):

11:54 AM Changeset in webkit [291685] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] Lifetime of CommandEncoder's internal MTLBlitCommandEncoder is not managed correctly
https://bugs.webkit.org/show_bug.cgi?id=238167

Reviewed by Kimmo Kinnunen.

We lazily create a MTLBlitCommandEncoder inside CommandEncoder to service a few various calls
which require one. Metal has some state tracking inside it, such that when objects are destroyed,
they have to be in the right state. This patch aligns WebGPU's state tracking and Metal's state
tracking.

Test: api/validation/encoding/programmable/pipeline_bind_group_compat.spec.ts

  • WebGPU/CommandEncoder.mm:

(WebGPU::CommandEncoder::~CommandEncoder):
(WebGPU::CommandEncoder::finalizeBlitCommandEncoder):

11:49 AM Changeset in webkit [291684] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

LibWebRTCCodecsProxy.mm and SharedVideoFrame.cpp do not need to be built as part of WebContent executable
https://bugs.webkit.org/show_bug.cgi?id=238002

Reviewed by Eric Carlson.

  • WebKit.xcodeproj/project.pbxproj:
11:37 AM Changeset in webkit [291683] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-614.1.7-branch

Cherry-pick r291629. rdar://problem/89495774

YouTube.com - Clicking anywhere on the progress bar pauses the video
https://bugs.webkit.org/show_bug.cgi?id=237750
<rdar://problem/90364846>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-unexpected-pause.html

When calling play() or pause() on a MediaPlayerPrivateMediaSourceAVFObjC, the object will
respond by calling m_player->playbackStateChanged(), which will in turn call
HTMLMediaElement::mediaPlayerPlaybackStateChanged() with the new state. However, HTMLMediaElement
expects this to be called only for unanticipated state changes, not expected state changes. And
when that method is called and the reported state does not match the element's own expected state,
the element calls its own play() or pause() function to update its own state to match the player's.
And because MediaPlayerPrivateMediaSourceAVFObjC calls this method on the next run loop, there is
an opportunity for those states to get out of sync, which happens when YouTube responds to a tap
in its timeline.

Remove the unnecessary "call on next run loop" behavior of …
play() and ::pause(). Also, remove the unnecessary notification that the play state has changed. In the future, this can be accomplished by adding a callback parameter to MediaPlayer::play() rather than relying on a state change notification.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playAtHostTime): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseAtHostTime):

LayoutTests:

  • media/media-source/media-source-unexpected-pause-expected.txt: Added.
  • media/media-source/media-source-unexpected-pause.html: Added.

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

11:37 AM Changeset in webkit [291682] by Russell Epstein
  • 6 edits in branches/safari-614.1.7-branch

Cherry-pick r291606. rdar://problem/89616625

Website policies are not respected when doing COOP based process swap
https://bugs.webkit.org/show_bug.cgi?id=238036
<rdar://89616625>

Reviewed by Chris Dumez.

Source/WebKit:

In case of normal process swap, we make use of website policies so everything is fine.
For COOP based process swap, this happens later on, at a point where we lost website policies.
To overcome this, we store the website policies used by a navigation inside the API::Navigation object.
It is used by continueNavigationInNewProcess to correctly initialize the new WebPage website policies.
We then set the website policies in the navigation object just before continuing the load in the same process,
as process swap may happen later when inspecting the response.
Minor refactoring in continueNavigationInNewProcess to get the policies directly from the given Navigation object.
Minor refactoring in receivedNavigationPolicyDecision to make the code doing process swap clearer.

Covered by API test.

  • UIProcess/API/APINavigation.h: (API::Navigation::setWebsitePoliciesForProcessSwap): (API::Navigation::takeWebsitePoliciesForProcessSwap):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedNavigationPolicyDecision): (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::continueNavigationInNewProcess): (WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation):
  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

11:27 AM Changeset in webkit [291681] by Alan Coon
  • 3 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r291598. rdar://problem/89972004

Adjust when _setPrivacyProxyFailClosedForUnreachableNonMainHosts is called
https://bugs.webkit.org/show_bug.cgi?id=237735

Reviewed by Geoff Garen.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): (WebKit::NetworkSessionCocoa::createWebSocketTask):

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

11:27 AM Changeset in webkit [291680] by Alan Coon
  • 19 edits in branches/safari-613-branch/Source

Cherry-pick r289134. rdar://problem/89972004

Remember whether cached main resources used private relay when considering whether to call _setPrivacyProxyFailClosed
https://bugs.webkit.org/show_bug.cgi?id=236125

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-04
Reviewed by Geoffrey Garen.

Source/WebCore:

Use an unused bit on disk to remember whether the response was originally received over private relay.
Also, instead of remembering on the main frame's DocumentLoader, remember on the WebProcess.
This makes it so if you enter the same URL twice, which loads from the MemoryCache from different WebCore::Pages, it still remembers.
If you load a different domain, it will load in a different WebProcess anyways, at which point you will not be using the same MemoryCache.

  • loader/DocumentLoader.h: (WebCore::DocumentLoader::setMainResourceWasPrivateRelayed): Deleted. (WebCore::DocumentLoader::mainResourceWasPrivateRelayed const): Deleted.

Source/WebKit:

  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::encode const): (WebKit::NetworkResourceLoadParameters::decode):
  • NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::retrieveCacheEntry): (WebKit::NetworkResourceLoader::didReceiveResponse): (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry): (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::makeEntry): (WebKit::NetworkCache::Cache::store): (WebKit::NetworkCache::Cache::update):
  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheEntry.cpp: (WebKit::NetworkCache::Entry::Entry): (WebKit::NetworkCache::Entry::encodeAsStorageRecord const): (WebKit::NetworkCache::Entry::decodeStorageRecord):
  • NetworkProcess/cache/NetworkCacheEntry.h: (WebKit::NetworkCache::Entry::privateRelayed const):
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: (WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse): (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cache/PrefetchCache.cpp: (WebKit::PrefetchCache::Entry::Entry): (WebKit::PrefetchCache::store):
  • NetworkProcess/cache/PrefetchCache.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
  • WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::addParametersShared):
  • WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didReceiveResponse):
  • WebProcess/WebProcess.h: (WebKit::WebProcess::setHadMainFrameMainResourcePrivateRelayed): (WebKit::WebProcess::hadMainFrameMainResourcePrivateRelayed const):

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

11:27 AM Changeset in webkit [291679] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ iOS EWS ] fast/text/text-shadow-ink-overflow-missing.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=238211

Unreviewed test gardening.

  • platform/ios/TestExpectations:
11:27 AM Changeset in webkit [291678] by Alan Coon
  • 40 edits
    1 add in branches/safari-613-branch/Source

Cherry-pick r289018. rdar://problem/89972004

This reverts r289843.

11:17 AM Changeset in webkit [291677] by pvollan@apple.com
  • 2 edits in trunk

REGRESSION(r291587): Unintentionally removed contributors change
https://bugs.webkit.org/show_bug.cgi?id=238204

Unreviewed, partial revert of r291587.

  • metadata/contributors.json:
10:57 AM Changeset in webkit [291676] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r291573. rdar://problem/89964344

[watchOS] Add required syscall
https://bugs.webkit.org/show_bug.cgi?id=238117
<rdar://89964344>

Reviewed by Brent Fulgham.

Add rarely used syscall on watchOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:

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

10:57 AM Changeset in webkit [291675] by Alan Coon
  • 3 edits in branches/safari-613-branch

Cherry-pick r291527. rdar://problem/88857731

Dialog element only animates once
https://bugs.webkit.org/show_bug.cgi?id=236274
rdar://88857731

Reviewed by Dean Jackson, Tim Nguyen and Antti Koivisto.

LayoutTests/imported/w3c:

Import relevant WPT tests that had already been upstreamed in a previous, reverted
version of this patch.

  • web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-animation.html: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
  • web-platform-tests/css/css-animations/support/testcommon.js: (addElement): (addDiv):

Source/WebCore:

Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
and its ::backdrop as the dialog is open and eventually re-opened.

The first issue was that we didn't clear all CSS Animations state when a <dialog> was
closed and its style was set to display: none. We now call setAnimationsCreatedByMarkup
to correctly clear such state both when we identify a Styleable is newly getting
display: none. We do the same when cancelDeclarativeAnimations() is called, but also
call setCSSAnimationList() on the associated effect stack since that wasn't done either.
Now both functions do similar cleanup.

This allows us to remove removeCSSAnimationCreatedByMarkup() which did a fair bit of work
to clear CSS Animation state per-animation when we only ever used that function for
_all_ animations.

The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
We now do that inside of Element::removeFromTopLayer() at a point where the code in
Styleable::fromRenderer() will still work as the element will still be contained in
Document::topLayerElements().

Finally, we need to be sure that calling Element::setAnimationsCreatedByMarkup() with an
empty list doesn't end up creating an ElementAnimationRareData object if there was no
pre-existing object and the list of animations are empty.

Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html

imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html

  • dom/Element.cpp: (WebCore::Element::removeFromTopLayer): (WebCore::Element::setAnimationsCreatedByMarkup):
  • style/Styleable.cpp: (WebCore::Styleable::cancelDeclarativeAnimations const): (WebCore::Styleable::updateCSSAnimations const): (WebCore::removeCSSAnimationCreatedByMarkup): Deleted.

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

10:57 AM Changeset in webkit [291674] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r291522. rdar://problem/90124325

Fix the build (hopefully)

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

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

10:57 AM Changeset in webkit [291673] by Alan Coon
  • 7 edits in branches/safari-613-branch

Cherry-pick r291518. rdar://problem/90124325

[Cocoa] Teach WebKit how to serialize CGColors
https://bugs.webkit.org/show_bug.cgi?id=238069
<rdar://problem/90124325>

Reviewed by Dean Jackson and Tim Horton.

Source/WebKit:

We have 2 ways of serializing Cocoa objects: NS type handling in ArgumentCodersCocoa.mm,
and CF type handling in ArgumentCodersCF.mm. CGColors are CF types, so this patch adds
direct support in ArgumentCodersCF to serialize them, by round-tripping them through
WebCore::Colors. However, NS containers (like font descriptor attribute dictionaries)
can contain CGColors, so this patch also teaches ArgumentCodersCocoa that there may be
CF types inside NS containers. If one is present, ArgumentCodersCocoa has to call into
ArgumentCodersCF to serialize it.

This patch doesn't add support for the reverse path, where an NS object is contained
within a CF container. I intentionally omitted implementing this because I wasn't sure
if it would be a layering violation; ArgumentCodersCococa.mm already #includes
ArgumentCodersCF.h, but ArgumentCodersCF.mm doesn't #include ArgumentCodersCocoa.h.
This path isn't actually necessary to solve my problem at hand, so someone else can
add support if necessary in the future. I also added a comment at the site where the
code would fail, describing what the problem is and a potential workaround.

This patch also adds support for our NSSecureCoding implementation for CGColors. This
is necessary because sometimes we want to serialize things like NSAttributedStrings,
which we don't have direct support for, so we use NSSecureCoding to serialize them
instead. NSAttributedStrings can contain fonts whose descriptor dictionaries contain
CGColors, so this path needs to work with CGColors too. Support is implemented using
NSKeyedArchiverDelegate and NSKeyedUnarchiverDelegate.

Test: IPCTestingAPI.CGColorInNSSecureCoding

The non-NSSecureCoding parts of this patch are tested by our regular LayoutTests
when DOM GPU Process rendering is enabled.

  • Shared/Cocoa/ArgumentCodersCocoa.mm: (-[WKSecureCodingArchivingDelegate archiver:willEncodeObject:]): (-[WKSecureCodingArchivingDelegate unarchiver:didDecodeObject:]): (-[WKSecureCodingCGColorWrapper wrappedColor]): (+[WKSecureCodingCGColorWrapper supportsSecureCoding]): (-[WKSecureCodingCGColorWrapper encodeWithCoder:]): (-[WKSecureCodingCGColorWrapper initWithCoder:]): (-[WKSecureCodingCGColorWrapper initWithCGColor:]): (IPC::typeFromObject): (IPC::decodeSecureCodingInternal): (IPC::encodeCFInternal): (IPC::decodeCFInternal): (IPC::encodeObject): (IPC::decodeObject):
  • Shared/cf/ArgumentCodersCF.cpp: (IPC::typeFromCFTypeRef): (IPC::ArgumentCoder<CFTypeRef>::encode): (IPC::ArgumentCoder<RetainPtr<CFTypeRef>>::decode): (IPC::ArgumentCoder<CGColorRef>::encode): (IPC::ArgumentCoder<RetainPtr<CGColorRef>>::decode):
  • Shared/cf/ArgumentCodersCF.h:

Tools:

  • Scripts/webkitpy/style/checkers/cpp.py:
  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:

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

10:57 AM Changeset in webkit [291672] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r291451. rdar://problem/89940620

[Apple Pay] REGRESSION(r283431): HAVE_PASSKIT_PAYMENT_METHOD_BILLING_ADDRESS was removed without also removing where it was used
https://bugs.webkit.org/show_bug.cgi?id=238056
<rdar://problem/89940620>

Reviewed by Tim Horton.

  • Modules/applepay/cocoa/PaymentMethodCocoa.mm: (WebCore::convert):

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

10:57 AM Changeset in webkit [291671] by Alan Coon
  • 4 edits
    2 adds in branches/safari-613-branch

Cherry-pick r291330. rdar://problem/90320701

REGRESSION (r282737): text-shadow is clipped
https://bugs.webkit.org/show_bug.cgi?id=237898
<rdar://problem/90320701>

Reviewed by Darin Adler.

Source/WebCore:

Inflate the ink overflow rect with the text shadow values (note that here, in the display builder we work with physical coordinates).

Test: fast/text/text-shadow-ink-overflow-missing.html

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp: (WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
  • rendering/style/RenderStyle.h: (WebCore::RenderStyle::getTextShadowHorizontalExtent const): (WebCore::RenderStyle::getTextShadowVerticalExtent const):

LayoutTests:

  • fast/text/text-shadow-ink-overflow-missing-expected.html: Added.
  • fast/text/text-shadow-ink-overflow-missing.html: Added.

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

10:57 AM Changeset in webkit [291670] by Alan Coon
  • 13 edits in branches/safari-613-branch/Source

Cherry-pick r291326. rdar://problem/85551863

Video poster disappears prematurely on play, leaving transparent video element.
https://bugs.webkit.org/show_bug.cgi?id=226960
<rdar://problem/79315114>

Reviewed by Jer Noble.

Source/WebCore:

If a media file has an enabled video track, don't advance readyState to
HAVE_ENOUGH_DATA until we have the first frame so we won't hide the poster image
until AVFoundation has something to render.

Tested manually.

  • html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::mediaPlayerFirstVideoFrameAvailable): Always log.
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Move the test for the first video frame above the player item status check. If a file has a video track, don't advance to HAVE_ENOUGH_DATA unless we have the first video frame.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Clear m_cachedHasEnabledVideo. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Remove unneeded local variable. (WebCore::MediaPlayerPrivateAVFoundationObjC::platformSetVisible): Minro cleanup. (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Set hasVideo if AVPlayerItem.hasEnabledVideo is true, because it remains stable while AVAssetTracks sometimes disappear and reappear. (WebCore::MediaPlayerPrivateAVFoundationObjC::firstFrameAvailableDidChange): Add logging. (WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledAudioDidChange): Ditto (WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledVideoDidChange): New, cache AVPlayerItem.hasEnabledVideo. (WebCore::itemKVOProperties): (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Respond to @"hasEnabledVideo".
  • platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h:

Source/WebKit:

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): Always log. (WebKit::MediaPlayerPrivateRemote::~MediaPlayerPrivateRemote): Ditto. (WebKit::MediaPlayerPrivateRemote::prepareForPlayback): Pass the player's content rect box to createVideoLayerRemote so it can be sized correctly even before it becomes visible. (WebKit::MediaPlayerPrivateRemote::firstVideoFrameAvailable): Always log. (WebKit::MediaPlayerPrivateRemote::renderingModeChanged): Ditto.
  • WebProcess/GPU/media/VideoLayerRemote.h:
  • WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm: (WebKit::createVideoLayerRemote): Set the new layer's frame so its children will be positioned correctly when the are made visible.

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

10:56 AM Changeset in webkit [291669] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r291324. rdar://problem/45607220

Crash under HTMLDocumentParser::didBeginYieldingParser()
https://bugs.webkit.org/show_bug.cgi?id=237930
<rdar://45607220>

Reviewed by Geoffrey Garen.

Add null pointer check.

No new tests, unable to reproduce.

  • html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::didBeginYieldingParser): (WebCore::HTMLDocumentParser::didEndYieldingParser):

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

10:56 AM Changeset in webkit [291668] by Alan Coon
  • 3 edits
    3 adds in branches/safari-613-branch

Cherry-pick r291303. rdar://problem/72432683

background-clip:text doesn't work with display:flex
https://bugs.webkit.org/show_bug.cgi?id=169125
<rdar://problem/72432683>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-backgrounds/background-clip/clip-text-flex-expected.html: Added.
  • web-platform-tests/css/css-backgrounds/background-clip/clip-text-flex-ref.html: Added.
  • web-platform-tests/css/css-backgrounds/background-clip/clip-text-flex.html: Added.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-backgrounds/background-clip/clip-text-flex.html

  • rendering/RenderElement.cpp: (WebCore::RenderElement::paintAsInlineBlock):

Flexbox children paint as inline blocks. This path didn't support text clip paint phase.

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

10:56 AM Changeset in webkit [291667] by Alan Coon
  • 5 edits
    4 adds in branches/safari-613-branch

Cherry-pick r291282. rdar://problem/88857731

Dialog element only animates once
https://bugs.webkit.org/show_bug.cgi?id=236274

Reviewed by Dean Jackson, Tim Nguyen and Antti Koivisto.

LayoutTests/imported/w3c:

Import relevant WPT tests that had already been upstreamed in a previous, reverted
version of this patch.

  • web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-animation.html: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
  • web-platform-tests/css/css-animations/support/testcommon.js: (addElement): (addDiv):

Source/WebCore:

Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
and its ::backdrop as the dialog is open and eventually re-opened.

The first issue was that we didn't clear all CSS Animations state when a <dialog> was
closed and its style was set to display: none. We now call setAnimationsCreatedByMarkup
to correctly clear such state both when we identify a Styleable is newly getting
display: none. We do the same when cancelDeclarativeAnimations() is called, but also
call setCSSAnimationList() on the associated effect stack since that wasn't done either.
Now both functions do similar cleanup.

This allows us to remove removeCSSAnimationCreatedByMarkup() which did a fair bit of work
to clear CSS Animation state per-animation when we only ever used that function for
_all_ animations.

The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
We now do that inside of Element::removeFromTopLayer() at a point where the code in
Styleable::fromRenderer() will still work as the element will still be contained in
Document::topLayerElements().

Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html

imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html

  • dom/Element.cpp: (WebCore::Element::removeFromTopLayer):
  • style/Styleable.cpp: (WebCore::Styleable::cancelDeclarativeAnimations const): (WebCore::Styleable::updateCSSAnimations const): (WebCore::removeCSSAnimationCreatedByMarkup): Deleted.

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

10:56 AM Changeset in webkit [291666] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/ThirdParty/ANGLE

Cherry-pick r291218. rdar://problem/89382320

REGRESSION (iOS 15.4 beta) - WebGL yields incorrect results when using preserveDrawingBuffer on iOS 15.4 Beta
https://bugs.webkit.org/show_bug.cgi?id=237113

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-14
Reviewed by Myles C. Maxfield.

Cherry-pick without tests conflicting tests.

Cherry-pick ANGLE commit: 74f3270214394c896154e4bf9338e7d75002de61
From: Gregg Tavares <Gregg Tavares>
Date: Thu, 3 Mar 2022 13:13:34 -0800
Subject: [PATCH] Metal: Fix for mulitsampled buffers losing their contents

Fixes tst included as well as WebGL CTS

https://www.khronos.org/registry/webgl/sdk/tests/conformance2/renderbuffers/multisample-draws-between-blits.html

Both fail on M1 without this fix.

Also fixes WebKit bug https://bugs.webkit.org/show_bug.cgi?id=237113

Bug: angleproject:7073

  • src/libANGLE/renderer/metal/FrameBufferMtl.mm: (rx::FramebufferMtl::setLoadStoreActionOnRenderPassFirstStart):

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

10:56 AM Changeset in webkit [291665] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/bmalloc

Cherry-pick r291199. rdar://problem/89984164

Unreviewed, ASan specific build fix
https://bugs.webkit.org/show_bug.cgi?id=237572

  • libpas/src/libpas/pas_utils.h: (pas_zero_memory):

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

10:56 AM Changeset in webkit [291664] by Alan Coon
  • 10 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r291182. rdar://problem/88226412

Delay responsiveness checks for the Network Process until it has finished initialization
https://bugs.webkit.org/show_bug.cgi?id=237782
<rdar://88226412>

Reviewed by Geoffrey Garen.

Delay responsiveness checks for the Network Process until it has finished initialization.
Network process initialization can be slow but we have evidence that it is not truly
hung since we see network process terminations right as the network process is initiating
the WebProcess connection later on.

  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess):
  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::didFinishLaunching): (WebKit::AuxiliaryProcessProxy::beginResponsivenessChecks): (WebKit::AuxiliaryProcessProxy::startResponsivenessTimer):
  • UIProcess/AuxiliaryProcessProxy.h:
  • UIProcess/GPU/GPUProcessProxy.cpp: (WebKit::GPUProcessProxy::didFinishLaunching):
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):
  • UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp: (WebKit::WebAuthnProcessProxy::didFinishLaunching):
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didFinishLaunching):

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

10:56 AM Changeset in webkit [291663] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r291175. rdar://problem/88549631

Fix WebContent jetsam that occurs when selecting text in a large e-mail
https://bugs.webkit.org/show_bug.cgi?id=237698

Reviewed by Simon Fraser.

When selecting text in a large e-mail in MobileMail, we often jetsam. This is due to this
chain of events:

  1. If the selection extends enough to start causing the content to pan (which is easy to do when zoomed in on the mail content), then AutoscrollController ends up changing the scroll position of the FrameView to perform the pan.
  2. FrameView::requestScrollPositionUpdate tries to prepopulate tiles around the endpoint of the pan by calling TileController::prepopulateRect with visibleContentRect's size.

The problem is that MobileMail resizes their web view (and therefore FrameView) to match
the size of the content. This causes FrameView's visibleContentRect to be very large (>100k
pts high for some emails). As a result, we end up prepopulating every single tile in the
email, causing a huge spike in IOSurface memory usage that leads to a jetsam.

To fix this, we make FrameView::requestScrollPositionUpdate act more like
RenderLayerCompositor::visibleRectForLayerFlushing. In particular, on iOS, we now use
exposedContentRect instead of visibleContentRect. Since exposedContentRect is derived from
contentOffset/contentSize of the scroll view in the UIProcess, it's more correct and is much
smaller than visibleContentRect in this case.

  • page/FrameView.cpp: (WebCore::FrameView::requestScrollPositionUpdate):

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

10:56 AM Changeset in webkit [291662] by Alan Coon
  • 6 edits
    3 adds in branches/safari-613-branch

Cherry-pick r291141. rdar://problem/90035071

Main document is leaking on haaretz.co.il due to lazy image loading
https://bugs.webkit.org/show_bug.cgi?id=237660
<rdar://problem/90035071>

Reviewed by Geoffrey Garen.

Source/WebCore:

When an HTML image uses loading=lazy, ImageLoader::updateFromElement() may get
called twice. If the image is outside the viewport, the first time ImageLoader::updateFromElement()
is called, we'll request a CachedImage but we'll set m_lazyImageLoadState to LazyImageLoadState::Deferred
and not ask the CachedImage to load. Then, later on, if the HTML image approaches the viewport,
ImageLoader::loadDeferredImage() will get called. It will set m_lazyImageLoadState to LazyImageLoadState::LoadImmediately
and call updateFromElement() again. This time however, updateFromElement() will actually ask the CachedImage
to load.

The issue was that the first time ImageLoader::updateFromElement(), we would set m_lazyImageLoadState to Deferred
and not ask the CachedImage to load but still set m_hasPendingLoadEvent to true. This is problematic if the CachedImage
is not already loaded since no was was started and thus no load event is coming (and no load event may ever come if the
image never approaches the viewport). When updatedHasPendingEvent() is called, it will protect the HTMLImageElement if
m_hasPendingLoadEvent is true, to make sure the image element stays alive long enough for us to dispatch the load event.
With lazy loading, this meant that we would protect the HTMLImageElement right away and undefinitely since no load event
may ever come. This meant that when navigating away from a page with images that are lazily loaded (and not loaded yet),
we would leak the HTMLImageElements (and ImageLoaders), which in turn would keep the Document alive too.

To address the issue, we now make sure that m_hasPendingLoadEvent is no longer set to true when updateFromElement()
is called but the CachedImage is not already loaded and not loading (lazy loading case). When updateFromElement() gets
called the second time (when the lazily loaded image approaches the viewport), we make sure that the m_hasPendingLoadEvent
flag gets set to true then.

Test: fast/dom/lazy-image-loading-document-leak.html

  • loader/ImageLoader.cpp: (WebCore::ImageLoader::ImageLoader): (WebCore::ImageLoader::updateFromElement): (WebCore::ImageLoader::didUpdateCachedImage): (WebCore::ImageLoader::didStartLoading):
  • loader/ImageLoader.h:
  • loader/cache/CachedImage.cpp: (WebCore::CachedImage::load):
  • loader/cache/CachedImageClient.h: (WebCore::CachedImageClient::didStartLoading):

LayoutTests:

Add layout test coverage.

  • fast/dom/lazy-image-loading-document-leak-expected.txt: Added.
  • fast/dom/lazy-image-loading-document-leak.html: Added.
  • fast/dom/resources/lazy-image-loading-document-leak-popup.html: Added.

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

10:56 AM Changeset in webkit [291661] by Alan Coon
  • 4 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r291127. rdar://problem/90050632

Document is leaking on haaretz.co.il due to an async script
https://bugs.webkit.org/show_bug.cgi?id=237672
<rdar://problem/90050632>

Reviewed by Geoffrey Garen.

I haven't been able to reproduce this in the context of a layout test, however,
I see the https://acdn.adnxs.com/dmp/async_usersync.html document flakily leaking
on haaretz.co.il due to an async script (sometimes the top document too).

From a memgraph, I can see that the cycle is:
HTMLDocument -> ScriptRunner -> PendingScript (via m_scriptsToExecuteSoon) -> HTMLScriptElement -> HTMLDocument (again)

To address the issue, I updated Document::commonTeardown() to clear all its ScriptRunner's pending scripts, right after
we stop all ActiveDOMObjects. At this point, we no longer want to run script and clearing any pending scripts is critical
since they hold a strong reference to the Document.

I have validated the fix on haaretz.co.il since I wasn't able to write an automated
test for this.

  • dom/Document.cpp: (WebCore::Document::commonTeardown):
  • dom/ScriptRunner.cpp: (WebCore::ScriptRunner::clearPendingScripts):
  • dom/ScriptRunner.h:

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

10:56 AM Changeset in webkit [291660] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/bmalloc

Cherry-pick r291097. rdar://problem/89116983

[libpas] We should gurantee that in-flux-stash is fully baked when pointing table is set
https://bugs.webkit.org/show_bug.cgi?id=237697
rdar://89116983

Reviewed by Mark Lam.

To support enumerating hashtable which can be in the middle of resizing, we have in-flux-stash: this
small stash is used to keep old table and size while resizing. However, Mark pointed that
pas_tiny_large_map_hashtable_for_each_entry_remote's assertion is firing, which is ensuring that table's
underlying pointer should be NULL when the size is 0. But in-flux-stash, we did not guarantee that
in-flux-stash data is consistent when it is exposed to the enumerator (when setting hashtable_being_resized).

This patch inserts pas_compiler_fence when exposing and unexposing in-flux-stash. pas_compiler_fence is
enough (pas_store_store_fence is not necessary) because pas_enumerator runs after suspending the process.
Thus, data structure's consistency between instruction boundary is enough.

  • libpas/src/libpas/pas_hashtable.h:

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

10:56 AM Changeset in webkit [291659] by Alan Coon
  • 5 edits
    3 adds in branches/safari-613-branch

Cherry-pick r291030. rdar://problem/89989815

IntersectionObserver is causing massive document leaks on haaretz.co.il
https://bugs.webkit.org/show_bug.cgi?id=237619
<rdar://problem/89989815>

Reviewed by Simon Fraser.

Source/WebCore:

On haaretz.co.il, many of the iframe documents (for Google ad frames) were leaking due to
IntersectionObserver. In particular, IntersectionObserver::isReachableFromOpaqueRoots()
was returning true because m_targetsWaitingForFirstObservation was non-empty. This indicates
that the IntersectionObserver is waiting for its first observation since that target was
added. However, the observation is not coming because we navigated away from the document.

To address the issue, I updated Document::commonTeardown() to disconnect all
IntersectionObservers (and the very similar ResizeObservers), right after stopping all
ActiveDOMObject.

Test: fast/dom/intersection-observer-document-leak.html

  • dom/Document.cpp: (WebCore::Document::commonTeardown):
  • dom/Document.h:
  • page/IntersectionObserver.cpp: (WebCore::IntersectionObserver::disconnect): No longer return early if hasObservationTargets() returns false. This is because

LayoutTests:

Add layout test coverage.

  • fast/dom/intersection-observer-document-leak-expected.txt: Added.
  • fast/dom/intersection-observer-document-leak.html: Added.
  • fast/dom/resources/intersection-observer-document-leak-popup.html: Added.

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

10:56 AM Changeset in webkit [291658] by Alan Coon
  • 5 edits
    2 adds in branches/safari-613-branch

Cherry-pick r291029. rdar://problem/88690874

[Cocoa] metadata cue endTime may not be updated
https://bugs.webkit.org/show_bug.cgi?id=237630
rdar://88690874

Reviewed by Jer Noble.

Source/WebCore:

Data cues have a start time but not an explicit duration, a data cue ends when
the next data cue from the same track starts. This means we don’t know the
duration of cue #1 until cue #2 is delivered, so when cue #1 is delivered it is
given the end time of the media file’s duration and the actual end time is updated
when cue #2 arrives.

http://webkit.org/b/229924 refactored text, audio, and video tracks to not depend
on HTMLMediaElement. Because InbandDataTextTrack could no longer access the
HTMLMediaElement to get its duration, a duration property was added to TextTrackList
that InbandDataTextTrack uses to set the duration of temporary cues.
TextTrackList.duration is set when it is created and updated when the media player
reports a duration change.

This means that if the media file’s duration is not known when the text track list
is created, and the file's duration never changes, the text track list never has a
valid duration and data cues were not added to the temporary list.

Fix this by updating TextTrackList.duration when a HTMLMediaElement reaches HAVE_METADATA.

Test: http/tests/media/hls/track-in-band-hls-metadata-cue-duration.html

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::durationChanged): Update m_textTracks.duration and post the 'durationchange' event. (WebCore::HTMLMediaElement::setReadyState): Call durationChanged. (WebCore::HTMLMediaElement::mediaPlayerDurationChanged): Ditto.
  • html/HTMLMediaElement.h:
  • html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): Add cues to the incomplete cue map even if the track list doesn't have duration.

LayoutTests:

  • http/tests/media/hls/track-in-band-hls-metadata-cue-duration-expected.txt: Added.
  • http/tests/media/hls/track-in-band-hls-metadata-cue-duration.html: Added.

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

10:56 AM Changeset in webkit [291657] by Alan Coon
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r291009. rdar://problem/89952347

AX: Speech Synthesis no longer returning list of voices in macOS 12.3
https://bugs.webkit.org/show_bug.cgi?id=237584
<rdar://problem/89952347>

Reviewed by Andres Gonzalez.

Source/WTF:

The minimum macOS version was meant to be 13 and above, but we started including 12.x releases inadvertently.

  • wtf/PlatformHave.h:

LayoutTests:

  • fast/speechsynthesis/voices-non-mock-expected.txt: Added.
  • fast/speechsynthesis/voices-non-mock.html: Added.

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

10:56 AM Changeset in webkit [291656] by Alan Coon
  • 13 edits in branches/safari-613-branch/Source/bmalloc

Cherry-pick r291007. rdar://problem/89984164

[libpas] Report more actionable crash in pas_enumerator
https://bugs.webkit.org/show_bug.cgi?id=237572

Reviewed by Saam Barati.

  1. Adds PAS_ASSERT_WITH_DETAIL, which can report more detailed crash information than PAS_ASSERT while it is not efficient as much as PAS_ASSERT. We use it only in pas_enumerator related code to report more actionable crash from these code. It is OK since pas_enumerator is not used usually, which will be used only when vmmap is attached.
  2. Extract enumerate_large_map, enumerate_small_large_map, and enumerate_tiny_large_map to report which part of these functions can crash (in very rare case).
  3. Ensure pas_thread_local_cache_create's thread_local_cache is exposed after setting up all the data.
  • libpas/src/libpas/pas_enumerable_range_list.c: (pas_enumerable_range_list_append): (pas_enumerable_range_list_iterate): (pas_enumerable_range_list_iterate_remote):
  • libpas/src/libpas/pas_enumerate_bitfit_heaps.c: (view_callback): (enumerate_bitfit_heap_callback):
  • libpas/src/libpas/pas_enumerate_initially_unaccounted_pages.c: (range_list_iterate_add_unaccounted_callback): (range_list_iterate_exclude_accounted_callback):
  • libpas/src/libpas/pas_enumerate_large_heaps.c: (range_list_iterate_add_large_payload_callback): (record_span): (large_map_hashtable_entry_callback): (small_large_map_hashtable_entry_callback): (tiny_large_map_hashtable_entry_callback): (enumerate_large_map): (enumerate_small_large_map): (enumerate_tiny_large_map): (pas_enumerate_large_heaps):
  • libpas/src/libpas/pas_enumerate_segregated_heaps.c: (local_allocator_map_entry_is_empty_or_deleted): (local_allocator_map_entry_is_empty): (local_allocator_map_entry_is_deleted): (collect_shared_page_directories_heap_callback): (enumerate_exclusive_view): (enumerate_shared_view): (enumerate_partial_view): (shared_page_directory_view_callback): (size_directory_view_callback): (consider_allocator): (pas_enumerate_segregated_heaps):
  • libpas/src/libpas/pas_enumerate_unaccounted_pages_as_meta.c: (pas_enumerate_unaccounted_pages_as_meta):
  • libpas/src/libpas/pas_enumerator.c: (pas_enumerator_create): (pas_enumerator_read_compact): (pas_enumerator_read): (pas_enumerator_add_unaccounted_pages): (pas_enumerator_exclude_accounted_page): (pas_enumerator_exclude_accounted_pages): (pas_enumerator_record): (pas_enumerator_record_page_payload_and_meta):
  • libpas/src/libpas/pas_enumerator.h: (pas_enumerator_record_kind_get_string):
  • libpas/src/libpas/pas_enumerator_region.c: (pas_enumerator_region_allocate):
  • libpas/src/libpas/pas_thread_local_cache.c: (pas_thread_local_cache_create):
  • libpas/src/libpas/pas_utils.c: (pas_assertion_failed_no_inline):
  • libpas/src/libpas/pas_utils.h: (pas_zero_memory):

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

10:55 AM Changeset in webkit [291655] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r291006. rdar://problem/85361911

The accessibility library should be soft linked optionally
https://bugs.webkit.org/show_bug.cgi?id=236513

Reviewed by Geoffrey Garen.

The accessibility library should be soft linked optionally, since it is not always present.

  • Shared/Cocoa/AuxiliaryProcessCocoa.mm: (WebKit::handleAXPreferenceChange): (WebKit::AuxiliaryProcess::handlePreferenceChange):

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

10:55 AM Changeset in webkit [291654] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290999. rdar://problem/89218299

UniqueIDBDatabase::didFireVersionChangeEvent should capture identifier of UniqueIDBDatabaseConnection
https://bugs.webkit.org/show_bug.cgi?id=236950
rdar://problem/89218299

Reviewed by Chris Dumez.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::didFireVersionChangeEvent):

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

10:55 AM Changeset in webkit [291653] by Alan Coon
  • 3 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290994. rdar://problem/89923867

REGRESSION (r290853): CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::clear
https://bugs.webkit.org/show_bug.cgi?id=237565
<rdar://problem/88356074>

Reviewed by Chris Dumez.

No new tests. Fixes crashing test: accessibility/mac/value-change/value-change-user-info-textarea.html

newDocument may be the frame's document. We should make it a RefPtr
because it could get set to null in this function.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::clear):
  • loader/FrameLoader.h:

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

10:55 AM Changeset in webkit [291652] by Alan Coon
  • 3 edits
    1 add in branches/safari-613-branch

Cherry-pick r290981. rdar://problem/83326232

Remove invalid ASSERT in LocaleIDBuilder::overrideLanguageScriptRegion().
https://bugs.webkit.org/show_bug.cgi?id=237573
<rdar://problem/83326232>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/handle-empty-localeID-in-localeIDBufferForLanguageTagWithNullTerminator.js: Added.

Source/JavaScriptCore:

The ASSERT(length) in LocaleIDBuilder::overrideLanguageScriptRegion() is simply
incorrect. The length can be 0 if uloc_forLanguageTag returns a 0 length in
localeIDBufferForLanguageTagWithNullTerminator(). LocaleIDBuilder::overrideLanguageScriptRegion()
already handles this scenario correctly. We just need to remove this incorrect ASSERT.

Also verified that we're producing the same result on the attached test case as
Chrome and Firefox produces.

  • runtime/IntlObject.cpp: (JSC::localeIDBufferForLanguageTagWithNullTerminator):

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

10:55 AM Changeset in webkit [291651] by Alan Coon
  • 10 edits in branches/safari-613-branch/Source

Cherry-pick r290969. rdar://problem/89638872

Preconnecting after process swap is a page load time improvement on some devices
https://bugs.webkit.org/show_bug.cgi?id=237055
<rdar://problem/89638872>

Reviewed by Geoffrey Garen.

Source/WebCore:

Export method.

  • platform/network/NetworkLoadMetrics.h:

Source/WebKit:

On some devices we see that doing a second preconnect on HTTP/1.1 is a significant page load time improvement.
This is due to the fact that most page loads on HTTP/1.1 will open several connections, and having two
preconnected connections instead of one, will speed up page load time. This patch implements this by starting
a second preconnect after the first has finished. It is important to wait until the first preconnect has
finished, otherwise the second preconnect will go to waste, since the underlying network layer does not yet
know if this is HTTP/1.1 or not. Since we do not see page load time improvement on iOS with this behavior,
it is currently only enabled for macOS. The next step is to investigate why it does not seem to be a page
load time improvement on iOS. We probably need to make sure the main resource load has started before we
start the second preconect. This will avoid that the second preconnect returns immediately.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::sendH2Ping): (WebKit::NetworkConnectionToWebProcess::preconnectTo):
  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::preconnectTo):
  • NetworkProcess/PreconnectTask.cpp: (WebKit::PreconnectTask::PreconnectTask): (WebKit::PreconnectTask::didFinishLoading): (WebKit::PreconnectTask::didFailLoading): (WebKit::PreconnectTask::didFinish):
  • NetworkProcess/PreconnectTask.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::SpeculativeLoadManager::preconnectForSubresource):

Source/WTF:

Add ENABLE guard for this behavior.

  • wtf/PlatformEnableCocoa.h:

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

10:55 AM Changeset in webkit [291650] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290878. rdar://problem/89000777

Release_Assert | WebCore::Document::addTopLayerElement()
https://bugs.webkit.org/show_bug.cgi?id=237307

Patch by Frédéric Wang <fwang@igalia.com> on 2022-03-07
Reviewed by Chris Dumez.

setBooleanAttribute() call in HTMLDialogElement::showModal() dispatches a DOMSubtreeModified
event. Postpone it so that listeners cannot disconnect the dialog element.

  • html/HTMLDialogElement.cpp: (WebCore::HTMLDialogElement::showModal): Add a queue to postpone event.

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

10:55 AM Changeset in webkit [291649] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/JavaScriptCore

Cherry-pick r290873. rdar://problem/89770507

Fix JITOperationList::addPointers() to support JIT_OPERATION_VALIDATION_ASSERT_ENABLED.
https://bugs.webkit.org/show_bug.cgi?id=237504
<rdar://problem/89770507>

Reviewed by Saam Barati.

According to tagJSCCodePtrImpl(), we will only use an operation's validation entry
if Options::useJITCage(). Make JITOperationList::addPointers() conform to this.

  • assembler/JITOperationList.cpp: (JSC::JITOperationList::addPointers):

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

10:55 AM Changeset in webkit [291648] by Alan Coon
  • 16 edits in branches/safari-613-branch/Source

Cherry-pick r290856. rdar://problem/89569036

REGRESSION (r284472): [ Monterey ] http/tests/websocket/tests/hybi/inspector/send-and-recieve-debugger.html is failing
https://bugs.webkit.org/show_bug.cgi?id=237280

Reviewed by Devin Rousso.

Source/WebCore:

Covered by existing http/tests/websocket/tests/hybi/inspector/* test cases.

On macOS Monterey we use NSURLSession-based WebSockets by default, unlike earlier versions of macOS. The channel
for these sockets is implemented in WebKit::WebSocketChannel. The non-NSURLSession WebSockets channel (at
least on Cocoa platforms) is implemented in WebCore::WebSocketChannel.

As of r284472 the logic to delay the dispatch of received WebSocket message on platforms using
NSURLSession-based WebSockets is handled by WebCore::WebSocket, not the WebKit::WebSocketChannel.
WebKit::WebSocketChannel now immediately does the work it needs to, and only the delegated work to WebSocket
is queued and taken care of when the socket has resumed. This resulted in some of the instrumentation in
WebKit::WebSocketChannel being able to be called while the socket was suspended leading to events being logged
in the frontend "in the future" (e.g. before the paused script would have been able to be aware of them). To
correct this the WebKit::WebSocketChannel now provides a hook into its helper WebSocketChannelInspector
object to allow the WebCore::WebSocket to notify Web Inspector of events at the same time it is being
logically handled by the page.

Other ThreadableWebSocketChannel implementations will instead provide nullptr in place of a pointer to a
WebInspectorChannelInspector. WebCore::WebSocketChannel was not affected by the changes in r284472 as it has
a different way to guarantee that the methods containing InspectorInstrumentation were not called while the
channel was suspended (and enforced with numerous ASSERT(!m_suspended) checks).

  • Modules/websockets/ThreadableWebSocketChannel.h: (WebCore::ThreadableWebSocketChannel::channelInspector const):
  • Modules/websockets/WebSocketChannelClient.h:
  • Add reason for error messages so they can be sent to Web Inspector.
  • Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveMessage): (WebCore::WebSocket::didReceiveBinaryData): (WebCore::WebSocket::didReceiveMessageError): (WebCore::WebSocket::didClose):
  • Modules/websockets/WebSocket.h:
  • Move inspector instrumentation calls from WebKit::WebSocketChannel to here so that they are not called until the socket is resumed.
  • We also now wrap these instrumentation calls in an unlikely check for frontends to avoid allocating the simulated call frames when Web Inspector isn't even open.
  • Modules/websockets/WebSocketChannelInspector.cpp: (WebCore::WebSocketChannelInspector::WebSocketChannelInspector): (WebCore::WebSocketChannelInspector::didCreateWebSocket const): (WebCore::WebSocketChannelInspector::willSendWebSocketHandshakeRequest const): (WebCore::WebSocketChannelInspector::didReceiveWebSocketHandshakeResponse const): (WebCore::WebSocketChannelInspector::didCloseWebSocket const): (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrame const): (WebCore::WebSocketChannelInspector::didSendWebSocketFrame const): (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrameError const): (WebCore::WebSocketChannelInspector::createFrame): (WebCore::WebSocketChannelInspector::didCreateWebSocket): Deleted. (WebCore::WebSocketChannelInspector::willSendWebSocketHandshakeRequest): Deleted. (WebCore::WebSocketChannelInspector::didReceiveWebSocketHandshakeResponse): Deleted. (WebCore::WebSocketChannelInspector::didCloseWebSocket): Deleted. (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrame): Deleted. (WebCore::WebSocketChannelInspector::didSendWebSocketFrame): Deleted. (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrameError): Deleted.
  • Modules/websockets/WebSocketChannelInspector.h:
  • Update to keep a WeakRef to the Document to reduce the amount of plumbing necessary to call these methods from WebSocket.
  • Move static utility method createFrame here from WebKit::WebSocketChannel since it is only used for inspector instrumentation.
  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError): (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
  • Modules/websockets/WorkerThreadableWebSocketChannel.h:
  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
  • Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::fail): (WebCore::WebSocketChannel::didFailSocketStream):
  • Modules/websockets/WebSocketChannel.h:
  • Update these classes to pass along a reason, if available, for errors.

Source/WebKit:

Move inspector instrumentation for things that should be delayed until the websocket has resumed (in general,
these are instrumentation points for receiving messages) into WebCore::WebSocket so that they are sent at the
expected time in the frontend, not "in the future" when script execution is suspended (e.g. while debugging).

  • WebProcess/Network/WebSocketChannel.cpp: (WebKit::WebSocketChannel::notifySendFrame): (WebKit::WebSocketChannel::connect): (WebKit::WebSocketChannel::close): (WebKit::WebSocketChannel::fail): (WebKit::WebSocketChannel::disconnect): (WebKit::WebSocketChannel::didReceiveText): (WebKit::WebSocketChannel::didReceiveBinaryData): (WebKit::WebSocketChannel::didClose): (WebKit::WebSocketChannel::didReceiveMessageError): (WebKit::WebSocketChannel::didSendHandshakeRequest): (WebKit::WebSocketChannel::didReceiveHandshakeResponse): (WebKit::createWebSocketFrameForWebInspector): Deleted.
  • WebProcess/Network/WebSocketChannel.h:

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

10:55 AM Changeset in webkit [291647] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r290855. rdar://problem/82814846

Web Inspector: [Cocoa] Continually opening and closing Web Inspector sometimes crashes
https://bugs.webkit.org/show_bug.cgi?id=237484

Reviewed by Darin Adler.

We need to handle operations on the main queue because webView:stopURLSchemeTask: will be called from the main
queue, and we must not be in middle the operation when we get the request to stop said operation, otherwise we
may attempt to call [urlSchemeTask did*], which is not permitted after we have been asked to stop that task.
If we add the operation for the WKURLSchemeTask to a different queue it is possible we will have already
started the operation on a background queue while at the same time are receiving a request to stop that same
WKURLSchemeTask.

  • UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm: (-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]): (-[WKInspectorResourceURLSchemeHandler webView:stopURLSchemeTask:]):

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

10:55 AM Changeset in webkit [291646] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r290847. rdar://problem/89402338

Crash under ScrollingCoordinatorMac::hasNodeWithAnimatedScrollChanged()
https://bugs.webkit.org/show_bug.cgi?id=237478
<rdar://89072235>

Reviewed by Alan Bujtas.

Crash data show that r290109 failed to fix this crash; the actual cause of the crash is a
null m_page on TiledCoreAnimationScrollingCoordinator, diagnosed by noting that the crash
offset corresponds to the offset of m_renderingUpdateRemainingSteps in Page.

  • WebProcess/WebPage/mac/TiledCoreAnimationScrollingCoordinator.mm: (WebKit::TiledCoreAnimationScrollingCoordinator::hasNodeWithAnimatedScrollChanged):

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

10:55 AM Changeset in webkit [291645] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290832. rdar://problem/89758344

Top layers should not be moved
https://bugs.webkit.org/show_bug.cgi?id=237305

Patch by Rob Buis <rbuis@igalia.com> on 2022-03-04
Reviewed by Tim Nguyen.

Top layers are always children of RenderView and should not be moved.

  • rendering/RenderElement.cpp: (WebCore::RenderElement::moveLayers):

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

10:55 AM Changeset in webkit [291644] by Alan Coon
  • 4 edits
    2 adds in branches/safari-613-branch

Cherry-pick r290830. rdar://problem/89081463

CSP report does not get sent to the document in the case of a detached element
https://bugs.webkit.org/show_bug.cgi?id=237440
<rdar://problem/89081463>

Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/security/contentSecurityPolicy/report-violation-to-document-after-element-has-been-detached.html

Only send a violation report to the element if it is connected. Check
right before dispatching in case the element gets detached after the
security policy violation has been created. If the element is not
connected in this case, we send the report to the document.

  • dom/Element.cpp: (WebCore::Element::enqueueSecurityPolicyViolationEvent):
  • page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::reportViolation const): Also sets the composed value on the violation event as per the spec.

LayoutTests:

  • http/tests/security/contentSecurityPolicy/report-violation-to-document-after-element-has-been-detached-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/report-violation-to-document-after-element-has-been-detached.html: Added.

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

10:55 AM Changeset in webkit [291643] by Alan Coon
  • 4 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290820. rdar://problem/88301613

AVVideoCaptureSource should reuse CaptureDevice label
https://bugs.webkit.org/show_bug.cgi?id=237363
<rdar://88301613>

Reviewed by Eric Carlson.

We are getting AV device name through AVCaptureDevice.localizedName, first in UIProcess, then in GPUProcess.
To make sure we always use the ones from UIProcess (which are the ones exposed through mediaDevices.enumerateDevices),
We make sure to use CaptureDevice.label when creating an AVVideoCaptureSource.

Manually tested.

  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm: (WebCore::AVVideoCaptureSource::create): (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

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

10:55 AM Changeset in webkit [291642] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r290744. rdar://problem/81609371

[WebAuthn] Ensure presenter gets dismissed on iOS
https://bugs.webkit.org/show_bug.cgi?id=237336
rdar://81609371

Reviewed by Brent Fulgham.

Always call [m_presenter dismissWithError] to ensure presenter gets dismissed.

  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm: (WebKit::AuthenticatorPresenterCoordinator::dimissPresenter):

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

10:55 AM Changeset in webkit [291641] by Alan Coon
  • 7 edits
    4 adds in branches/safari-613-branch

Cherry-pick r290676. rdar://problem/83831093

[Cocoa] HLS stream currentTime sometimes jumps backwards
https://bugs.webkit.org/show_bug.cgi?id=235087
rdar://83831093

Reviewed by Dean Jackson.

Source/WebCore:

Test: http/tests/media/hls/hls-non-zero-start-time.html

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by: pass log identifier to lambda so the method name will be logged correctly. (WebCore::HTMLMediaElement::currentMediaTime const): Remove LOG_CACHED_TIME_WARNINGS build flag, always log time drift warnings when log level is DEBUG.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Log when periodic time observer is passed unexpected values. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use NSKeyValueObservingOptionInitial KVO option for "@duration" property because we sometimes don't get a duration changed event for HLS streams, so m_cachedDuration remains invalid. (WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTimeDidChange const): Drive-by: fix use-after-move.

Source/WebKit:

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::currentTimeChanged): Always notify player when time jumps backwards.

LayoutTests:

  • http/tests/media/hls/hls-non-zero-start-time-expected.txt: Added.
  • http/tests/media/hls/hls-non-zero-start-time.html: Added.
  • http/tests/media/resources/hls/bip-bop-live.m3u8: Added.
  • http/tests/media/resources/hls/bipbop/start-offset.m3u8: Added.
  • http/tests/media/resources/hls/bipbop/start-offset.ts: Added.

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

10:55 AM Changeset in webkit [291640] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290675. rdar://problem/89585043

Remove release assert when UI process is blocking IOSurface IOKit access
https://bugs.webkit.org/show_bug.cgi?id=237278
<rdar://problem/89585043>

Unreviewed, address review comments.

Log error instead of creating CrashTracer reports.

  • platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::bytesPerRowAlignment):

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

10:54 AM Changeset in webkit [291639] by Alan Coon
  • 6 edits
    2 adds in branches/safari-613-branch

Cherry-pick r290645. rdar://problem/89180092

REGRESSION (r273129): Text contents in <span> with opacity not repainting/updating when sibling element has "will-change: transform"
https://bugs.webkit.org/show_bug.cgi?id=236876
<rdar://problem/89180092>

Reviewed by Simon Fraser.

Source/WebCore:

This patch implements a slightly naive repaint for inline boxes with self painting layers.

  1. Mark the line when it gains an inline box (RenderInline) with self painting layer (e.g. <span style="position: relative">this has dedicated layer</span>)
  2. Issue repaint at the end of the line layout on such renderers.

Test: fast/repaint/inline-box-with-self-paint-layer.html

  • rendering/LegacyInlineFlowBox.cpp: (WebCore::LegacyInlineFlowBox::addToLine):
  • rendering/LegacyInlineFlowBox.h: (WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox): (WebCore::LegacyInlineFlowBox::hasSelfPaintInlineBox const):
  • rendering/LegacyLineLayout.cpp: (WebCore::repaintSelfPaintInlineBoxes): (WebCore::LegacyLineLayout::layoutRunsAndFloats):
  • rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRect const): expand the ASSERT to enclsing inline boxes too.

LayoutTests:

  • fast/repaint/inline-box-with-self-paint-layer-expected.html: Added.
  • fast/repaint/inline-box-with-self-paint-layer.html: Added.

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

10:54 AM Changeset in webkit [291638] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290618. rdar://problem/89585043

Remove release assert when UI process is blocking IOSurface IOKit access
https://bugs.webkit.org/show_bug.cgi?id=237278

Reviewed by Darin Adler.

Remove release assert in IOSurface::bytesPerRowAlignment() when UI process is blocking IOSurface IOKit access.
Instead, log this event, and return an appropriate value.

  • platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::bytesPerRowAlignment):

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

10:54 AM Changeset in webkit [291637] by Alan Coon
  • 4 edits
    2 adds in branches/safari-613-branch

Cherry-pick r290615. rdar://problem/87919197

Handle widow relayout differently
https://bugs.webkit.org/show_bug.cgi?id=235519

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-28
Reviewed by Alan Bujtas.

Source/WebCore:

Handle widow relayout differently to prevent function call recursion.

Test: fast/multicol/widow-many-relayouts-crash.html

  • rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutBlock): (WebCore::RenderBlockFlow::relayoutToAvoidWidows): Deleted.
  • rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::didBreakAtLineToAvoidWidow const):

LayoutTests:

  • fast/multicol/widow-many-relayouts-crash-expected.txt: Added.
  • fast/multicol/widow-many-relayouts-crash.html: Added.

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

10:54 AM Changeset in webkit [291636] by Alan Coon
  • 4 edits in branches/safari-613-branch

Cherry-pick r290539. rdar://problem/88767812

[WebAuthn] Fallback to attestation=none whenever attestation fails
https://bugs.webkit.org/show_bug.cgi?id=237223
rdar://88767812

Reviewed by Brent Fulgham.

Source/WebKit:

Whenever attestation is requested by a RP and it fails to complete,
we previously errored out of the registration. The more correct platform
behavior in this case is to provide attestation=none.

Created API test for this behavior.

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):

Tools:

Add test for local authenticator attestation fallback behavior.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST):

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

10:54 AM Changeset in webkit [291635] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290526. rdar://problem/89372801

[Cocoa] HLS + Modern EME key rotation causes playback to stall indefinitely
https://bugs.webkit.org/show_bug.cgi?id=237214
<rdar://89372801>

Reviewed by Eric Carlson.

In r275916, Ref was changed to perform pointer equality in its operator==. This caused
takeUnexpectedKeyRequestForInitializationData() to fail to find key requests matching
the initData passed in through MediaKeySession.

Fix the equality test by calling .get() on the Ref, which causes the == to resolve to
FragmentedSharedBuffer::operator==().

  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: (WebCore::CDMInstanceFairPlayStreamingAVFObjC::takeUnexpectedKeyRequestForInitializationData):

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

10:54 AM Changeset in webkit [291634] by Alan Coon
  • 18 edits
    15 adds in branches/safari-613-branch

Cherry-pick r290519. rdar://problem/89148022

Re-add YouTubePluginReplacement, removed in r285252
https://bugs.webkit.org/show_bug.cgi?id=237182
Source/WebCore:

<rdar://89148022>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-25
Reviewed by Chris Dumez.

Tests: security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html

security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html
security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html
security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html

Its removal broke webpages that work in Chrome and Firefox, so back it comes.

  • Headers.cmake:
  • Modules/plugins: Copied from Source/WebCore/Modules/plugins.
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSPluginElementFunctions.cpp: (WebCore::pluginScriptObject):
  • bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation):
  • bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::JSTestPluginInterface::visitChildrenImpl):
  • html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::createElementRenderer): (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot): (WebCore::registrar): (WebCore::pluginReplacementForType): (WebCore::HTMLPlugInElement::requestObject): (WebCore::HTMLPlugInElement::scriptObjectForPluginReplacement):
  • html/HTMLPlugInElement.h: (WebCore::HTMLPlugInElement::pluginReplacementScriptObject):
  • html/shadow/ShadowPseudoIds.cpp: (WebCore::ShadowPseudoIds::webkitPluginReplacement):
  • html/shadow/ShadowPseudoIds.h:
  • html/shadow/YouTubeEmbedShadowElement.cpp:
  • html/shadow/YouTubeEmbedShadowElement.h:
  • page/Settings.yaml:

Tools:

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-25
Reviewed by Chris Dumez.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp:

LayoutTests:

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-25
Reviewed by Chris Dumez.

  • TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/win/TestExpectations:
  • security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement-expected.txt.
  • security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html: Copied from LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html.
  • security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement-expected.txt.
  • security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html.
  • security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-expected.txt.
  • security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type-expected.txt.
  • security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html.
  • security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html.

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

10:54 AM Changeset in webkit [291633] by Alan Coon
  • 4 edits
    1 add in branches/safari-613-branch

Cherry-pick r290517. rdar://problem/89428235

operationMaterializeObjectInOSR should DeferTerminationForAWhile instead of just DeferTermination.
https://bugs.webkit.org/show_bug.cgi?id=237173
rdar://problem/89450245

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/termination-exception-in-operationMaterializeObjectInOSR2.js: Added.

Source/JavaScriptCore:

DeferTermination can throw the TerminationException on destruction of the scope
object. operationMaterializeObjectInOSR() was using DeferTermination, resulting
in the TerminationException being thrown on exit. This trips up
validateDFGExceptionHandling testing (which is enabled on Debug builds) because the
TerminationException is unexpected. The solution is simply to use
DeferTerminationForAWhile instead, and let a more natural trap checkpoint throw
the TerminationException later.

Also refactored notifyDebuggerOfUnwinding() to return early if a debugger is not
present. This avoids unnecessarily entering and exiting a DeferTermination scope
in notifyDebuggerOfUnwinding(). This was observed while testing this change on
the attached test case.

  • ftl/FTLOperations.cpp: (JSC::FTL::operationMaterializeObjectInOSR):
  • interpreter/Interpreter.cpp: (JSC::notifyDebuggerOfUnwinding):

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

10:54 AM Changeset in webkit [291632] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r290328. rdar://problem/88567612

Fix GPUP WebGL generator script wrt uninitialised sized span
https://bugs.webkit.org/show_bug.cgi?id=235889
<rdar://problem/88567612>

Reviewed by Chris Dumez.

Even though we check if the synchronous message was received successfully before using it,
if we didn't check then we might have a problem with pointing to uninitialized memory, which we then wouldn't use for anything.
To fix this hypothetical problem, I start out by pointing to initialized memory.

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp: (WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat):

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

10:54 AM Changeset in webkit [291631] by Alan Coon
  • 9 edits in branches/safari-613-branch/Source

Cherry-pick r288662. rdar://problem/89582442

[WP] Avoid calling IOSurfaceAlignProperty
https://bugs.webkit.org/show_bug.cgi?id=235659

Reviewed by Simon Fraser.

Source/WebCore:

Add information about alignment of bytes per row to IOSurface class.

  • platform/graphics/cocoa/IOSurface.h:
  • platform/graphics/cocoa/IOSurface.mm: (WebCore::surfaceBytesPerRowAlignment): (WebCore::IOSurface::bytesPerRowAlignment): (WebCore::IOSurface::setBytesPerRowAlignment):

Source/WebKit:

Avoid calling IOSurfaceAlignProperty in the WebContent process, since it requires IOKit access.
Information about the alignment of bytes per row of IOSurface will be retrieved in the UI process,
and sent to the WebContent process, where it will be stored.

  • Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode const): (WebKit::WebProcessCreationParameters::decode):
  • Shared/WebProcessCreationParameters.h:
  • Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::calculateBytesPerRow):
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):

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

10:43 AM Changeset in webkit [291630] by pvollan@apple.com
  • 23 edits in trunk/Source

Enable content filtering in the Network process
https://bugs.webkit.org/show_bug.cgi?id=238156

Reviewed by Geoffrey Garen.

Source/WebCore:

There is no need for sandbox extensions in the WebContent process when content filtering
is taking place in the Network process.

  • platform/cocoa/NetworkExtensionContentFilter.h:
  • platform/cocoa/NetworkExtensionContentFilter.mm:

(WebCore::NetworkExtensionContentFilter::enabled):

Source/WebKit:

Remove code associated with Network extension sandbox extensions.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • Shared/Cocoa/LoadParametersCocoa.mm:

(WebKit::LoadParameters::platformEncode const):
(WebKit::LoadParameters::platformDecode):

  • Shared/LoadParameters.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::addPlatformLoadParameters):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::reloadAfterUnblockedContentFilter): Deleted.

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

(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponseShared):

  • UIProcess/WebPageProxy.h:
  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::contentFilterDidBlockLoad):
(WebKit::WebResourceLoader::cancelMainResourceLoadForContentFilter): Deleted.

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.messages.in:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::platformDidReceiveLoadParameters):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didReceivePolicyDecision):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:

Set the feature flag.

  • wtf/PlatformEnableCocoa.h:
10:42 AM Changeset in webkit [291629] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

YouTube.com - Clicking anywhere on the progress bar pauses the video
https://bugs.webkit.org/show_bug.cgi?id=237750
<rdar://problem/90364846>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-unexpected-pause.html

When calling play() or pause() on a MediaPlayerPrivateMediaSourceAVFObjC, the object will
respond by calling m_player->playbackStateChanged(), which will in turn call
HTMLMediaElement::mediaPlayerPlaybackStateChanged() with the new state. However, HTMLMediaElement
expects this to be called only for unanticipated state changes, not expected state changes. And
when that method is called and the reported state does not match the element's own expected state,
the element calls its own play() or pause() function to update its own state to match the player's.
And because MediaPlayerPrivateMediaSourceAVFObjC calls this method on the next run loop, there is
an opportunity for those states to get out of sync, which happens when YouTube responds to a tap
in its timeline.

Remove the unnecessary "call on next run loop" behavior of MediaPlayerPrivateMediaSourceAVFObjC::
play() and ::pause(). Also, remove the unnecessary notification that the play state has changed. In
the future, this can be accomplished by adding a callback parameter to MediaPlayer::play() rather than
relying on a state change notification.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playAtHostTime):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseAtHostTime):

LayoutTests:

  • media/media-source/media-source-unexpected-pause-expected.txt: Added.
  • media/media-source/media-source-unexpected-pause.html: Added.
10:35 AM Changeset in webkit [291628] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Inline swatch popovers should hide when inline swatches are removed
https://bugs.webkit.org/show_bug.cgi?id=235047
<rdar://problem/87687975>

Reviewed by Patrick Angle.

  • UserInterface/Views/InlineSwatch.js:

(WI.InlineSwatch):
(WI.InlineSwatch.prototype.dismissPopover):
(WI.InlineSwatch.prototype._presentPopover):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.detached):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
(WI.SpreadsheetStyleProperty.prototype._renderValue):
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):

10:30 AM Changeset in webkit [291627] by Jonathan Bedard
  • 5 edits in trunk/Tools

[Merge-Queue] Add ValidateSquashed
https://bugs.webkit.org/show_bug.cgi?id=238172
<rdar://problem/90602594>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/factories.py:

(MergeQueueFactory.init): Add ValidateSquashed.

  • Tools/CISupport/ews-build/factories_unittest.py:

(TestExpectedBuildSteps): Ditto.

  • Tools/CISupport/ews-build/steps.py:

(VerifyGitHubIntegrity.send_email_for_github_issue):
(ValidateSquashed): Ensure that a pull request only has a single commit.
(ValidateSquashed.init): Do not log environment variables.
(ValidateSquashed.start): Log commits between the HEAD branch and base branch.
(ValidateSquashed.getResultSummary):
(ValidateSquashed.evaluateCommand): Check number of commits between HEAD and base branch.
(ValidateSquashed.doStepIf): Only run step for pull requests.
(ValidateSquashed.hideStepIf): Hide step if we aren't running it.

Canonical link: https://commits.webkit.org/248720@main

10:19 AM Changeset in webkit [291626] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS][WP] Add telemetry for syscalls used during launch
https://bugs.webkit.org/show_bug.cgi?id=235865
<rdar://problem/88228583>

Reviewed by Brent Fulgham.

Add telemetry in the WebContent process' sandbox on macOS to determine which syscalls are used only during launch.

  • WebProcess/com.apple.WebProcess.sb.in:
10:12 AM Changeset in webkit [291625] by J Pascoe
  • 8 edits in trunk

[WebAuthn] Pass along timeout to ASA and ignore timeout for conditional mediation requests
https://bugs.webkit.org/show_bug.cgi?id=238147
rdar://90509464

Reviewed by Brent Fulgham.

Source/WebKit:

Currently we don't pass the timeout from the rp into ASA, so the default timeout is always used.
This patch starts passing along the timeout to ASA, and creates a place for ASA to specify the
mediation of the request, so we can ignore the timeout for requests using conditional mediation.

Modified API test.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(toWebCore):
(-[_WKWebAuthenticationPanel makeCredentialWithMediationRequirement:clientDataHash:options:completionHandler:]):
(-[_WKWebAuthenticationPanel makeCredentialWithClientDataHash:options:completionHandler:]):
(-[_WKWebAuthenticationPanel getAssertionWithMediationRequirement:clientDataHash:options:completionHandler:]):
(-[_WKWebAuthenticationPanel getAssertionWithClientDataHash:options:completionHandler:]):

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::initTimeOutTimer):

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:

(WebKit::configureRegistrationRequestContext):
(WebKit::configureAssertionOptions):

Tools:

Modify API test to use new SPI.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

9:14 AM Changeset in webkit [291624] by J Pascoe
  • 10 edits in trunk/Source

[WebAuthn] Support getAssertion for virtual HID authenticators
https://bugs.webkit.org/show_bug.cgi?id=238154
rdar://problem/90593150

Reviewed by Brent Fulgham.

Source/WebCore:

Virtual authenticators for WebAuthn support different transprots: nfc, usb, internal,
and ble. Currently, we only fully support the internal transport and makeCredential for
usb-transport. The default transport for web-platform-tests is usb. This patch implements
getAssertion for hid-based virtual authneticators.

  • Modules/webauthn/WebAuthenticationUtils.cpp:

(WebCore::buildUserEntityMap):
(WebCore::buildCredentialDescriptor):

  • Modules/webauthn/WebAuthenticationUtils.h:
  • Modules/webauthn/fido/FidoConstants.h:

Source/WebKit:

Virtual authenticators for WebAuthn support different transports: nfc, usb, internal,
and ble. Currently, we only fully support the internal transport and makeCredential for
usb-transport. The default transport for web-platform-tests is usb. This patch implements
getAssertion for hid-based virtual authneticators.

Tested via manually creating virtual authenticator and performing create / get.

  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.cpp:

(WebKit::VirtualAuthenticatorManager::addCredential):
(WebKit::VirtualAuthenticatorManager::credentialsMatchingList):

  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.h:
  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorUtils.h:
  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorUtils.mm:

(WebKit::privateKeyFromBase64):
(WebKit::signatureForPrivateKey):

  • UIProcess/WebAuthentication/Virtual/VirtualHidConnection.cpp:

(WebKit::VirtualHidConnection::parseRequest):

9:01 AM Changeset in webkit [291623] by commit-queue@webkit.org
  • 6 edits in trunk

It should be possible to copy text out of "AutoFilledAndViewable" password fields
https://bugs.webkit.org/show_bug.cgi?id=238160

Patch by Ricky Mondello <Ricky Mondello> on 2022-03-22
Reviewed by Geoffrey Garen.

Source/WebCore:

  • editing/Editor.cpp:

(WebCore::Editor::canCopy const): Allow copy in AutoFilledAndViewable password fields.

  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::isInAutoFilledAndViewableField const): Added.

  • editing/VisibleSelection.h: Declare member function.

LayoutTests:

  • fast/forms/input-autofilled-and-viewable.html: Test copying.
8:45 AM Changeset in webkit [291622] by jer.noble@apple.com
  • 5 edits
    2 adds in trunk

Fetching a Blob URL with an unbounded Range header do not generate a Content-Range response header
https://bugs.webkit.org/show_bug.cgi?id=238170

Reviewed by Eric Carlson.

Source/WebCore:

Test: fetch/fetch-blob-unbounded-range.html

Handle the case where the request contains an unbounded range, and property calculate the rangeEnd
to pass into ParsedContentRange.

  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::notifyResponseOnSuccess):

Source/WebKit:

Handle the case where the request contains an unbounded range, and property calculate the rangeEnd
to pass into ParsedContentRange.

  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):

LayoutTests:

  • fetch/fetch-blob-unbounded-range-expected.txt: Added.
  • fetch/fetch-blob-unbounded-range.html: Added.
8:37 AM Changeset in webkit [291621] by magomez@igalia.com
  • 2 edits in trunk/Source/WebKit

Ensure that proxies are invalidated before destroying them.
https://bugs.webkit.org/show_bug.cgi?id=237187

Reviewed by Carlos Garcia Campos.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::updateSceneState):

8:30 AM Changeset in webkit [291620] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Ensure there is a Network process after launching the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=238080
<rdar://88933565>

Reviewed by Chris Dumez.

After the WebContent process has finished launching, ensure there is a Network process
which will provide the WebContent process with the Launch Services database.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didFinishLaunching):

8:25 AM Changeset in webkit [291619] by Jonathan Bedard
  • 5 edits in trunk/Tools

[Merge-Queue] Add ValidateCommitterAndReviewer
https://bugs.webkit.org/show_bug.cgi?id=238150
<rdar://problem/90587620>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/factories.py:

(CommitQueueFactory.init): Rename ValidateCommiterAndReviewer to ValidateCommiterAndReviewer.
(MergeQueueFactory.init): Add ValidateCommitterAndReviewer, PrintConfiguration, CleanGitRepo,
CheckOutSource, FetchBranches, ShowIdentifier, VerifyGitHubIntegrity, UpdateWorkingDirectory
and CheckOutPullRequest.

  • Tools/CISupport/ews-build/factories_unittest.py:

(TestExpectedBuildSteps): Add Merge-Queue step names.

  • Tools/CISupport/ews-build/steps.py:

(GitHubMixin.get_pr_json): Retry tied to attempt not index.
(GitHubMixin.get_reviewers): Get list of reviewers for pull-request in repository.
(ValidateCommitterAndReviewer): Renamed from ValidateCommiterAndReviewer, inherit from GitHubMixin.
(ValidateCommitterAndReviewer.init): Rename ValidateCommiterAndReviewer.
(ValidateCommitterAndReviewer.fail_build): Block pull request, differentiate comment for pull
request and patch.
(ValidateCommitterAndReviewer.start): Support pull requests.
(ValidateCommiterAndReviewer): Renamed to ValidateCommitterAndReviewer.

  • Tools/CISupport/ews-build/steps_unittest.py:

Canonical link: https://commits.webkit.org/248712@main

8:24 AM Changeset in webkit [291618] by Wenson Hsieh
  • 5 edits
    1 add in trunk

-[WKWebView _spellCheckerDocumentTag] is inconsistent with the document tag passed into NSSpellChecker
https://bugs.webkit.org/show_bug.cgi?id=238186
rdar://90591883

Reviewed by Tim Horton.

Source/WebKit:

Currently, WebViewImpl and WebPageProxy both maintain separate spellchecking document tag values, both of which
are derived from -[NSSpellChecker uniqueSpellDocumentTag]. While the former is used for autocorrection as well
as the WKWebView SPI -_spellCheckerDocumentTag, the latter is passed into NSSpellChecker API when performing
spellchecking.

For various reasons, Mail compose (using WebKit2) requires -_spellCheckerDocumentTag to be consistent with the
value of the spell checker document tag passed into -checkString:range:…:inSpellDocumentWithTag:orthography:.
Address this by simply having WebViewImpl call through into WebPageProxy's spellDocumentTag, such that the two
now share the same value.

Test: SpellCheckerDocumentTag.SpellCheckerDocumentTagWhenCheckingString

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::spellCheckerDocumentTag):

Tools:

Add a test to verify that the spell checking document tag passed into NSSpellChecker API is consistent with the
document tag reported by WKWebView.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/SpellCheckerDocumentTag.mm: Added.

(TestWebKitAPI::TEST):

7:48 AM Changeset in webkit [291617] by Jonathan Bedard
  • 2 edits in trunk/Tools

[git-webkit] Make radar conditional on authentication (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=238051
<rdar://problem/90384655>

Reviewed by Alexey Proskuryakov.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:

(Tracker.init): Only check for authentication if library exists.

Canonical link: https://commits.webkit.org/248709@main

7:48 AM Changeset in webkit [291616] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Move TextureMapper member variables, types and code out of GraphicsContextGLANGLE
https://bugs.webkit.org/show_bug.cgi?id=238200

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-03-22
Reviewed by Alejandro G. Castro.

Move member variables and code specific to the TextureMapper-oriented
GraphicsContextGLTextureMapperANGLE class from the parent
GraphicsContextGLANGLE class into GraphicsContextGLTextureMapperANGLE.

This means moving down various member variables and types as well as
friendship declarations. For behavior to remain the same, the
prepareTextureImpl() method is made virtual and overridden in the
TextureMapper class, but otherwise matches the previous behavior.

Nicosia::GCGLANGLELayer is adjusted to operate on a reference to the
derived class, not on the base GraphicsContextGLANGLE.

No new tests as there's no change in behavior.

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::prepareTextureImpl):

  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp:

(Nicosia::GCGLANGLELayer::GCGLANGLELayer):

  • platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLTextureMapperANGLE::prepareTextureImpl):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::EGLImageBacking):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::~EGLImageBacking):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::format const):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::stride const):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::releaseResources):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::isReleased):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::reset):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::EGLImageBacking): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::~EGLImageBacking): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::format const): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::stride const): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::releaseResources): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::isReleased): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::reset): Deleted.

  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h:
7:41 AM Changeset in webkit [291615] by Jonathan Bedard
  • 2 edits in trunk/Tools

[Python 3] Use sys.executable instead of Python
https://bugs.webkit.org/show_bug.cgi?id=238175
<rdar://problem/90604107>

Reviewed by Ryan Haddad.

  • Tools/Scripts/webkitpy/common/system/executive_unittest.py:

(ExecutiveTest.test_run_command_with_bad_command):

Canonical link: https://commits.webkit.org/248708@main

7:09 AM Changeset in webkit [291614] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WPE][GTK] VideoFrameGStreamer missing include after -r291610 refactor
https://bugs.webkit.org/show_bug.cgi?id=238199

Patch by Alejandro G. Castro <alex@igalia.com> on 2022-03-22
Reviewed by Žan Doberšek.

We need to add the define we had in the file before the refactor.

  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
6:35 AM Changeset in webkit [291613] by Carlos Garcia Campos
  • 52 edits
    4 deletes in trunk

[GTK][WPE] Remove the ATK implementation
https://bugs.webkit.org/show_bug.cgi?id=238198

Reviewed by Adrian Perez de Castro.

.:

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityList.cpp:

(WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::canSetValueAttribute const):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::textIteratorBehaviorForTextRange const):

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

(WebCore::AccessibilityRenderObject::indexForVisiblePosition const):
(WebCore::AccessibilityRenderObject::shouldNotifyActiveDescendant const):

  • accessibility/AccessibilityTableColumn.cpp:

(WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored const):

  • accessibility/AccessibilityTableHeaderContainer.cpp:

(WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored const):

  • accessibility/atk/AXObjectCacheAtk.cpp: Removed.

(WebCore::wrapperParent): Deleted.
(WebCore::AXObjectCache::detachWrapper): Deleted.
(WebCore::AXObjectCache::attachWrapper): Deleted.
(WebCore::AXObjectCache::platformPerformDeferredCacheUpdate): Deleted.
(WebCore::getListObject): Deleted.
(WebCore::notifyChildrenSelectionChange): Deleted.
(WebCore::AXObjectCache::postPlatformNotification): Deleted.
(WebCore::AXObjectCache::nodeTextChangePlatformNotification): Deleted.
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Deleted.
(WebCore::AXObjectCache::platformHandleFocusedUIElementChanged): Deleted.
(WebCore::AXObjectCache::handleScrolledToAnchor): Deleted.

  • accessibility/atk/AccessibilityObjectAtk.cpp: Removed.

(WebCore::AccessibilityObject::detachPlatformWrapper): Deleted.
(WebCore::AccessibilityObject::accessibilityIgnoreAttachment const): Deleted.
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const): Deleted.
(WebCore::AccessibilityObject::allowsTextRanges const): Deleted.
(WebCore::AccessibilityObject::getLengthForTextRange const): Deleted.

  • accessibility/atk/WebKitAccessible.cpp: Removed.

(webkitAccessibleGetName): Deleted.
(webkitAccessibleGetDescription): Deleted.
(removeAtkRelationByType): Deleted.
(setAtkRelationSetFromCoreObject): Deleted.
(isRootObject): Deleted.
(webkitAccessibleGetParent): Deleted.
(webkitAccessibleGetNChildren): Deleted.
(webkitAccessibleRefChild): Deleted.
(webkitAccessibleGetIndexInParent): Deleted.
(webkitAccessibleGetAttributes): Deleted.
(atkRole): Deleted.
(webkitAccessibleGetRole): Deleted.
(isTextWithCaret): Deleted.
(setAtkStateSetFromCoreObject): Deleted.
(webkitAccessibleRefStateSet): Deleted.
(webkitAccessibleRefRelationSet): Deleted.
(webkitAccessibleInit): Deleted.
(webkitAccessibleGetObjectLocale): Deleted.
(webkit_accessible_class_init): Deleted.
(roleIsTextType): Deleted.
(interfaceMaskFromObject): Deleted.
(uniqueAccessibilityTypeName): Deleted.
(accessibilityTypeFromObject): Deleted.
(webkitAccessibleNew): Deleted.
(webkitAccessibleGetAccessibilityObject): Deleted.
(webkitAccessibleDetach): Deleted.
(webkitAccessibleIsDetached): Deleted.
(webkitAccessibleCacheAndReturnAtkProperty): Deleted.

  • accessibility/atk/WebKitAccessible.h: Removed.
  • accessibility/atk/WebKitAccessibleHyperlink.cpp: Removed.

(webkitAccessibleHyperlinkActionDoAction): Deleted.
(webkitAccessibleHyperlinkActionGetNActions): Deleted.
(webkitAccessibleHyperlinkActionGetDescription): Deleted.
(webkitAccessibleHyperlinkActionGetKeybinding): Deleted.
(webkitAccessibleHyperlinkActionGetName): Deleted.
(webkit_accessible_hyperlink_atk_action_interface_init): Deleted.
(webkitAccessibleHyperlinkGetURI): Deleted.
(webkitAccessibleHyperlinkGetObject): Deleted.
(rangeLengthForObject): Deleted.
(webkitAccessibleHyperlinkGetStartIndex): Deleted.
(webkitAccessibleHyperlinkGetEndIndex): Deleted.
(webkitAccessibleHyperlinkIsValid): Deleted.
(webkitAccessibleHyperlinkGetNAnchors): Deleted.
(webkitAccessibleHyperlinkIsSelectedLink): Deleted.
(webkitAccessibleHyperlinkGetProperty): Deleted.
(webkitAccessibleHyperlinkSetProperty): Deleted.
(webkit_accessible_hyperlink_class_init): Deleted.
(webkitAccessibleHyperlinkGetOrCreate): Deleted.

  • accessibility/atk/WebKitAccessibleHyperlink.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceAction.cpp: Removed.

(core): Deleted.
(webkitAccessibleActionDoAction): Deleted.
(webkitAccessibleActionGetNActions): Deleted.
(webkitAccessibleActionGetDescription): Deleted.
(webkitAccessibleActionGetKeybinding): Deleted.
(webkitAccessibleActionGetName): Deleted.
(webkitAccessibleActionInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceAction.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceComponent.cpp: Removed.

(atkToContents): Deleted.
(webkitAccessibleComponentRefAccessibleAtPoint): Deleted.
(webkitAccessibleComponentGetExtents): Deleted.
(webkitAccessibleComponentGrabFocus): Deleted.
(webkitAccessibleComponentScrollTo): Deleted.
(webkitAccessibleComponentScrollToPoint): Deleted.
(webkitAccessibleComponentInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceComponent.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceDocument.cpp: Removed.

(core): Deleted.
(documentAttributeValue): Deleted.
(webkitAccessibleDocumentGetAttributeValue): Deleted.
(webkitAccessibleDocumentGetAttributes): Deleted.
(webkitAccessibleDocumentGetLocale): Deleted.
(webkitAccessibleDocumentInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceDocument.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp: Removed.

(core): Deleted.
(webkitAccessibleEditableTextSetRunAttributes): Deleted.
(webkitAccessibleEditableTextSetTextContents): Deleted.
(webkitAccessibleEditableTextInsertText): Deleted.
(webkitAccessibleEditableTextCopyText): Deleted.
(webkitAccessibleEditableTextCutText): Deleted.
(webkitAccessibleEditableTextDeleteText): Deleted.
(webkitAccessibleEditableTextPasteText): Deleted.
(webkitAccessibleEditableTextInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceEditableText.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp: Removed.

(webkitAccessibleHyperlinkImplGetHyperlink): Deleted.
(webkitAccessibleHyperlinkImplInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp: Removed.

(core): Deleted.
(webkitAccessibleHypertextGetLink): Deleted.
(webkitAccessibleHypertextGetNLinks): Deleted.
(webkitAccessibleHypertextGetLinkIndex): Deleted.
(webkitAccessibleHypertextInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceHypertext.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceImage.cpp: Removed.

(core): Deleted.
(webkitAccessibleImageGetImagePosition): Deleted.
(webkitAccessibleImageGetImageDescription): Deleted.
(webkitAccessibleImageGetImageSize): Deleted.
(webkitAccessibleImageInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceImage.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceSelection.cpp: Removed.

(core): Deleted.
(listObjectForCoreSelection): Deleted.
(optionFromList): Deleted.
(optionFromSelection): Deleted.
(webkitAccessibleSelectionAddSelection): Deleted.
(webkitAccessibleSelectionClearSelection): Deleted.
(webkitAccessibleSelectionRefSelection): Deleted.
(webkitAccessibleSelectionGetSelectionCount): Deleted.
(webkitAccessibleSelectionIsChildSelected): Deleted.
(webkitAccessibleSelectionRemoveSelection): Deleted.
(webkitAccessibleSelectionSelectAllSelection): Deleted.
(webkitAccessibleSelectionInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceSelection.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceTable.cpp: Removed.

(core): Deleted.
(cell): Deleted.
(cellIndex): Deleted.
(cellAtIndex): Deleted.
(webkitAccessibleTableRefAt): Deleted.
(webkitAccessibleTableGetIndexAt): Deleted.
(webkitAccessibleTableGetColumnAtIndex): Deleted.
(webkitAccessibleTableGetRowAtIndex): Deleted.
(webkitAccessibleTableGetNColumns): Deleted.
(webkitAccessibleTableGetNRows): Deleted.
(webkitAccessibleTableGetColumnExtentAt): Deleted.
(webkitAccessibleTableGetRowExtentAt): Deleted.
(webkitAccessibleTableGetColumnHeader): Deleted.
(webkitAccessibleTableGetRowHeader): Deleted.
(webkitAccessibleTableGetCaption): Deleted.
(webkitAccessibleTableGetColumnDescription): Deleted.
(webkitAccessibleTableGetRowDescription): Deleted.
(webkitAccessibleTableInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceTable.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp: Removed.

(convertToGPtrArray): Deleted.
(core): Deleted.
(webkitAccessibleTableCellGetColumnHeaderCells): Deleted.
(webkitAccessibleTableCellGetRowHeaderCells): Deleted.
(webkitAccessibleTableCellGetColumnSpan): Deleted.
(webkitAccessibleTableCellGetRowSpan): Deleted.
(webkitAccessibleTableCellGetPosition): Deleted.
(webkitAccessibleTableCellGetTable): Deleted.
(webkitAccessibleTableCellInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceTableCell.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceText.cpp: Removed.

(core): Deleted.
(baselinePositionForRenderObject): Deleted.
(getAttributeSetForAccessibilityObject): Deleted.
(compareAttribute): Deleted.
(attributeSetDifference): Deleted.
(accessibilityObjectLength): Deleted.
(getAccessibilityObjectForOffset): Deleted.
(getRunAttributesFromAccessibilityObject): Deleted.
(textExtents): Deleted.
(offsetAdjustmentForListItem): Deleted.
(webCoreOffsetToAtkOffset): Deleted.
(atkOffsetToWebCoreOffset): Deleted.
(getNodeForAccessibilityObject): Deleted.
(getSelectionOffsetsForObject): Deleted.
(webkitAccessibleTextGetText): Deleted.
(emptyTextSelectionAtOffset): Deleted.
(webkitAccessibleTextGetChar): Deleted.
(nextWordStartPosition): Deleted.
(previousWordEndPosition): Deleted.
(wordAtPositionForAtkBoundary): Deleted.
(numberOfReplacedElementsBeforeOffset): Deleted.
(webkitAccessibleTextWordForBoundary): Deleted.
(isSentenceBoundary): Deleted.
(isWhiteSpaceBetweenSentences): Deleted.
(sentenceAtPositionForAtkBoundary): Deleted.
(webkitAccessibleTextSentenceForBoundary): Deleted.
(lineAtPositionForAtkBoundary): Deleted.
(webkitAccessibleTextLineForBoundary): Deleted.
(webkitAccessibleTextGetTextForOffset): Deleted.
(webkitAccessibleTextGetTextAfterOffset): Deleted.
(webkitAccessibleTextGetTextAtOffset): Deleted.
(webkitAccessibleTextGetTextBeforeOffset): Deleted.
(webkitAccessibleTextGetCharacterAtOffset): Deleted.
(webkitAccessibleTextGetCaretOffset): Deleted.
(webkitAccessibleTextGetRunAttributes): Deleted.
(webkitAccessibleTextGetDefaultAttributes): Deleted.
(webkitAccessibleTextGetCharacterExtents): Deleted.
(webkitAccessibleTextGetRangeExtents): Deleted.
(webkitAccessibleTextGetCharacterCount): Deleted.
(webkitAccessibleTextGetOffsetAtPoint): Deleted.
(webkitAccessibleTextGetNSelections): Deleted.
(webkitAccessibleTextGetSelection): Deleted.
(webkitAccessibleTextAddSelection): Deleted.
(webkitAccessibleTextSetSelection): Deleted.
(webkitAccessibleTextRemoveSelection): Deleted.
(webkitAccessibleTextSetCaretOffset): Deleted.
(webkitAccessibleTextGetStringAtOffset): Deleted.
(webkitAccessibleTextInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceText.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceValue.cpp: Removed.

(core): Deleted.
(webkitAccessibleSetNewValue): Deleted.
(webkitAccessibleGetIncrementValue): Deleted.
(webkitAccessibleGetValueAndText): Deleted.
(webkitAccessibleGetIncrement): Deleted.
(webkitAccessibleSetValue): Deleted.
(webkitAccessibleGetRange): Deleted.
(webkitAccessibleValueGetCurrentValue): Deleted.
(webkitAccessibleValueGetMaximumValue): Deleted.
(webkitAccessibleValueGetMinimumValue): Deleted.
(webkitAccessibleValueSetCurrentValue): Deleted.
(webkitAccessibleValueGetMinimumIncrement): Deleted.
(webkitAccessibleValueInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceValue.h: Removed.
  • accessibility/atk/WebKitAccessibleUtil.cpp: Removed.

(addToAtkAttributeSet): Deleted.
(contentsRelativeToAtkCoordinateType): Deleted.
(titleTagShouldBeUsedInDescriptionField): Deleted.
(accessibilityTitle): Deleted.
(accessibilityDescription): Deleted.
(selectionBelongsToObject): Deleted.
(objectFocusedAndCaretOffsetUnignored): Deleted.

  • accessibility/atk/WebKitAccessibleUtil.h: Removed.
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::attributes const):

  • editing/FrameSelection.h:
  • editing/atk/FrameSelectionAtk.cpp: Removed.

(WebCore::emitTextSelectionChange): Deleted.
(WebCore::maybeEmitTextFocusChange): Deleted.
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Deleted.

  • page/Settings.yaml:
  • platform/graphics/PlatformDisplay.cpp:
  • platform/graphics/PlatformDisplay.h:
  • platform/graphics/x11/PlatformDisplayX11.cpp:
  • platform/graphics/x11/PlatformDisplayX11.h:

Source/WebKit:

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp: Removed.

(coreRootObjectWrapperDetachedCallback): Deleted.
(rootWebAreaWrapper): Deleted.
(accessibilityRootObjectWrapper): Deleted.
(webkitWebPageAccessibilityObjectInitialize): Deleted.
(webkitWebPageAccessibilityObjectGetIndexInParent): Deleted.
(webkitWebPageAccessibilityObjectGetNChildren): Deleted.
(webkitWebPageAccessibilityObjectRefChild): Deleted.
(webkitWebPageAccessibilityObjectRefStateSet): Deleted.
(webkit_web_page_accessibility_object_class_init): Deleted.
(webkitWebPageAccessibilityObjectNew): Deleted.

  • WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.h: Removed.
  • WebProcess/WebPage/glib/WebPageGLib.cpp:

(WebKit::WebPage::platformInitialize):

  • WebProcess/wpe/WebProcessMainWPE.cpp:

(WebKit::initializeAccessibility): Deleted.

Tools:

  • DumpRenderTree/AccessibilityController.h:
  • DumpRenderTree/AccessibilityUIElement.h:
  • Scripts/valgrind/suppressions.txt:
  • Scripts/webkit-filter-log:
  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(testAccessibleChildrenChanged):
(testAccessibleAttributes):
(testAccessibleState):
(testAccessibleStateChanged):
(testAccessibleListMarkers):
(testTextSurrogatePair):
(testTextIterator):
(testTextExtents):
(testTextSelections):
(testTextAttributes):
(testTextStateChanged):
(testTextReplacedObjects):
(testTextListMarkers):
(testHyperlinkBasic):
(testHypertextBasic):
(testActionBasic):
(testDocumentBasic):
(testImageBasic):
(testSelectionMenuList):
(testTableBasic):

  • TestWebKitAPI/glib/PlatformGTK.cmake:
  • WebKitTestRunner/InjectedBundle/AccessibilityController.h:
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: Removed.

(WTR::AccessibilityController::resetToConsistentState): Deleted.
(WTR::childElementById): Deleted.
(WTR::AccessibilityController::accessibleElementById): Deleted.
(WTR::AccessibilityController::platformName): Deleted.
(WTR::AccessibilityController::injectAccessibilityPreference): Deleted.
(WTR::AccessibilityController::rootElement): Deleted.
(WTR::AccessibilityController::focusedElement): Deleted.
(WTR::AccessibilityController::addNotificationListener): Deleted.
(WTR::AccessibilityController::removeNotificationListener): Deleted.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp: Removed.

(): Deleted.
(WTR::AccessibilityNotificationHandler::AccessibilityNotificationHandler): Deleted.
(WTR::AccessibilityNotificationHandler::~AccessibilityNotificationHandler): Deleted.
(WTR::AccessibilityNotificationHandler::setNotificationFunctionCallback): Deleted.
(WTR::AccessibilityNotificationHandler::removeAccessibilityNotificationHandler): Deleted.
(WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks): Deleted.
(WTR::AccessibilityNotificationHandler::disconnectAccessibilityCallbacks): Deleted.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.h: Removed.

(WTR::AccessibilityNotificationHandler::create): Deleted.
(WTR::AccessibilityNotificationHandler::setPlatformElement): Deleted.
(WTR::AccessibilityNotificationHandler::platformElement const): Deleted.
(WTR::AccessibilityNotificationHandler::notificationFunctionCallback const): Deleted.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: Removed.

(): Deleted.
(WTR::AccessibilityUIElement::AccessibilityUIElement): Deleted.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Deleted.
(WTR::AccessibilityUIElement::isEqual): Deleted.
(WTR::AccessibilityUIElement::getChildren): Deleted.
(WTR::AccessibilityUIElement::getChildrenWithRange): Deleted.
(WTR::AccessibilityUIElement::childrenCount): Deleted.
(WTR::AccessibilityUIElement::elementAtPoint): Deleted.
(WTR::AccessibilityUIElement::indexOfChild): Deleted.
(WTR::AccessibilityUIElement::childAtIndex): Deleted.
(WTR::accessibilityElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::linkedUIElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaOwnsElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaOwnsReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaFlowToReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaControlsReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaLabelledByElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaLabelledByReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaDescribedByElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaDescribedByReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaDetailsElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaDetailsReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaErrorMessageElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaErrorMessageReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::disclosedRowAtIndex): Deleted.
(WTR::AccessibilityUIElement::rowAtIndex): Deleted.
(WTR::AccessibilityUIElement::selectedChildAtIndex const): Deleted.
(WTR::AccessibilityUIElement::selectedChildrenCount const): Deleted.
(WTR::AccessibilityUIElement::selectedRowAtIndex): Deleted.
(WTR::AccessibilityUIElement::titleUIElement): Deleted.
(WTR::AccessibilityUIElement::parentElement): Deleted.
(WTR::AccessibilityUIElement::disclosedByRow): Deleted.
(WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Deleted.
(WTR::AccessibilityUIElement::attributesOfDocumentLinks): Deleted.
(WTR::AccessibilityUIElement::attributesOfChildren): Deleted.
(WTR::AccessibilityUIElement::allAttributes): Deleted.
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Deleted.
(WTR::AccessibilityUIElement::stringAttributeValue): Deleted.
(WTR::AccessibilityUIElement::numberAttributeValue): Deleted.
(WTR::AccessibilityUIElement::currentStateValue const): Deleted.
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Deleted.
(WTR::AccessibilityUIElement::rowHeaders const): Deleted.
(WTR::AccessibilityUIElement::columnHeaders const): Deleted.
(WTR::AccessibilityUIElement::uiElementAttributeValue const): Deleted.
(WTR::AccessibilityUIElement::boolAttributeValue): Deleted.
(WTR::AccessibilityUIElement::isAttributeSettable): Deleted.
(WTR::AccessibilityUIElement::isAttributeSupported): Deleted.
(WTR::AccessibilityUIElement::parameterizedAttributeNames): Deleted.
(WTR::AccessibilityUIElement::role): Deleted.
(WTR::AccessibilityUIElement::subrole): Deleted.
(WTR::AccessibilityUIElement::roleDescription): Deleted.
(WTR::AccessibilityUIElement::computedRoleString): Deleted.
(WTR::AccessibilityUIElement::title): Deleted.
(WTR::AccessibilityUIElement::description): Deleted.
(WTR::AccessibilityUIElement::orientation const): Deleted.
(WTR::AccessibilityUIElement::stringValue): Deleted.
(WTR::AccessibilityUIElement::language): Deleted.
(WTR::AccessibilityUIElement::helpText const): Deleted.
(WTR::AccessibilityUIElement::x): Deleted.
(WTR::AccessibilityUIElement::y): Deleted.
(WTR::AccessibilityUIElement::width): Deleted.
(WTR::AccessibilityUIElement::height): Deleted.
(WTR::AccessibilityUIElement::clickPointX): Deleted.
(WTR::AccessibilityUIElement::clickPointY): Deleted.
(WTR::AccessibilityUIElement::intValue const): Deleted.
(WTR::AccessibilityUIElement::minValue): Deleted.
(WTR::AccessibilityUIElement::maxValue): Deleted.
(WTR::AccessibilityUIElement::valueDescription): Deleted.
(WTR::AccessibilityUIElement::insertionPointLineNumber): Deleted.
(WTR::AccessibilityUIElement::isPressActionSupported): Deleted.
(WTR::AccessibilityUIElement::isIncrementActionSupported): Deleted.
(WTR::AccessibilityUIElement::isDecrementActionSupported): Deleted.
(WTR::AccessibilityUIElement::isEnabled): Deleted.
(WTR::AccessibilityUIElement::isRequired const): Deleted.
(WTR::AccessibilityUIElement::isFocused const): Deleted.
(WTR::AccessibilityUIElement::isSelected const): Deleted.
(WTR::AccessibilityUIElement::isSelectedOptionActive const): Deleted.
(WTR::AccessibilityUIElement::isExpanded const): Deleted.
(WTR::AccessibilityUIElement::isChecked const): Deleted.
(WTR::AccessibilityUIElement::isIndeterminate const): Deleted.
(WTR::AccessibilityUIElement::hierarchicalLevel const): Deleted.
(WTR::AccessibilityUIElement::speakAs): Deleted.
(WTR::AccessibilityUIElement::ariaIsGrabbed const): Deleted.
(WTR::AccessibilityUIElement::ariaDropEffects const): Deleted.
(WTR::AccessibilityUIElement::lineForIndex): Deleted.
(WTR::AccessibilityUIElement::rangeForLine): Deleted.
(WTR::AccessibilityUIElement::rangeForPosition): Deleted.
(WTR::AccessibilityUIElement::boundsForRange): Deleted.
(WTR::AccessibilityUIElement::stringForRange): Deleted.
(WTR::AccessibilityUIElement::attributedStringForRange): Deleted.
(WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled): Deleted.
(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate): Deleted.
(WTR::AccessibilityUIElement::uiElementForSearchPredicate): Deleted.
(WTR::AccessibilityUIElement::selectTextWithCriteria): Deleted.
(WTR::AccessibilityUIElement::attributesOfColumnHeaders): Deleted.
(WTR::AccessibilityUIElement::attributesOfRowHeaders): Deleted.
(WTR::AccessibilityUIElement::attributesOfColumns): Deleted.
(WTR::AccessibilityUIElement::attributesOfRows): Deleted.
(WTR::AccessibilityUIElement::attributesOfVisibleCells): Deleted.
(WTR::AccessibilityUIElement::attributesOfHeader): Deleted.
(WTR::AccessibilityUIElement::rowCount): Deleted.
(WTR::AccessibilityUIElement::columnCount): Deleted.
(WTR::AccessibilityUIElement::indexInTable): Deleted.
(WTR::AccessibilityUIElement::rowIndexRange): Deleted.
(WTR::AccessibilityUIElement::columnIndexRange): Deleted.
(WTR::AccessibilityUIElement::cellForColumnAndRow): Deleted.
(WTR::AccessibilityUIElement::horizontalScrollbar const): Deleted.
(WTR::AccessibilityUIElement::verticalScrollbar const): Deleted.
(WTR::AccessibilityUIElement::selectedTextRange): Deleted.
(WTR::AccessibilityUIElement::setSelectedTextRange): Deleted.
(WTR::AccessibilityUIElement::increment): Deleted.
(WTR::AccessibilityUIElement::decrement): Deleted.
(WTR::AccessibilityUIElement::showMenu): Deleted.
(WTR::AccessibilityUIElement::press): Deleted.
(WTR::AccessibilityUIElement::setSelectedChild const): Deleted.
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const): Deleted.
(WTR::AccessibilityUIElement::removeSelectionAtIndex const): Deleted.
(WTR::AccessibilityUIElement::clearSelectedChildren const): Deleted.
(WTR::AccessibilityUIElement::accessibilityValue const): Deleted.
(WTR::AccessibilityUIElement::documentEncoding): Deleted.
(WTR::AccessibilityUIElement::documentURI): Deleted.
(WTR::AccessibilityUIElement::url): Deleted.
(WTR::AccessibilityUIElement::addNotificationListener): Deleted.
(WTR::AccessibilityUIElement::removeNotificationListener): Deleted.
(WTR::AccessibilityUIElement::isFocusable const): Deleted.
(WTR::AccessibilityUIElement::isSelectable const): Deleted.
(WTR::AccessibilityUIElement::isMultiSelectable const): Deleted.
(WTR::AccessibilityUIElement::isVisible const): Deleted.
(WTR::AccessibilityUIElement::isOffScreen const): Deleted.
(WTR::AccessibilityUIElement::isCollapsed const): Deleted.
(WTR::AccessibilityUIElement::isIgnored const): Deleted.
(WTR::AccessibilityUIElement::isSingleLine const): Deleted.
(WTR::AccessibilityUIElement::isMultiLine const): Deleted.
(WTR::AccessibilityUIElement::hasPopup const): Deleted.
(WTR::AccessibilityUIElement::takeFocus): Deleted.
(WTR::AccessibilityUIElement::takeSelection): Deleted.
(WTR::AccessibilityUIElement::addSelection): Deleted.
(WTR::AccessibilityUIElement::removeSelection): Deleted.
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Deleted.
(WTR::AccessibilityUIElement::textMarkerRangeForElement): Deleted.
(WTR::AccessibilityUIElement::textMarkerRangeLength): Deleted.
(WTR::AccessibilityUIElement::previousTextMarker): Deleted.
(WTR::AccessibilityUIElement::nextTextMarker): Deleted.
(WTR::AccessibilityUIElement::stringForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::rectsForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Deleted.
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::endTextMarkerForBounds): Deleted.
(WTR::AccessibilityUIElement::startTextMarkerForBounds): Deleted.
(WTR::AccessibilityUIElement::textMarkerForPoint): Deleted.
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker): Deleted.
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Deleted.
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): Deleted.
(WTR::AccessibilityUIElement::indexForTextMarker): Deleted.
(WTR::AccessibilityUIElement::isTextMarkerValid): Deleted.
(WTR::AccessibilityUIElement::textMarkerForIndex): Deleted.
(WTR::AccessibilityUIElement::startTextMarker): Deleted.
(WTR::AccessibilityUIElement::endTextMarker): Deleted.
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::scrollToMakeVisible): Deleted.
(WTR::AccessibilityUIElement::scrollToGlobalPoint): Deleted.
(WTR::AccessibilityUIElement::scrollToMakeVisibleWithSubFocus): Deleted.
(WTR::AccessibilityUIElement::supportedActions const): Deleted.
(WTR::AccessibilityUIElement::pathDescription const): Deleted.
(WTR::AccessibilityUIElement::mathPostscriptsDescription const): Deleted.
(WTR::AccessibilityUIElement::mathPrescriptsDescription const): Deleted.
(WTR::AccessibilityUIElement::classList const): Deleted.
(WTR::stringAtOffset): Deleted.
(WTR::AccessibilityUIElement::characterAtOffset): Deleted.
(WTR::AccessibilityUIElement::wordAtOffset): Deleted.
(WTR::AccessibilityUIElement::lineAtOffset): Deleted.
(WTR::AccessibilityUIElement::sentenceAtOffset): Deleted.
(WTR::AccessibilityUIElement::replaceTextInRange): Deleted.
(WTR::AccessibilityUIElement::insertText): Deleted.
(WTR::AccessibilityUIElement::popupValue const): Deleted.

  • WebKitTestRunner/PlatformGTK.cmake:
  • WebKitTestRunner/PlatformWPE.cmake:
  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

  • accessibility/gtk/aria-modal-state-exposed-expected.txt:
  • accessibility/gtk/aria-modal-state-exposed.html:
  • accessibility/gtk/name-from-label-expected.txt:
  • accessibility/gtk/name-from-label.html:
  • accessibility/gtk/object-attributes-expected.txt:
  • accessibility/gtk/object-attributes.html:
  • accessibility/language-attribute.html:
5:33 AM Changeset in webkit [291612] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[GLIB] Use a static string for default application name
https://bugs.webkit.org/show_bug.cgi?id=238124

Patch by Philippe Normand <pnormand@igalia.com> on 2022-03-22
Reviewed by Xabier Rodriguez-Calvar.

  • platform/glib/ApplicationGLib.cpp:

(WebCore::getApplicationName):

  • platform/glib/ApplicationGLib.h:
3:36 AM Changeset in webkit [291611] by youenn@apple.com
  • 91 edits in trunk/Source

Move RealtimeMediaSource::VideoSampleObserver::videoSampleAvailable to VideoFrame
https://bugs.webkit.org/show_bug.cgi?id=237884

Reviewed by Eric Carlson.

Source/WebCore:

Refactoring to do the following:

  • Renaming of VideoSampleObserver to VideoFrameObserver, videoSampleAvailable to videoFrameAvailable...
  • videoFrameAvailable takes a VideoFrame instead of a MediaSample
  • Use VideoFrame::rotation and VideoFrame::isMirrored.
  • Use VideoFrame::Rotation instead of MediaSample::VideoRotation

Update code according this renaming.
Move from using MediaSample to VideoFrame where it makes sense.

Prepare for removal of MediaSample as parent class of VideoFrame.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
  • html/canvas/WebGLRenderingContextBase.cpp:
  • platform/MediaSample.h:
  • platform/VideoFrame.cpp:
  • platform/VideoFrame.h:
  • platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
  • platform/graphics/cv/ImageRotationSessionVT.h:
  • platform/graphics/cv/ImageRotationSessionVT.mm:
  • platform/graphics/cv/ImageTransferSessionVT.h:
  • platform/graphics/cv/ImageTransferSessionVT.mm:
  • platform/graphics/cv/VideoFrameCV.h:
  • platform/graphics/cv/VideoFrameCV.mm:
  • platform/graphics/gstreamer/VideoFrameGStreamer.cpp:
  • platform/graphics/gstreamer/VideoFrameGStreamer.h:
  • platform/mediarecorder/MediaRecorderPrivate.h:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:
  • platform/mediarecorder/MediaRecorderPrivateMock.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
  • platform/mediastream/RealtimeMediaSource.cpp:
  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:
  • platform/mediastream/RealtimeOutgoingVideoSource.h:
  • platform/mediastream/RealtimeVideoCaptureSource.cpp:
  • platform/mediastream/RealtimeVideoCaptureSource.h:
  • platform/mediastream/RealtimeVideoSource.cpp:
  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mediastream/VideoPreset.h:
  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:
  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.h:
  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h:
  • platform/mediastream/ios/ReplayKitCaptureSource.mm:
  • platform/mediastream/libwebrtc/VideoFrameLibWebRTC.cpp:
  • platform/mediastream/libwebrtc/VideoFrameLibWebRTC.h:
  • platform/mediastream/libwebrtc/gstreamer/RealtimeIncomingVideoSourceLibWebRTC.cpp:
  • platform/mediastream/libwebrtc/gstreamer/RealtimeOutgoingVideoSourceLibWebRTC.cpp:
  • platform/mediastream/libwebrtc/gstreamer/RealtimeOutgoingVideoSourceLibWebRTC.h:
  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
  • platform/mock/MockRealtimeVideoSource.cpp:
  • platform/mock/MockRealtimeVideoSource.h:
  • testing/Internals.cpp:
  • testing/Internals.h:

Source/WebKit:

Move from using MediaSample to VideoFrame directly.

  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.messages.in:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp:
  • WebProcess/GPU/media/RemoteVideoFrameProxy.h:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:
  • WebProcess/GPU/webrtc/SharedVideoFrame.cpp:
  • WebProcess/GPU/webrtc/SharedVideoFrame.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:
  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.messages.in:
  • WebProcess/cocoa/RemoteRealtimeVideoSource.h:
3:18 AM Changeset in webkit [291610] by commit-queue@webkit.org
  • 5 edits
    1 copy in trunk/Source/WebCore

[TextureMapper] Split GraphicsContextGLTextureMapper into two classes
https://bugs.webkit.org/show_bug.cgi?id=238141

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-03-22
Reviewed by Alejandro G. Castro.

Split GraphicsContextGLTextureMapper into two distinct classes. The
current class unconditionally inherits from GraphicsContextGLOpenGL, and
the new GraphicsContextGLTextureMapperANGLE inherits from
GraphicsContextGLANGLE. This reduces complexity and avoids the
implementation to span across two separate files. The two classes can
also be developed independently, with more changes and cleanups already
planned for the ANGLE variant.

No new tests due to no actual change in behavior.

  • platform/TextureMapper.cmake:
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::createWebProcessGraphicsContextGL):
(WebCore::GraphicsContextGLTextureMapper::create):
(WebCore::GraphicsContextGLTextureMapper::GraphicsContextGLTextureMapper):
(WebCore::GraphicsContextGLTextureMapper::layerContentsDisplayDelegate):
(WebCore::GraphicsContextGLTextureMapper::copyTextureFromMedia):
(WebCore::GraphicsContextGLTextureMapper::paintCompositedResultsToVideoFrame):
(WebCore::GraphicsContextGLTextureMapper::platformInitialize):

  • platform/graphics/texmap/GraphicsContextGLTextureMapper.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::platformDisplay const):
(WebCore::GraphicsContextGLANGLE::platformConfig const):
(WebCore::GraphicsContextGLANGLE::makeContextCurrent):
(WebCore::GraphicsContextGLANGLE::checkGPUStatus):
(WebCore::GraphicsContextGLANGLE::platformReleaseThreadResources):
(WebCore::GraphicsContextGLANGLE::readCompositedResults):
(WebCore::createWebProcessGraphicsContextGL):
(WebCore::GraphicsContextGLTextureMapperANGLE::create):
(WebCore::GraphicsContextGLTextureMapperANGLE::GraphicsContextGLTextureMapperANGLE):
(WebCore::GraphicsContextGLTextureMapperANGLE::~GraphicsContextGLTextureMapperANGLE):
(WebCore::GraphicsContextGLTextureMapperANGLE::layerContentsDisplayDelegate):
(WebCore::GraphicsContextGLTextureMapperANGLE::copyTextureFromMedia):
(WebCore::GraphicsContextGLTextureMapperANGLE::paintCompositedResultsToVideoFrame):
(WebCore::GraphicsContextGLTextureMapperANGLE::platformInitializeContext):
(WebCore::GraphicsContextGLTextureMapperANGLE::platformInitialize):
(WebCore::GraphicsContextGLTextureMapperANGLE::setContextVisibility):
(WebCore::GraphicsContextGLTextureMapperANGLE::reshapeDisplayBufferBacking):
(WebCore::GraphicsContextGLTextureMapperANGLE::prepareForDisplay):
(WebCore::GraphicsContextGLTextureMapper::platformInitializeContext): Deleted.
(WebCore::GraphicsContextGLTextureMapper::platformInitialize): Deleted.
(WebCore::GraphicsContextGLTextureMapper::setContextVisibility): Deleted.
(WebCore::GraphicsContextGLTextureMapper::prepareForDisplay): Deleted.
(WebCore::GraphicsContextGLTextureMapper::reshapeDisplayBufferBacking): Deleted.

  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h: Copied from Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.h.
2:43 AM Changeset in webkit [291609] by Ziran Sun
  • 16 edits in trunk

[selection] Change form's selection attribute to unsigned long
https://bugs.webkit.org/show_bug.cgi?id=237951

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update test expectations as more sub-tests are now passing.

  • web-platform-tests/html/semantics/forms/textfieldselection/selection-expected.txt:
  • web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt:
  • web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt:

Source/WebCore:

We should change the type of attribute "selectionStart" and "selectionEnd"
from long to unsigned long. Also "start" and "end" parameters in function
selectionRange() need to be changed correspondingly.

This change is in line with Chromium CL at
https://github.com/chromium/chromium/commit/b6ff6db1c5683b5e564a72b0941ad504b410d1af

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setDefaultSelectionAfterFocus):
(WebCore::HTMLInputElement::selectionStartForBindings const):
(WebCore::HTMLInputElement::setSelectionStartForBindings):
(WebCore::HTMLInputElement::selectionEndForBindings const):
(WebCore::HTMLInputElement::setSelectionEndForBindings):
(WebCore::HTMLInputElement::setSelectionRangeForBindings):

  • html/HTMLInputElement.h:
  • html/HTMLInputElement.idl:
  • html/HTMLTextAreaElement.idl:
  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
(WebCore::HTMLTextFormControlElement::setSelectionStart):
(WebCore::HTMLTextFormControlElement::setSelectionEnd):
(WebCore::HTMLTextFormControlElement::select):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::selectionStart const):
(WebCore::HTMLTextFormControlElement::computeSelectionStart const):
(WebCore::HTMLTextFormControlElement::selectionEnd const):
(WebCore::HTMLTextFormControlElement::computeSelectionEnd const):

  • html/HTMLTextFormControlElement.h:

(WebCore::HTMLTextFormControlElement::cacheSelection):
(WebCore::HTMLTextFormControlElement::hasCachedSelection const):

LayoutTests:

Update test accordingly. This is inline with Chromium.

Note that for selection-start-end-readonly.html, two sub-tests
are now failing. This is the right behaviour since the test assumes
types for selectionStart and selectionEnd as "int". We could modify the
test and make the type as unsigned. Interestingly the test script's
format is strange and it seems having "return" for each line. Simply updating
some lines on the test scripts causes errors when applying the patch. We have
decided to address this test in a separate patch (maybe remove the file and added
a new one with proper format).

  • fast/forms/input-appearance-selection.html:
  • fast/forms/selection-functions-expected.txt:
  • fast/forms/selection-start-end-readonly-expected.txt:
1:51 AM Changeset in webkit [291608] by Diego Pino Garcia
  • 4 edits in trunk/Source

Source/WebCore:
Unreviewed, fix non-unified build after r291597

  • css/typedom/CSSNumericValue.cpp:

Source/WebKit:
Unreviewed, fix non-unified build after r291589

  • NetworkProcess/NetworkBroadcastChannelRegistry.cpp:
1:14 AM Changeset in webkit [291607] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

Squelch warning message from output of build-jsc
https://bugs.webkit.org/show_bug.cgi?id=238177

Reviewed by Saam Barati.

There was a "prototype mismatch" error.

  • Scripts/webkitperl/BuildSubproject.pm:
12:44 AM Changeset in webkit [291606] by youenn@apple.com
  • 6 edits in trunk

Website policies are not respected when doing COOP based process swap
https://bugs.webkit.org/show_bug.cgi?id=238036
<rdar://89616625>

Reviewed by Chris Dumez.

Source/WebKit:

In case of normal process swap, we make use of website policies so everything is fine.
For COOP based process swap, this happens later on, at a point where we lost website policies.
To overcome this, we store the website policies used by a navigation inside the API::Navigation object.
It is used by continueNavigationInNewProcess to correctly initialize the new WebPage website policies.
We then set the website policies in the navigation object just before continuing the load in the same process,
as process swap may happen later when inspecting the response.
Minor refactoring in continueNavigationInNewProcess to get the policies directly from the given Navigation object.
Minor refactoring in receivedNavigationPolicyDecision to make the code doing process swap clearer.

Covered by API test.

  • UIProcess/API/APINavigation.h:

(API::Navigation::setWebsitePoliciesForProcessSwap):
(API::Navigation::takeWebsitePoliciesForProcessSwap):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation):

  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
12:21 AM Changeset in webkit [291605] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Adjust anchor/focus nodes after removal when LiveRangeSelection is enabled
https://bugs.webkit.org/show_bug.cgi?id=238004

Patch by Frédéric Wang <fwang@igalia.com> on 2022-03-22
Reviewed by Ryosuke Niwa.

This patch ensures that FrameSelection::nodeWillBeRemoved adjusts m_anchor and m_focus
when corresponding nodes are removed from the DOM tree. There are no behavior changes
when live range is disabled.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::nodeWillBeRemoved): When live range is enabled,
Ensure that anchor nodes are updated even when the selection is none and pass information
about whether anchor or focus are removed by the node removal.
(WebCore::FrameSelection::respondToNodeModification): Adjust anchor and focus if they
are removed, when live range is enabled.

  • editing/FrameSelection.h: Add arguments for anchor and focus.

Mar 21, 2022:

10:26 PM Changeset in webkit [291604] by Said Abou-Hallawa
  • 46 edits
    2 adds in trunk

[GPU Process] Make GraphicsContextState keep track of changes till they are applied
https://bugs.webkit.org/show_bug.cgi?id=238066
rdar://90585183

Reviewed by Simon Fraser.

Source/WebCore:

A member of type GraphicsContextState::ChangeFlags will be added to
GraphicsContextState to keep track of what has changes since it was last
applied. So we can eliminate the struct GraphicsContextStateChange.

We will have to have a single member for every GraphicsContextState::Change.

  1. So we will combine the color, the pattern, the gradient and the gradient space transform in one class called 'SourceBrush'.
  1. We will combine the shadow offset, the shadow blurRadius, the shadow color and the radius mode in one struct called 'DropShadow'
  1. And we will combine the CompositeOperator and the BledMode in one struct called 'CompositeMode'.

GraphicsContextState will handle setting its members, its encoding and
decoding and its streaming to text.

Adding a transparency layer in CG sets the global alpha to 1. We need to
sync the member GraphicsContextState.alpha with the platform alpha when
we beginTransparencyLayer() and when we endTransparencyLayer().

DisplayList::Recorder will keep its stack of GraphicsContextState. The
difference between the state of GraphicsContext and the state of the
Recorder is we eagerly apply the former to the platform context but we
lazily record the changes of the later. Recorder::didUpdateState()
overrides the base class method to just merge the changes from the base
class GraphicsContext::m_state to Recorder::currentState().state.
Recorder::appendStateChangeItem() records the accumulated changes in the
currentState() since the last drawing.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/BifurcatedGraphicsContext.cpp:

(WebCore::BifurcatedGraphicsContext::beginTransparencyLayer):
(WebCore::BifurcatedGraphicsContext::endTransparencyLayer):
(WebCore::BifurcatedGraphicsContext::didUpdateState):

  • platform/graphics/BifurcatedGraphicsContext.h:
  • platform/graphics/DrawGlyphsRecorder.h:
  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::updateState):
(WebCore::GraphicsContext::getShadow const):
(WebCore::GraphicsContext::setStrokeColor): Deleted.
(WebCore::GraphicsContext::setShadow): Deleted.
(WebCore::GraphicsContext::clearShadow): Deleted.
(WebCore::GraphicsContext::setFillColor): Deleted.
(WebCore::GraphicsContext::setStrokePattern): Deleted.
(WebCore::GraphicsContext::setFillPattern): Deleted.
(WebCore::GraphicsContext::setStrokeGradient): Deleted.
(WebCore::GraphicsContext::setFillGradient): Deleted.
(WebCore::GraphicsContext::setCompositeOperation): Deleted.

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::fillColor const):
(WebCore::GraphicsContext::fillGradient const):
(WebCore::GraphicsContext::fillGradientSpaceTransform const):
(WebCore::GraphicsContext::fillPattern const):
(WebCore::GraphicsContext::setFillBrush):
(WebCore::GraphicsContext::setFillColor):
(WebCore::GraphicsContext::setFillGradient):
(WebCore::GraphicsContext::setFillPattern):
(WebCore::GraphicsContext::fillRule const):
(WebCore::GraphicsContext::setFillRule):
(WebCore::GraphicsContext::strokeColor const):
(WebCore::GraphicsContext::strokeGradient const):
(WebCore::GraphicsContext::strokeGradientSpaceTransform const):
(WebCore::GraphicsContext::strokePattern const):
(WebCore::GraphicsContext::setStrokeBrush):
(WebCore::GraphicsContext::setStrokeColor):
(WebCore::GraphicsContext::setStrokeGradient):
(WebCore::GraphicsContext::setStrokePattern):
(WebCore::GraphicsContext::strokeThickness const):
(WebCore::GraphicsContext::setStrokeThickness):
(WebCore::GraphicsContext::strokeStyle const):
(WebCore::GraphicsContext::setStrokeStyle):
(WebCore::GraphicsContext::dropShadow const):
(WebCore::GraphicsContext::shadowOffset const):
(WebCore::GraphicsContext::shadowBlur const):
(WebCore::GraphicsContext::shadowColor const):
(WebCore::GraphicsContext::setDropShadow):
(WebCore::GraphicsContext::setShadow):
(WebCore::GraphicsContext::clearShadow):
(WebCore::GraphicsContext::hasVisibleShadow const):
(WebCore::GraphicsContext::hasBlurredShadow const):
(WebCore::GraphicsContext::hasShadow const):
(WebCore::GraphicsContext::compositeMode const):
(WebCore::GraphicsContext::compositeOperation const):
(WebCore::GraphicsContext::blendMode const):
(WebCore::GraphicsContext::setCompositeMode):
(WebCore::GraphicsContext::setCompositeOperation):
(WebCore::GraphicsContext::alpha const):
(WebCore::GraphicsContext::setAlpha):
(WebCore::GraphicsContext::textDrawingMode const):
(WebCore::GraphicsContext::setTextDrawingMode):
(WebCore::GraphicsContext::imageInterpolationQuality const):
(WebCore::GraphicsContext::setImageInterpolationQuality):
(WebCore::GraphicsContext::setShouldAntialias):
(WebCore::GraphicsContext::setShouldSmoothFonts):
(WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContext::shadowsIgnoreTransforms const):
(WebCore::GraphicsContext::setShadowsIgnoreTransforms):
(WebCore::GraphicsContext::setDrawLuminanceMask):
(WebCore::GraphicsContext::setUseDarkAppearance):
(WebCore::GraphicsContext::blendModeOperation const): Deleted.

  • platform/graphics/GraphicsContextState.cpp:

(WebCore::GraphicsContextState::GraphicsContextState):
(WebCore::GraphicsContextState::hasOnlyPrimitiveChanges const):
(WebCore::GraphicsContextState::mergeChanges):
(WebCore::GraphicsContextState::didBeginTransparencyLayer):
(WebCore::GraphicsContextState::didEndTransparencyLayer):
(WebCore::stateChangeName):
(WebCore::GraphicsContextState::dump const):
(WebCore::operator<<):
(WebCore::GraphicsContextStateChange::changesFromState const): Deleted.
(WebCore::GraphicsContextStateChange::accumulate): Deleted.
(WebCore::GraphicsContextStateChange::apply const): Deleted.
(WebCore::GraphicsContextStateChange::dump const): Deleted.

  • platform/graphics/GraphicsContextState.h:

(WebCore::GraphicsContextState::GraphicsContextState):
(WebCore::GraphicsContextState::changes const):
(WebCore::GraphicsContextState::didApplyChanges):
(WebCore::GraphicsContextState::setFillBrush):
(WebCore::GraphicsContextState::setFillColor):
(WebCore::GraphicsContextState::setFillGradient):
(WebCore::GraphicsContextState::setFillPattern):
(WebCore::GraphicsContextState::setFillRule):
(WebCore::GraphicsContextState::setStrokeBrush):
(WebCore::GraphicsContextState::setStrokeColor):
(WebCore::GraphicsContextState::setStrokeGradient):
(WebCore::GraphicsContextState::setStrokePattern):
(WebCore::GraphicsContextState::setStrokeThickness):
(WebCore::GraphicsContextState::setStrokeStyle):
(WebCore::GraphicsContextState::setCompositeMode):
(WebCore::GraphicsContextState::setDropShadow):
(WebCore::GraphicsContextState::setAlpha):
(WebCore::GraphicsContextState::setImageInterpolationQuality):
(WebCore::GraphicsContextState::setTextDrawingMode):
(WebCore::GraphicsContextState::setShouldAntialias):
(WebCore::GraphicsContextState::setShouldSmoothFonts):
(WebCore::GraphicsContextState::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContextState::setShadowsIgnoreTransforms):
(WebCore::GraphicsContextState::setDrawLuminanceMask):
(WebCore::GraphicsContextState::setUseDarkAppearance):
(WebCore::GraphicsContextState::setProperty):
(WebCore::GraphicsContextState::encode const):
(WebCore::GraphicsContextState::decode):
(WebCore::GraphicsContextStateChange::GraphicsContextStateChange): Deleted.

  • platform/graphics/GraphicsTypes.cpp:

(WebCore::operator<<):

  • platform/graphics/GraphicsTypes.h:

(WebCore::CompositeMode::operator==):
(WebCore::CompositeMode::encode const):
(WebCore::CompositeMode::decode):
(WebCore::DropShadow::isVisible const):
(WebCore::DropShadow::isBlurred const):
(WebCore::DropShadow::hasOutsets const):
(WebCore::operator==):
(WebCore::DropShadow::encode const):
(WebCore::DropShadow::decode):

  • platform/graphics/NullGraphicsContext.h:
  • platform/graphics/ShadowBlur.cpp:

(WebCore::ShadowBlur::ShadowBlur):

  • platform/graphics/ShadowBlur.h:
  • platform/graphics/SourceBrush.cpp: Added.

(WebCore::SourceBrush::SourceBrush):
(WebCore::SourceBrush::gradientSpaceTransform const):
(WebCore::SourceBrush::gradient const):
(WebCore::SourceBrush::pattern const):
(WebCore::SourceBrush::setGradient):
(WebCore::SourceBrush::setPattern):
(WebCore::operator<<):

  • platform/graphics/SourceBrush.h: Added.

(WebCore::SourceBrush::color const):
(WebCore::SourceBrush::setColor):
(WebCore::SourceBrush::brush const):
(WebCore::SourceBrush::setGradient):
(WebCore::SourceBrush::isPrimitive const):
(WebCore::operator==):
(WebCore::SourceBrush::Brush::LogicalGradient::encode const):
(WebCore::SourceBrush::Brush::LogicalGradient::decode):
(WebCore::SourceBrush::Brush::encode const):
(WebCore::SourceBrush::Brush::decode):
(WebCore::SourceBrush::encode const):
(WebCore::SourceBrush::decode):

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::FillSource::FillSource):
(WebCore::Cairo::StrokeSource::StrokeSource):
(WebCore::Cairo::ShadowState::ShadowState):

  • platform/graphics/cairo/FontCairo.cpp:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::Gradient::fill):

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContextCairo::drawRect):
(WebCore::GraphicsContextCairo::drawLine):
(WebCore::GraphicsContextCairo::drawEllipse):
(WebCore::GraphicsContextCairo::fillRect):
(WebCore::GraphicsContextCairo::drawLinesForText):
(WebCore::GraphicsContextCairo::didUpdateState):
(WebCore::GraphicsContextCairo::drawGlyphs):

  • platform/graphics/cairo/GraphicsContextCairo.h:
  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContextCG::GraphicsContextCG):
(WebCore::GraphicsContextCG::drawNativeImage):
(WebCore::GraphicsContextCG::applyStrokePattern):
(WebCore::GraphicsContextCG::applyFillPattern):
(WebCore::calculateDrawingMode):
(WebCore::GraphicsContextCG::drawPath):
(WebCore::GraphicsContextCG::fillPath):
(WebCore::GraphicsContextCG::strokePath):
(WebCore::GraphicsContextCG::fillRect):
(WebCore::GraphicsContextCG::fillRoundedRectImpl):
(WebCore::GraphicsContextCG::fillRectWithRoundedHole):
(WebCore::GraphicsContextCG::beginTransparencyLayer):
(WebCore::applyShadowOffsetWorkaroundIfNeeded):
(WebCore::setCGShadow):
(WebCore::GraphicsContextCG::didUpdateState):
(WebCore::GraphicsContextCG::strokeRect):
(WebCore::GraphicsContextCG::fillEllipse):
(WebCore::GraphicsContextCG::strokeEllipse):

  • platform/graphics/cg/GraphicsContextCG.h:
  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::populateInternalState):
(WebCore::DrawGlyphsRecorder::populateInternalContext):
(WebCore::DrawGlyphsRecorder::concludeInternalContext):
(WebCore::DrawGlyphsRecorder::updateFillBrush):
(WebCore::DrawGlyphsRecorder::updateStrokeBrush):
(WebCore::DrawGlyphsRecorder::updateCTM):
(WebCore::DrawGlyphsRecorder::updateShadow):
(WebCore::DrawGlyphsRecorder::recordDrawGlyphs):
(WebCore::DrawGlyphsRecorder::updateFillColor): Deleted.
(WebCore::DrawGlyphsRecorder::updateStrokeColor): Deleted.
(WebCore::shadowIsCleared): Deleted.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::shouldDumpForFlags):

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::SetState::SetState):
(WebCore::DisplayList::SetState::apply):
(WebCore::DisplayList::operator<<):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::SetState::state const):
(WebCore::DisplayList::SetState::encode const):
(WebCore::DisplayList::SetState::decode):
(WebCore::DisplayList::SetState::stateChange const): Deleted.
(WebCore::DisplayList::SetState::stateChange): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::appendStateChangeItem):
(WebCore::DisplayList::Recorder::appendStateChangeItemIfNecessary):
(WebCore::DisplayList::Recorder::state const):
(WebCore::DisplayList::Recorder::didUpdateState):
(WebCore::DisplayList::Recorder::save):
(WebCore::DisplayList::Recorder::restore):
(WebCore::DisplayList::Recorder::beginTransparencyLayer):
(WebCore::DisplayList::Recorder::endTransparencyLayer):
(WebCore::DisplayList::containsOnlyInlineStateChanges): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.h:

(WebCore::DisplayList::Recorder::ContextState::ContextState):
(WebCore::DisplayList::Recorder::ContextState::cloneForTransparencyLayer const):
(WebCore::DisplayList::Recorder::ContextState::cloneForSave const): Deleted.

  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp:

(WebCore::DisplayList::RecorderImpl::recordSetState):

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

(WebCore::DisplayList::applySetStateItem):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::didUpdateState):
(Nicosia::CairoOperationRecorder::fillRect):
(Nicosia::CairoOperationRecorder::fillRoundedRect):
(Nicosia::CairoOperationRecorder::drawGlyphs):
(Nicosia::CairoOperationRecorder::drawRect):
(Nicosia::CairoOperationRecorder::drawLine):
(Nicosia::CairoOperationRecorder::drawLinesForText):
(Nicosia::CairoOperationRecorder::drawEllipse):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
  • rendering/svg/RenderSVGPath.cpp:

(WebCore::useStrokeStyleToFill):

Source/WebKit:

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::setState):

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::recordSetState):

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Tools:

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

(TestWebKitAPI::TEST):

LayoutTests:

  • displaylists/extent-includes-shadow-expected.txt:
  • displaylists/extent-includes-transforms-expected.txt:
  • displaylists/layer-dispay-list-expected.txt:
  • gpu-process/TestExpectations:
9:26 PM Changeset in webkit [291603] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Change Date.parse to stop returning numbers with fractional part
https://bugs.webkit.org/show_bug.cgi?id=238050

Reviewed by Saam Barati.

JSTests:

  • stress/date-parse-timeclip.js: Added.

(shouldBe):

Source/JavaScriptCore:

Date.parse should return NaN or integer numbers[1,2]. This patch applies timeClip
to the result of Date.parse to ensure that the returned value is time value.

[1]: https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date.parse
[2]: https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-time-values-and-time-range

  • runtime/DateConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

8:54 PM Changeset in webkit [291602] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix bug in Relationship::mergeImpl
https://bugs.webkit.org/show_bug.cgi?id=238183
<rdar://89822922>

Reviewed by Yusuke Suzuki.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
8:52 PM Changeset in webkit [291601] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

AirFixObviousSpills needs to consider a PreIndex and PostIndex as clobbering the Reg used for indexing
https://bugs.webkit.org/show_bug.cgi?id=238178
<rdar://87345895>

Reviewed by Mark Lam.

Inside AirFixObviousSpills, we run a basic alias analysis for StackSlots and
registers. For example, when we overwrite a register, we clear anything
it's aliased with. However, the way we were doing this was by looking at
each Arg that was Defd. However, this iteration was missing that
PostIndex/PreIndex mutate the register that feeds into the address Arg.
This patch fixes the issue by walking the instruction in such a way that
we visit all the Defs we care about, both Regs and StackSlots.

  • b3/air/AirFixObviousSpills.cpp:
8:49 PM Changeset in webkit [291600] by Tyler Wilcock
  • 12 edits
    3 copies
    1 move
    8 adds
    2 deletes in trunk

AX: AccessibilityObject::visibleCharacterRange is extremely slow when called on objects with lots of text
https://bugs.webkit.org/show_bug.cgi?id=237678

Reviewed by Andres Gonzalez.

Source/WebCore:

AccessibilityObject::visibleCharacterRange is extremely slow when
called on objects with lots of text. For example, trying to enter a
large contenteditable element with VoiceOver causes "Safari not
responding" because WebKit is so slow to return this data.

This patch fixes this in two ways. First, we optimize computation of
the end boundary point by grabbing previous line start positions in
batches and binary searching within each batch to find the correct
value.

I tried to apply this algorithm to the computation of the start
boundary, but that regressed performance for small and medium text
objects, and didn't yield any noticeable improvement for large text
objects. Keeping start boundary computation as-is while changing the
end boundary computation provided the best performance at all text
sizes.

Second, this patch caches visibleCharacterRange results, as the same
inputs to this function will always yield the same output. It's common
for this data to be requested multiple times without any change in
page state (e.g. scrolling), so caching further improves performance
by a lot.

Additional testcases added to accessibility/visible-character-range.html to
ensure behavior is correct.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::previousLineStartBoundaryPoints const): Added.
(WebCore::AccessibilityObject::lastBoundaryPointContainedInRect const): Added.
(WebCore::AccessibilityObject::boundaryPointsContainedInRect const): Added.
(WebCore::AccessibilityObject::visibleCharacterRange const):
Wraps visibleCharacterRangeInternal to handle caching.
(WebCore::AccessibilityObject::visibleCharacterRangeInternal const):
(WebCore::AccessibilityObject::previousLineStartPositionInternal const): Added.
(WebCore::AccessibilityObject::previousLineStartPosition const):
Wraps previousLineStartPositionInternal to return default
VisualPosition if it returns std::nullopt (existing callers expect this behavior)

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::lastBoundaryPointContainedInRect const): Added.

  • dom/BoundaryPoint.cpp:

(WebCore::operator<<):

  • dom/BoundaryPoint.h:

Added implementation of operator<< to make debugging boundary points easier.

LayoutTests:

Add many new visible character range testcases split across four new tests.

  • accessibility/visible-character-range-basic.html: Added.
  • accessibility/visible-character-range-height-changes.html: Added.
  • accessibility/visible-character-range-scrolling.html: Added.
  • accessibility/visible-character-range-width-changes.html: Added.
  • platform/glib/TestExpectations: Skip new tests.
  • platform/ios-simulator-wk2/TestExpectations:

Mark new tests as crashing since the old test was crashing in main.

  • platform/ios/TestExpectations: Enable new tests.
  • platform/ios/accessibility/visible-character-range-basic-expected.txt: Added.
  • platform/ios/accessibility/visible-character-range-expected.txt: Removed.
  • platform/ios/accessibility/visible-character-range-height-changes-expected.txt: Added.
  • platform/ios/accessibility/visible-character-range-scrolling-expected.txt: Added.
  • platform/ios/accessibility/visible-character-range-width-changes-expected.txt: Added.
  • platform/mac-wk1/TestExpectations: Skip new tests.
  • platform/mac/accessibility/visible-character-range-basic-expected.txt: Added.
  • platform/mac/accessibility/visible-character-range-expected.txt: Removed.
  • platform/mac/accessibility/visible-character-range-height-changes-expected.txt: Added.
  • platform/mac/accessibility/visible-character-range-scrolling-expected.txt: Added.
  • platform/mac/accessibility/visible-character-range-width-changes-expected.txt: Added.
  • platform/win/TestExpectations: Skip new tests.
  • resources/accessibility-helper.js:

(visibleRange): Added.

8:33 PM Changeset in webkit [291599] by Simon Fraser
  • 9 edits in trunk/Source/WebKit

Do all RemoteLayerBackingStore buffer swapping in one batch
https://bugs.webkit.org/show_bug.cgi?id=238161

Reviewed by Tim Horton.

Previously, RemoteLayerBackingStore buffer swapping happened per-layer in
PlatformCALayerRemote::recursiveBuildTransaction().

To prepare for a single IPC for all buffer swapping, batch all the swapping under
prepareBackingStoresForDisplay() which is called from
RemoteLayerTreeContext::buildTransaction().

RemoteLayerBackingStoreCollection tracks m_backingStoresNeedingDisplay, and
RemoteLayerBackingStore implements needsDisplay() so we only add backing stores to this hash
set that need any buffer swapping.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::layerWillBeDisplayed):
(WebKit::RemoteLayerBackingStore::needsDisplay const):
(WebKit::RemoteLayerBackingStore::prepareToDisplay):
(WebKit::RemoteLayerBackingStore::paintContents):
(WebKit::RemoteLayerBackingStore::takePendingFlushers):

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:

(WebKit::RemoteLayerBackingStoreCollection::backingStoreNeedsDisplay):
(WebKit::RemoteLayerBackingStoreCollection::prepareBackingStoresForDisplay):
(WebKit::RemoteLayerBackingStoreCollection::paintReachableBackingStoreContents):
(WebKit::RemoteLayerBackingStoreCollection::willFlushLayers):
(WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed):

  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm:

(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::backingStoreNeedsDisplay):
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::prepareBackingStoreBuffers):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::buildTransaction):

8:28 PM Changeset in webkit [291598] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Adjust when _setPrivacyProxyFailClosedForUnreachableNonMainHosts is called
https://bugs.webkit.org/show_bug.cgi?id=237735

Reviewed by Geoff Garen.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(WebKit::NetworkSessionCocoa::createWebSocketTask):

8:22 PM Changeset in webkit [291597] by commit-queue@webkit.org
  • 28 edits
    1 delete in trunk

Implement CSSNumericValue.mul, div, add, sub, max, and min
https://bugs.webkit.org/show_bug.cgi?id=238153

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-21
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/arithmetic.tentative-expected.txt:

Source/WebCore:

This implements all except the derived units of multiplication and the unit checking of the others.
They are an off-by-default experimental feature right now, part of css-typed-om which is being implemented.
They are covered by wpt tests.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCSSStyleValueCustom.cpp:

(WebCore::toJSNewlyCreated):

  • css/typedom/CSSKeywordValue.h:

(WebCore::CSSKeywordValue::value const): Deleted.
(WebCore::CSSKeywordValue::CSSKeywordValue): Deleted.

  • css/typedom/CSSNumericValue.cpp:

(WebCore::negate):
(WebCore::invert):
(WebCore::operationOnValuesOfSameUnit):
(WebCore::CSSNumericValue::prependItemsOfTypeOrThis):
(WebCore::CSSNumericValue::addInternal):
(WebCore::CSSNumericValue::add):
(WebCore::CSSNumericValue::sub):
(WebCore::CSSNumericValue::multiplyInternal):
(WebCore::CSSNumericValue::mul):
(WebCore::CSSNumericValue::div):
(WebCore::CSSNumericValue::min):
(WebCore::CSSNumericValue::max):
(WebCore::CSSNumericValue::rectifyNumberish):
(WebCore::CSSNumericValue::toSum):

  • css/typedom/CSSNumericValue.h:

(isType):

  • css/typedom/CSSStyleValue.h:

(WebCore::isCSSNumericValue):
(WebCore::isCSSMathValue):

  • css/typedom/CSSUnitValue.h:

(isType):

  • css/typedom/numeric/CSSMathInvert.cpp:

(WebCore::CSSMathInvert::CSSMathInvert):

  • css/typedom/numeric/CSSMathInvert.h:

(isType):
(WebCore::CSSMathInvert::value const): Deleted.

  • css/typedom/numeric/CSSMathMax.cpp:

(WebCore::CSSMathMax::CSSMathMax):
(WebCore::CSSMathMax::create): Deleted.

  • css/typedom/numeric/CSSMathMax.h:

(isType):

  • css/typedom/numeric/CSSMathMin.cpp:

(WebCore::CSSMathMin::CSSMathMin):
(WebCore::CSSMathMin::create): Deleted.

  • css/typedom/numeric/CSSMathMin.h:

(isType):

  • css/typedom/numeric/CSSMathNegate.cpp:

(WebCore::CSSMathNegate::CSSMathNegate):
(WebCore::CSSMathNegate::create): Deleted.

  • css/typedom/numeric/CSSMathNegate.h:

(isType):
(WebCore::CSSMathNegate::value const): Deleted.

  • css/typedom/numeric/CSSMathProduct.cpp:

(WebCore::CSSMathProduct::CSSMathProduct):
(WebCore::CSSMathProduct::create): Deleted.

  • css/typedom/numeric/CSSMathProduct.h:

(isType):

  • css/typedom/numeric/CSSMathSum.cpp:

(WebCore::CSSMathSum::CSSMathSum):
(WebCore::CSSMathSum::create): Deleted.
(WebCore::CSSMathSum::values const): Deleted.

  • css/typedom/numeric/CSSMathSum.h:

(isType):

  • css/typedom/numeric/CSSMathValue.cpp: Removed.
  • css/typedom/numeric/CSSMathValue.h:

(WebCore::CSSMathValue::getOperator const): Deleted.
(): Deleted.
(isType): Deleted.

  • css/typedom/numeric/CSSNumericArray.cpp:

(WebCore::CSSNumericArray::create):
(WebCore::CSSNumericArray::CSSNumericArray):

  • css/typedom/numeric/CSSNumericArray.h:

(WebCore::CSSNumericArray::array const):

  • css/typedom/numeric/CSSNumericType.h:
  • css/typedom/transform/CSSTransformValue.h:

(WebCore::CSSTransformValue::length const): Deleted.

7:09 PM Changeset in webkit [291596] by Russell Epstein
  • 1 edit in branches/safari-614.1.6-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h

Unreviewed logging change. rdar://90517607

6:38 PM Changeset in webkit [291595] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ iOS iPhone 12 ] fast/hidpi & fast/layers/hidpi tests are flaky text/image failing
https://bugs.webkit.org/show_bug.cgi?id=232384

Unreviewed test gardening.

  • platform/ios/TestExpectations:
6:35 PM Changeset in webkit [291594] by Oriol Brufau
  • 6 edits
    2 adds in trunk

[css-cascade] Let revert-layer roll back to preshints
https://bugs.webkit.org/show_bug.cgi?id=237532

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Add test.

  • web-platform-tests/css/css-cascade/presentational-hints-rollback-expected.txt: Added.
  • web-platform-tests/css/css-cascade/presentational-hints-rollback.html: Added.

Source/WebCore:

The patch makes presentational hints use a cascade layer priority of 0.
The priority of the lowest layer is then increased to 1.
This allows 'revert-layer' in author origin revert to the presentational
hints origin, which is between user origin and author origin.

Test: imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback.html

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::addElementStyleProperties):
(WebCore::Style::ElementRuleCollector::matchAllRules):
(WebCore::Style::ElementRuleCollector::addElementInlineStyleProperties):

  • style/ElementRuleCollector.h:
  • style/RuleSetBuilder.cpp:

(WebCore::Style::RuleSetBuilder::updateCascadeLayerPriorities):

6:19 PM Changeset in webkit [291593] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] maxAnisotropy > 16 is clamped, rather than illegal
https://bugs.webkit.org/show_bug.cgi?id=238063

Reviewed by Kimmo Kinnunen.

See https://github.com/gpuweb/gpuweb/issues/696#issuecomment-644343897

Let's add a maxAnisotropy value to samplers, and a maxAnisotropy limit(? query?) (likely only
ever 16 or 1), but not to validate that the former is less than the latter.

Test: api/operation/sampling/anisotropy.spec.ts

  • WebGPU/Sampler.mm:

(WebGPU::validateCreateSampler):
(WebGPU::Device::createSampler):

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

REGRESSION: [ Monterey ] imported/w3c/web-platform-tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html is a constant text failure
<rdar://problem/77527575?

Unreviewed test gardening.

  • platform/mac/TestExpectations: Removing no longer needed test expectation.
5:22 PM Changeset in webkit [291591] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

Unreviewed, address post-landing feedback on r291445

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView compareFoundRange:toRange:inDocument:]):

Subtraction to determine ordering is an anti-pattern, due to the
possibility of overflow. Use comparison operators.

5:17 PM Changeset in webkit [291590] by Russell Epstein
  • 9 edits in branches/safari-613-branch/Source

Versioning.

WebKit-7613.2.4

4:46 PM Changeset in webkit [291589] by Chris Dumez
  • 19 edits
    3 adds in trunk

LayoutTests/imported/w3c:
BroadcastChannel instances in distinct opaque origins can communicate
https://bugs.webkit.org/show_bug.cgi?id=238090
<rdar://problem/90511155>

Reviewed by Alex Christensen.

Import web-platform-tests test coverage.

  • web-platform-tests/webmessaging/broadcastchannel/opaque-origin-expected.txt: Added.
  • web-platform-tests/webmessaging/broadcastchannel/opaque-origin.html: Added.
  • web-platform-tests/webmessaging/broadcastchannel/w3c-import.log:

Source/WebCore:
BroadcastChannel instances in distinct opaque origins can communicate
https://bugs.webkit.org/show_bug.cgi?id=238090
<rdar://problem/90511155>

Reviewed by Alex Christensen.

The issue is that we would use a ClientOrigin to distinguish origins for BroadcastChannel,
which relies on SecurityOriginData internally. A unique/opaque SecurityOrigin becomes an empty
SecurityOriginData upon conversion. As a result, when comparing ClientOrigin objects from
unique SecurityOrigins, they would compare as equal.

To address the issue, I introduced a new PartitionedSecurityOrigin type which is similar
to ClientOrigin but stores SecurityOrigin objects internally, instead of SecurityOriginData
objects. PartitionedSecurityOrigin's operator==() is such that different SecurityOrigins
would not be equal but the same unique SecurityOrigin would be. I then used this new
PartitionedSecurityOrigin type as key in our HashMap on the WebProcess side instead of
ClientOrigin. This allows communication between several BroadcastChannels from the same
unique origin, while preventing communication between distinct opaque origins.

When the PartitionedSecurityOrigin contains an opaque security origin, we don't involve
the Network Process at all since the destination can only be in the same WebProcess.

Test: imported/w3c/web-platform-tests/webmessaging/broadcastchannel/opaque-origin.html

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/BroadcastChannel.cpp:

(WebCore::shouldPartitionOrigin):
(WebCore::BroadcastChannel::MainThreadBridge::registerChannel):
(WebCore::BroadcastChannel::MainThreadBridge::unregisterChannel):
(WebCore::BroadcastChannel::MainThreadBridge::postMessage):

  • dom/BroadcastChannelRegistry.h:
  • loader/EmptyClients.cpp:
  • page/PartitionedSecurityOrigin.h: Added.

(WebCore::PartitionedSecurityOrigin::PartitionedSecurityOrigin):
(WebCore::PartitionedSecurityOrigin::isHashTableDeletedValue const):
(WebCore::PartitionedSecurityOrigin::isHashTableEmptyValue const):
(WebCore::operator==):
(WTF::add):
(WTF::PartitionedSecurityOriginHash::hash):
(WTF::PartitionedSecurityOriginHash::equal):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::emptyValue):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::constructEmptyValue):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::isEmptyValue):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::peek):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::take):

Source/WebKit:
BroadcastChannel instances in distinct opaque origins can communicate
https://bugs.webkit.org/show_bug.cgi?id=238090
<rdar://problem/90511155>

Reviewed by Alex Christensen.

The issue is that we would use a ClientOrigin to distinguish origins for BroadcastChannel,
which relies on SecurityOriginData internally. A unique/opaque SecurityOrigin becomes an empty
SecurityOriginData upon conversion. As a result, when comparing ClientOrigin objects from
unique SecurityOrigins, they would compare as equal.

To address the issue, I introduced a new PartitionedSecurityOrigin type which is similar
to ClientOrigin but stores SecurityOrigin objects internally, instead of SecurityOriginData
objects. PartitionedSecurityOrigin's operator==() is such that different SecurityOrigins
would not be equal but the same unique SecurityOrigin would be. I then used this new
PartitionedSecurityOrigin type as key in our HashMap on the WebProcess side instead of
ClientOrigin. This allows communication between several BroadcastChannels from the same
unique origin, while preventing communication between distinct opaque origins.

When the PartitionedSecurityOrigin contains an opaque security origin, we don't involve
the Network Process at all since the destination can only be in the same WebProcess.

  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp:

(WebKit::toClientOrigin):
(WebKit::WebBroadcastChannelRegistry::registerChannel):
(WebKit::WebBroadcastChannelRegistry::unregisterChannel):
(WebKit::WebBroadcastChannelRegistry::postMessage):
(WebKit::WebBroadcastChannelRegistry::postMessageLocally):
(WebKit::WebBroadcastChannelRegistry::postMessageToRemote):
(WebKit::WebBroadcastChannelRegistry::networkProcessCrashed):

  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.h:

Source/WebKitLegacy:
Dust off Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=238121

Reviewed by Yusuke Suzuki.

  • PlatformMac.cmake:
4:39 PM Changeset in webkit [291588] by Kate Cheney
  • 7 edits
    2 adds in trunk

nj.gov: Background color incorrect for 'State Vehicles' section
https://bugs.webkit.org/show_bug.cgi?id=238035
<rdar://problem/84543795>

Reviewed by Aditya Keerthi.

Source/WebCore:

Test: fast/css/non-form-control-element-drop-appearance.html

Update RenderTheme::adjustStyle to drop appearance for non-form
control elements when they are styled by the author.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustAppearanceForElement const):
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::isControlStyled const):

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

(WebCore::RenderStyle::borderAndBackgroundEqual const):

  • rendering/style/RenderStyle.h:

LayoutTests:

  • fast/css/non-form-control-element-drop-appearance-expected.html: Added.
  • fast/css/non-form-control-element-drop-appearance.html: Added.
  • editing/deleting/insert-in-orphaned-selection-crash.html: Added.

Now that we drop native style for non-form control elements, we need to
add height to the style to make sure this table element is selectable and
successfully tests what it needs to test.

4:36 PM Changeset in webkit [291587] by commit-queue@webkit.org
  • 4 edits in trunk

Unreviewed, reverting r291055.
https://bugs.webkit.org/show_bug.cgi?id=238145

Invalid test expectations

Reverted changeset:

"[iOS] Hard link AVPictureInPictureController"
https://bugs.webkit.org/show_bug.cgi?id=237227
https://commits.webkit.org/r291055

3:44 PM Changeset in webkit [291586] by Russell Epstein
  • 2 edits in branches/safari-614.1.7-branch/Source/WebKit

Cherry-pick r291563. rdar://problem/90448244

Sandbox: Remove telemetry in Network Process sandbox macOS
https://bugs.webkit.org/show_bug.cgi?id=238041

Patch by Adam Mazander <mazander@apple.com> on 2022-03-21
Reviewed by Brent Fulgham.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

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

3:14 PM Changeset in webkit [291585] by Matteo Flores
  • 1 edit in trunk/LayoutTests/ChangeLog

REGRESSION(r290797-r290793): [ iOS Debug ] 4 editing/selection/* tests are constant timeouts
https://bugs.webkit.org/show_bug.cgi?id=238155

Unreviewed test gardening.

  • platform/ios/TestExpectations:
3:14 PM Changeset in webkit [291584] by Matteo Flores
  • 1 edit in trunk/LayoutTests/platform/ios/TestExpectations

Need a short description (OOPS!).
Need the bug URL (OOPS!).

Reviewed by NOBODY (OOPS!).

  • platform/ios/TestExpectations:
2:44 PM Changeset in webkit [291583] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.9.2

Tag Safari-614.1.5.9.2.

2:42 PM Changeset in webkit [291582] by Russell Epstein
  • 8 edits
    2 adds in branches/safari-614.1.7-branch/Source

Cherry-pick r291564. rdar://problem/90463946

Add an addition point for system background color
https://bugs.webkit.org/show_bug.cgi?id=238108
<rdar://problem/90463946>

Reviewed by Aditya Keerthi.

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/ios/WebCoreUIColorExtras.h: Added.
  • platform/ios/WebCoreUIColorExtras.mm: Added. (WebCore::systemBackgroundColor): Add an addition point.
  • rendering/RenderThemeIOS.mm: (WebCore::CSSValueSystemColorInformation::function): (WebCore::cssValueSystemColorInformationList): (WebCore::systemColorFromCSSValueSystemColorInformation): Adopt it for CSS use of system background color.

Source/WebKit:

  • UIProcess/API/ios/WKWebViewIOS.mm: (scrollViewBackgroundColor): Adopt systemBackgroundColor().
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::contentViewBackgroundColor):
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Move the fallback to systemBackgroundColor into PageClientImpl so that it can realize the web view's trait collection.

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

2:35 PM Changeset in webkit [291581] by Russell Epstein
  • 8 edits
    2 adds in branches/safari-614.1.5.9-branch/Source

Cherry-pick r291564. rdar://problem/90463946

Add an addition point for system background color
https://bugs.webkit.org/show_bug.cgi?id=238108
<rdar://problem/90463946>

Reviewed by Aditya Keerthi.

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/ios/WebCoreUIColorExtras.h: Added.
  • platform/ios/WebCoreUIColorExtras.mm: Added. (WebCore::systemBackgroundColor): Add an addition point.
  • rendering/RenderThemeIOS.mm: (WebCore::CSSValueSystemColorInformation::function): (WebCore::cssValueSystemColorInformationList): (WebCore::systemColorFromCSSValueSystemColorInformation): Adopt it for CSS use of system background color.

Source/WebKit:

  • UIProcess/API/ios/WKWebViewIOS.mm: (scrollViewBackgroundColor): Adopt systemBackgroundColor().
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::contentViewBackgroundColor):
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Move the fallback to systemBackgroundColor into PageClientImpl so that it can realize the web view's trait collection.

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

2:32 PM Changeset in webkit [291580] by Russell Epstein
  • 9 edits in branches/safari-614.1.5.9-branch/Source

Versioning.

WebKit-7614.1.5.9.2

2:23 PM Changeset in webkit [291579] by Brent Fulgham
  • 4 edits in trunk

Disable the <model> element in Captive Portal mode.
https://bugs.webkit.org/show_bug.cgi?id=238148
<rdar://90562002>

Reviewed by Chris Dumez.

Source/WebKit:

When displaying content in a captive portal, we should make sure the experimental
<model> element is unavailable.

Tests: TestWebKitAPI

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::adjustSettingsForCaptivePortal): Added. Also turn off <model> support.
(WebKit::WebPage::updatePreferences): Call new helper function.

Tools:

Update tests to check <model> element.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1:44 PM Changeset in webkit [291578] by mmaxfield@apple.com
  • 6 edits in trunk

[WebGPU] Set the WebGPU WKPreference to true in layout tests
https://bugs.webkit.org/show_bug.cgi?id=238130

Reviewed by Sam Weinig.

Tools:

WebGPU isn't ready yet to show up in any Safari menus, so rather than just marking it as an experimental feature,
this patch just enables the preference in DumpRenderTree and WebKitTestRunner.

This doesn't require a linker change, because all of the WebGPU calls are already behind HAS(WEBGPU_IMPLEMENTATION).
Therefore, the immediate behavior change of this patch is that the IDL types are exposed in layout tests, but calling
WebGPU functions in layout tests will return undefined. When we finally link WebCore with WebGPU, then these
functions will automatically start working in layout tests. Outside of layout tests, the IDL types are still not
present, and so therefore the WebGPU functions cannot be called because they are not visible from script.

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

  • platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
12:57 PM Changeset in webkit [291577] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[JSC] ReferenceError when using extra parens in class fields
https://bugs.webkit.org/show_bug.cgi?id=236843

Reviewed by Saam Barati.

JSTests:

  • stress/class-field-initializer-should-have-variable-scope.js: Added.

(shouldBe):
(test1.const.a.x.B):
(test1):
(test2.const.a.x.B):
(test2):
(test3.B.prototype.b):
(test3.B):
(test3):

Source/JavaScriptCore:

class field initializer should create its own used-variables set
to capture used variables separately from the other variables since
it becomes independent CodeBlock internally later. The current code
was wrong since,

  1. Incorrectly using the current set of class-scope.
  2. Incorrectly marking only the last set while parseAssignmentExpression can create a new set inside it.
  • parser/Parser.cpp:

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

  • parser/Parser.h:

(JSC::Scope::markLastUsedVariablesSetAsCaptured):

12:42 PM Changeset in webkit [291576] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening after 246673@main.

  • fast/viewport/watchos/viewport-adaptations-after-navigation-expected.txt:
  • fast/viewport/watchos/viewport-with-system-minimum-layout-margins.html:
12:21 PM Changeset in webkit [291575] by mmaxfield@apple.com
  • 2 edits
    1 copy
    1 add in trunk/Tools

[WebGPU] Add a build-webgpu script
https://bugs.webkit.org/show_bug.cgi?id=238040

Reviewed by Saam Barati.

This patch adds a build-webgpu script by sharing code with the build-jsc script.
It moves almost all of the contents of the build-jsc script to a shared Perl module,
webkitperl/BuildSubproject.pm, and then has build-jsc and build-webgpu both call
into it to build the relevant projects.

  • Scripts/build-jsc:

(buildMyProject): Deleted.
(writeCongrats): Deleted.

  • Scripts/build-webgpu: Added.
  • Scripts/webkitperl/BuildSubproject.pm: Copied from Tools/Scripts/build-jsc.

(buildMyProject):
(writeCongrats):

12:16 PM Changeset in webkit [291574] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[media-controls] scrubbing on iOS when inline does not work
https://bugs.webkit.org/show_bug.cgi?id=238138
rdar://90046770

Reviewed by Dean Jackson.

This bug is simular to bug 238136. We cannot register pointer events on window on iOS.

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

(Slider.prototype._interactionEndTarget):

12:11 PM Changeset in webkit [291573] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[watchOS] Add required syscall
https://bugs.webkit.org/show_bug.cgi?id=238117
<rdar://89964344>

Reviewed by Brent Fulgham.

Add rarely used syscall on watchOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
12:00 PM Changeset in webkit [291572] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[media-controls] tap gesture recognizer sometimes fails to recognize on iOS
https://bugs.webkit.org/show_bug.cgi?id=238136

Reviewed by Dean Jackson.

While on macOS it's fine to register pointer events handlers on the window object,
on iOS it may not be depending on the fullscreen state. However, it's always fine to
use the gesture recognizer's target on iOS, so let's default to that when touches
are supported.

  • Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js:

(GestureRecognizer.prototype.touchesBegan):
(GestureRecognizer.prototype.get _captureTarget):
(GestureRecognizer.prototype._removeTrackingListeners):

11:58 AM Changeset in webkit [291571] by mmaxfield@apple.com
  • 11 edits in trunk/Source/WebGPU

[WebGPU] Implement error reporting facilities
https://bugs.webkit.org/show_bug.cgi?id=238131

Reviewed by Kimmo Kinnunen.

This patch implements the GPUDevice.pushErrorScope() and GPUDevice.popErrorScope() functions,
according to the spec.

Now that we can report errors, we should be just about able to pass our first CTS test.

  • CommandLinePlayground/main.swift:
  • WebGPU/Buffer.mm:

(WebGPU::Buffer::mapAsync):
(WebGPU::Buffer::unmap):

  • WebGPU/CommandEncoder.h:

(WebGPU::CommandEncoder::create):

  • WebGPU/CommandEncoder.mm:

(WebGPU::Device::createCommandEncoder):
(WebGPU::CommandEncoder::CommandEncoder):
(WebGPU::CommandEncoder::copyBufferToBuffer):
(WebGPU::CommandEncoder::clearBuffer):
(WebGPU::CommandEncoder::finish):

  • WebGPU/Device.h:
  • WebGPU/Device.mm:

(WebGPU::Device::currentErrorScope):
(WebGPU::Device::generateAValidationError):
(WebGPU::Device::validatePopErrorScope const):
(WebGPU::Device::popErrorScope):
(WebGPU::Device::pushErrorScope):
(WebGPU::Device::setUncapturedErrorCallback):

  • WebGPU/Queue.h:
  • WebGPU/Queue.mm:

(WebGPU::Queue::submit):

  • WebGPU/Sampler.h:

(WebGPU::Sampler::create):

  • WebGPU/Sampler.mm:

(WebGPU::Device::createSampler):
(WebGPU::Sampler::Sampler):

11:48 AM Changeset in webkit [291570] by Tyler Wilcock
  • 9 edits
    9 adds in trunk

AX: Include display: contents elements in the AX tree
https://bugs.webkit.org/show_bug.cgi?id=237834

Reviewed by Chris Fleizach.

Source/WebCore:

Because display: contents intentionally prevents a render object from being
generated for the element it's applied to, we don't add it to the AX tree as
part of our normal render tree walk, making these elements inaccessible.

This patch includes these elements as part of the DOM walk that
addHiddenChildren (now renamed to addNodeOnlyChildren) already does.

Also, because display: contents moves the affected element's children up a
level in the render tree, this patch also special cases:

  1. AccessibilityRenderObject::parentObject and similar methods to return their display: contents parent instead of their render tree parent
  2. AccessibilityObject::insertChild to only insert display: contents children to their display: contents parent, rather than their render tree parent

Test: accessibility/display-contents-element-roles.html, accessibility/aria-hidden-display-contents-element.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::getOrCreate):
Allow creation of AX objects from display: contents Nodes.
Also, don't create an object for a renderer that is in the process of
being destroyed (prevents display-contents-element-roles.html from crashing in ITM)

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::displayContentsParent const):
(WebCore::AccessibilityObject::insertChild):
If an object has a display: contents parent, and that parent isn't
this, return early.

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

(WebCore::AccessibilityRenderObject::parentObjectIfExists const):
(WebCore::AccessibilityRenderObject::parentObject const):
(WebCore::AccessibilityRenderObject::parentObjectUnignored const):
If an object has a display: contents parent, return that instead of
its render tree parent.
(WebCore::AccessibilityRenderObject::addNodeOnlyChildren):
Renamed from addHiddenChildren.
(WebCore::AccessibilityRenderObject::addChildren):
Don't clear m_subtreeDirty until after all children have been added.
Necessary to make aria-hidden-display-contents-element.html pass, as
we were clearing this too early, causing display: contents subtrees to
not be updated after aria-hidden changes.
(WebCore::AccessibilityRenderObject::addHiddenChildren):
Renamed to addNodeOnlyChildren.

  • accessibility/AccessibilityRenderObject.h:

LayoutTests:

  • accessibility/aria-hidden-display-contents-element-expected.txt: Added.
  • accessibility/aria-hidden-display-contents-element.html: Added.
  • accessibility/display-contents-element-roles-expected.txt: Added.
  • accessibility/display-contents-element-roles.html: Added.
  • platform/glib/accessibility/aria-hidden-display-contents-element-expected.txt: Added.
  • platform/glib/accessibility/display-contents-element-roles-expected.txt: Added.
  • platform/ios/TestExpectations: Enable new tests.
  • platform/ios/accessibility/aria-hidden-display-contents-element-expected.txt: Added.
  • platform/ios/accessibility/display-contents-element-roles-expected.txt: Added.
  • platform/win/TestExpectations: Skip display-contents-element-roles.html.
  • platform/win/accessibility/aria-hidden-display-contents-element-expected.txt: Added.
11:01 AM Changeset in webkit [291569] by Russell Epstein
  • 2 edits in branches/safari-614.1.7-branch/Source/WebCore

Cherry-pick r291514. rdar://problem/90500863

[iOS] Fix more build breakage from r291361
https://bugs.webkit.org/show_bug.cgi?id=238097
<rdar://problem/90505371>

Unreviewed build fix.

  • platform/ios/WebAVPlayerController.mm: Declare AVAssetTrack.

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

11:00 AM Changeset in webkit [291568] by Oriol Brufau
  • 2 edits in trunk/Source/WebCore

[css-cascade] Don't defer applying text decoration properties
https://bugs.webkit.org/show_bug.cgi?id=238126

Reviewed by Darin Adler.

shouldApplyPropertyInParseOrder() was returning true for these:

  • webkit-text-decoration
  • text-decoration-line
  • text-decoration-style
  • text-decoration-color
  • text-decoration-skip
  • text-decoration-skip-ink
  • text-underline-position
  • text-underline-offset
  • text-decoration-thickness
  • text-decoration

This was previously needed for text-decoration-line and text-decoration,
since they were implemented as longhands that shared a computed value.
But that's no longer the case, text-decoration became a shorthand in bug
237175.

AFAIK -webkit-text-decoration has always been a shorthand since it was
implemented in bug 92000, so having it in the list it's pointless,
only longhands matter. And text-decoration-skip became a shorthand in
bug 230244, so it's also pointless.

The other longhands seem unnecessary too, since they don't share a
computed style with other properties.

No test since there should be no observable change in behavior.

  • style/PropertyCascade.cpp:

(WebCore::Style::shouldApplyPropertyInParseOrder):

10:58 AM Changeset in webkit [291567] by youenn@apple.com
  • 4 edits in trunk/Source

Remove unneeded quotes in capture attribution string
https://bugs.webkit.org/show_bug.cgi?id=238132
<rdar://88794701>

Reviewed by Eric Carlson.

Source/WebCore:

  • en.lproj/Localizable.strings:

Source/WebKit:

Quotes are unneeded and made it less clear to read.

  • GPUProcess/cocoa/GPUConnectionToWebProcessCocoa.mm:

(WebKit::GPUConnectionToWebProcess::setCaptureAttributionString):

10:53 AM Changeset in webkit [291566] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Accessing WebGL content crashes in macOS Recovery OS
https://bugs.webkit.org/show_bug.cgi?id=238139

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-21
Reviewed by Antti Koivisto.

Add a quick fix trying to circumvent a Recovery OS crash.
Parts of this will be reverted once the true source is found.

  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::platformSupportsMetal):

10:47 AM Changeset in webkit [291565] by Russell Epstein
  • 1 copy in branches/safari-614.1.7-branch

New branch.

10:44 AM Changeset in webkit [291564] by timothy_horton@apple.com
  • 8 edits
    2 adds in trunk/Source

Add an addition point for system background color
https://bugs.webkit.org/show_bug.cgi?id=238108
<rdar://problem/90463946>

Reviewed by Aditya Keerthi.

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/ios/WebCoreUIColorExtras.h: Added.
  • platform/ios/WebCoreUIColorExtras.mm: Added.

(WebCore::systemBackgroundColor):
Add an addition point.

  • rendering/RenderThemeIOS.mm:

(WebCore::CSSValueSystemColorInformation::function):
(WebCore::cssValueSystemColorInformationList):
(WebCore::systemColorFromCSSValueSystemColorInformation):
Adopt it for CSS use of system background color.

Source/WebKit:

  • UIProcess/API/ios/WKWebViewIOS.mm:

(scrollViewBackgroundColor):
Adopt systemBackgroundColor().

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::contentViewBackgroundColor):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::platformUnderPageBackgroundColor const):
Move the fallback to systemBackgroundColor into PageClientImpl
so that it can realize the web view's trait collection.

10:37 AM Changeset in webkit [291563] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Sandbox: Remove telemetry in Network Process sandbox macOS
https://bugs.webkit.org/show_bug.cgi?id=238041

Patch by Adam Mazander <mazander@apple.com> on 2022-03-21
Reviewed by Brent Fulgham.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
10:20 AM Changeset in webkit [291562] by commit-queue@webkit.org
  • 18 edits in trunk/Source

Dust off Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=238121

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-21
Reviewed by Yusuke Suzuki.

Source/bmalloc:

  • PlatformMac.cmake:

Source/ThirdParty/ANGLE:

  • GLESv2.cmake:
  • Metal.cmake:

Source/ThirdParty/libwebrtc:

  • CMakeLists.txt:
  • Source/third_party/libwebm/common/vp9_level_stats.h:

Source/WebCore:

  • CMakeLists.txt:
  • PlatformMac.cmake:
  • SourcesCocoa.txt:

Source/WebCore/PAL:

  • pal/PlatformMac.cmake:

Source/WebKit:

  • PlatformMac.cmake:

Source/WebKitLegacy:

  • PlatformMac.cmake:
10:15 AM Changeset in webkit [291561] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Null check style in Editor::applyParagraphStyle
https://bugs.webkit.org/show_bug.cgi?id=238137

Patch by Rob Buis <rbuis@igalia.com> on 2022-03-21
Reviewed by Wenson Hsieh.

Null check style in Editor::applyParagraphStyle.

  • editing/Editor.cpp:

(WebCore::Editor::applyParagraphStyle):

9:57 AM Changeset in webkit [291560] by Jonathan Bedard
  • 2 edits in trunk/Tools

[Merge-Queue] Support multiple reviewers names
https://bugs.webkit.org/show_bug.cgi?id=238095
<rdar://problem/90503503>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/steps.py:

(ApplyPatch.start): Only apply the first reviewer name.
(ValidateCommiterAndReviewer.start): Support a list of reviewers.

Canonical link: https://commits.webkit.org/248662@main

9:29 AM Changeset in webkit [291559] by Jonathan Bedard
  • 9 edits
    3 deletes in trunk/Source

Unreviewed, reverting r291558.

Exceeded GitHub file size limit

Reverted changeset:

"Enable PGO when building for release and production"
https://bugs.webkit.org/show_bug.cgi?id=238119
https://commits.webkit.org/r291558

8:25 AM Changeset in webkit [291558] by Wenson Hsieh
  • 9 edits
    6 adds in trunk/Source

Enable PGO when building for release and production
https://bugs.webkit.org/show_bug.cgi?id=238119
rdar://90182309

Reviewed by Saam Barati.

Source/JavaScriptCore:

See WebCore/ChangeLog for more details.

  • Configurations/Base.xcconfig:
  • Configurations/JavaScriptCore.xcconfig:
  • Profiling/JavaScriptCore.profdata: Added.

Source/WebCore:

Add LLVM profiles to the WebCore, JavaScriptCore and WebKit frameworks, collected by running certain benchmarks
on ARM macOS. We then use this data for release and production builds by specifying a -fprofile-instr-use in
OTHER_CPLUSPLUSFLAGS. Across various configurations of macOS and iOS, this is an ~8% speedup on Speedometer.


| subtest | ms | ms | b / a | pValue |


| Elm-TodoMVC |101.721667 |99.571667 |0.978864 | 0.000211 (significant) |
| VueJS-TodoMVC |18.643333 |17.196667 |0.922403 | 0.000000 (significant) |
| EmberJS-TodoMVC |108.763333 |103.306667 |0.949830 | 0.000000 (significant) |
| BackboneJS-TodoMVC |37.951667 |34.693333 |0.914145 | 0.000000 (significant) |
| Preact-TodoMVC |13.586667 |12.818333 |0.943449 | 0.053277 |
| AngularJS-TodoMVC |117.130000 |110.755000 |0.945573 | 0.000000 (significant) |
| Vanilla-ES2015-TodoMVC |58.950000 |52.716667 |0.894261 | 0.000000 (significant) |
| Inferno-TodoMVC |52.660000 |49.571667 |0.941353 | 0.000000 (significant) |
| Flight-TodoMVC |51.551667 |46.230000 |0.896770 | 0.000000 (significant) |
| Angular2-TypeScript-TodoMVC |35.753333 |33.698333 |0.942523 | 0.000000 (significant) |
| VanillaJS-TodoMVC |48.400000 |42.670000 |0.881612 | 0.000000 (significant) |
| jQuery-TodoMVC |218.346667 |200.051667 |0.916211 | 0.000000 (significant) |
| EmberJS-Debug-TodoMVC |304.171667 |291.903333 |0.959666 | 0.000000 (significant) |
| React-TodoMVC |75.475000 |72.761667 |0.964050 | 0.000008 (significant) |
| React-Redux-TodoMVC |126.448333 |120.458333 |0.952629 | 0.000000 (significant) |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |55.643333 |49.665000 |0.892560 | 0.000000 (significant) |


a mean = 306.08529
b mean = 330.01548
pValue = 0.0000000000
(Bigger means are better.)
1.078 times better
Results ARE significant

  • Configurations/Base.xcconfig:

For now, we additionally ignore errors that arise if profiled symbols differ from built symbols; in the future,
we'll need to implement some kind of strategy to detect when enough symbols in the profile data no longer match
symbols that appear in the built binaries, such that it might begin to negate the performance benefit from PGO.

Note that while the profile data was collected on an ARM Mac, performance tests have shown the profile data to
largely generalize well to other architectures and platforms as well (i.e. macOS x86_64 and iOS arm64e). As
such, instead of limiting this profile to ARM macOS, we can just use it everywhere (and perhaps, add platform-
or architecture-specific profile data later, if needed).

  • Configurations/WebCore.xcconfig:
  • Profiling/WebCore.profdata: Added.

Source/WebKit:

See WebCore/ChangeLog for more details.

  • Configurations/Base.xcconfig:
  • Configurations/WebKit.xcconfig:
  • Profiling/WebKit.profdata: Added.
6:17 AM Changeset in webkit [291557] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.36.0

WebKitGTK 2.36.0

6:16 AM Changeset in webkit [291556] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.36

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.36.0 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.36.0.
2:27 AM Changeset in webkit [291555] by Ziran Sun
  • 7 edits in trunk

[selection] HTMLTextFormControlElement::subtreeHasChanged() shouldn't be called in setRangeText
https://bugs.webkit.org/show_bug.cgi?id=237720

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update test expectations as more sub-tests are now passing.

  • web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt:
  • web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt:

Source/WebCore:

We shouldn't call HTMLTextFormControlElement::subtreeHasChanged() in HTMLTextFormControlElement::setRangeText.
It has been removed in patch for bug 237641. This patch is to further remove unnecessary code.

This change refers and imports some of the changes in chromium CL at
https://codereview.chromium.org/1577243002

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setRangeText):

LayoutTests:

Update test expectation as the test is now passing.

  • fast/forms/setrangetext-expected.txt:
1:45 AM Changeset in webkit [291554] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.36

Merge r291552 - REGRESSION(r286955): Rendering Links during search: highlighting fails
https://bugs.webkit.org/show_bug.cgi?id=237816

Reviewed by Simon Fraser.

Source/WebCore:

Since r286955 the same coalesced marked text loop is used for painting the foreground text in case of text with
decorations. StyledMarkedText::coalesceAdjacentWithEqualDecorations() doesn't take into account the text style,
so when selected foreground color is different we end up painting the whole decorated text with the same
foreground color for the selected and non-selected parts.

Test: fast/text/selection-with-text-decorations.html

  • rendering/StyledMarkedText.cpp:

(WebCore::StyledMarkedText::coalesceAdjacentWithEqualDecorations): Take into account the text styles too.

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintForegroundAndDecorations): Do not call
StyledMarkedText::coalesceAdjacentWithEqualForeground() in case of text with decorations, since it's unused.

LayoutTests:

  • fast/text/selection-with-text-decorations-expected.html: Added.
  • fast/text/selection-with-text-decorations.html: Added.
  • platform/ios/TestExpectations:
1:45 AM Changeset in webkit [291553] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.36/Source/WebCore

Merge r291544 - REGRESSION(r289154) [GSTREAMER] webrtc/vp8-then-h264.html is crashing after SDK update to fdo 21.08 and Gstreamer 1.20
https://bugs.webkit.org/show_bug.cgi?id=237872

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

  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:

(WebCore::VP8Decoder::Create): Fix typo in decoder factory test.

1:40 AM WebKitGTK/2.36.x edited by Carlos Garcia Campos
(diff)
1:35 AM Changeset in webkit [291552] by Carlos Garcia Campos
  • 5 edits
    2 adds in trunk

REGRESSION(r286955): Rendering Links during search: highlighting fails
https://bugs.webkit.org/show_bug.cgi?id=237816

Reviewed by Simon Fraser.

Source/WebCore:

Since r286955 the same coalesced marked text loop is used for painting the foreground text in case of text with
decorations. StyledMarkedText::coalesceAdjacentWithEqualDecorations() doesn't take into account the text style,
so when selected foreground color is different we end up painting the whole decorated text with the same
foreground color for the selected and non-selected parts.

Test: fast/text/selection-with-text-decorations.html

  • rendering/StyledMarkedText.cpp:

(WebCore::StyledMarkedText::coalesceAdjacentWithEqualDecorations): Take into account the text styles too.

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintForegroundAndDecorations): Do not call
StyledMarkedText::coalesceAdjacentWithEqualForeground() in case of text with decorations, since it's unused.

LayoutTests:

  • fast/text/selection-with-text-decorations-expected.html: Added.
  • fast/text/selection-with-text-decorations.html: Added.
  • platform/ios/TestExpectations:
12:41 AM Changeset in webkit [291551] by Diego Pino Garcia
  • 2 edits in trunk/Tools

Unreviewed, fix Debian Stable build after r291543

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(elementSize): Replace RELEASE_ASSERT_NOT_REACHED() for RELEASE_ASSERT_NOT_REACHED_UNDER_CONSTEXPR_CONTEXT().

12:14 AM Changeset in webkit [291550] by youenn@apple.com
  • 19 edits in trunk/Source

Remove use of MediaSampleAVFObjC from WebRTC pipelines
https://bugs.webkit.org/show_bug.cgi?id=237706
<rdar://problem/90425391>

Reviewed by Eric Carlson.

Source/WebCore:

Replace MediaSampleAVFObjC by VideoFrameCV when handling CVPixelBuffers.

Covered by existing tests.

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/graphics/cv/ImageRotationSessionVT.mm:
  • platform/graphics/cv/ImageTransferSessionVT.h:
  • platform/graphics/cv/ImageTransferSessionVT.mm:
  • platform/graphics/cv/VideoFrameCV.h:
  • platform/graphics/cv/VideoFrameCV.mm:
  • platform/mediastream/RealtimeVideoSource.cpp:
  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:

Source/WebKit:

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

Mar 20, 2022:

7:11 PM Changeset in webkit [291549] by Diego Pino Garcia
  • 3 edits in trunk/Source/WebCore

[WPE] Unreviewed, fix non-unified build after r291474 and r291508

  • css/CSSToLengthConversionData.h:
  • html/parser/AtomHTMLToken.h:
5:59 PM Changeset in webkit [291548] by Alan Bujtas
  • 31 edits
    3 moves in trunk/Source/WebCore

[IFC][Integration] Rename InlineIterator::Line to LineBox
https://bugs.webkit.org/show_bug.cgi?id=238128

Reviewed by Antti Koivisto.

  • dom/Position.cpp:

(WebCore::Position::upstream const):
(WebCore::Position::downstream const):
(WebCore::Position::rendersInDifferentPosition const):

  • editing/RenderedPosition.h:

(WebCore::RenderedPosition::lineBox const):
(WebCore::RenderedPosition::line const): Deleted.

  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::leftVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::rightVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::absoluteSelectionBoundsForLine const):

  • editing/VisibleUnits.cpp:

(WebCore::startTextOrLineBreakBox):
(WebCore::endTextOrLineBreakBox):
(WebCore::logicallyPreviousBox):
(WebCore::logicallyNextBox):
(WebCore::startPositionForLine):
(WebCore::endPositionForLine):
(WebCore::absoluteLineDirectionPointToLocalPointInBlock):
(WebCore::previousLinePosition):
(WebCore::nextLinePosition):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):

  • layout/integration/InlineIteratorBox.cpp:

(WebCore::InlineIterator::Box::lineBox const):
(WebCore::InlineIterator::Box::style const):
(WebCore::InlineIterator::Box::line const): Deleted.

  • layout/integration/InlineIteratorBox.h:
  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::LineBoxIterator::LineBoxIterator):
(WebCore::InlineIterator::LineBoxIterator::atEnd const):
(WebCore::InlineIterator::LineBoxIterator::traverseNext):
(WebCore::InlineIterator::LineBoxIterator::traversePrevious):
(WebCore::InlineIterator::LineBoxIterator::operator== const):
(WebCore::InlineIterator::firstLineBoxFor):
(WebCore::InlineIterator::lastLineBoxFor):
(WebCore::InlineIterator::LineBox::next const):
(WebCore::InlineIterator::LineBox::previous const):
(WebCore::InlineIterator::LineBox::firstLeafBox const):
(WebCore::InlineIterator::LineBox::lastLeafBox const):
(WebCore::InlineIterator::closestBoxForHorizontalPosition):
(WebCore::InlineIterator::LineIterator::LineIterator): Deleted.
(WebCore::InlineIterator::LineIterator::atEnd const): Deleted.
(WebCore::InlineIterator::LineIterator::traverseNext): Deleted.
(WebCore::InlineIterator::LineIterator::traversePrevious): Deleted.
(WebCore::InlineIterator::LineIterator::operator== const): Deleted.
(WebCore::InlineIterator::firstLineFor): Deleted.
(WebCore::InlineIterator::lastLineFor): Deleted.
(WebCore::InlineIterator::Line::next const): Deleted.
(WebCore::InlineIterator::Line::previous const): Deleted.
(WebCore::InlineIterator::Line::firstLeafBox const): Deleted.
(WebCore::InlineIterator::Line::lastLeafBox const): Deleted.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::LineBox::height const):
(WebCore::InlineIterator::LineBoxIterator::LineBoxIterator):
(WebCore::InlineIterator::LineBoxIterator::operator++):
(WebCore::InlineIterator::LineBoxIterator::operator!= const):
(WebCore::InlineIterator::LineBoxIterator::operator== const):
(WebCore::InlineIterator::LineBoxIterator::operator* const):
(WebCore::InlineIterator::LineBoxIterator::operator-> const):
(WebCore::InlineIterator::previousLineBoxContentBottomOrBorderAndPadding):
(WebCore::InlineIterator::contentStartInBlockDirection):
(WebCore::InlineIterator::LineBox::LineBox):
(WebCore::InlineIterator::LineBox::contentLogicalTop const):
(WebCore::InlineIterator::LineBox::contentLogicalBottom const):
(WebCore::InlineIterator::LineBox::contentLogicalTopAdjustedForPrecedingLineBox const):
(WebCore::InlineIterator::LineBox::contentLogicalBottomAdjustedForFollowingLineBox const):
(WebCore::InlineIterator::LineBox::top const):
(WebCore::InlineIterator::LineBox::bottom const):
(WebCore::InlineIterator::LineBox::contentLogicalLeft const):
(WebCore::InlineIterator::LineBox::contentLogicalRight const):
(WebCore::InlineIterator::LineBox::contentLogicalWidth const):
(WebCore::InlineIterator::LineBox::isHorizontal const):
(WebCore::InlineIterator::LineBox::baselineType const):
(WebCore::InlineIterator::LineBox::containingBlock const):
(WebCore::InlineIterator::LineBox::containingFragment const):
(WebCore::InlineIterator::LineBox::isFirstAfterPageBreak const):
(WebCore::InlineIterator::LineBox::isFirst const):
(WebCore::InlineIterator::Line::lineBoxHeight const): Deleted.
(WebCore::InlineIterator::LineIterator::LineIterator): Deleted.
(WebCore::InlineIterator::LineIterator::operator++): Deleted.
(WebCore::InlineIterator::LineIterator::operator bool const): Deleted.
(WebCore::InlineIterator::LineIterator::operator!= const): Deleted.
(WebCore::InlineIterator::LineIterator::operator== const): Deleted.
(WebCore::InlineIterator::LineIterator::operator* const): Deleted.
(WebCore::InlineIterator::LineIterator::operator-> const): Deleted.
(WebCore::InlineIterator::previousLineContentBottomOrBorderAndPadding): Deleted.
(WebCore::InlineIterator::Line::Line): Deleted.
(WebCore::InlineIterator::Line::contentLogicalTop const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalBottom const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalBottomAdjustedForFollowingLine const): Deleted.
(WebCore::InlineIterator::Line::lineBoxTop const): Deleted.
(WebCore::InlineIterator::Line::lineBoxBottom const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalLeft const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalRight const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalWidth const): Deleted.
(WebCore::InlineIterator::Line::isHorizontal const): Deleted.
(WebCore::InlineIterator::Line::baselineType const): Deleted.
(WebCore::InlineIterator::Line::containingBlock const): Deleted.
(WebCore::InlineIterator::Line::containingFragment const): Deleted.
(WebCore::InlineIterator::Line::isFirstAfterPageBreak const): Deleted.
(WebCore::InlineIterator::Line::isFirst const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineBoxIteratorLegacyPath::LineBoxIteratorLegacyPath):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::contentLogicalTopAdjustedForPrecedingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::contentLogicalBottomAdjustedForFollowingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::top const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::bottom const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::operator== const):
(WebCore::InlineIterator::LineIteratorLegacyPath::LineIteratorLegacyPath): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTop const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottomAdjustedForFollowingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::lineBoxTop const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::lineBoxBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalLeft const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalRight const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::isHorizontal const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::baselineType const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::containingBlock const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::containingFragment const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::isFirstAfterPageBreak const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::traverseNext): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::traversePrevious): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::operator== const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::atEnd const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::firstLeafBox const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::lastLeafBox const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineBoxIteratorModernPath::LineBoxIteratorModernPath):
(WebCore::InlineIterator::LineBoxIteratorModernPath::top const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::bottom const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::contentLogicalTopAdjustedForPrecedingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::contentLogicalBottomAdjustedForFollowingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::operator== const):
(WebCore::InlineIterator::LineIteratorModernPath::LineIteratorModernPath): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTop const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lineBoxTop const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lineBoxBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottomAdjustedForFollowingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalLeft const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalRight const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::isHorizontal const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::baselineType const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::containingBlock const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::containingFragment const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::isFirstAfterPageBreak const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::traverseNext): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::traversePrevious): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::operator== const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::atEnd const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::firstLeafBox const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lastLeafBox const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::setAtEnd): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lines const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::line const): Deleted.

  • layout/integration/InlineIteratorLogicalOrderTraversal.cpp:

(WebCore::InlineIterator::makeLineLogicalOrderCache):
(WebCore::InlineIterator::updateLineLogicalOrderCacheIfNeeded):
(WebCore::InlineIterator::firstLeafOnLineInLogicalOrder):
(WebCore::InlineIterator::lastLeafOnLineInLogicalOrder):
(WebCore::InlineIterator::firstLeafOnLineInLogicalOrderWithNode):
(WebCore::InlineIterator::lastLeafOnLineInLogicalOrderWithNode):

  • layout/integration/InlineIteratorLogicalOrderTraversal.h:

(WebCore::InlineIterator::leafBoxesInLogicalOrder):

  • layout/integration/InlineIteratorTextBox.cpp:

(WebCore::InlineIterator::TextBox::selectionRect const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::firstLineBox const):
(WebCore::LayoutIntegration::LineLayout::lastLineBox const):
(WebCore::LayoutIntegration::LineLayout::firstLine const): Deleted.
(WebCore::LayoutIntegration::LineLayout::lastLine const): Deleted.

  • layout/integration/LayoutIntegrationLineLayout.h:
  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalTop):
(WebCore::LineSelection::logicalBottom):
(WebCore::LineSelection::logicalRect):
(WebCore::LineSelection::physicalRect):
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
(WebCore::LineSelection::selectionState):

  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForLinePosition):
(WebCore::computeCaretRectForText):
(WebCore::computeCaretRectForLineBreak):
(WebCore::computeCaretRectForBox):

  • rendering/InlineBoxPainter.cpp:

(WebCore::InlineBoxPainter::InlineBoxPainter):
(WebCore::InlineBoxPainter::paintMask):
(WebCore::InlineBoxPainter::paintDecorations):
(WebCore::InlineBoxPainter::style const):

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

(WebCore::RenderBlockFlow::adjustEnclosingTopForPrecedingBlock const):
(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::RenderBlockFlow::containsNonZeroBidiLevel const):
(WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getLeadingCorner const):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::paintOutline):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::TextBoxPainter):
(WebCore::TextBoxPainter::paintBackground):
(WebCore::textPosition):
(WebCore::TextBoxPainter::computePaintRect):

  • rendering/svg/SVGRootInlineBox.cpp:

(WebCore::SVGRootInlineBox::reorderValueListsToLogicalOrder):

  • style/InlineTextBoxStyle.cpp:

(WebCore::minLogicalTopForTextDecorationLine):
(WebCore::maxLogicalBottomForTextDecorationLine):
(WebCore::computeUnderlineOffset):

9:48 AM Changeset in webkit [291547] by commit-queue@webkit.org
  • 9 edits
    4 adds
    1 delete in trunk/Tools/buildstream

[Flatpak SDK] Bump to meson 0.60
https://bugs.webkit.org/show_bug.cgi?id=238112

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

  • elements/freedesktop-sdk.bst: Update junction and include patches for Meson update and

follow-up recipe updates.

  • elements/sdk-platform.bst: Remove shared-mime-info, the same version is shipped by the upstream SDK already.
  • elements/sdk/glib.bst: Remove invalid meson options
  • elements/sdk/gst-plugins-bad.bst: Ditto.
  • elements/sdk/gst-plugins-base.bst: Ditto.
  • elements/sdk/gstreamer.bst: Ditto.
  • elements/sdk/gtk+-3.bst: Ditto.
  • elements/sdk/gtk.bst: Ditto.
  • elements/sdk/shared-mime-info.bst: Removed.
  • patches/fdo-0001-gdk-pixbuf-Remove-invalid-meson-options.patch: Added.
  • patches/fdo-0001-gst-plugins-bad-Remove-invalid-meson-option.patch: Added.
  • patches/fdo-0001-meson-Bump-to-0.60.3.patch: Added.
  • patches/fdo-0001-shared-mime-info-Backport-meson-0.60-build-fix.patch: Added.
9:37 AM Changeset in webkit [291546] by Oriol Brufau
  • 9 edits
    2 adds in trunk

Fix CSS cascade regarding logical properties
https://bugs.webkit.org/show_bug.cgi?id=236199

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Expect animation-004.html to pass.
Add new test logicalprops-with-deferred-writing-mode.html

  • web-platform-tests/css/css-logical/animation-004-expected.txt:
  • web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode-expected.txt: Added.
  • web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html: Added.

Source/WebCore:

The CSS cascade was trying to resolve logical properties into physical
ones too early. This failed if we still didn't know the direction or
writing-mode, e.g. because they were set to a variable or to a CSS-wide
keyword.

This patch keeps logical properties as-is during the cascade. They are
only resolved when finally applied. Also, both logical properties and
their physical equivalents are now set to apply in parse order, since
'height: 0px; block-size: 1px' and 'block-size: 1px; height: 0px' can be
different, the order matters.

Tests: imported/w3c/web-platform-tests/css/css-logical/animation-004.html

imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json:
  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseValueWithVariableReferences):

  • style/PropertyCascade.cpp:

(WebCore::Style::shouldApplyPropertyInParseOrder):
(WebCore::Style::PropertyCascade::PropertyCascade):
(WebCore::Style::PropertyCascade::set):
(WebCore::Style::PropertyCascade::setDeferred):
(WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode const): Deleted.
(WebCore::Style::PropertyCascade::direction const): Deleted.

  • style/PropertyCascade.h:

(WebCore::Style::PropertyCascade::areDeferredInOrder const):

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::Builder):
(WebCore::Style::Builder::applyProperty):
(WebCore::Style::directionFromStyle): Deleted.

8:52 AM WebKitGTK/2.36.x edited by Michael Catanzaro
(diff)
8:04 AM Changeset in webkit [291545] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[IFC][Integration] Remove redundant InlineIterator::Line::contentLogicalTopAdjustedForHitTesting
https://bugs.webkit.org/show_bug.cgi?id=238107

Reviewed by Antti Koivisto.

It looks like contentLogicalTopAdjustedForHitTesting is just the combination of

  • containingBlock's border and padding before
  • LineSelection::logicalTop (which is either the line's content top or the previous line's content bottom)
  • line's content top
  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::contentStartInBlockDirection):
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForHitTesting const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForHitTesting const): Deleted.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint): This seems to be missing the contentLogicalTop check.

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

7:18 AM Changeset in webkit [291544] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r289154) [GSTREAMER] webrtc/vp8-then-h264.html is crashing after SDK update to fdo 21.08 and Gstreamer 1.20
https://bugs.webkit.org/show_bug.cgi?id=237872

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

  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:

(WebCore::VP8Decoder::Create): Fix typo in decoder factory test.

6:37 AM Changeset in webkit [291543] by Adrian Perez de Castro
  • 2 edits in trunk/Tools

Fix clang warning after r291229

Unreviewed build fix.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(elementSize): Move RELEASE_ASSERT_NOT_REACHED() out of the switch to make clang happy.

4:46 AM Changeset in webkit [291542] by Adrian Perez de Castro
  • 2 edits
    3 adds in trunk/Tools/buildstream

[Flatpak SDK] Include gi-docgen and its dependencies
https://bugs.webkit.org/show_bug.cgi?id=237681

Reviewed by Philippe Normand.

Import a build element for gi-docgen, which reuses most of the dependencies from the
Freedesktop SDK, except for the python-typogrify element, which is not available there
and this also adds an element for.

  • elements/sdk-platform.bst:
  • elements/sdk/gi-docgen.bst: Added.
  • elements/sdk/python3-smartypants.bst: Added.
  • elements/sdk/python3-typogrify.bst: Added.
4:40 AM Changeset in webkit [291541] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WPE][GStreamer] media playback broken
https://bugs.webkit.org/show_bug.cgi?id=238110

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-03-20
Reviewed by Philippe Normand.

  • platform/graphics/gbm/GBMBufferSwapchain.cpp:

(WebCore::GBMBufferSwapchain::GBMBufferSwapchain):
Fix the assert that's hit when using eight-buffers capacity value. Just
a matter of using the more proper <= operator.

Mar 19, 2022:

9:11 PM Changeset in webkit [291540] by Chris Dumez
  • 4 edits in trunk

Vector move constructor and move assignment operator are suboptimal when the vector has an inline buffer
https://bugs.webkit.org/show_bug.cgi?id=238096

Reviewed by Darin Adler.

Source/WTF:

The move constructor (and move assignment operators) for Vector were implemented using Vector::swap(), which
is fine for vectors with out of line buffers because we're just swapping pointers. However, when the vector
has inline capacity, this is suboptimal because it is not cheap to move data from one inline buffer to another
and moving any data to the source buffer is unnecessary.

  • wtf/Vector.h:

(WTF::VectorBuffer::VectorBuffer):
(WTF::VectorBuffer::adopt):
(WTF::Malloc>::Vector):
(WTF::=):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WTF/Vector.cpp:

(TestWebKitAPI::TEST):

8:46 PM Changeset in webkit [291539] by Tyler Wilcock
  • 1 edit
    1 move in trunk/LayoutTests

Rebaseline accessibility/roles-exposed.html for Mac WK1 after https://commits.webkit.org/r291401
https://bugs.webkit.org/show_bug.cgi?id=238099

Reviewed by Chris Fleizach.

  • platform/mac-wk1/accessibility/roles-exposed-expected.txt:
8:29 PM Changeset in webkit [291538] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Optimize EventTarget::visitJSEventListeners()
https://bugs.webkit.org/show_bug.cgi?id=238116

Reviewed by Darin Adler.

This was confirmed by A/B bots to be a 1-1.5% progression on Speedometer on
iMac 20,1 (Intel).

  • dom/EventListenerMap.cpp:

(WebCore::EventListenerMap::clear):
(WebCore::EventListenerMap::replace):
(WebCore::EventListenerMap::add):
(WebCore::EventListenerMap::remove):
(WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
(WebCore::EventListenerMap::assertNoActiveIterators const): Deleted.
(WebCore::EventListenerMap::EventListenerMap): Deleted.
(WebCore::EventListenerIterator::EventListenerIterator): Deleted.
(WebCore::EventListenerIterator::~EventListenerIterator): Deleted.
(WebCore::EventListenerIterator::nextListener): Deleted.

  • dom/EventListenerMap.h:

(WebCore::EventListenerMap::visitJSEventListeners):
(): Deleted.
(WebCore::EventListenerMap::assertNoActiveIterators const): Deleted.

  • dom/EventTarget.cpp:

(WebCore::EventTarget::visitJSEventListeners): Deleted.

  • dom/EventTarget.h:

(WebCore::EventTarget::visitJSEventListeners):

8:18 PM Changeset in webkit [291537] by Oriol Brufau
  • 8 edits in trunk

[cssom] Implement border-image serialization
https://bugs.webkit.org/show_bug.cgi?id=238102

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Let the test accept some equivalent serializations.
Expect it to pass.

  • web-platform-tests/css/css-backgrounds/parsing/border-image-valid-expected.txt:
  • web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html:

Source/WebCore:

Add logic for serializing border-image at specified-value time.

Tests: fast/css/parse-border-image-repeat-null-crash.html

imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::borderImagePropertyValue const):
(WebCore::StyleProperties::asText const):

  • css/StyleProperties.h:

LayoutTests:

Expect cssText to serialize border-image instead of longhands.

  • fast/css/parse-border-image-repeat-null-crash-expected.txt:
7:18 PM Changeset in webkit [291536] by Oriol Brufau
  • 9 edits
    2 adds in trunk

Fix hasExplicitlySetBorderRadius flag
https://bugs.webkit.org/show_bug.cgi?id=238062

Reviewed by Darin Adler.

Source/WebCore:

The four border-*-radius longhands were sharing the same flag, so the
behavior was broken when setting longhands individually.

This patch splits the flag into 4 different ones, one for each longhand.
Also makes sure to set it properly when a longhand is set to 'initial'.

It's ugly to have all this boilerplate code for the flags, but
https://webkit.org/b/212506 will make it automatically generated.

Test: fast/css/appearance-apple-pay-button-border-radius-longhands.html

  • css/CSSProperties.json:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::RenderStyle):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::hasExplicitlySetBorderBottomLeftRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderBottomRightRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderTopLeftRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderTopRightRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderRadius const):
(WebCore::RenderStyle::setHasExplicitlySetBorderBottomLeftRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderBottomRightRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderTopLeftRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderTopRightRadius):
(WebCore::RenderStyle::NonInheritedFlags::operator== const):
(WebCore::RenderStyle::NonInheritedFlags::copyNonInheritedFrom):
(WebCore::RenderStyle::setHasExplicitlySetBorderRadius): Deleted.

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInitialBorderBottomLeftRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderBottomLeftRadius):
(WebCore::Style::BuilderCustom::applyValueBorderBottomLeftRadius):
(WebCore::Style::BuilderCustom::applyInitialBorderBottomRightRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderBottomRightRadius):
(WebCore::Style::BuilderCustom::applyValueBorderBottomRightRadius):
(WebCore::Style::BuilderCustom::applyInitialBorderTopLeftRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderTopLeftRadius):
(WebCore::Style::BuilderCustom::applyValueBorderTopLeftRadius):
(WebCore::Style::BuilderCustom::applyInitialBorderTopRightRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderTopRightRadius):
(WebCore::Style::BuilderCustom::applyValueBorderTopRightRadius):

LayoutTests:

Add test, skip it except in iOS and Mac.

  • TestExpectations:
  • fast/css/appearance-apple-pay-button-border-radius-longhands-expected.html: Added.
  • fast/css/appearance-apple-pay-button-border-radius-longhands.html: Added.
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
5:45 PM Changeset in webkit [291535] by Alan Bujtas
  • 10 edits in trunk/Source/WebCore

[IFC][Integration] InlineIterator::Line functions should all return float values
https://bugs.webkit.org/show_bug.cgi?id=238106

Reviewed by Antti Koivisto.

Display structures are supposed to be all float based.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::lineBoxHeight const):
(WebCore::InlineIterator::contentStartInBlockDirection):
(WebCore::InlineIterator::Line::contentLogicalTop const):
(WebCore::InlineIterator::Line::contentLogicalBottom const):
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::Line::contentLogicalBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::Line::lineBoxTop const):
(WebCore::InlineIterator::Line::lineBoxBottom const):

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTop const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottom const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::lineBoxTop const):
(WebCore::InlineIterator::LineIteratorLegacyPath::lineBoxBottom const):

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTop const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottom const):
(WebCore::InlineIterator::LineIteratorModernPath::lineBoxTop const):
(WebCore::InlineIterator::LineIteratorModernPath::lineBoxBottom const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottomAdjustedForFollowingLine const):

  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalTop):
(WebCore::LineSelection::logicalBottom):
(WebCore::LineSelection::logicalRect):
(WebCore::LineSelection::physicalRect):
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustEnclosingTopForPrecedingBlock const):
(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::paintOutline):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintBackground):

4:22 PM Changeset in webkit [291534] by mmaxfield@apple.com
  • 3 edits in trunk/LayoutTests

Make fast/text/emoji-num-glyphs.html more robust
https://bugs.webkit.org/show_bug.cgi?id=238120
<rdar://problem/88842010>

Unreviewed test gardening.

  • fast/text/emoji-num-glyphs-expected.txt:
  • fast/text/emoji-num-glyphs.html:
1:30 PM Changeset in webkit [291533] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[IFC][Integration] Remove redundant InlineIterator::Line::closestBoxForPoint function
https://bugs.webkit.org/show_bug.cgi?id=238103

Reviewed by Antti Koivisto.

  1. Rename closestBoxForLogicalLeftPosition to closestBoxForHorizontalPosition and move it off of the Line class.
  2. Replace InlineIterator::Line::closestBoxForPoint calls with closestBoxForHorizontalPosition.
  3. Tidy up Line class.
  • editing/VisibleUnits.cpp:

(WebCore::previousLinePosition):
(WebCore::nextLinePosition):

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::closestBoxForHorizontalPosition):
(WebCore::InlineIterator::Line::closestBoxForPoint const): Deleted.
(WebCore::InlineIterator::Line::closestBoxForLogicalLeftPosition const): Deleted.

  • layout/integration/InlineIteratorLine.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

1:24 PM Changeset in webkit [291532] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[IFC][Integration] Rename InlineIterator::Line::blockDirectionPointInLine to contentStartInBlockDirection
https://bugs.webkit.org/show_bug.cgi?id=238101

Reviewed by Antti Koivisto.

blockDirectionPointInLine returns the position (vertical or horizontal, depending on the writing mode) where the content
starts (which for flipped writing mode is the bottom of the line).
Let's also move this function out of the Line class and have it as a standalone helper function (and move/rename some private Line
functions to public).

  • editing/VisibleUnits.cpp:

(WebCore::absoluteLineDirectionPointToLocalPointInBlock):

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::blockDirectionPointInLine const): Deleted.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::contentStartInBlockDirection):
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::Line::contentLogicalTopForHitTesting const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopForHitTesting const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopForHitTesting const): Deleted.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

1:05 PM Changeset in webkit [291531] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[IFC][Integration] Use a more descriptive name for InlineIterator::Line::enclosing* functions
https://bugs.webkit.org/show_bug.cgi?id=238094

Reviewed by Antti Koivisto.

Enlcosing essentially means content logical top/bottom here.

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::blockDirectionPointInLine const):

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::Line::contentLogicalTopForHitTesting const):
(WebCore::InlineIterator::Line::contentLogicalBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::Line::enclosingTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::Line::enclosingTopForHitTesting const): Deleted.
(WebCore::InlineIterator::Line::enclosingBottomAdjustedForFollowingLine const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopForHitTesting const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingTopForHitTesting const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingBottomAdjustedForFollowingLine const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopForHitTesting const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::enclosingTopForHitTesting const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::enclosingBottomAdjustedForFollowingLine const): Deleted.

  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalTop):
(WebCore::LineSelection::logicalBottom):
(WebCore::LineSelection::logicalRect):
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

12:17 PM Changeset in webkit [291530] by Alan Bujtas
  • 10 edits in trunk/Source/WebCore

[IFC][Integration] Rename InlineIterator::Line:top/bottom to contentLogicalTop/contentLogicalBottom
https://bugs.webkit.org/show_bug.cgi?id=238085

Reviewed by Antti Koivisto.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::contentLogicalTop const):
(WebCore::InlineIterator::Line::contentLogicalBottom const):
(WebCore::InlineIterator::Line::top const): Deleted.
(WebCore::InlineIterator::Line::bottom const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTop const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottom const):
(WebCore::InlineIterator::LineIteratorLegacyPath::top const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::bottom const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTop const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottom const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::top const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::bottom const): Deleted.

11:21 AM Changeset in webkit [291529] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[IFC][Integration] InlineIterator::Line::enclosingBottom should read enclosingBottomAdjustedForFollowingLine
https://bugs.webkit.org/show_bug.cgi?id=238084

Reviewed by Antti Koivisto.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::enclosingBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::Line::enclosingBottom const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingBottom const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::enclosingBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingBottom const): Deleted.

8:39 AM Changeset in webkit [291528] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[IFC][Integration] Move selection specific code from InlineIterator::Line to LineSelection
https://bugs.webkit.org/show_bug.cgi?id=238083

Reviewed by Antti Koivisto.

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::enclosingTopAdjustedForPrecedingBlock const): Deleted.
(WebCore::InlineIterator::Line::selectionState const): Deleted.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::enclosingLogicalRect const): Deleted.
(WebCore::InlineIterator::Line::enclosingPhysicalRect const): Deleted.

  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalRect):
(WebCore::LineSelection::physicalRect):
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
(WebCore::LineSelection::selectionState):

6:23 AM Changeset in webkit [291527] by graouts@webkit.org
  • 5 edits
    4 adds in trunk

Dialog element only animates once
https://bugs.webkit.org/show_bug.cgi?id=236274
rdar://88857731

Reviewed by Dean Jackson, Tim Nguyen and Antti Koivisto.

LayoutTests/imported/w3c:

Import relevant WPT tests that had already been upstreamed in a previous, reverted
version of this patch.

  • web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-animation.html: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
  • web-platform-tests/css/css-animations/support/testcommon.js:

(addElement):
(addDiv):

Source/WebCore:

Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
and its ::backdrop as the dialog is open and eventually re-opened.

The first issue was that we didn't clear all CSS Animations state when a <dialog> was
closed and its style was set to display: none. We now call setAnimationsCreatedByMarkup
to correctly clear such state both when we identify a Styleable is newly getting
display: none. We do the same when cancelDeclarativeAnimations() is called, but also
call setCSSAnimationList() on the associated effect stack since that wasn't done either.
Now both functions do similar cleanup.

This allows us to remove removeCSSAnimationCreatedByMarkup() which did a fair bit of work
to clear CSS Animation state per-animation when we only ever used that function for
_all_ animations.

The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
We now do that inside of Element::removeFromTopLayer() at a point where the code in
Styleable::fromRenderer() will still work as the element will still be contained in
Document::topLayerElements().

Finally, we need to be sure that calling Element::setAnimationsCreatedByMarkup() with an
empty list doesn't end up creating an ElementAnimationRareData object if there was no
pre-existing object and the list of animations are empty.

Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html

imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html

  • dom/Element.cpp:

(WebCore::Element::removeFromTopLayer):
(WebCore::Element::setAnimationsCreatedByMarkup):

  • style/Styleable.cpp:

(WebCore::Styleable::cancelDeclarativeAnimations const):
(WebCore::Styleable::updateCSSAnimations const):
(WebCore::removeCSSAnimationCreatedByMarkup): Deleted.

4:41 AM Changeset in webkit [291526] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

REGRESSION (r285529): Flash of missing text when content on https://ahumanfuture.co animates
https://bugs.webkit.org/show_bug.cgi?id=237972
rdar://90385586

Reviewed by Simon Fraser.

Source/WebCore:

Accelerated animations are added to a CALayer in two different ways.

Transform-related animations are added in a CAAnimationGroup so that we can have control of the
way they interact with each other. We added this system when we added support for individual CSS
transform properties on top of the existing "transform" property. All CAAnimationGroup animations
are timed to start at 1s and thus we subtract that same 1s value from all animations contained
within such groups.

All other animations, such as "opacity" animations, are added as simple leaf animations and their
begin time is not subject to that 1s subtraction.

In r285529, when we introduced leaf animations for transform properties other than transform-related
properties, we took an unfortunate approach to deal with that 1s subtraction. We would *always* subtract
1s for all animations, and for leaf animation add that 1s back when we added them in the
addLeafAnimation() lambda.

However, we *did not* check whether that animation was newly started or if we were merely adding it
again. This meant that every time GraphicsLayerCA::updateAnimations() was called, any leaf animation
would have 1s added to their begin time.

So, if for instance a page ran on a given element a "scale" animation for 1s and an "opacity" animation
for 2s, when the "scale" animation would complete, GraphicsLayerCA::updateAnimations() would be called
to remove that animation, and add 1s to the "opacity" animation begin time.

We now set the begin time, if not already set, in two places: in the addLeafAnimation() lambda for
leaf animations, and in the addAnimationsForProperty() lambda for animations added to groups. We
only ever set the begin time if not already set during a previous update and only subtract the
parent group begin time for animations contained within a group.

Additionally, this means we set the begin times when we iterate over remaining animations after culling
finished animations. As such, we no longer need to iterate over *all* known animations to set their
begin time if needed prior to adding them.

Test: webanimations/accelerated-animation-opacity-animation-begin-time-after-scale-animation-ends.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateAnimations):

LayoutTests:

Add a new test which would fail prior to the source change. In this test we start two animations: a "scale"
animation which lasts for 100ms, and an "opacity" animation which lasts much longer but only visually updates
for the duration of the "scale" animation. When the "scale" animation completes, we stop the test and ensure
that the reference test shows that the "opacity" animation is at the state it should be in at at that time,
and was not rewound due to the bug being fixed.

  • webanimations/accelerated-animation-opacity-animation-begin-time-after-scale-animation-ends-expected.html: Added.
  • webanimations/accelerated-animation-opacity-animation-begin-time-after-scale-animation-ends.html: Added.
3:36 AM Changeset in webkit [291525] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, WPE clang build fix after r291343.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor):

2:12 AM Changeset in webkit [291524] by Antti Koivisto
  • 6 edits in trunk

[CSS Container Queries] Add Typed OM support for container units
https://bugs.webkit.org/show_bug.cgi?id=238078

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/container-units-typed-om-expected.txt:

Source/WebCore:

For completeness, Typed OM is not enabled or fully implemented yet.

  • css/DOMCSSNamespace+CSSNumericFactory.idl:
  • css/typedom/CSSNumericFactory.h:
  • css/typedom/CSSStyleValueFactory.cpp:

(WebCore::CSSStyleValueFactory::reifyValue):

1:49 AM Changeset in webkit [291523] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[IFC][Integration] Move enclosingHeightAdjustedForPrecedingBlock off of InlineIterator::Line
https://bugs.webkit.org/show_bug.cgi?id=238081

Reviewed by Antti Koivisto.

This function is way too specific to be on InlineIterator::Line (and has only one callsite).

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::enclosingHeightAdjustedForPrecedingBlock const): Deleted.

  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
(WebCore::LineSelection::logicalHeightAdjustedForPrecedingBlock): Deleted.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::inlineSelectionGaps):

1:14 AM Changeset in webkit [291522] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build (hopefully)

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

Mar 18, 2022:

8:46 PM Changeset in webkit [291521] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Further reduce # of registers used in RegExpTestInline
https://bugs.webkit.org/show_bug.cgi?id=238105

Reviewed by Saam Barati.

This patch further reduces # of registers used in RegExpTestInline.
After flushRegisters(), we can use baseGPR for any purpose.
We also remove x64 hack since we have enough registers for x64 even
if we use one callee-save register in unlinked DFG.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileRegExpTestInline):

8:30 PM Changeset in webkit [291520] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix typo from r291295
https://bugs.webkit.org/show_bug.cgi?id=238087

Patch by Joseph Griego <jgriego@igalia.com> on 2022-03-18
Reviewed by Chris Dumez.

No new tests (changes only comments)

  • bindings/scripts/CodeGeneratorJS.pm:

(IsAlwaysExposedOnInterface):

8:25 PM Changeset in webkit [291519] by Patrick Angle
  • 2 edits in trunk/Source/WebCore

Web Inspector: console.screenshot has extra transparent pixels at bottom of screenshot on platforms with viewports that are obscured by browser chrome
https://bugs.webkit.org/show_bug.cgi?id=238060

Reviewed by Devin Rousso.

ScrollView::sizeForVisibleRect includes partially-visible portions of the viewport, including in Safari's case
the part of the viewport under the semi-translucent title bar. Because we force an origin of zero, this meant
that we were overshooting the bottom of the viewport by the height of this area when taking a snapshot for
console.screenshot(). Instead, we should use unobscured viewport rectangle and provide coordinates in
document-space, not view-space to WebCore::snapshotFrameRect.

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::screenshot):

7:00 PM Changeset in webkit [291518] by mmaxfield@apple.com
  • 7 edits in trunk

[Cocoa] Teach WebKit how to serialize CGColors
https://bugs.webkit.org/show_bug.cgi?id=238069
<rdar://problem/90124325>

Reviewed by Dean Jackson and Tim Horton.

Source/WebKit:

We have 2 ways of serializing Cocoa objects: NS type handling in ArgumentCodersCocoa.mm,
and CF type handling in ArgumentCodersCF.mm. CGColors are CF types, so this patch adds
direct support in ArgumentCodersCF to serialize them, by round-tripping them through
WebCore::Colors. However, NS containers (like font descriptor attribute dictionaries)
can contain CGColors, so this patch also teaches ArgumentCodersCocoa that there may be
CF types inside NS containers. If one is present, ArgumentCodersCocoa has to call into
ArgumentCodersCF to serialize it.

This patch doesn't add support for the reverse path, where an NS object is contained
within a CF container. I intentionally omitted implementing this because I wasn't sure
if it would be a layering violation; ArgumentCodersCococa.mm already #includes
ArgumentCodersCF.h, but ArgumentCodersCF.mm doesn't #include ArgumentCodersCocoa.h.
This path isn't actually necessary to solve my problem at hand, so someone else can
add support if necessary in the future. I also added a comment at the site where the
code would fail, describing what the problem is and a potential workaround.

This patch also adds support for our NSSecureCoding implementation for CGColors. This
is necessary because sometimes we want to serialize things like NSAttributedStrings,
which we don't have direct support for, so we use NSSecureCoding to serialize them
instead. NSAttributedStrings can contain fonts whose descriptor dictionaries contain
CGColors, so this path needs to work with CGColors too. Support is implemented using
NSKeyedArchiverDelegate and NSKeyedUnarchiverDelegate.

Test: IPCTestingAPI.CGColorInNSSecureCoding

The non-NSSecureCoding parts of this patch are tested by our regular LayoutTests
when DOM GPU Process rendering is enabled.

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(-[WKSecureCodingArchivingDelegate archiver:willEncodeObject:]):
(-[WKSecureCodingArchivingDelegate unarchiver:didDecodeObject:]):
(-[WKSecureCodingCGColorWrapper wrappedColor]):
(+[WKSecureCodingCGColorWrapper supportsSecureCoding]):
(-[WKSecureCodingCGColorWrapper encodeWithCoder:]):
(-[WKSecureCodingCGColorWrapper initWithCoder:]):
(-[WKSecureCodingCGColorWrapper initWithCGColor:]):
(IPC::typeFromObject):
(IPC::decodeSecureCodingInternal):
(IPC::encodeCFInternal):
(IPC::decodeCFInternal):
(IPC::encodeObject):
(IPC::decodeObject):

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::typeFromCFTypeRef):
(IPC::ArgumentCoder<CFTypeRef>::encode):
(IPC::ArgumentCoder<RetainPtr<CFTypeRef>>::decode):
(IPC::ArgumentCoder<CGColorRef>::encode):
(IPC::ArgumentCoder<RetainPtr<CGColorRef>>::decode):

  • Shared/cf/ArgumentCodersCF.h:

Tools:

  • Scripts/webkitpy/style/checkers/cpp.py:
  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
6:03 PM Changeset in webkit [291517] by Devin Rousso
  • 21 edits
    8 adds in trunk

Web Inspector: REGRESSION(?): Emulate User Gesture doesn't work
https://bugs.webkit.org/show_bug.cgi?id=232584
<rdar://problem/84899576>

Reviewed by Patrick Angle.

Source/JavaScriptCore:

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::evaluateOnCallFrame):

  • inspector/agents/InspectorRuntimeAgent.h:
  • inspector/agents/InspectorRuntimeAgent.cpp:

(Inspector::InspectorRuntimeAgent::evaluate):
(Inspector::InspectorRuntimeAgent::callFunctionOn):
Create overloads for these (protocol) methods so that we can avoid having to fetch the same
InjectedScript more than once (i.e. if the subclass fetches the InjectedScript and then
called into the baseclass, which also fetches the same InjectedScript).

  • debugger/Debugger.h:

(JSC::Debugger::Client::debuggerWillEvaluate):
(JSC::Debugger::Client::debuggerDidEvaluate):

  • debugger/Debugger.cpp:

(JSC::Debugger::evaluateBreakpointActions):
Pass along the current JSGlobalObject to eventually derive a relevant WebCore::Document.

Source/WebCore:

Recently some new web APIs have gone a step further by using a new way to detect one-time
user interaction called [transient activation](https://html.spec.whatwg.org/multipage/interaction.html#transient-activation).
In order to support invoking these APIs from Web Inspector, UserGestureEmulationScope
needs to be adjusted to support marking the context as having recently been interacted with,
which turns out to just involve plumbing a Document through to the UserGestureIndicator,
as the rest has already been implemented.

Tests: inspector/debugger/breakpoint-action-emulateUserGesture-hasTransientActiviation.html

inspector/debugger/evaluateOnCallFrame-emulateUserGesture-hasTransientActivation.html
inspector/runtime/callFunctionOn-emulateUserGesture-hasTransientActivation.html
inspector/runtime/evaluate-emulateUserGesture-hasTransientActivation.html

  • inspector/agents/page/PageDebuggerAgent.h:
  • inspector/agents/page/PageDebuggerAgent.cpp:

(WebCore::PageDebuggerAgent::evaluateOnCallFrame):
(WebCore::PageDebuggerAgent::debuggerWillEvaluate):
(WebCore::PageDebuggerAgent::debuggerDidEvaluate):

  • inspector/agents/page/PageRuntimeAgent.cpp:

(WebCore::PageRuntimeAgent::evaluate):
(WebCore::PageRuntimeAgent::callFunctionOn):

  • inspector/agents/page/UserGestureEmulationScope.h:
  • inspector/agents/page/UserGestureEmulationScope.cpp:

(WebCore::UserGestureEmulationScope::UserGestureEmulationScope):
Derive a Document from the JSGlobalObject of the relevant InjectedScript.

  • inspector/InspectorFrontendClientLocal.cpp:

(WebCore::InspectorFrontendClientLocal::openURLExternally):

  • inspector/InspectorFrontendHost.cpp:

(WebCore::FrontendMenuProvider::contextMenuItemSelected):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::navigate):
Drive-by: Pass the relevant Document to the UserGestureIndicator just in case the Web

Inspector frontend needs it.

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

(WebCore::Internals::hasTransientActivation): Added.
Expose DOMWindow::hasTransientActivation to tests.

LayoutTests:

  • inspector/debugger/breakpoint-action-emulateUserGesture-hasTransientActiviation.html: Added.
  • inspector/debugger/breakpoint-action-emulateUserGesture-hasTransientActiviation-expected.txt: Added.
  • inspector/debugger/evaluateOnCallFrame-emulateUserGesture-hasTransientActivation.html: Added.
  • inspector/debugger/evaluateOnCallFrame-emulateUserGesture-hasTransientActivation-expected.txt: Added.
  • inspector/runtime/callFunctionOn-emulateUserGesture-hasTransientActivation.html: Added.
  • inspector/runtime/callFunctionOn-emulateUserGesture-hasTransientActivation-expected.txt: Added.
  • inspector/runtime/evaluate-emulateUserGesture-hasTransientActivation.html: Added.
  • inspector/runtime/evaluate-emulateUserGesture-hasTransientActivation-expected.txt: Added.
5:59 PM Changeset in webkit [291516] by Nikos Mouchtaris
  • 4 edits in trunk/Source/WebCore

Calc() cleanup
https://bugs.webkit.org/show_bug.cgi?id=237982

Reviewed by Simon Fraser.

Small cleanup of CSSCalcExpressionNodeParser and CSSCalcOperationNode needed after
adding more math functions.

  • css/calc/CSSCalcExpressionNodeParser.cpp:

(WebCore::CSSCalcExpressionNodeParser::parseCalcFunction):

  • css/calc/CSSCalcOperationNode.cpp:

(WebCore::determineCategory):
(WebCore::CSSCalcOperationNode::simplifyNode):

  • css/calc/CSSCalcOperationNode.h:
5:55 PM Changeset in webkit [291515] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Reduce # of registers used in RegExpTestInline to allow using unlinked DFG in x64
https://bugs.webkit.org/show_bug.cgi?id=238092

Reviewed by Michael Saboff.

This patch reduces # of registers used in RegExpTestInline implementation to make it work
well for x64 unlinked DFG since it can reduce # of registers to use one callee-save register
for constants buffer.

We also add YarrJITRegisters::validate to ensure that used registers meet the invariants in YarrJIT.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileRegExpTestInline):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::jitCompileInlinedTest):

  • yarr/YarrJITRegisters.h:

(JSC::Yarr::YarrJITRegisters::validate):
(JSC::Yarr::YarrJITRegisters::YarrJITRegisters): Deleted.

5:46 PM Changeset in webkit [291514] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] Fix more build breakage from r291361
https://bugs.webkit.org/show_bug.cgi?id=238097
<rdar://problem/90505371>

Unreviewed build fix.

  • platform/ios/WebAVPlayerController.mm: Declare AVAssetTrack.
5:43 PM Changeset in webkit [291513] by commit-queue@webkit.org
  • 4 edits
    5 deletes in trunk

Unreviewed, reverting r291476.
https://bugs.webkit.org/show_bug.cgi?id=238098

Caused Gtk js/weakref-finalizationregistry.html failure

Reverted changeset:

"Remove the 1ms minimum for setTimeout"
https://bugs.webkit.org/show_bug.cgi?id=221124
https://commits.webkit.org/r291476

5:40 PM Changeset in webkit [291512] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[IFC][Integration] InlineIterator::Line::enclosingTop is really an enclosingTopAdjustedForPrecedingLine
https://bugs.webkit.org/show_bug.cgi?id=238079

Reviewed by Antti Koivisto.

This is used for selection and hittesting.

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::enclosingTopAdjustedForPrecedingBlock const):

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::enclosingTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::Line::enclosingLogicalRect const):
(WebCore::InlineIterator::Line::enclosingTop const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingTop const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::enclosingTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingTopForHitTesting const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingTop const): Deleted.

  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalTop):

5:31 PM Changeset in webkit [291511] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

Update preference location used for CaptivePortal testing.
https://bugs.webkit.org/show_bug.cgi?id=237970
<rdar://problem/88897735>

Patch by Gavin Phillips <gavin.p@apple.com> on 2022-03-18
Reviewed by Brent Fulgham.

Update the location of the setting used to determine whether we should ignore CaptivePortal requests for testing
as well as group the various iterations of preference checking into a single location.

  • UIProcess/API/Cocoa/_WKSystemPreferences.mm:

(+[_WKSystemPreferences isCaptivePortalModeEnabled]):
(+[_WKSystemPreferences setCaptivePortalModeEnabled:]):
(+[_WKSystemPreferences isCaptivePortalModeIgnored:]):
(+[_WKSystemPreferences setCaptivePortalModeIgnored:ignore:]):

  • UIProcess/API/Cocoa/_WKSystemPreferencesInternal.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::isCaptivePortalModeEnabledBySystemIgnoringCaching):

5:30 PM Changeset in webkit [291510] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.15

Tag Safari-614.1.5.15.

5:26 PM Changeset in webkit [291509] by Cameron McCormack
  • 12 edits in trunk/LayoutTests/imported/w3c

Update Display P3 canvas drawImage(video) tests to avoid edge case bugs
https://bugs.webkit.org/show_bug.cgi?id=237286

Reviewed by Jer Noble.

This test is intermittently failing, due to the odd single frame
videos causing issues and loadeddata not being guaranteed to mean the
video is ready for drawing. Update the tests to work around these.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html:

Use requestVideoFrameCallback if available, since that should be
better than loadeddata to guarantee the pixel data is available. Also
play the videos that are inserted, to avoid issues with the video
frame callback being called a bit late.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js:

Fix the command line in the comment that's used to generate the test
videos.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.mp4:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.webm:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.mp4:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.webm:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.mp4:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.webm:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.mp4:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.webm:

Change these videos from being a single frame long to 10s long.

5:19 PM Changeset in webkit [291508] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Optimize AtomHTMLToken::initializeAttributes()
https://bugs.webkit.org/show_bug.cgi?id=238074

Reviewed by Geoffrey Garen.

Use a HashSet to find duplicate attributes instead of doing a linear search.
This is a confirmed 1.2% progression on Speedometer on iMac20,1 via A/B bots.

  • html/parser/AtomHTMLToken.h:

(WebCore::AtomHTMLToken::initializeAttributes):

5:00 PM Changeset in webkit [291507] by Russell Epstein
  • 9 edits in branches/safari-614.1.5-branch/Source

Versioning.

WebKit-7614.1.5.15

4:51 PM Changeset in webkit [291506] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[macOS arm64] webrtc/vp9-profile2.html is consistently timing out
https://bugs.webkit.org/show_bug.cgi?id=238104

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:20 PM Changeset in webkit [291505] by Alan Coon
  • 1 copy in tags/Safari-614.1.6.1

Tag Safari-614.1.6.1.

4:20 PM Changeset in webkit [291504] by Alan Coon
  • 1 delete in tags/Safari-614.1.6.1

Delete tag.

4:18 PM Changeset in webkit [291503] by Alan Coon
  • 9 edits in branches/safari-614.1.6-branch/Source

Versioning.

WebKit-7614.1.6.1

4:13 PM Changeset in webkit [291502] by Alan Coon
  • 1 copy in tags/Safari-614.1.6.1

Tag Safari-614.1.6.1.

4:11 PM Changeset in webkit [291501] by Jonathan Bedard
  • 11 edits in trunk/Source

[iOS 15.4] Fix unused variables
https://bugs.webkit.org/show_bug.cgi?id=238089
<rdar://problem/90498642 >

Reviewed by Alexey Proskuryakov and Chris Dumez.

  • Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess): Declare isSafari as unused for Mac and Catalyst.

  • Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:

(-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
Remove canPanX and canPanY, since they are unused.

  • Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant _createSheetWithElementActions:defaultTitle:showLinkTitle:]): Remove titleIsURL.

  • Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::addMessageToConsole): Declare respondsToNewSelector as unused on iOS family.

  • Source/WebCore/accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::visiblePositionForPoint const): frameView is only used on Mac.

  • Source/WebCore/editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_addAttachmentForElement): Declare ignoreOrientation as unused on iOS family.

  • Source/WebCore/platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp:

(WebCore::AudioOutputUnitAdaptor::configure): Assert that result is unused.

  • Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp:

(WebCore::FontCascade::drawGlyphs): Declare shouldSmoothFonts as unused on iOS family.

Canonical link: https://commits.webkit.org/248613@main

3:47 PM Changeset in webkit [291500] by Antti Koivisto
  • 8 edits in trunk

[CSS Container Queries] Ensure container style changes are propagated to descendants
https://bugs.webkit.org/show_bug.cgi?id=238072

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/container-name-invalidation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-type-invalidation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-selection-expected.txt:

Source/WebCore:

  • style/StyleChange.cpp:

(WebCore::Style::determineChange):

Ensure we recompute the descendants when container properties change.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveComposedTree):
(WebCore::Style::TreeResolver::updateQueryContainer):

We need to ensure layout is up-to-date also when a query container stops being one.
Remove the unused m_resolvedQueryContainers maps.

  • style/StyleTreeResolver.h:
3:12 PM Changeset in webkit [291499] by pvollan@apple.com
  • 30 edits
    5 copies in trunk

Fix test failures when enabling content filtering in the Network process
https://bugs.webkit.org/show_bug.cgi?id=237217

Reviewed by Brent Fulgham.

Source/WebCore:

This patch addresses test failures when enabling content filtering in the Network process.
When content filtering is running in the Network process, we need to send the mock content
filter and settings to the Network process to support testing. The mock content filter is
moved from the WebCore test support library target to the WebCore framework, since WebKit
now also will reference the mock content filter when sending it to the Network process.
Previously a compile time guard was used to disable the content filtering code in the
document loader. However, we still need to support content filtering in the document
loader for WK1, so this patch changes that to use a runtime check instead. The rest of
this patch addresses test failures seen when running the layout and API tests. This patch
does not enable the feature.

No new tests, covered by existing tests.

  • WebCore.xcodeproj/project.pbxproj:
  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::startFilteringMainResource):
(WebCore::ContentFilter::continueAfterDataReceived):
(WebCore::ContentFilter::continueAfterNotifyFinished):
(WebCore::ContentFilter::deliverResourceData):
(WebCore::ContentFilter::url):
(WebCore::ContentFilter::continueAfterSubstituteDataRequest):

  • loader/ContentFilter.h:

(WebCore::ContentFilter::setBlockedError):

  • loader/ContentFilterClient.h:
  • loader/DocumentLoader.cpp:

(WebCore::contentFilterInDocumentLoader):
(WebCore::DocumentLoader::notifyFinished):
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::dataReceived):
(WebCore::DocumentLoader::detachFromFrame):
(WebCore::DocumentLoader::startLoadingMainResource):
(WebCore::DocumentLoader::clearMainResource):
(WebCore::DocumentLoader::becomeMainResourceClient):
(WebCore::DocumentLoader::dataReceivedThroughContentFilter):
(WebCore::DocumentLoader::contentFilterWillHandleProvisionalLoadFailure):
(WebCore::DocumentLoader::contentFilterHandleProvisionalLoadFailure):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::setBlockedPageURL):
(WebCore::DocumentLoader::setSubstituteDataFromContentFilter):

  • loader/PolicyChecker.cpp:

(WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy):

  • platform/ContentFilterUnblockHandler.h:
  • platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:

(WebCore::ContentFilterUnblockHandler::encode const):
(WebCore::ContentFilterUnblockHandler::decode):
(WebCore::ContentFilterUnblockHandler::canHandleRequest const):
(WebCore::ContentFilterUnblockHandler::requestUnblockAsync const):
(WebCore::ContentFilterUnblockHandler::setUnblockedAfterRequest):

  • testing/MockContentFilterManager.cpp: Added.

(WebCore::MockContentFilterManager::singleton):
(WebCore::MockContentFilterManager::setClient):
(WebCore::MockContentFilterManager::notifySettingsChanged const):

  • testing/MockContentFilterManager.h: Added.
  • testing/MockContentFilterSettings.cpp:

(WebCore::MockContentFilterSettings::reset):
(WebCore::MockContentFilterSettings::setEnabled):
(WebCore::MockContentFilterSettings::setBlockedString):
(WebCore::MockContentFilterSettings::setDecisionPoint):
(WebCore::MockContentFilterSettings::setDecision):
(WebCore::MockContentFilterSettings::setUnblockRequestDecision):
(WebCore::MockContentFilterSettings::setModifiedRequestURL):

  • testing/MockContentFilterSettings.h:

(WebCore::MockContentFilterSettings::encode const):
(WebCore::MockContentFilterSettings::decode):
(WebCore::MockContentFilterSettings::setBlockedString): Deleted.
(WebCore::MockContentFilterSettings::setDecisionPoint): Deleted.
(WebCore::MockContentFilterSettings::setDecision): Deleted.
(WebCore::MockContentFilterSettings::setUnblockRequestDecision): Deleted.
(WebCore::MockContentFilterSettings::setModifiedRequestURL): Deleted.

  • testing/MockContentFilterSettingsClient.h: Added.

(WebCore::MockContentFilterSettingsClient::~MockContentFilterSettingsClient):

Source/WebKit:

Add a WebMockContentFilterManager in the WebContent process, which will be notified
when mock content filter settings are changed from JavaScript, and then send the new
settings to the Network process and install the mock content filter. The other
changes are addressing layout and API test failures.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::installMockContentFilter):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::startContentFiltering):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::willSendRedirectedRequestInternal):
(WebKit::NetworkResourceLoader::contentFilterDidBlock):
(WebKit::NetworkResourceLoader::cancelMainResourceLoadForContentFilter):
(WebKit::NetworkResourceLoader::handleProvisionalLoadFailureFromContentFilter):

  • NetworkProcess/NetworkResourceLoader.h:
  • Shared/WebCoreArgumentCoders.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebMockContentFilterManager.cpp: Added.

(WebKit::WebMockContentFilterManager::singleton):
(WebKit::WebMockContentFilterManager::startObservingSettings):
(WebKit::WebMockContentFilterManager::mockContentFilterSettingsChanged):

  • WebProcess/Network/WebMockContentFilterManager.h: Added.
  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::contentFilterDidBlockLoad):
(WebKit::WebResourceLoader::cancelMainResourceLoadForContentFilter):
(WebKit::WebResourceLoader::handleProvisionalLoadFailureFromContentFilter): Deleted.

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.messages.in:
  • WebProcess/WebProcess.cpp:

Tools:

TestWebKitAPI needs to link with WebCore now that the mock content filter is compiled into WebCore.
Adjust test expectations, since the content filters are not expected to be loaded in the WebContent
process anymore.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
  • TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig:
  • TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm:
  • TestWebKitAPI/Tests/mac/ContentFiltering.mm:
3:09 PM Changeset in webkit [291498] by mmaxfield@apple.com
  • 47 edits in trunk/Source/WebGPU

[WebGPU] Add #pragma marks to strategic places
https://bugs.webkit.org/show_bug.cgi?id=238065

Reviewed by Alexey Proskuryakov.

They help a little bit with Xcode navigation.

  • WebGPU/Adapter.h:
  • WebGPU/Adapter.mm:
  • WebGPU/BindGroup.h:
  • WebGPU/BindGroup.mm:
  • WebGPU/BindGroupLayout.h:
  • WebGPU/BindGroupLayout.mm:
  • WebGPU/Buffer.h:
  • WebGPU/Buffer.mm:
  • WebGPU/CommandBuffer.h:
  • WebGPU/CommandBuffer.mm:
  • WebGPU/CommandEncoder.h:
  • WebGPU/CommandEncoder.mm:
  • WebGPU/ComputePassEncoder.h:
  • WebGPU/ComputePassEncoder.mm:
  • WebGPU/ComputePipeline.h:
  • WebGPU/ComputePipeline.mm:
  • WebGPU/Device.h:
  • WebGPU/Device.mm:
  • WebGPU/Instance.h:
  • WebGPU/Instance.mm:
  • WebGPU/PipelineLayout.h:
  • WebGPU/PipelineLayout.mm:
  • WebGPU/QuerySet.h:
  • WebGPU/QuerySet.mm:
  • WebGPU/Queue.h:
  • WebGPU/Queue.mm:
  • WebGPU/RenderBundle.h:
  • WebGPU/RenderBundle.mm:
  • WebGPU/RenderBundleEncoder.h:
  • WebGPU/RenderBundleEncoder.mm:
  • WebGPU/RenderPassEncoder.h:
  • WebGPU/RenderPassEncoder.mm:
  • WebGPU/RenderPipeline.h:
  • WebGPU/RenderPipeline.mm:
  • WebGPU/Sampler.h:
  • WebGPU/Sampler.mm:
  • WebGPU/ShaderModule.h:
  • WebGPU/ShaderModule.mm:
  • WebGPU/Surface.h:
  • WebGPU/Surface.mm:
  • WebGPU/SwapChain.h:
  • WebGPU/SwapChain.mm:
  • WebGPU/Texture.h:
  • WebGPU/Texture.mm:
  • WebGPU/TextureView.h:
  • WebGPU/TextureView.mm:
2:59 PM Changeset in webkit [291497] by Nikos Mouchtaris
  • 5 edits
    2 adds in trunk

Allow history swipe in scroller with overscroll-behavior
https://bugs.webkit.org/show_bug.cgi?id=235851

Reviewed by Simon Fraser.

Source/WebCore:

Re-add code to allow history swipe. Does so by returning unhandled if a horizontal
swipe is used. Also add test to make sure history swipes are allowed in scrolling nodes
with overscroll-behavior.

Test: scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe-overscroll-behavior.html

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::handleWheelEventWithNode):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::shouldRubberBand const):
(WebCore::ScrollingTreeScrollingNode::computeScrollPropagation const):
(WebCore::ScrollingTreeScrollingNode::shouldBlockScrollPropagation const): Deleted.

  • page/scrolling/ScrollingTreeScrollingNode.h:

LayoutTests:

  • scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe-overscroll-behavior-expected.txt: Added.
  • scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe-overscroll-behavior.html: Added.
2:53 PM Changeset in webkit [291496] by Chris Dumez
  • 5 edits in trunk/Source

Avoid calls to [CLLocationManager authorizationStatus] & [CLLocationManager locationServicesEnabled]
https://bugs.webkit.org/show_bug.cgi?id=237933
<rdar://89931043>

Reviewed by Geoffrey Garen.

Source/WebCore:

Avoid calls to [CLLocationManager authorizationStatus] & [CLLocationManager locationServicesEnabled]
for performance reasons since those are synchronous, potentially slow and called on the UIProcess
main thread.

Instead, rely on the fact that the locationManagerDidChangeAuthorization always gets called
asynchronously right after constructing the CLLocationManager with the actual authorization.
This simplifies our logic a bit too.

We now only call [CLLocationManager requestWhenInUseAuthorization] when locationManagerDidChangeAuthorization
gets called with kCLAuthorizationStatusNotDetermined asynchronously after construction.
If locationManagerDidChangeAuthorization gets called with an authorized enum value, we
call [CLLocationManager startUpdatingLocation] then (if the client is interested in locations, and not
merely in the authorization).

  • platform/cocoa/CoreLocationGeolocationProvider.h:
  • platform/cocoa/CoreLocationGeolocationProvider.mm:

(-[WebCLLocationManager initWithWebsiteIdentifier:client:mode:]):
(-[WebCLLocationManager locationManagerDidChangeAuthorization:]):
(WebCore::CoreLocationGeolocationProvider::CoreLocationGeolocationProvider):
(isAuthorizationGranted): Deleted.
(-[WebCLLocationManager initWithWebsiteIdentifier:client:]): Deleted.
(-[WebCLLocationManager start]): Deleted.
(-[WebCLLocationManager requestGeolocationAuthorization]): Deleted.
(WebCore::CoreLocationGeolocationProvider::start): Deleted.
(WebCore::CoreLocationGeolocationProvider::stop): Deleted.

Source/WebKit:

Minor changes to reflect API changes for our CoreLocation location manager.

  • UIProcess/WebGeolocationManagerProxy.cpp:

(WebKit::WebGeolocationManagerProxy::providerStartUpdating):
(WebKit::WebGeolocationManagerProxy::providerStopUpdating):

1:09 PM Changeset in webkit [291495] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Avoid extra pointer dereference in EventListenerMap::m_entries
https://bugs.webkit.org/show_bug.cgi?id=238075

Reviewed by Geoffrey Garen.

This is a confirmed 0.5-0.8% progression on Speedometer according to A/B
bots.

  • dom/EventListenerMap.cpp:

(WebCore::EventListenerMap::clear):
(WebCore::EventListenerMap::add):
(WebCore::EventListenerMap::remove):
(WebCore::EventListenerMap::find):
(WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
(WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
(WebCore::EventListenerIterator::nextListener):
(WebCore::EventListenerMap::find const): Deleted.

  • dom/EventListenerMap.h:

(WebCore::EventListenerMap::find const):

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

Keep a strong reference to session in [WebCoreNSURLSessionDataTask _restart]
https://bugs.webkit.org/show_bug.cgi?id=238061
<rdar://88242622>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-18
Reviewed by Eric Carlson.

_session is a WeakObjCPtr<WebCoreNSURLSession> and since we're not using ARC self.session
returns a raw pointer to an object that may be deallocated and null out its loader on a different thread.
To prevent null crashes, keep a strong reference to the session when using it.

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSession dealloc]):
(-[WebCoreNSURLSessionDataTask _restart]):

12:36 PM Changeset in webkit [291493] by Simon Fraser
  • 3 edits
    3 adds in trunk

REGRESSION (r290628): Scrubber makes a visual trail when scrubbing on tv.youtube.com
https://bugs.webkit.org/show_bug.cgi?id=238047
<rdar://problem/90451319>

Reviewed by Alan Bujtas.

Source/WebCore:

In r290628 I added a call to clearRepaintRects() when changing the backing sharing
target layer for a RenderLayer. However, for a layer using backing sharing, this
gets called twice during a normal compositing update, which has the effect of
clearing the cached repaint rects so that a layer repaint always computes new rects.
Thus, if a layer moved, we'd fail to repaint the old rect.

RenderLayerBacking::setBackingSharingLayers() already has logic to update repaint
rects when state changes, so we don't need this clearing.

Test: compositing/repaint/move-backing-sharing-layer.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setBackingProviderLayer):

LayoutTests:

  • compositing/repaint/move-backing-sharing-layer-expected.txt: Added.
  • compositing/repaint/move-backing-sharing-layer.html: Added.
12:19 PM Changeset in webkit [291492] by Ben Nham
  • 18 edits in trunk

Remove push subscriptions when associated service worker registrations are removed
https://bugs.webkit.org/show_bug.cgi?id=237983

Reviewed by Youenn Fablet.

Source/WebKit:

When a ServiceWorkerRegistration is removed, we also need to remove its associated
PushSubscription. This can occur when:

  1. The application calls ServiceWorkerRegistration.unregister. This is implemented by having resolveUnregistrationJobInClient call unsubscribeFromPushService in webpushd. The identifier passed to unsubscribeFromPushService is now optional; if the identifier is not present, then we delete whatever PushSubscription is associated with the given scope URL.
  1. The user clears website data for a particular origin. This is implemented by having deleteWebsiteDataForOrigins invoke removePushSubscriptionsForOrigin in webpushd.
  1. The user clears all website data. This is implemented by having deleteWebsiteData invoke removeAllPushSubscriptions in webpushd.

Covered by new API tests.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::hasPushSubscriptionForTesting):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::unsubscribeFromPushService):
(WebKit::NetworkNotificationManager::removeAllPushSubscriptions):
(WebKit::NetworkNotificationManager::removePushSubscriptionsForOrigin):

  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):

  • Shared/WebPushDaemonConstants.h:

(WebKit::WebPushD::messageTypeSendsReply):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _scopeURL:hasPushSubscriptionForTesting:]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::hasPushSubscriptionForTesting):

  • UIProcess/Network/NetworkProcessProxy.h:
  • webpushd/PushService.h:
  • webpushd/PushService.mm:

(WebPushD::UnsubscribeRequest::UnsubscribeRequest):
(WebPushD::UnsubscribeRequest::startInternal):
(WebPushD::PushService::unsubscribe):
(WebPushD::PushService::incrementSilentPushCount):
(WebPushD::PushService::removeRecordsForBundleIdentifier):
(WebPushD::PushService::removeRecordsForBundleIdentifierAndOrigin):
(WebPushD::PushService::removeRecordsImpl):

  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm:

(WebPushD::MessageInfo::removeAllPushSubscriptions::encodeReply):
(WebPushD::MessageInfo::removePushSubscriptionsForOrigin::encodeReply):
(WebPushD::Daemon::decodeAndHandleMessage):
(WebPushD::Daemon::unsubscribeFromPushService):
(WebPushD::Daemon::removeAllPushSubscriptions):
(WebPushD::Daemon::removePushSubscriptionsForOrigin):

Tools:

Add new tests to make sure that we delete push subscriptions when unregistering a service
worker or deleting website data.

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
12:11 PM Changeset in webkit [291491] by J Pascoe
  • 4 edits in trunk

Trigger PDF download in captive portal mode instead of using PDF viewer
https://bugs.webkit.org/show_bug.cgi?id=237245
rdar://problem/89525531

Reviewed by Chris Dumez.

Source/WebKit:

This is a stopgap solution since PDF.js needs more cycles to polish.

Added API test WKDownload.CaptivePortalPDF.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForResponseShared):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Add API test for captive portal pdf behavior.

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(tempPDFThatDoesNotExist):

11:48 AM Changeset in webkit [291490] by Jonathan Bedard
  • 7 edits in trunk/Tools

[git-webkit] Make radar conditional on authentication
https://bugs.webkit.org/show_bug.cgi?id=238051
<rdar://problem/90384655>

Reviewed by Aakash Jain.

  • Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:

(Tracker.init): Only instantiate client with valid authentication.
(Tracker.authentication): Catch exceptions from failed authentication.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:

(Scm.init): Only instantiate Radar as a tracker with valid authentication.

Canonical link: https://commits.webkit.org/248602@main

11:06 AM Changeset in webkit [291489] by Russell Epstein
  • 3 edits in branches/safari-614.1.6-branch/Source/WebKit

Cherry-pick r291437. rdar://problem/90445115

Unreviewed, reverting r290835.
https://bugs.webkit.org/show_bug.cgi?id=238044

Disruptive change

Reverted changeset:

"[iOS] Hard link AVPictureInPictureController"
https://bugs.webkit.org/show_bug.cgi?id=237227
https://commits.webkit.org/r290835

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

11:06 AM Changeset in webkit [291488] by Russell Epstein
  • 3 edits in branches/safari-614.1.6-branch/Source/WebKit

Cherry-pick r291429. rdar://problem/90445115

Unreviewed, reverting r291352.
https://bugs.webkit.org/show_bug.cgi?id=238039

Disruptive change

Reverted changeset:

"Incorrect header name used in has_include"
https://bugs.webkit.org/show_bug.cgi?id=237914
https://commits.webkit.org/r291352

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

9:45 AM Changeset in webkit [291487] by eocanha@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Add stop position to the range request
https://bugs.webkit.org/show_bug.cgi?id=238028

Reviewed by Philippe Normand.

Currently, the range requests performed by WebKitWebSourceGStreamer indicate a range
start position but not a range stop one, even though it's set in the internal
members->stopPosition attribute.

This may not be a problem when WebKitWebSrc is used as a source for the whole video,
but certainly is when it's used as an embedded source inside adaptive demux
(replacing SoupHttpSrc). It causes decoding errors in some MPEG-DASH streams.
See: https://github.com/WebPlatformForEmbedded/WPEWebKit/issues/813

This patch is authored by Eugene Mutavchi <Ievgen_Mutavchi@comcast.com>
See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/814

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: Apply stopPosition to the range request when it's valid.
8:39 AM Changeset in webkit [291486] by Patrick Griffis
  • 2 edits in trunk/Tools

[Flatpak] Pass extra webkit-flatpak args to sub-command
https://bugs.webkit.org/show_bug.cgi?id=238027

Reviewed by Carlos Garcia Campos.

This adds the abillity to run something like:

webkit-flatpak --command=echo -- --help

Where our script doesn't parse anything after -- and it gets passed to the subcommand.

  • flatpak/flatpakutils.py:

(extract_extra_command_args):
(WebkitFlatpak.load_from_args):
(WebkitFlatpak.setup_dev_env):

8:08 AM Changeset in webkit [291485] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r290356-r290351?): [ iOS EWS ] 3 imported/w3c/web-platform-tests/service-workers/service-worker/* tests are constant text failures.
https://bugs.webkit.org/show_bug.cgi?id=237160
<rdar://problem/89440067>

Reviewed by Chris Dumez.

When we try reusing a resource in the MemoryCache that was provided by a service worker, we might need to revalidate it.
In that case, we might add revalidation headers that will show up in service workers fetch event request.
To prevent this, we reload instead of revalidating at document level.
The service worker will then be able to revalidate itself the resource since it is probably in its memory cache.

Covered by test that is no longer flaky.

  • loader/cache/CachedResourceLoader.cpp:
7:31 AM Changeset in webkit [291484] by commit-queue@webkit.org
  • 4 edits in trunk

[GStreamer] Migrate gst-full support to 1.20
https://bugs.webkit.org/show_bug.cgi?id=237772

Patch by Philippe Normand <pnormand@igalia.com> on 2022-03-18
Reviewed by Xabier Rodriguez-Calvar.

.:

  • Source/cmake/GStreamerChecks.cmake:

Source/WebCore:

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::registerWebKitGStreamerElements): GStreamer 1.20 no longer requires manual
initialization of gst-full. It is done during the gst_init().

7:27 AM Changeset in webkit [291483] by commit-queue@webkit.org
  • 34 edits
    50 adds in trunk

[GStreamer] Initial import of the GstWebRTC backend
https://bugs.webkit.org/show_bug.cgi?id=236540

Patch by Philippe Normand <pnormand@igalia.com> on 2022-03-18
Reviewed by Carlos Garcia Campos and Xabier Rodriguez-Calvar.

.:

Enable GstWebRTC by default if a recent-enough (>= 1.20) version is available.

  • Source/cmake/FindGStreamer.cmake:
  • Source/cmake/GStreamerChecks.cmake:
  • Source/cmake/GStreamerDefinitions.cmake:
  • Source/cmake/GStreamerDependencies.cmake:

Source/WebCore:

Initial GstWebRTC backend. A lot of features unimplemented still, but we will incrementally
improve the layout test coverage in follow-up patches. Most notable short-comings currently:

  • DataChannel support is incomplete (bug 235879)
  • Network traffic not routed through Network process yet
  • Stats support incomplete
  • DTMF support unimplemented
  • ICE restarts not supported yet
  • Re-negotiation unlikely to work
  • Simulcast not handled yet
  • Balanced bundle not supported
  • RTX and FEC un-tested, but shouldn't be hard to fix
  • Modules/mediastream/MediaDevices.cpp:
  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::generateCertificate):

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::create):

  • Modules/mediastream/gstreamer/GStreamerDataChannelHandler.cpp: Added.

(WebCore::GStreamerDataChannelHandler::fromRTCDataChannelInit):
(WebCore::GStreamerDataChannelHandler::channelEvent):
(WebCore::GStreamerDataChannelHandler::GStreamerDataChannelHandler):
(WebCore::GStreamerDataChannelHandler::~GStreamerDataChannelHandler):
(WebCore::GStreamerDataChannelHandler::setClient):
(WebCore::GStreamerDataChannelHandler::sendStringData):
(WebCore::GStreamerDataChannelHandler::sendRawData):
(WebCore::GStreamerDataChannelHandler::close):
(WebCore::GStreamerDataChannelHandler::checkState):
(WebCore::GStreamerDataChannelHandler::readyStateChanged):
(WebCore::GStreamerDataChannelHandler::onMessageData):
(WebCore::GStreamerDataChannelHandler::onMessageString):
(WebCore::GStreamerDataChannelHandler::onError):
(WebCore::GStreamerDataChannelHandler::onBufferedAmountLow):
(WebCore::GStreamerDataChannelHandler::postTask):

  • Modules/mediastream/gstreamer/GStreamerDataChannelHandler.h: Added.
  • Modules/mediastream/gstreamer/GStreamerDtlsTransportBackend.cpp: Added.

(WebCore::GStreamerDtlsTransportBackend::GStreamerDtlsTransportBackend):
(WebCore::GStreamerDtlsTransportBackend::~GStreamerDtlsTransportBackend):
(WebCore::GStreamerDtlsTransportBackend::iceTransportBackend):
(WebCore::GStreamerDtlsTransportBackend::registerClient):
(WebCore::GStreamerDtlsTransportBackend::unregisterClient):
(WebCore::GStreamerDtlsTransportBackend::stateChanged):

  • Modules/mediastream/gstreamer/GStreamerDtlsTransportBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerIceTransportBackend.cpp: Added.

(WebCore::GStreamerIceTransportBackend::GStreamerIceTransportBackend):
(WebCore::GStreamerIceTransportBackend::~GStreamerIceTransportBackend):
(WebCore::GStreamerIceTransportBackend::iceTransportChanged):
(WebCore::GStreamerIceTransportBackend::registerClient):
(WebCore::GStreamerIceTransportBackend::unregisterClient):
(WebCore::GStreamerIceTransportBackend::stateChanged):
(WebCore::GStreamerIceTransportBackend::gatheringStateChanged):

  • Modules/mediastream/gstreamer/GStreamerIceTransportBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp: Added.

(WebCore::GStreamerMediaEndpoint::GStreamerMediaEndpoint):
(WebCore::GStreamerMediaEndpoint::initializePipeline):
(WebCore::GStreamerMediaEndpoint::~GStreamerMediaEndpoint):
(WebCore::GStreamerMediaEndpoint::teardownPipeline):
(WebCore::GStreamerMediaEndpoint::handleMessage):
(WebCore::GStreamerMediaEndpoint::disposeElementChain):
(WebCore::GStreamerMediaEndpoint::setConfiguration):
(WebCore::GStreamerMediaEndpoint::restartIce):
(WebCore::fetchDescription):
(WebCore::fetchSignalingState):
(WebCore::descriptionsFromWebRTCBin):
(WebCore::GStreamerMediaEndpoint::doSetLocalDescription):
(WebCore::GStreamerMediaEndpoint::setRemoteDescriptionSucceeded):
(WebCore::GStreamerMediaEndpoint::doSetRemoteDescription):
(WebCore::SetDescriptionCallData::SetDescriptionCallData):
(WebCore::GStreamerMediaEndpoint::setDescription):
(WebCore::GStreamerMediaEndpoint::storeRemoteMLineInfo):
(WebCore::GStreamerMediaEndpoint::configureAndLinkSource):
(WebCore::GStreamerMediaEndpoint::requestPad):
(WebCore::GStreamerMediaEndpoint::addTrack):
(WebCore::GStreamerMediaEndpoint::removeTrack):
(WebCore::GStreamerMediaEndpoint::doCreateOffer):
(WebCore::GStreamerMediaEndpoint::doCreateAnswer):
(WebCore::GStreamerMediaEndpoint::initiate):
(WebCore::GStreamerMediaEndpoint::getStats):
(WebCore::GStreamerMediaEndpoint::mediaStreamFromRTCStream):
(WebCore::GStreamerMediaEndpoint::addRemoteStream):
(WebCore::GStreamerMediaEndpoint::removeRemoteStream):
(WebCore::GStreamerMediaEndpoint::createTransceiverBackends):
(WebCore::GStreamerMediaEndpoint::addTransceiver):
(WebCore::GStreamerMediaEndpoint::createSourceForTrack):
(WebCore::GStreamerMediaEndpoint::setSenderSourceFromTrack):
(WebCore::GStreamerMediaEndpoint::transceiverBackendFromSender):
(WebCore::GStreamerMediaEndpoint::addIceCandidate):
(WebCore::GStreamerMediaEndpoint::createDataChannel):
(WebCore::GStreamerMediaEndpoint::onDataChannel):
(WebCore::GStreamerMediaEndpoint::close):
(WebCore::GStreamerMediaEndpoint::stop):
(WebCore::GStreamerMediaEndpoint::suspend):
(WebCore::GStreamerMediaEndpoint::resume):
(WebCore::GStreamerMediaEndpoint::onNegotiationNeeded):
(WebCore::GStreamerMediaEndpoint::onIceConnectionChange):
(WebCore::GStreamerMediaEndpoint::onIceGatheringChange):
(WebCore::GStreamerMediaEndpoint::onIceCandidate):
(WebCore::GStreamerMediaEndpoint::createSessionDescriptionSucceeded):
(WebCore::GStreamerMediaEndpoint::createSessionDescriptionFailed):
(WebCore::GStreamerMediaEndpoint::collectTransceivers):
(WebCore::GStreamerMediaEndpoint::gatherStatsForLogging):
(WebCore::RTCStatsLogger::RTCStatsLogger):
(WebCore::RTCStatsLogger::toJSONString const):
(WebCore::GStreamerMediaEndpoint::processStats):
(WebCore::GStreamerMediaEndpoint::onStatsDelivered):
(WebCore::GStreamerMediaEndpoint::startLoggingStats):
(WebCore::GStreamerMediaEndpoint::stopLoggingStats):
(WebCore::GStreamerMediaEndpoint::logChannel const):
(WebCore::GStreamerMediaEndpoint::statsLogInterval const):
(WebCore::GStreamerMediaEndpoint::gatherDecoderImplementationName):
(WTF::LogArgument<WebCore::RTCStatsLogger>::toString):

  • Modules/mediastream/gstreamer/GStreamerMediaEndpoint.h: Added.

(WebCore::GStreamerMediaEndpoint::create):
(WebCore::GStreamerMediaEndpoint::isStopped const):
(WebCore::GStreamerMediaEndpoint::isNegotiationNeeded const):
(WebCore::GStreamerMediaEndpoint::pipeline const):

  • Modules/mediastream/gstreamer/GStreamerPeerConnectionBackend.cpp: Added.

(WebCore::createGStreamerPeerConnectionBackend):
(WebCore::PeerConnectionBackend::receiverCapabilities):
(WebCore::PeerConnectionBackend::senderCapabilities):
(WebCore::GStreamerPeerConnectionBackend::GStreamerPeerConnectionBackend):
(WebCore::GStreamerPeerConnectionBackend::suspend):
(WebCore::GStreamerPeerConnectionBackend::resume):
(WebCore::GStreamerPeerConnectionBackend::restartIce):
(WebCore::GStreamerPeerConnectionBackend::setConfiguration):
(WebCore::GStreamerPeerConnectionBackend::getStats):
(WebCore::backendFromRTPSender):
(WebCore::GStreamerPeerConnectionBackend::doSetLocalDescription):
(WebCore::GStreamerPeerConnectionBackend::doSetRemoteDescription):
(WebCore::GStreamerPeerConnectionBackend::doCreateOffer):
(WebCore::GStreamerPeerConnectionBackend::doCreateAnswer):
(WebCore::GStreamerPeerConnectionBackend::close):
(WebCore::GStreamerPeerConnectionBackend::doStop):
(WebCore::GStreamerPeerConnectionBackend::doAddIceCandidate):
(WebCore::GStreamerPeerConnectionBackend::createReceiver):
(WebCore::GStreamerPeerConnectionBackend::createDataChannelHandler):
(WebCore::findExistingSender):
(WebCore::GStreamerPeerConnectionBackend::addTrack):
(WebCore::GStreamerPeerConnectionBackend::addTransceiverFromTrackOrKind):
(WebCore::GStreamerPeerConnectionBackend::addTransceiver):
(WebCore::GStreamerPeerConnectionBackend::setSenderSourceFromTrack):
(WebCore::backendFromRTPTransceiver):
(WebCore::GStreamerPeerConnectionBackend::existingTransceiver):
(WebCore::GStreamerPeerConnectionBackend::newRemoteTransceiver):
(WebCore::GStreamerPeerConnectionBackend::collectTransceivers):
(WebCore::GStreamerPeerConnectionBackend::removeTrack):
(WebCore::GStreamerPeerConnectionBackend::applyRotationForOutgoingVideoSources):
(WebCore::GStreamerPeerConnectionBackend::gatherDecoderImplementationName):
(WebCore::GStreamerPeerConnectionBackend::isNegotiationNeeded const):

  • Modules/mediastream/gstreamer/GStreamerPeerConnectionBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpReceiverBackend.cpp: Added.

(WebCore::GStreamerRtpReceiverBackend::getParameters):
(WebCore::GStreamerRtpReceiverBackend::getContributingSources const):
(WebCore::GStreamerRtpReceiverBackend::getSynchronizationSources const):
(WebCore::GStreamerRtpReceiverBackend::createSource):
(WebCore::GStreamerRtpReceiverBackend::rtcRtpTransformBackend):
(WebCore::GStreamerRtpReceiverBackend::dtlsTransportBackend):

  • Modules/mediastream/gstreamer/GStreamerRtpReceiverBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpReceiverTransformBackend.cpp: Added.

(WebCore::mediaTypeFromReceiver):
(WebCore::GStreamerRtpReceiverTransformBackend::GStreamerRtpReceiverTransformBackend):
(WebCore::GStreamerRtpReceiverTransformBackend::~GStreamerRtpReceiverTransformBackend):
(WebCore::GStreamerRtpReceiverTransformBackend::setTransformableFrameCallback):
(WebCore::GStreamerRtpReceiverTransformBackend::requestKeyFrame):

  • Modules/mediastream/gstreamer/GStreamerRtpReceiverTransformBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpSenderBackend.cpp: Added.

(WebCore::updateTrackSource):
(WebCore::GStreamerRtpSenderBackend::startSource):
(WebCore::GStreamerRtpSenderBackend::stopSource):
(WebCore::GStreamerRtpSenderBackend::replaceTrack):
(WebCore::GStreamerRtpSenderBackend::getParameters const):
(WebCore::GStreamerRtpSenderBackend::setParameters):
(WebCore::GStreamerRtpSenderBackend::createDTMFBackend):
(WebCore::GStreamerRtpSenderBackend::rtcRtpTransformBackend):
(WebCore::GStreamerRtpSenderBackend::setMediaStreamIds):
(WebCore::GStreamerRtpSenderBackend::dtlsTransportBackend):

  • Modules/mediastream/gstreamer/GStreamerRtpSenderBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpSenderTransformBackend.cpp: Added.

(WebCore::mediaTypeFromSender):
(WebCore::GStreamerRtpSenderTransformBackend::GStreamerRtpSenderTransformBackend):
(WebCore::GStreamerRtpSenderTransformBackend::~GStreamerRtpSenderTransformBackend):
(WebCore::GStreamerRtpSenderTransformBackend::setTransformableFrameCallback):
(WebCore::GStreamerRtpSenderTransformBackend::requestKeyFrame):

  • Modules/mediastream/gstreamer/GStreamerRtpSenderTransformBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpTransceiverBackend.cpp: Added.

(WebCore::GStreamerRtpTransceiverBackend::GStreamerRtpTransceiverBackend):
(WebCore::GStreamerRtpTransceiverBackend::createReceiverBackend):
(WebCore::GStreamerRtpTransceiverBackend::createSenderBackend):
(WebCore::GStreamerRtpTransceiverBackend::direction const):
(WebCore::GStreamerRtpTransceiverBackend::currentDirection const):
(WebCore::GStreamerRtpTransceiverBackend::setDirection):
(WebCore::GStreamerRtpTransceiverBackend::mid):
(WebCore::GStreamerRtpTransceiverBackend::stop):
(WebCore::GStreamerRtpTransceiverBackend::stopped const):
(WebCore::GStreamerRtpTransceiverBackend::setCodecPreferences):

  • Modules/mediastream/gstreamer/GStreamerRtpTransceiverBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpTransformBackend.cpp: Added.

(WebCore::GStreamerRtpTransformBackend::setInputCallback):
(WebCore::GStreamerRtpTransformBackend::clearTransformableFrameCallback):
(WebCore::GStreamerRtpTransformBackend::processTransformedFrame):

  • Modules/mediastream/gstreamer/GStreamerRtpTransformBackend.h: Added.

(WebCore::GStreamerRtpTransformBackend::GStreamerRtpTransformBackend):

  • Modules/mediastream/gstreamer/GStreamerSctpTransportBackend.cpp: Added.

(WebCore::toRTCSctpTransportState):
(WebCore::GStreamerSctpTransportBackend::GStreamerSctpTransportBackend):
(WebCore::GStreamerSctpTransportBackend::~GStreamerSctpTransportBackend):
(WebCore::GStreamerSctpTransportBackend::dtlsTransportBackend):
(WebCore::GStreamerSctpTransportBackend::registerClient):
(WebCore::GStreamerSctpTransportBackend::unregisterClient):
(WebCore::GStreamerSctpTransportBackend::stateChanged):

  • Modules/mediastream/gstreamer/GStreamerSctpTransportBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerStatsCollector.cpp: Added.

(WebCore::fillRTCStats):
(WebCore::fillRTCRTPStreamStats):
(WebCore::fillRTCCodecStats):
(WebCore::fillInboundRTPStreamStats):
(WebCore::fillOutboundRTPStreamStats):
(WebCore::fillRTCPeerConnectionStats):
(WebCore::fillRTCTransportStats):
(WebCore::fillReportCallback):
(WebCore::CallbackHolder::CallbackHolder):
(WebCore::GStreamerStatsCollector::getStats):

  • Modules/mediastream/gstreamer/GStreamerStatsCollector.h: Added.

(WebCore::GStreamerStatsCollector::create):
(WebCore::GStreamerStatsCollector::setElement):

  • Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp: Added.

(WebCore::toRTCIceComponent):
(WebCore::toRTCIceProtocol):
(WebCore::toRTCIceTcpCandidateType):
(WebCore::toRTCIceCandidateType):
(WebCore::toRTCError):
(WebCore::toWebRTCBitRatePriority):
(WebCore::fromRTCEncodingParameters):
(WebCore::fromWebRTCBitRatePriority):
(WebCore::toRTCEncodingParameters):
(WebCore::toRTCRtpSendParameters):
(WebCore::ensureDebugCategoryInitialized):
(WebCore::parseIceCandidateSDP):
(WebCore::x509Serialize):
(WebCore::privateKeySerialize):
(WebCore::generateCertificate):
(WebCore::sdpMediaHasAttributeKey):

  • Modules/mediastream/gstreamer/GStreamerWebRTCUtils.h: Added.

(WebCore::toRTCRtpTransceiverDirection):
(WebCore::fromRTCRtpTransceiverDirection):
(WebCore::toSessionDescriptionType):
(WebCore::fromSessionDescriptionType):
(WebCore::toSignalingState):
(WebCore::toRTCIceConnectionState):
(WebCore::toRTCDtlsTransportState):
(WebCore::toRTCIceTransportState):
(WebCore::toRTCIceGatheringState):
(WebCore::bundlePolicyFromConfiguration):
(WebCore::iceTransportPolicyFromConfiguration):
(WebCore::toRTCErrorDetailType):

  • platform/GStreamer.cmake:
  • platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:

(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):

  • platform/audio/gstreamer/GStreamerAudioStreamDescription.h:
  • platform/graphics/gstreamer/GRefPtrGStreamer.cpp:

(WTF::adoptGRef):
(WTF::refGPtr<GstWebRTCRTPReceiver>):
(WTF::derefGPtr<GstWebRTCRTPReceiver>):
(WTF::refGPtr<GstWebRTCRTPSender>):
(WTF::derefGPtr<GstWebRTCRTPSender>):
(WTF::refGPtr<GstWebRTCRTPTransceiver>):
(WTF::derefGPtr<GstWebRTCRTPTransceiver>):
(WTF::refGPtr<GstWebRTCDataChannel>):
(WTF::derefGPtr<GstWebRTCDataChannel>):
(WTF::refGPtr<GstWebRTCDTLSTransport>):
(WTF::derefGPtr<GstWebRTCDTLSTransport>):
(WTF::refGPtr<GstWebRTCICETransport>):
(WTF::derefGPtr<GstWebRTCICETransport>):

  • platform/graphics/gstreamer/GRefPtrGStreamer.h:
  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::capsMediaType):

  • platform/graphics/gstreamer/GUniquePtrGStreamer.h:
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::createAudioSourceProvider):

  • platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:

(WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):
(WebCore::GStreamerAudioCapturer::createConverter):

  • platform/mediastream/gstreamer/GStreamerCapturer.cpp:

(WebCore::GStreamerCapturer::createSource):

  • platform/mediastream/gstreamer/GStreamerDTMFSenderBackend.cpp: Added.

(WebCore::GStreamerDTMFSenderBackend::GStreamerDTMFSenderBackend):
(WebCore::GStreamerDTMFSenderBackend::~GStreamerDTMFSenderBackend):
(WebCore::GStreamerDTMFSenderBackend::canInsertDTMF):
(WebCore::GStreamerDTMFSenderBackend::playTone):
(WebCore::GStreamerDTMFSenderBackend::tones const):
(WebCore::GStreamerDTMFSenderBackend::duration const):
(WebCore::GStreamerDTMFSenderBackend::interToneGap const):
(WebCore::GStreamerDTMFSenderBackend::onTonePlayed):

  • platform/mediastream/gstreamer/GStreamerDTMFSenderBackend.h: Added.
  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(webkitMediaStreamSrcAddTrack):

  • platform/mediastream/gstreamer/GStreamerVideoEncoder.cpp:

(webkit_webrtc_video_encoder_class_init):

  • platform/mediastream/gstreamer/RealtimeIncomingAudioSourceGStreamer.cpp: Added.

(WebCore::RealtimeIncomingAudioSourceGStreamer::RealtimeIncomingAudioSourceGStreamer):
(WebCore::RealtimeIncomingAudioSourceGStreamer::~RealtimeIncomingAudioSourceGStreamer):
(WebCore::RealtimeIncomingAudioSourceGStreamer::startProducingData):
(WebCore::RealtimeIncomingAudioSourceGStreamer::stopProducingData):
(WebCore::RealtimeIncomingAudioSourceGStreamer::capabilities):
(WebCore::RealtimeIncomingAudioSourceGStreamer::settings):
(WebCore::RealtimeIncomingAudioSourceGStreamer::dispatchSample):

  • platform/mediastream/gstreamer/RealtimeIncomingAudioSourceGStreamer.h: Added.

(WebCore::RealtimeIncomingAudioSourceGStreamer::create):
(isType):

  • platform/mediastream/gstreamer/RealtimeIncomingSourceGStreamer.cpp: Added.

(WebCore::RealtimeIncomingSourceGStreamer::RealtimeIncomingSourceGStreamer):
(WebCore::RealtimeIncomingSourceGStreamer::lockValve const):
(WebCore::RealtimeIncomingSourceGStreamer::releaseValve const):
(WebCore::RealtimeIncomingSourceGStreamer::registerClient):

  • platform/mediastream/gstreamer/RealtimeIncomingSourceGStreamer.h: Added.

(WebCore::RealtimeIncomingSourceGStreamer::bin):
(WebCore::RealtimeIncomingSourceGStreamer::dispatchSample):

  • platform/mediastream/gstreamer/RealtimeIncomingVideoSourceGStreamer.cpp: Added.

(WebCore::RealtimeIncomingVideoSourceGStreamer::RealtimeIncomingVideoSourceGStreamer):
(WebCore::RealtimeIncomingVideoSourceGStreamer::startProducingData):
(WebCore::RealtimeIncomingVideoSourceGStreamer::stopProducingData):
(WebCore::RealtimeIncomingVideoSourceGStreamer::capabilities):
(WebCore::RealtimeIncomingVideoSourceGStreamer::settings):
(WebCore::RealtimeIncomingVideoSourceGStreamer::settingsDidChange):
(WebCore::RealtimeIncomingVideoSourceGStreamer::dispatchSample):

  • platform/mediastream/gstreamer/RealtimeIncomingVideoSourceGStreamer.h: Added.

(WebCore::RealtimeIncomingVideoSourceGStreamer::create):
(isType):

  • platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceGStreamer.cpp: Added.

(WebCore::RealtimeOutgoingAudioSourceGStreamer::RealtimeOutgoingAudioSourceGStreamer):
(WebCore::RealtimeOutgoingAudioSourceGStreamer::setPayloadType):

  • platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceGStreamer.h: Added.
  • platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.cpp: Added.

(WebCore::RealtimeOutgoingMediaSourceGStreamer::RealtimeOutgoingMediaSourceGStreamer):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::~RealtimeOutgoingMediaSourceGStreamer):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::setSource):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::start):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::stop):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::sourceMutedChanged):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::sourceEnabledChanged):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::initializeFromTrack):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::link):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::setSinkPad):

  • platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.h: Added.

(WebCore::RealtimeOutgoingMediaSourceGStreamer::source const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::allowedCaps const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::pad const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::sender const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::bin const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::setPayloadType):

  • platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceGStreamer.cpp: Added.

(WebCore::RealtimeOutgoingVideoSourceGStreamer::RealtimeOutgoingVideoSourceGStreamer):
(WebCore::RealtimeOutgoingVideoSourceGStreamer::setPayloadType):

  • platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceGStreamer.h: Added.
  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setWebRTCH265Support):
(WebCore::Internals::setWebRTCVP9Support):
(WebCore::Internals::setWebRTCVP9VTBSupport):
(WebCore::Internals::setEnableWebRTCEncryption):
(WebCore::Internals::setUseDTLS10):

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml: Unconditionally enable WebRTC when GstWebRTC is

enabled. We don't have a runtime Provider yet.

  • Scripts/Preferences/WebPreferencesExperimental.yaml: Disable encoded transforms unless libwebrtc is enabled.
  • wtf/glib/GRefPtr.cpp: Add GArray handling.

(WTF::refGPtr):
(WTF::derefGPtr):

  • wtf/glib/GRefPtr.h:

Tools:

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox): Allow libnice debug log environment variable in runtime sandbox.

LayoutTests:

  • platform/glib/TestExpectations: Flag most WebRTC as failing. During this first development

cycle I focused mostly on fixing crashes and only fixed a few failures. The remaining ones
will be adressed in follow-up patches.

  • platform/glib/fast/mediastream/RTCPeerConnection-localDescription-expected.txt: Added.
  • platform/glib/fast/mediastream/RTCPeerConnection-remoteDescription-expected.txt: Added.
  • platform/glib/fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt: Added.
  • platform/glib/fast/mediastream/RTCPeerConnection-stable-expected.txt: Added.
7:19 AM Changeset in webkit [291482] by Carlos Garcia Campos
  • 5 edits
    1 add in trunk

[GLIB] Make it possible to call GRefPtr::outPtr() multiple times wihtout an explicit clear
https://bugs.webkit.org/show_bug.cgi?id=238070

Reviewed by Adrian Perez de Castro.

Source/WTF:

Clear the GRefPtr before returning the value in outPtr(), similar to what GUniqueOutPtr does, since it's easy to
forget to explicitly call clear from the callers.

  • wtf/glib/GRefPtr.h:

(WTF::GRefPtr::outPtr):

Tools:

Add a unit tests for GRefPtr.

  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/Tests/WTF/glib/GRefPtr.cpp: Added.

(TestWebKitAPI::GWeakPtr::GWeakPtr):
(TestWebKitAPI::GWeakPtr::~GWeakPtr):
(TestWebKitAPI::GWeakPtr::set):
(TestWebKitAPI::TEST):

6:49 AM Changeset in webkit [291481] by Alan Bujtas
  • 17 edits in trunk/Source/WebCore

[IFC][Integration] Rename InlineIterator::Line::closestRun* to closestBoxFor*
https://bugs.webkit.org/show_bug.cgi?id=238064

Reviewed by Antti Koivisto.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::localCaretRectForCharacterOffset):

  • dom/Position.cpp:

(WebCore::Position::upstream const):
(WebCore::Position::downstream const):
(WebCore::Position::rendersInDifferentPosition const):
(WebCore::Position::inlineBoxAndOffset const):
(WebCore::searchAheadForBetterMatch):
(WebCore::Position::inlineRunAndOffset const): Deleted.

  • dom/Position.h:
  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::directionOfSelection):

  • editing/InlineRunAndOffset.h:
  • editing/RenderedPosition.cpp:

(WebCore::RenderedPosition::RenderedPosition):
(WebCore::RenderedPosition::previousLeafOnLine const):
(WebCore::RenderedPosition::nextLeafOnLine const):
(WebCore::RenderedPosition::isEquivalent const):
(WebCore::RenderedPosition::bidiLevelOnLeft const):
(WebCore::RenderedPosition::bidiLevelOnRight const):
(WebCore::RenderedPosition::leftBoundaryOfBidiRun):
(WebCore::RenderedPosition::rightBoundaryOfBidiRun):
(WebCore::RenderedPosition::atLeftBoundaryOfBidiRun const):
(WebCore::RenderedPosition::atRightBoundaryOfBidiRun const):
(WebCore::RenderedPosition::absoluteRect const):

  • editing/RenderedPosition.h:

(WebCore::RenderedPosition::line const):
(WebCore::RenderedPosition::atLeftmostOffsetInBox const):
(WebCore::RenderedPosition::atRightmostOffsetInBox const):

  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::leftVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::rightVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::inlineBoxAndOffset const):
(WebCore::VisiblePosition::localCaretRect const):
(WebCore::VisiblePosition::absoluteSelectionBoundsForLine const):
(WebCore::VisiblePosition::inlineRunAndOffset const): Deleted.

  • editing/VisiblePosition.h:
  • editing/VisibleUnits.cpp:

(WebCore::isTextOrLineBreakBox):
(WebCore::previousTextOrLineBreakBox):
(WebCore::nextTextOrLineBreakBox):
(WebCore::startTextOrLineBreakBox):
(WebCore::endTextOrLineBreakBox):
(WebCore::logicallyPreviousBox):
(WebCore::logicallyNextBox):
(WebCore::wordBreakIteratorForMinOffsetBoundary):
(WebCore::wordBreakIteratorForMaxOffsetBoundary):
(WebCore::visualWordPosition):
(WebCore::startPositionForLine):
(WebCore::endPositionForLine):
(WebCore::previousLinePosition):
(WebCore::nextLinePosition):
(WebCore::isTextOrLineBreakRun): Deleted.
(WebCore::previousTextOrLineBreakRun): Deleted.
(WebCore::nextTextOrLineBreakRun): Deleted.
(WebCore::startTextOrLineBreakRun): Deleted.
(WebCore::endTextOrLineBreakRun): Deleted.
(WebCore::logicallyPreviousRun): Deleted.
(WebCore::logicallyNextRun): Deleted.

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::closestBoxForPoint const):
(WebCore::InlineIterator::Line::closestBoxForLogicalLeftPosition const):
(WebCore::InlineIterator::Line::closestRunForPoint const): Deleted.
(WebCore::InlineIterator::Line::closestRunForLogicalLeftPosition const): Deleted.

  • layout/integration/InlineIteratorLine.h:
  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForText):
(WebCore::computeCaretRectForLineBreak):
(WebCore::computeCaretRectForSVGInlineText):
(WebCore::computeCaretRectForBox):
(WebCore::computeCaretRectForBlock):
(WebCore::computeLocalCaretRect):

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

(WebCore::positionForRun):
(WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderObject.h:
6:30 AM Changeset in webkit [291480] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[Linux] GBMDevice as a thread-specific object is problematic
https://bugs.webkit.org/show_bug.cgi?id=237758
<rdar://problem/90476889>

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-03-18
Reviewed by Alejandro G. Castro.

Per-thread GBMDevice instances (and the internal gbm_device objects) can
end up causing trouble if the gbm_bo objects spawned from it are moved
across threads and used after the originating thread (and that thread's
GBMDevice instance) is destroyed. This can happen with a GStreamer
pipeline where repeated playback is possibly moved across different
threads.

The original intention was to preemptively avoid any thread-safety
issues in the libgbm implementations but we haven't seen any yet. That
might change down the line once we adapt against implementations from
different vendors, at which point the most sensible solution would be
to deploy a specific thread on which all libgbm operations would be
handled.

  • platform/graphics/gbm/GBMBufferSwapchain.cpp:

(WebCore::GBMBufferSwapchain::getBuffer):

  • platform/graphics/gbm/GBMDevice.cpp:

(WebCore::GBMDevice::singleton):
(WebCore::GBMDevice::GBMDevice):
(WebCore::GBMDevice::~GBMDevice):
(WebCore::threadSpecificDevice): Deleted.
(WebCore::GBMDevice::get): Deleted.

  • platform/graphics/gbm/GBMDevice.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLTextureMapper::platformInitialize):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::reset):

5:59 AM Changeset in webkit [291479] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.36/Source/WebKit

Merge r291475 - [WPE][GTK] Fix a crash after r290360
https://bugs.webkit.org/show_bug.cgi?id=237917

Reviewed by Youenn Fablet.

When AuxiliaryProcess::shutDown is called for the WebProcess there might be pages not closed yet, for example
when swapping process on navigation, the close message is sent to the page after the shutdown. In the case of
GTK and WPE ports the pages are closed before stopping the run loop to ensure associated resources (like GPU
resources) are released. Closing the last page makes the process termination allowed, which ends up calling
AuxiliaryProcess::terminate again. Also, when the shutdown message is received we don't want to ask again the UI
process whether the process can be terminated, since the UI process asked it.

  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::enableTermination): Return early if m_isInShutDown is true.
(WebKit::AuxiliaryProcess::shutDown): Set m_isInShutDown for the scope.

  • Shared/AuxiliaryProcess.h:
5:59 AM Changeset in webkit [291478] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.36/Source/WebKit

Merge r291472 - Remove AuxiliaryProcess termination timeout
https://bugs.webkit.org/show_bug.cgi?id=238012

Reviewed by Chris Dumez.

It was only used by the plugin process, now it's always set to 0 for all processes, so it's useless.

  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::AuxiliaryProcess):
(WebKit::AuxiliaryProcess::disableTermination):
(WebKit::AuxiliaryProcess::enableTermination):
(WebKit::AuxiliaryProcess::terminationTimerFired): Deleted.

  • Shared/AuxiliaryProcess.h:

(WebKit::AuxiliaryProcess::setTerminationTimeout): Deleted.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

5:18 AM Changeset in webkit [291477] by commit-queue@webkit.org
  • 21 edits in trunk

Recycling a webgl context when it has been lost and restored causes a crash
https://bugs.webkit.org/show_bug.cgi?id=238024

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-18
Reviewed by Geoffrey Garen.

Source/WebCore:

Simulated context lost makes WebGLRenderingContextBase::m_context = nullptr
Real context lost preserves WebGLRenderingContextBase::m_context.

WebGLRenderingContextBase::maybeRestoreContext() used m_context.

The intention was that simulated context lost never invokes maybeRestoreContext()
as the timer to run maybeRestoreContext() is started only on real context lost.

However, it is possible to invoke simulated context lost after a real context lost,
but before the timer triggers maybeRestoreContext().

The sequence would be:

  1. Lose the context somehow
  2. Wait for webglcontextlost, use event.preventDefault() to request a restore.
  3. Before restore happens, lose the context via simulated context lost. This can be done by creating many contexts or via the WEBGL_lose_context.loseContext().
  4. maybeRestoreContext() would query m_context->getGraphicsResetStatusARB() for console log reasons, trying to explain to the developer why the context was lost. In case simulated context lost set the m_context == nullptr, this would crash.

getGraphicsResetStatusARB() has likely not been accurate for any platform ever.
For ANGLE, it is unimplemented and cannot pinpoint which context caused the context lost.
Just remove getGraphicsResetStatusARB() use from maybeRestoreContext(), this prevents
the crash. Remove it also from WebKit use altogether, it is never used for anything.

Adds the case to webgl/max-active-contexts-webglcontextlost-prevent-default.html

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::loseContextImpl):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):

  • loader/FrameLoaderClient.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:
  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp:
  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.h:
  • platform/graphics/opengl/ExtensionsGLOpenGLES.cpp:
  • platform/graphics/opengl/ExtensionsGLOpenGLES.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:

Source/WebKit:

Remove GraphicsContextGL::getGraphicsResetStatusARB(), it's unused now.

  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:

(getActiveUniformBlockiv):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToCanvas):
(WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToCanvas):
(WebKit::RemoteGraphicsContextGLProxy::markContextLost):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:

LayoutTests:

Creating excessive amount of contexts will lose the oldest context via
"simulated context lost" logic, making the contexts non-restorable.

Previously the test tried to test that requesting a restore on a context that
had simulated context lost would not restore. However, the test was invalid,
as it asserted that the context is still lost immediately after preventDefault():

event.preventDefault();
if (!contexts[0].isContextLost())

document.getElementById("result").textContent = "FAIL";

This is not correct, as the preventDefault() only informs the browser
that the context should be restored. The restore happens asynchronously.

Fix the test logic and add extra cases. Make the logic as such:

  1. Lose the context in some way
  2. Wait for context lost event, request restore
  3. Optionally do something that would trigger another way of losing the context
  4. Run assertions about context being still expectedly lost

The failures in the test expectation:
FAIL getError expected: INVALID_OPERATION. Was NO_ERROR :
FAIL getError expected: CONTEXT_LOST_WEBGL. Was NO_ERROR :
bug 236965

FAIL Expected restore be ignored, but it was not.
bug 238034

  • webgl/max-active-contexts-webglcontextlost-prevent-default.html:
4:58 AM Changeset in webkit [291476] by Cameron McCormack
  • 3 edits
    5 adds in trunk

Remove the 1ms minimum for setTimeout
https://bugs.webkit.org/show_bug.cgi?id=221124
<rdar://problem/73852354>

Reviewed by Sam Weinig.

The HTML spec makes no mention of a 1ms minimum for timers. Removing
the 1ms minimum for setTimeout results in a 0.7-2.1% improvement on
Speedometer, depending on platform and hardware.

The WPT added here demonstrates how this change can affect pages: if a
page schedules a 1ms and then a 0ms timeout in the same turn of the
event loop, then with this patch they will now be fired in the reverse
order. Firefox and Chrome do not impose a 1ms minimum, which reduces
the risk of this being a problem.

Not addressing the setTimeout 1ms minimum here, which should likely also
be removed.

While we're here, settle on "one shot" rather rather than "single
shot" as the term for timers that fire once.

Tests: imported/w3c/web-platform-tests/html/webappapis/timers/zero-settimeout.any.html

imported/w3c/web-platform-tests/html/webappapis/timers/zero-settimeout.any.worker.html

  • page/DOMTimer.h:
  • page/DOMTimer.cpp:

(WebCore::DOMTimer::DOMTimer): We must pass oneShot into
intervalClampedToMinimum, since the way isOneShot determines whether
we are a one shot timer is by checking repeatInterval, which is only
set once startRepeating is called.
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):
(WebCore::DOMTimer::updateTimerIntervalIfNecessary):
(WebCore::DOMTimer::isOneShot const):
(WebCore::DOMTimer::intervalClampedToMinimum const):

2:51 AM Changeset in webkit [291475] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[WPE][GTK] Fix a crash after r290360
https://bugs.webkit.org/show_bug.cgi?id=237917

Reviewed by Youenn Fablet.

When AuxiliaryProcess::shutDown is called for the WebProcess there might be pages not closed yet, for example
when swapping process on navigation, the close message is sent to the page after the shutdown. In the case of
GTK and WPE ports the pages are closed before stopping the run loop to ensure associated resources (like GPU
resources) are released. Closing the last page makes the process termination allowed, which ends up calling
AuxiliaryProcess::terminate again. Also, when the shutdown message is received we don't want to ask again the UI
process whether the process can be terminated, since the UI process asked it.

  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::enableTermination): Return early if m_isInShutDown is true.
(WebKit::AuxiliaryProcess::shutDown): Set m_isInShutDown for the scope.

  • Shared/AuxiliaryProcess.h:
2:01 AM Changeset in webkit [291474] by Antti Koivisto
  • 22 edits in trunk

[CSS Container Queries] Basic support for container units
https://bugs.webkit.org/show_bug.cgi?id=238021

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/container-units-animation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-basic-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-computational-independence-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-invalidation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-selection-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-small-viewport-fallback-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-typed-om-expected.txt:

Source/WebCore:

Container Relative Lengths: the cqw, cqh, cqi, cqb, cqmin, cqmax units
https://drafts.csswg.org/css-contain-3/#container-lengths

  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):

Resolve container units by resolving the query container and computing the value against it.

(WebCore::CSSPrimitiveValue::unitTypeString):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
(WebCore::CSSPrimitiveValue::equals const):

  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::isLength):

  • css/CSSToLengthConversionData.cpp:

(WebCore::CSSToLengthConversionData::CSSToLengthConversionData):

  • css/CSSToLengthConversionData.h:

(WebCore::CSSToLengthConversionData::element const):

  • css/CSSUnits.cpp:

(WebCore::unitCategory):
(WebCore::operator<<):

  • css/CSSUnits.h:
  • css/ContainerQuery.h:
  • css/calc/CSSCalcCategoryMapping.cpp:

(WebCore::calcUnitCategory):
(WebCore::calculationCategoryForCombination):
(WebCore::hasDoubleValue):

  • css/parser/CSSParserToken.cpp:

(WebCore::cssPrimitiveValueUnitFromTrie):

Parsing support.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::LengthRawKnownTokenTypeDimensionConsumer::consume):

  • style/ContainerQueryEvaluator.cpp:

(WebCore::Style::ContainerQueryEvaluator::selectContainer const):
(WebCore::Style::ContainerQueryEvaluator::selectContainer):

Factor container selection into static function that can be used from the unit resolution code.

  • style/ContainerQueryEvaluator.h:
  • style/SelectorMatchingState.h:
1:35 AM Changeset in webkit [291473] by Carlos Garcia Campos
  • 22 edits in trunk

Add a public build option for PDF.js
https://bugs.webkit.org/show_bug.cgi?id=238023

Reviewed by Michael Catanzaro.

.:

PDF.js increases the binary size of the library quite a bit, so embedders might want to disable it if they know
they don't need PDF support at all.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/WebCore:

  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createDocument):

  • html/PDFDocument.cpp:
  • html/PDFDocument.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::isPDFJSResourceLoad const):

  • page/SecurityOrigin.cpp:

(WebCore::shouldTreatAsUniqueOrigin):

  • platform/LegacySchemeRegistry.cpp:

(WebCore::builtinSecureSchemes):

Source/WebKit:

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::objectContentType):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):
(WebKit::WebPage::canShowMIMEType const):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::shouldUsePDFPlugin const):

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:
  • wtf/PlatformEnable.h:
1:32 AM Changeset in webkit [291472] by Carlos Garcia Campos
  • 7 edits in trunk/Source/WebKit

Remove AuxiliaryProcess termination timeout
https://bugs.webkit.org/show_bug.cgi?id=238012

Reviewed by Chris Dumez.

It was only used by the plugin process, now it's always set to 0 for all processes, so it's useless.

  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::AuxiliaryProcess):
(WebKit::AuxiliaryProcess::disableTermination):
(WebKit::AuxiliaryProcess::enableTermination):
(WebKit::AuxiliaryProcess::terminationTimerFired): Deleted.

  • Shared/AuxiliaryProcess.h:

(WebKit::AuxiliaryProcess::setTerminationTimeout): Deleted.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

1:30 AM Changeset in webkit [291471] by Carlos Garcia Campos
  • 4 edits in trunk

[ATSPI] accessibility/dropdown-value.html is timing out since added in 248145@main
https://bugs.webkit.org/show_bug.cgi?id=237803
<rdar://problem/90193311>

Reviewed by Andres Gonzalez.

Tools:

The test expects the combo box to expose the selected element name as the string value.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::AccessibilityUIElement::stringValue): Handle combo boxes as special case and return the selected element
name.

LayoutTests:

  • platform/gtk/TestExpectations: Unskip the test.
1:10 AM Changeset in webkit [291470] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix non-unified build after r291467

  • workers/service/context/ServiceWorkerInspectorProxy.cpp:
12:52 AM Changeset in webkit [291469] by graouts@webkit.org
  • 2 edits
    6 adds in trunk/LayoutTests

REGRESSION(r291129-r291128): [WK1 EWS] 3 imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/* tests are a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=238054
<rdar://problem/90458721>

Unreviewed test gardening.

The scroll-behavior property is not enabled on WK1 so we must have specific test expectations for these tests.

  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt: Added.
12:35 AM Changeset in webkit [291468] by youenn@apple.com
  • 20 edits in trunk/Source

Remove MediaSample usage from canvas capture code
https://bugs.webkit.org/show_bug.cgi?id=238015

Reviewed by Eric Carlson.

Source/WebCore:

Refactoring to use VideoFrame as interface/wrapper around video frames instead of the more generic MediaSample.
Coverd by existing tests.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:

(WebCore::CanvasCaptureMediaStreamTrack::Source::captureCanvas):

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::toVideoFrame):
(WebCore::HTMLCanvasElement::toMediaSample): Deleted.

  • html/HTMLCanvasElement.h:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::paintCompositedResultsToVideoFrame):
(WebCore::WebGLRenderingContextBase::paintCompositedResultsToMediaSample): Deleted.

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::GraphicsContextGLCocoa::paintCompositedResultsToVideoFrame):
(WebCore::GraphicsContextGLCocoa::paintCompositedResultsToMediaSample): Deleted.

  • platform/graphics/cv/VideoFrameCV.h:
  • platform/graphics/cv/VideoFrameCV.mm:

(WebCore::VideoFrameCV::createFromPixelBuffer):

Source/WebKit:

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToVideoFrame):
(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToMediaSample): Deleted.

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToVideoFrame):
(WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToMediaSample): Deleted.

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
12:33 AM Changeset in webkit [291467] by youenn@apple.com
  • 19 edits in trunk

Keep service workers alive when they are inspected even though they should be terminated
https://bugs.webkit.org/show_bug.cgi?id=237827
<rdar://88313935>

Reviewed by Alex Christensen.

Source/WebCore:

Store in SWServerWorker whether a worker is inspected or is processing push events.
In that case, we delay termination of workers until it is no longer inspected or no longer processing push events.
Two code paths are happening:

  1. A service worker was triggered with service worker clients, and all service worker clients are removed. At that point, we were previously terminating service workers after a delay. Instead, we now only terminate workers that are no longer inspected or no longer processing push events. We reschedule the timer to continue trying removing the context connection.
  2. A service worker is not stopped by removal of service worker clients. In that case, we need to terminate the service workers when inspected and/or push counter gets back to regular (not inspected, no push counter). When terminating such a service worker, we try removing the context connection as well.

To make sure SWServerWorker knows whether inspectable or not, we add connection support to transmit whether inspected from WebProcess.
ServiceWorkerInspectorProxy is responsible to update the inspectable value.
Introduce internals API to set inspected state of a service worker.

Covered by new API tests.

  • testing/ServiceWorkerInternals.cpp:
  • testing/ServiceWorkerInternals.h:
  • testing/ServiceWorkerInternals.idl:
  • workers/service/context/SWContextManager.cpp:
  • workers/service/context/SWContextManager.h:
  • workers/service/context/ServiceWorkerInspectorProxy.cpp:
  • workers/service/server/SWServer.cpp:
  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerToContextConnection.cpp:
  • workers/service/server/SWServerToContextConnection.h:
  • workers/service/server/SWServerWorker.cpp:
  • workers/service/server/SWServerWorker.h:

Source/WebKit:

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

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
Note: See TracTimeline for information about the timeline view.