Timeline



Feb 6, 2021:

10:08 PM Changeset in webkit [272470] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

[macOS] Add support for accessibility image extraction
https://bugs.webkit.org/show_bug.cgi?id=221262
<rdar://problem/70744978>

Reviewed by Devin Rousso.

Add WebKitAdditions support for image extraction.

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

(WebKit::WebViewImpl::requestImageExtraction): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestImageExtraction):

10:02 PM Changeset in webkit [272469] by commit-queue@webkit.org
  • 33 edits in trunk

Non-special URLs should have an opaque origin
https://bugs.webkit.org/show_bug.cgi?id=162254

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

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-origin-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml-expected.txt:
  • web-platform-tests/url/url-origin-expected.txt:

Source/WebCore:

This matches the behavior of Chrome, Firefox, and the URL specification.
In order to maintain compatibility with existing apps, we do a linkedOnOrAfter check for the new behavior.
In order to allow things like web extensions to continue to work, we allow non-null origins for schemes
for which a WKURLSchemeHandler has been registered. We learned this lesson 4 years ago when we tried this change.
This also makes sense conceptually because those schemes will be handled by the containing application,
so they can be an "origin" for a page.

  • page/SecurityOrigin.cpp:

(WebCore::shouldTreatAsUniqueOrigin):

  • platform/LegacySchemeRegistry.cpp:

(WebCore::schemesHandledBySchemeHandler):
(WebCore::LegacySchemeRegistry::registerURLSchemeAsHandledBySchemeHandler):
(WebCore::LegacySchemeRegistry::schemeIsHandledBySchemeHandler):

  • platform/LegacySchemeRegistry.h:
  • platform/cocoa/VersionChecks.h:

Source/WebInspectorUI:

  • UserInterface/Base/URLUtilities.js:

(parseURL):

Source/WebKit:

I needed to change API::SecurityOrigin from wrapping a WebCore::SecurityOrigin to wrapping a WebCore::SecurityOriginData,
otherwise it would often be null and we want it to be not null in the UI process.

  • Shared/API/APISecurityOrigin.h:

(API::SecurityOrigin::createFromString):
(API::SecurityOrigin::create):
(API::SecurityOrigin::securityOrigin const):
(API::SecurityOrigin::SecurityOrigin):

  • Shared/API/c/WKSecurityOriginRef.cpp:

(WKSecurityOriginCopyDatabaseIdentifier):
(WKSecurityOriginCopyProtocol):
(WKSecurityOriginCopyHost):
(WKSecurityOriginGetPort):

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreRemoveFetchCacheForOrigin):

  • UIProcess/API/Cocoa/WKSecurityOrigin.mm:

(-[WKSecurityOrigin protocol]):
(-[WKSecurityOrigin host]):
(-[WKSecurityOrigin port]):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::registerURLSchemeHandler):

Source/WTF:

  • wtf/URL.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
9:08 PM Changeset in webkit [272468] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Incorrect line box height when line-height is set on an empty root inline box
https://bugs.webkit.org/show_bug.cgi?id=221522

Reviewed by Antti Koivisto.

The root inline box with non-initial line height value stretches the line box even when root has no content.

e.g. <div style="line-height: 100px;"><span>content</span></div>
This content produces a ~100px tall line box.

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::inlineLevelBoxAffectsLineBox const):

7:28 PM Changeset in webkit [272467] by Wenson Hsieh
  • 10 edits
    1 add in trunk/Source/WebCore

Introduce image overlays and add UA shadow root support for image extraction
https://bugs.webkit.org/show_bug.cgi?id=221236

Reviewed by Ryosuke Niwa.

This patch restores some of the logic previously introduced in r164457 (and removed with r272117) to render
service button cells over images, and additionally renames and repurposes it for image extraction, a new
accessibility feature. See comments below for more details.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLElement.cpp:

(WebCore::imageOverlayElementIdentifier):
(WebCore::HTMLElement::hasImageOverlay const):

Add a helper to determine whether or not an element's UA shadow root has an image overlay element. This is
consulted in the constructor of RenderImage.

(WebCore::HTMLElement::updateWithImageExtractionResult):

Add a helper method to install image extraction content in the shadow root of an element, given an
ImageExtractionResult. This consists of an image overlay container (a relatively positioned div), which then
contains some number of absolutely positioned child div elements. Additionally load the image overlay
stylesheet as text within a style element when creating the UA shadow root.

  • html/HTMLElement.h:
  • html/shadow/imageOverlay.css: Added.

(div#image-overlay):
(div.image-overlay-text):

Add a new UA stylesheet for the image overlay shadow DOM subtree. The overlay contains a number of absolutely
positoned div elements, which are positioned inside the overlay element using using CSS transforms.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::RenderImage):
(WebCore::RenderImage::canHaveChildren const):

Return true if we require children in the shadow root (for either media controls, or this new image overlay).

(WebCore::RenderImage::layout):
(WebCore::RenderImage::layoutShadowContent):
(WebCore::RenderImage::layoutShadowControls): Deleted.

Rename layoutShadowControls to layoutShadowContent, and allow it to support both the "shadow controls" case
(i.e. RenderMedia) and the "image extraction content" case. Additonally, remove the check for
shadowControlsNeedCustomLayoutMetrics() when setting child renderer width/height. This is currently only used
for laying out media controls in RenderMedia, but we'll need it now for all RenderImages.

  • rendering/RenderImage.h:

(WebCore::RenderImage::setHasImageOverlay):
(WebCore::RenderImage::hasShadowContent const):

Add a helper method to return whether or not the RenderImage should expect shadow root content. This is true
for both media controls (m_hasShadowControls) and for the new image overlay content (m_hasImageOverlay).

(WebCore::RenderImage::shadowControlsNeedCustomLayoutMetrics const): Deleted.

  • rendering/RenderMedia.h:

See RenderImage::layoutShadowControls above.

7:13 PM Changeset in webkit [272466] by Alexey Shvayka
  • 4 edits
    1 add in trunk

REGRESSION (r264574): Unchecked JS exception in validateAndApplyPropertyDescriptor()
https://bugs.webkit.org/show_bug.cgi?id=221494

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/redefine-property-same-value-exception-check.js: Added.

Source/JavaScriptCore:

This patch brings back exception check after sameValue(), which was accidentally
removed in r264574. sameValue() may throw OOM when comparing rope strings.

Even though this case was unreachable because of PropertyDescriptor::equalTo()
fast path, we should maintain consistent exception checks.

For the same reason, sameValue() in protoFuncFinalizationRegistryRegister() is
replaced with pointer comparison, which is safe & unobservable because target
is a known JSObject.

  • runtime/FinalizationRegistryPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSObject.cpp:

(JSC::validateAndApplyPropertyDescriptor):

6:02 PM Changeset in webkit [272465] by Lauro Moura
  • 2 edits in trunk/LayoutTests

[WPE] Gardening mathml failures

Unreviewed test gardening.

  • platform/wpe/TestExpectations:
4:10 PM Changeset in webkit [272464] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[build.webkit.org] Switch bot watchers dashboard to use new buildbot
https://bugs.webkit.org/show_bug.cgi?id=221493

Reviewed by Alexey Proskuryakov.

  • CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

10:01 AM Changeset in webkit [272463] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Continuation pre and post block inline boxes should not have both the start and end decorations of the original inline box
https://bugs.webkit.org/show_bug.cgi?id=221502

Reviewed by Antti Koivisto.

The generated inline boxes inside the pre/post block containers of a continuation "inherit" all the original styles e.g.

<span style="margin-left: 10px"><div></div></span>

We turn this into a continuation by constructing a set of pre and a post block containers.

(pre)Block container (anonymous)

Inline container (<span>)

Block container (<div></div>)
(post)Block container (anonymous)

Inline container (</span>)

Now the border box of the inline container inside the post block container should not have a 1px margin offset. Only the inline container in the pre block should "inherit" the left margin from the original <span>.
Legacy line layout solves this issue by calling hasInlineDirectionBordersPaddingOrMargin() during layout to decide which side of the decorations to apply,
but these inline boxes should not have those start/end values the first place.
(see fast/inline/inline-with-empty-inline-continuations.html)

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::BoxTree::buildTree):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::updateInlineBoxDimensions):

8:01 AM Changeset in webkit [272462] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC][Quirk] Keep the root inline box baseline anchored at 0
https://bugs.webkit.org/show_bug.cgi?id=221517

Reviewed by Antti Koivisto.

In quirks mode when the root inline box has no content, a negative baseline value should not push the root baseline upwards.
e.g.
<div><span style="vertical-align: -300px">this text should be ~300px while the root baseline is at 0px</span></div>
However an inline box with negative ascent (e.g. large enough negative margin-top value) can pull the root inline box up.

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::computeLineBoxHeightAndAlignInlineLevelBoxesVertically):

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

ASSERT NOT REACHED in WebCore::Layout::LineBuilder::candidateContentForLine
https://bugs.webkit.org/show_bug.cgi?id=221492
<rdar://problem/74032439>

Reviewed by Antti Koivisto.

Floats are not part of the inline content and they should be ignored while checking if the continuous candidate content ends in a wrap opportunity.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::candidateContentForLine):

Feb 5, 2021:

11:51 PM Changeset in webkit [272460] by Antti Koivisto
  • 2 edits in trunk/LayoutTests

Remove the Timer from Style::Scope
https://bugs.webkit.org/show_bug.cgi?id=221221
<rdar://problem/73918532>

Unreviewed followup.

  • platform/mac/TestExpectations:

imported/w3c/web-platform-tests/css/css-scoping/css-scoping-shadow-dynamic-remove-style-detached.html
should no longer be flaky on Mac

11:34 PM Changeset in webkit [272459] by don.olmstead@sony.com
  • 2 edits in trunk

[MSVC] Catalog warnings
https://bugs.webkit.org/show_bug.cgi?id=199248

Unreviewed build fix.

Missed a warning generated when building AppleWin.

  • Source/cmake/OptionsMSVC.cmake:
9:33 PM Changeset in webkit [272458] by commit-queue@webkit.org
  • 19 edits
    8 adds in trunk/LayoutTests

Update LayoutTests/imported/w3c/web-platform-tests/shadow-dom to the upstream
https://bugs.webkit.org/show_bug.cgi?id=220768

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2021-02-05
Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

This imported https://github.com/web-platform-tests/wpt/tree/875f4c73ec1122cd0ea05580f6b56fda0ef71cc7

  • web-platform-tests/shadow-dom/HTMLSlotElement-interface.html:
  • web-platform-tests/shadow-dom/ShadowRoot-interface.html:
  • web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html:
  • web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative-expected.txt:
  • web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html:
  • web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html: Added.
  • web-platform-tests/shadow-dom/declarative/getinnerhtml.tentative-expected.txt:
  • web-platform-tests/shadow-dom/declarative/getinnerhtml.tentative.html:
  • web-platform-tests/shadow-dom/declarative/support/declarative-child-frame.html: Added.
  • web-platform-tests/shadow-dom/declarative/support/helpers.js: Added.

(setInnerHTML):

  • web-platform-tests/shadow-dom/declarative/support/w3c-import.log: Added.
  • web-platform-tests/shadow-dom/declarative/w3c-import.log:
  • web-platform-tests/shadow-dom/focus/w3c-import.log:
  • web-platform-tests/shadow-dom/nested-slot-remove-crash.html: Added.
  • web-platform-tests/shadow-dom/slotchange-expected.txt:
  • web-platform-tests/shadow-dom/slotchange.html:
  • web-platform-tests/shadow-dom/slots-imperative-api-slotchange.tentative-expected.txt:
  • web-platform-tests/shadow-dom/slots-imperative-api-slotchange.tentative.html:
  • web-platform-tests/shadow-dom/slots-imperative-slot-api.tentative.html:
  • web-platform-tests/shadow-dom/untriaged/events/event-dispatch/test-002.html:
  • web-platform-tests/shadow-dom/w3c-import.log:

LayoutTests:

  • platform/ios/TestExpectations:
9:09 PM Changeset in webkit [272457] by don.olmstead@sony.com
  • 2 edits in trunk

[MSVC] Catalog warnings
https://bugs.webkit.org/show_bug.cgi?id=199248

Reviewed by Fujii Hironori.

Catalog all the MSVC warnings providing the message and a link to documentation
for the warning. Some warnings are noted as being against the style guide so they
won't be addressed. All other warnings could potentially be fixed in the codebase.

  • Source/cmake/OptionsMSVC.cmake:
8:06 PM Changeset in webkit [272456] by eric.carlson@apple.com
  • 2 edits in trunk/Tools

[Mac] Disable MediaSessionTest API tests
https://bugs.webkit.org/show_bug.cgi?id=221514
<rdar://74048912>

Unreviewed, disable tests that don't play well with other media tests running
at the same time.

  • TestWebKitAPI/Tests/WebKitCocoa/MediaSession.mm:

(TestWebKitAPI::TEST_F):

6:48 PM Changeset in webkit [272455] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Do not display identifier in status bubble tooltips
https://bugs.webkit.org/show_bug.cgi?id=221513

Unreviewed infrastucture fix.

  • CISupport/ews-app/ews/views/statusbubble.py:
4:56 PM Changeset in webkit [272454] by Russell Epstein
  • 1 copy in tags/Safari-612.1.2.4

Tag Safari-612.1.2.4.

4:49 PM Changeset in webkit [272453] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Deploy WTFMove in the constructor for AutofillElements
https://bugs.webkit.org/show_bug.cgi?id=221507

Patch by Ricky Mondello <Ricky Mondello> on 2021-02-05
Reviewed by Wenson Hsieh.

  • editing/cocoa/AutofillElements.cpp:

(WebCore::AutofillElements::AutofillElements):

4:44 PM Changeset in webkit [272452] by Russell Epstein
  • 8 edits in branches/safari-612.1.2-branch/Source

Versioning.

WebKit-7612.1.2.4

4:43 PM Changeset in webkit [272451] by commit-queue@webkit.org
  • 7 edits in trunk

REGRESSION(r272337): crash under WebCore::SpeechRecognizer::setInactive()
https://bugs.webkit.org/show_bug.cgi?id=221451

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-02-05
Reviewed by Youenn Fablet.

Source/WebCore:

Stop sending final update in SpeechRecognizer's destructor and send it in prepareForDestruction() instead, so
that no update will be sent for a destroyed SpeechRecognizer.

API test: WebKit2.SpeechRecognitionWebProcessCrash.

  • Modules/speech/SpeechRecognizer.cpp:

(WebCore::SpeechRecognizer::prepareForDestruction):
(WebCore::SpeechRecognizer::~SpeechRecognizer): Deleted.

  • Modules/speech/SpeechRecognizer.h:

Source/WebKit:

  • UIProcess/SpeechRecognitionServer.cpp:

(WebKit::SpeechRecognitionServer::handleRequest):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:

(TestWebKitAPI::TEST):

4:16 PM Changeset in webkit [272450] by Darin Adler
  • 2 edits in trunk/Source/WebKit

Add missing null checks to decoding functions involving RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=221441

Reviewed by Anders Carlsson.

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<WebCore::ResourceRequest>::decodePlatformData): Fail if the dictionary
is null: the encoder never encodes a null dictionary.
(IPC::ArgumentCoder<WebCore::CertificateInfo>::decode): Fail if the SecTrustRef is null:
the encoder never encodes a null SecTrustRef. Fail if the certificate chain array is null:
the encoder never encodes a null CFArrayRef.
(IPC::decodeNSError): Return a RetainPtr instead of using a bool return value and a
RetainPtr out argument. Fail if the user info dictionary is null: the encoder never encodes
a null user info dictionary.
(IPC::ArgumentCoder<WebCore::ResourceError>::decodePlatformData): Updated for the change
to the interface of decodeNSError.
(IPC::ArgumentCoder<WebCore::ContentFilterUnblockHandler>::decode): Fail if the CFDataRef
is null: the encoder never encodes a null CFDataRef.

4:07 PM Changeset in webkit [272449] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

REGRESSION (r271815): [macOS] /dev/dtracehelper is blocked on customer builds, even with SIP disabled
https://bugs.webkit.org/show_bug.cgi?id=221501
<rdar://73893768>

Reviewed by Per Arne Vollan.

Instead of requiring apple-internal to use /dev/dtracehelper, allow on systems where
SIP has been deactivated.

  • WebProcess/com.apple.WebProcess.sb.in: Use CSR filter to gate access to /dev/dtracehelper
3:32 PM Changeset in webkit [272448] by commit-queue@webkit.org
  • 4 edits in trunk

Allow Password AutoFill in more text field configurations

https://bugs.webkit.org/show_bug.cgi?id=221429
rdar://problem/73899947

Patch by Ricky Mondello <Ricky Mondello> on 2021-02-05
Reviewed by Wenson Hsieh.

Extend where we'll offer Password AutoFill in web views. Allow all type=password fields. Allow in situations
with back-to-back type=password fields, but only attempt to fill the second password field when it's empty,
to flexibly accomodate account creation and password change scenarios.

I did a round of manual testing with the related existing OS feature.

  • editing/cocoa/AutofillElements.cpp:

(WebCore::AutofillElements::AutofillElements): Add secondPassword to initializer.
(WebCore::AutofillElements::computeAutofillElements): Change the algorithm as described above.
(WebCore::AutofillElements::autofill): Also fill the secondPassword, if applicable.

  • editing/cocoa/AutofillElements.h: Change constructor and add member variable.
3:26 PM Changeset in webkit [272447] by Alan Coon
  • 1 copy in tags/Safari-612.1.2.3

Tag Safari-612.1.2.3.

3:23 PM Changeset in webkit [272446] by Alan Coon
  • 8 edits in branches/safari-612.1.2-branch/Source

Versioning.

WebKit-7612.1.2.3

3:18 PM Changeset in webkit [272445] by eric.carlson@apple.com
  • 31 edits
    2 adds in trunk

[Mac] Connect MediaSession with MediaRemote and NowPlaying
https://bugs.webkit.org/show_bug.cgi?id=221431
<rdar://problem/74000363>

Reviewed by Jer Noble.

Source/WebCore:

Route all remote control commands to navigator.mediaSession when it has any
registered action handlers, and pass navigator.mediaSession.metadata to NowPlaying.

Tested with new API tests in Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaSession.mm.

  • Modules/mediasession/MediaImage.h:

(WebCore::MediaImage::encode const):
(WebCore::MediaImage::decode):

  • Modules/mediasession/MediaMetadata.cpp:

(WebCore::MediaMetadata::setTitle):
(WebCore::MediaMetadata::setArtist):
(WebCore::MediaMetadata::setAlbum):
(WebCore::MediaMetadata::setArtwork):

  • Modules/mediasession/MediaMetadata.h:

(WebCore::MediaMetadata::title const):
(WebCore::MediaMetadata::artist const):
(WebCore::MediaMetadata::album const):
(WebCore::MediaMetadata::artwork const):
(WebCore::MediaMetadata::metadata const):

  • Modules/mediasession/MediaMetadataInit.h:

(WebCore::MediaMetadataInit::encode const):
(WebCore::MediaMetadataInit::decode):

  • Modules/mediasession/MediaSession.cpp:

(WebCore::nextLogIdentifier):
(WebCore::logChannel):
(WebCore::logClassName):
(WebCore::platformCommandForMediaSessionAction):
(WebCore::MediaSession::MediaSession):
(WebCore::MediaSession::setMetadata):
(WebCore::MediaSession::setPlaybackState):
(WebCore::MediaSession::setActionHandler):
(WebCore::MediaSession::setPositionState):

  • Modules/mediasession/MediaSession.h:

(WebCore::MediaSession::hasActiveActionHandlers const):
(WebCore::MediaSession::logger const):
(WebCore::MediaSession::logIdentifier const):
(WTF::LogArgument<WebCore::MediaSessionPlaybackState>::toString):
(WTF::LogArgument<WebCore::MediaSessionAction>::toString):

  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::didReceiveRemoteControlCommand):

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::didReceiveRemoteControlCommand):
(WebCore::MediaElementSession::nowPlayingInfo const):

  • html/MediaElementSession.h:
  • page/ChromeClient.h:
  • platform/RemoteCommandListener.cpp:

(WebCore::RemoteCommandListener::scheduleSupportedCommandsUpdate):
(WebCore::RemoteCommandListener::addSupportedCommand):
(WebCore::RemoteCommandListener::removeSupportedCommand):

  • platform/RemoteCommandListener.h:
  • platform/audio/NowPlayingInfo.h:

(WebCore::NowPlayingInfo::decode):

  • platform/audio/PlatformMediaSession.cpp:

(WebCore::convertEnumerationToString):

  • platform/audio/PlatformMediaSession.h:
  • platform/audio/PlatformMediaSessionManager.h:

(WebCore::PlatformMediaSessionManager::addSupportedCommand):
(WebCore::PlatformMediaSessionManager::removeSupportedCommand):

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

(WebCore::MediaSessionManagerCocoa::scheduleSessionStatusUpdate):
(WebCore::MediaSessionManagerCocoa::sessionCanProduceAudioChanged):
(WebCore::MediaSessionManagerCocoa::addSupportedCommand):
(WebCore::MediaSessionManagerCocoa::removeSupportedCommand):
(WebCore::MediaSessionManagerCocoa::setNowPlayingInfo):

  • platform/mac/MediaRemoteSoftLink.cpp:
  • platform/mac/MediaRemoteSoftLink.h:
  • platform/mac/RemoteCommandListenerMac.h:
  • platform/mac/RemoteCommandListenerMac.mm:

(WebCore::mediaRemoteCommandForPlatformCommand):
(WebCore::RemoteCommandListenerMac::defaultCommands):
(WebCore::isSeekCommand):
(WebCore::RemoteCommandListenerMac::updateSupportedCommands):
(WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac):

Source/WebCore/PAL:

  • pal/spi/mac/MediaRemoteSPI.h:

Source/WebKit:

Add a private preference so the new MediaSession API test can enable the feature.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _mediaSessionEnabled]):
(-[WKPreferences _setMediaSessionEnabled:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/MediaSession.mm: Added.

(TestWebKitAPI::MediaSessionTest::webView):
(TestWebKitAPI::MediaSessionTest::webViewPid):
(TestWebKitAPI::MediaSessionTest::getNowPlayingClient):
(TestWebKitAPI::MediaSessionTest::getNowPlayingClientPid):
(TestWebKitAPI::MediaSessionTest::loadPageAndBecomeNowPlaying):
(TestWebKitAPI::MediaSessionTest::runScriptWithUserGesture):
(TestWebKitAPI::MediaSessionTest::play):
(TestWebKitAPI::MediaSessionTest::pause):
(TestWebKitAPI::MediaSessionTest::sendMediaRemoteCommand):
(TestWebKitAPI::MediaSessionTest::sendMediaRemoteSeekCommand):
(TestWebKitAPI::MediaSessionTest::listenForEventMessages):
(TestWebKitAPI::MediaSessionTest::eventListenerWasCalled):
(TestWebKitAPI::MediaSessionTest::waitForEventListenerToBeCalled):
(TestWebKitAPI::MediaSessionTest::listenForSessionHandlerMessages):
(TestWebKitAPI::MediaSessionTest::sessionHandlerWasCalled):
(TestWebKitAPI::MediaSessionTest::waitForSessionHandlerToBeCalled):
(TestWebKitAPI::MediaSessionTest::getSupportedCommands):
(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebKitCocoa/media-remote.html: Added.
3:09 PM Changeset in webkit [272444] by Alan Coon
  • 1 copy in tags/Safari-612.1.2.2

Tag Safari-612.1.2.2.

3:06 PM Changeset in webkit [272443] by Russell Epstein
  • 1 copy in tags/Safari-611.1.14

Tag Safari-611.1.14.

3:01 PM Changeset in webkit [272442] by Alan Coon
  • 6 edits
    1 add in branches/safari-612.1.2-branch/Source/WebCore

Cherry-pick r272377. rdar://problem/73989711

Process LocalizableAdditions string file correctly.
https://bugs.webkit.org/show_bug.cgi?id=221358

Reviewed by Tim Horton.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/scripts/preprocessor.pm: (applyPreprocessor):

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

2:52 PM Changeset in webkit [272441] by Alan Coon
  • 8 edits in branches/safari-612.1.2-branch/Source

Versioning.

WebKit-7612.1.2.2

2:44 PM Changeset in webkit [272440] by Lauro Moura
  • 13 edits in trunk/LayoutTests

[GLIB] Rebaseline and gardening commong gtk/wpe failures.

Unreviewed test gardening.

  • platform/glib/TestExpectations:

Rebaselines after r272100

  • platform/glib/tables/mozilla/bugs/bug106795-expected.txt:
  • platform/gtk/tables/mozilla/bugs/bug16252-expected.txt:
  • platform/gtk/tables/mozilla/bugs/bug20579-expected.txt:
  • platform/gtk/tables/mozilla/bugs/bug82946-2-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug16252-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug20579-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug82946-2-expected.txt:

Rebaseline after r272035

  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Rebaseline after r271110

  • platform/gtk/fast/block/basic/014-expected.txt:
  • platform/wpe/fast/block/basic/014-expected.txt:
2:40 PM Changeset in webkit [272439] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

[Cocoa] CRASH in MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer()
https://bugs.webkit.org/show_bug.cgi?id=221490
<rdar://73966316>

Reviewed by Eric Carlson.

Add null-checks to every use of player() in SourceBufferPrivateAVFObjC.

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::appendCompleted):
(WebCore::SourceBufferPrivateAVFObjC::destroyParser):
(WebCore::SourceBufferPrivateAVFObjC::destroyRenderers):
(WebCore::SourceBufferPrivateAVFObjC::readyState const):
(WebCore::SourceBufferPrivateAVFObjC::setReadyState):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::flushVideo):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::bufferWasConsumed):
(WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession):
(WebCore::SourceBufferPrivateAVFObjC::player const):

2:31 PM Changeset in webkit [272438] by Devin Rousso
  • 5 edits in trunk/Source/WebCore

[macOS] REGRESSION(r272352): missing track for videos that haven't fully loaded
https://bugs.webkit.org/show_bug.cgi?id=221500

Reviewed by Eric Carlson.

r272352 removed the .track.fill that was used as a "background" for the slider. For videos
that aren't fully loaded and are buffering, that "background" is necessary to indicate where
the slider is as the .track.secondary only represents what's been buffered not the entire
length of the video/slider.

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

(Slider.prototype.commit):

  • Modules/modern-media-controls/controls/slider.css:

(.slider > .custom-slider > .fill.primary): Added.
(.slider > .custom-slider > .fill.track): Added.
(.slider > .custom-slider > .fill.secondary): Added.
(.slider > .custom-slider > .primary): Deleted.
(.slider > .custom-slider > .secondary): Deleted.
Add back the background fill track removed in r272352, but adjust it so that it only draws
after the knob so that on macOS it doesn't draw in the space around the knob.

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

(MacOSFullscreenMediaControls):

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

(MacOSInlineMediaControls):
Remove the secondaryValue calls since the background fill track has been added back.

1:16 PM Changeset in webkit [272437] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[BigSur WK1] media/media-source/media-source-webm-append-buffer-after-abort.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=221369

Unreviewed test gardening.

Patch by Amir Mark Jr <Amir Mark Jr.> on 2021-02-05

  • platform/mac-wk1/TestExpectations: Mark as skip because test is not supported on wk1
1:08 PM Changeset in webkit [272436] by weinig@apple.com
  • 13 edits in trunk

Generalize color conversion code to reduce number of overloads required
https://bugs.webkit.org/show_bug.cgi?id=221443

Reviewed by Darin Adler.

Source/WebCore:

Replace overloaded named conversion functions (e.g. toSRGBA(), toLab(), etc.)
with template specializion of a new ColorConversion struct:

template<> struct ColorConversion<Output, Input> {

Output convert(const Input& color) { ... }

};

which is accessed via a new generic convertColor<ColorType>() function.

This allows for a few improvements:

  • Removes the need for each color type to define an identity conversion.
  • Removes the need for each color type to define an generic conversion.
  • Allows integration with component type conversion so a call like

convertTo<SRGBA<uint8_t>>(toSRGBA(hsla))

can now be written just as

convertColor<SRGBA<uint8_t>>(hsla)

This also provides a path forward for more optimizations / simplifications
since we can now reason about conversion based purely on types.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseHSLParameters):
(WebCore::CSSPropertyParserHelpers::parseHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseLabParameters):
(WebCore::CSSPropertyParserHelpers::parseLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
Switch to convertColor<> and replace some unnecessary type with auto.

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::detectContentInRange):
Adopt Color::toColorTypeLossy<> and convertColor<>.

  • platform/graphics/Color.cpp:

(WebCore::Color::invertedColorWithAlpha const):
Adopt convertColor<>.

  • platform/graphics/Color.h:

(WebCore::Color::toSRGBALossy const):
(WebCore::Color::toColorTypeLossy const):
Add generic conversion function toColorTypeLossy<>() and re-implement
toSRGBALossy<>() using it.

  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorConversion.h:

Replace function overloads with explicit specialization of the new ColorConversion
struct. Replace identity functions and fallback functions with a single non-specialized
ColorConversion which uses constexpr to handle the identity case, conversion to/from
SRGBA<uint8_t> (the only non-float color) and the fallback case.

  • platform/graphics/ColorUtilities.cpp:

(WebCore::luminance):
Adopt convertColor<>.

  • platform/graphics/cg/ColorCG.cpp:

(WebCore::roundAndClampToSRGBALossy):
(WebCore::leakCGColor):
Adopt convertColor<>.

  • platform/graphics/filters/FELighting.cpp:

(WebCore::FELighting::drawLighting):
Adopt toColorTypeLossy<>.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::datePlaceholderTextColor const):
Adopt Color::toColorTypeLossy<> and convertColor<>.

Tools:

  • TestWebKitAPI/Tests/WebCore/ColorTests.cpp:

(TestWebKitAPI::TEST):
Update tests to use convertColor<>.

12:48 PM Changeset in webkit [272435] by Antti Koivisto
  • 4 edits
    2 adds in trunk

[LFC][Integration] Hit testing broken for descendants of pointer-events:none boxes
https://bugs.webkit.org/show_bug.cgi?id=221460

Reviewed by Zalan Bujtas.

Source/WebCore:

Descendants of pointer-events:none boxes may still be hittestable if they override the value.
LFC integration hit testing code didn't take this into account.

Test: fast/events/hittest-pointer-event-none-descendants.html

  • layout/integration/LayoutIntegrationLineLayout.cpp:

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

Replaced and inline-block boxes do the visibility/pointer-events test themselves.
This code just needs to take care of text boxes.

LayoutTests:

  • fast/events/hittest-pointer-event-none-descendants-expected.html: Added.
  • fast/events/hittest-pointer-event-none-descendants.html: Added.
12:27 PM Changeset in webkit [272434] by youenn@apple.com
  • 15 edits in trunk

Enable audio capture for speech recognition in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=221457

Reviewed by Eric Carlson.

Source/WebCore:

Add fake deviceId to play nice with capture ASSERTs.
Covered by updated tests.

  • Modules/speech/SpeechRecognitionCaptureSource.cpp:

(WebCore::SpeechRecognitionCaptureSource::createRealtimeMediaSource):

Source/WebKit:

Allow to create remote sources without any constraint.
To do so, we serialize through IPC a MediaConstraints with isValid = false and treat it as no constraint in capture process.

Make sure to send sandbox extensions and authorizations for GPUProcess to capture in case of speech recognition audio capture request.

In case of GPUProcess audio capture, send the request to capture to WebProcess like done for iOS.
WebProcess is then responsible to get audio samples from GPUProcess and forward them to UIProcess.
A future refactoring should move speech recognition to GPUProcess.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::grantRequest):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::createRealtimeMediaSourceForSpeechRecognition):

  • WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp:

(WebKit::SpeechRecognitionRealtimeMediaSourceManager::grantSandboxExtensions):
(WebKit::SpeechRecognitionRealtimeMediaSourceManager::createSource):

  • WebProcess/cocoa/RemoteRealtimeMediaSource.cpp:

(WebKit::RemoteRealtimeMediaSource::create):
(WebKit::RemoteRealtimeMediaSource::RemoteRealtimeMediaSource):
(WebKit::RemoteRealtimeMediaSource::createRemoteMediaSource):
(WebKit::RemoteRealtimeMediaSource::~RemoteRealtimeMediaSource):
(WebKit::RemoteRealtimeMediaSource::cloneVideoSource):
(WebKit::RemoteRealtimeMediaSource::gpuProcessConnectionDidClose):

  • WebProcess/cocoa/RemoteRealtimeMediaSource.h:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::AudioFactory::createAudioCaptureSource):
(WebKit::UserMediaCaptureManager::VideoFactory::createVideoCaptureSource):
(WebKit::UserMediaCaptureManager::DisplayFactory::createDisplayCaptureSource):

LayoutTests:

  • fast/speechrecognition/ios/restart-recognition-after-stop.html:
  • fast/speechrecognition/ios/start-recognition-then-stop.html:
  • fast/speechrecognition/start-recognition-then-stop.html:
  • fast/speechrecognition/start-second-recognition.html:
12:18 PM Changeset in webkit [272433] by Patrick Angle
  • 18 edits
    2 adds in trunk

Web Inspector: Implement backend support for maintaining a list of Grid layout contexts
https://bugs.webkit.org/show_bug.cgi?id=221228

Reviewed by Devin Rousso.

Source/JavaScriptCore:

Added CSS.LayoutContextType property to DOM.Node and added CSS.nodeLayoutContextTypeChanged event.

  • inspector/protocol/CSS.json:
  • Added CSS.LayoutContextType type.
  • Added DOM.nodeLayoutContextTypeChanged event.
  • inspector/protocol/DOM.json:
  • Added layoutContextType property to DOM.Node type.

Source/WebCore:

Test: inspector/dom/layout-context.html

Implemented support for getting the layout context for grid nodes as part of the existing DOM.Node protocol
object as well as firing an event when the layout context type changes for a node.

  • dom/Element.cpp:

(WebCore::Element::didChangeRenderer):

  • Handle the underlying RenderObject changing.
  • dom/Element.h:
  • dom/Node.h:

(WebCore::Node::didChangeRenderer):

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::nodeLayoutContextChangedImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::nodeLayoutContextChanged):

  • Add instrumentation for layout context changes.
  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::layoutContextTypeForRenderer):
(WebCore::InspectorCSSAgent::nodeLayoutContextTypeChanged):

  • Inform the frontend when a known node changes its layout context.
  • inspector/agents/InspectorCSSAgent.h:
  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForNode):

  • Set the layout context for nodes that will be new to the frontend.
  • rendering/RenderObject.h:

(WebCore::Node::setRenderer):

Source/WebInspectorUI:

Added layoutContextType property to WI.DOMNode and listener for CSS.nodeLayoutContextTypeChanged event.

  • UserInterface/Controllers/DOMManager.js:

(WI.DOMManager.prototype.nodeLayoutContextTypeChanged):

  • When a node's layout context changes, update the WI.DOMNode
  • UserInterface/Models/DOMNode.js:

(WI.DOMNode):
(WI.DOMNode.prototype.get layoutContextType):
(WI.DOMNode.prototype.set layoutContextType):

  • Fire an event when the layout context type changes.
  • UserInterface/Protocol/CSSObserver.js:

(WI.CSSObserver.prototype.nodeLayoutContextTypeChanged):

  • Listen for the CSS.nodeLayoutContextTypeChanged event.

LayoutTests:

Added tests for CSS.nodeLayoutContextTypeChanged event and corresponding properties.

  • inspector/css/nodeLayoutContextTypeChanged-expected.txt: Added.
  • inspector/css/nodeLayoutContextTypeChanged.html: Added.
11:26 AM Changeset in webkit [272432] by Alan Coon
  • 1 copy in tags/Safari-612.1.2.1

Tag Safari-612.1.2.1.

11:13 AM Changeset in webkit [272431] by ysuzuki@apple.com
  • 2 edits in trunk/JSTests

Unreviewd, update test262/config.yaml

Tests are failing only in OSS build since OSS build is building WebKit with very old ICU headers.

  • test262/config.yaml:
11:08 AM Changeset in webkit [272430] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, follow-up change after r272428
https://bugs.webkit.org/show_bug.cgi?id=221454

isPropertyNameExcluded can invoke GC etc. Structure::forEachProperty can miss PropertyTable and Structure
reference when it is highly optimized, so that it can crash if GC happens in the middle of Structure::forEachProperty.

  1. Insert ensureStillAliveHere in Structure::forEachProperty to ensure liveness of PropertyTable
  2. We should not perform side-effectful operation including GC in Structure::forEachProperty. So we moved isPropertyNameExcluded.
  • runtime/StructureInlines.h:

(JSC::Structure::forEachProperty):

10:59 AM Changeset in webkit [272429] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

[GPUProcess] If the GPUProcess crashes during fullscreen playback, video pauses and exits fullscreen
https://bugs.webkit.org/show_bug.cgi?id=221485

Reviewed by Eric Carlson.

If the GPUProcess crashed during fullscreen playback, video would pause and exit fullscreen. This was suboptimal.
The video now just resumes playing while in fullscreen, just like we do when inline.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerReloadAndResumePlaybackIfNeeded):

10:58 AM Changeset in webkit [272428] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] globalFuncCopyDataProperties should not perform GC-sensitive operation in the middle of Structure::forEachProperty
https://bugs.webkit.org/show_bug.cgi?id=221454

Reviewed by Mark Lam.

JSTests:

  • stress/copy-data-properties-fast-path.js: Added.

(foo):

Source/JavaScriptCore:

isPropertyNameExcluded can invoke GC etc. And running Structure::forEachProperty
is fragile state against any side-effect including GC.
We should not perform GC-sensitive operation during Structure::forEachProperty.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

10:53 AM Changeset in webkit [272427] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GPU Process] Repopulate the TestExpectations file #2
https://bugs.webkit.org/show_bug.cgi?id=221446

Unreviewed test gardening.

Patch by Rini Patel <rini_patel@apple.com> on 2021-02-05

  • gpu-process/TestExpectations:
10:49 AM Changeset in webkit [272426] by youenn@apple.com
  • 5 edits
    2 deletes in trunk/LayoutTests

Remove GPUProcess flag in MediaRecorder tests
https://bugs.webkit.org/show_bug.cgi?id=221401

Reviewed by Eric Carlson.

Remove test that is the same as http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html.

  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess-expected.txt: Removed.
  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html: Removed.
  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html:
  • http/wpt/mediarecorder/pause-recording.html:

Increase timer to cope with added latency introduced by IPC messaging.

  • platform/mac-wk2/TestExpectations:
10:44 AM Changeset in webkit [272425] by Kate Cheney
  • 4 edits in trunk/Source/WebKit

ASSERTION FAILED: Completion handler should always be called under WebKit::VideoFullscreenManagerProxy::forEachSession
https://bugs.webkit.org/show_bug.cgi?id=221343
<rdar://problem/73939450>

Reviewed by Youenn Fablet.

If a client tries to exit fullscreen mode when there is no fullscreen
video present, we should call the completion handler immediately and
return.

Rename requestFullscreenModeWithCallback to requestCloseAllMediaPresentations
because the completion handler is only called when all media presentations
are closed. requestFullscreenModeWithCallback makes it seem like we
can use this function with other modes besides VideoFullscreenModeNone.

No new tests, this will fix a crashing iOS test.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView closeAllMediaPresentations:]):

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

(WebKit::VideoFullscreenModelContext::requestCloseAllMediaPresentations):
(WebKit::VideoFullscreenManagerProxy::requestCloseAllMediaPresentations):
(WebKit::VideoFullscreenModelContext::requestFullscreenModeWithCallback): Deleted.
(WebKit::VideoFullscreenManagerProxy::requestFullscreenModeWithCallback): Deleted.

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

Versioning.

WebKit-7611.1.15

10:31 AM Changeset in webkit [272423] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] commit-queue should use commits.webkit.org url instead of trac url
https://bugs.webkit.org/show_bug.cgi?id=221476

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(PushCommitToWebKitRepo.url_for_revision):

  • CISupport/ews-build/steps_unittest.py:
10:27 AM Changeset in webkit [272422] by youenn@apple.com
  • 6 edits
    2 adds in trunk

Make sure click attribution is processed in case of redirected kept alive loads
https://bugs.webkit.org/show_bug.cgi?id=221453
<rdar://problem/70896640>

Reviewed by John Wilander.

Source/WebCore:

Test: http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::addSubresourceLoader):
Update assertion to cope with keep alive fetches which are similar to beacon/ping loads.

Source/WebKit:

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::continueWillSendRedirectedRequest):
Move the click attribution processing before kept alive check.

LayoutTests:

  • http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt: Added.
  • http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive.html: Added.
  • http/tests/privateClickMeasurement/resources/redirectToConversion.php:
10:12 AM Changeset in webkit [272421] by Darin Adler
  • 9 edits in trunk/Source/WebCore

StyleImage refinement to follow up recent changes
https://bugs.webkit.org/show_bug.cgi?id=221434

Reviewed by Sam Weinig.

  • rendering/style/FillLayer.cpp:

(WebCore::FillLayer::hasOpaqueImage const): Pass a reference.

  • rendering/style/StyleCachedImage.cpp:

(WebCore::StyleCachedImage::knownToBeOpaque const): Take a reference.

  • rendering/style/StyleCachedImage.h: Take a reference.
  • rendering/style/StyleGeneratedImage.cpp:

(WebCore::StyleGeneratedImage::imageSize const): Simplify using an early return.
Remove an unnnecessary redundant null check.
(WebCore::StyleGeneratedImage::knownToBeOpaque const): Take and pass a reference.

  • rendering/style/StyleGeneratedImage.h: Take a reference.
  • rendering/style/StyleImage.h: Take a reference.
  • rendering/style/StyleMultiImage.cpp:

(WebCore::StyleMultiImage::knownToBeOpaque const): Take a reference.

  • rendering/style/StyleMultiImage.h: Take a reference.
9:38 AM Changeset in webkit [272420] by Chris Dumez
  • 2 edits in trunk/LayoutTests

REGRESSION (r272392): [ MacOS ] webaudio/audioworklet-addModule-failure.html is flakey timing out
https://bugs.webkit.org/show_bug.cgi?id=221469
<rdar://problem/74027196>

Unreviewed, make sure the test triggers JS garbage collection before exiting so that the next test does
not fail with an out-of-memory error.

  • webaudio/audioworket-out-of-memory.html:
9:20 AM Changeset in webkit [272419] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Remove access to IOMobileFramebufferUserClient
https://bugs.webkit.org/show_bug.cgi?id=221408
<rdar://problem/70551457>

Reviewed by Brent Fulgham.

Remove access to the IOKit class IOMobileFramebufferUserClient in the WebContent process on macOS and iOS
when the GPU process is enabled.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
9:11 AM Changeset in webkit [272418] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

CrashTracer: com.apple.WebKit.Networking at WebKit: WebKit::ResourceLoadStatisticsDatabaseStore::setPrevalentResource
https://bugs.webkit.org/show_bug.cgi?id=221432
<rdar://problem/67069819>

Reviewed by John Wilander.

We are seeing crashes in ResourceLoadStatisticsDatabaseStore::setPrevalentResource
as a result of trying to use a nullopt domainID value. In theory this should
never be WTF::nullopt but is because of a failing SQLite query in
ResourceLoadStatisticsDatabaseStore::domainID which reports the error "not an error".

To fix this we should check the domain ID and return early with a
debug assert in setPrevalentResource() if it is WTF::nullopt to avoid
a crash. Additionally, we should add more information to the logging
statement, specifically the SQLite statement string, to try and debug further.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::domainID const):
(WebKit::ResourceLoadStatisticsDatabaseStore::setPrevalentResource):

8:54 AM Changeset in webkit [272417] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebKit

SpeechRecognitionPermissionManager should not handle requests that are already cancelled
https://bugs.webkit.org/show_bug.cgi?id=221296

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-02-05
Reviewed by Youenn Fablet.

It is possible that client asks to stop/abort pending requests, which are waiting for permission check to be
done. In our current implementation, SpeechRecognitionPermissionManager would perform permission checks for
these cancelled requests, which is unnecessary and may cause extra prompts. We should let
SpeechRecognitionPermissionManager check if request is still valid before checking permissions.

No test is added as this behavior change is not observable without resetting the TCC permission between requests.

  • UIProcess/SpeechRecognitionPermissionManager.cpp:

(WebKit::SpeechRecognitionPermissionManager::request):
(WebKit::SpeechRecognitionPermissionManager::startNextRequest):
(WebKit::SpeechRecognitionPermissionManager::startProcessingRequest):
(WebKit::SpeechRecognitionPermissionManager::continueProcessingRequest):
(WebKit::SpeechRecognitionPermissionManager::requestUserPermission):

  • UIProcess/SpeechRecognitionPermissionManager.h:
  • UIProcess/SpeechRecognitionPermissionRequest.h:

(WebKit::SpeechRecognitionPermissionRequest::create):
(WebKit::SpeechRecognitionPermissionRequest::~SpeechRecognitionPermissionRequest):
(WebKit::SpeechRecognitionPermissionRequest::request):
(WebKit::SpeechRecognitionPermissionRequest::SpeechRecognitionPermissionRequest):
(WebKit::SpeechRecognitionPermissionRequest::origin const): Deleted.
(WebKit::SpeechRecognitionPermissionRequest::lang const): Deleted.
(WebKit::SpeechRecognitionPermissionRequest::frameIdentifier const): Deleted.

  • UIProcess/SpeechRecognitionServer.cpp:

(WebKit::SpeechRecognitionServer::requestPermissionForRequest):
(WebKit::SpeechRecognitionServer::sendUpdate):

  • UIProcess/SpeechRecognitionServer.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestSpeechRecognitionPermission):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::createSpeechRecognitionServer):

8:38 AM Changeset in webkit [272416] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Add support for "word separator" when the whitespace content has multiple characters
https://bugs.webkit.org/show_bug.cgi?id=221355

Reviewed by Antti Koivisto.

Keep track of word separator characters in whitespace content even when the whitespace content has multiple characters.
This fixes cases when "word-spacing" has a non-zero value in "space and tab preserve" content (e.g <pre style="word-spacing: 200px">This content has spaces and tabs</pre>)
(On trunk we fail to adjust the run position with the word-spacing value because the whitespace content is not marked as a word separator.)

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::moveToNextNonWhitespacePosition):
(WebCore::Layout::InlineTextItem::createAndAppendTextItems):

  • layout/inlineformatting/InlineTextItem.h:

(WebCore::Layout::InlineTextItem::createNonWhitespaceItem):

8:19 AM Changeset in webkit [272415] by Lauro Moura
  • 2 edits in trunk/Tools

[Flatpak SDK] Print stderr when coredumpctl fails
https://bugs.webkit.org/show_bug.cgi?id=221448

Reviewed by Philippe Normand.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_gdb):

7:50 AM Changeset in webkit [272414] by Chris Dumez
  • 11 edits in trunk

[GPUProcess][iOS] Audio is lost after media playback recovers from the GPUProcess crash
https://bugs.webkit.org/show_bug.cgi?id=221305
<rdar://problem/73904864>

Reviewed by Eric Carlson.

Source/WebCore:

The issue was that when the GPUProcess crashed while in the middle of media playback, we would
fail to remove the old/invalid AudioTrack and then append the new/valid AudioTrack upon
recovery. We would end up using the wrong old AudioTrack instead of the new track as a result.

To address the issue, I have refactored the code so that the "reload and resume" logic now
resides in HTMLMediaElement instead of MediaPlayer. This makes sure that the HTMLMediaElement
object's state stays good. In particular, when HTMLMediaElement::prepareToLoad() is called,
it calls forgetResourceSpecificTracks() to drop the old/invalid AudioTracks.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerReloadAndResumePlaybackIfNeeded):

  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::reloadAndResumePlaybackIfNeeded):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaPlayerUserAgent const):
(WebCore::MediaPlayerClient::mediaPlayerReloadAndResumePlaybackIfNeeded):

Source/WebKit:

Fix issue where we would sometimes lose the video after recovering from a GPUProcess
crash. The issue is that RemoteMediaPlayerProxy::setVideoInlineSizeFenced() may get
called *before* RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable(). As a
result, we would not have a root layer yet and we would fail to set the video
dimensions and they would remain at 0x0.

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:
  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:

(WebKit::setVideoInlineSizeIfPossible):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable):
(WebKit::RemoteMediaPlayerProxy::setVideoInlineSizeFenced):

Tools:

Unskip API test checks on iOS now that they are passing.

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):

7:11 AM Changeset in webkit [272413] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

[CMake] Hide libwebrtc symbols
https://bugs.webkit.org/show_bug.cgi?id=221333

This is a naive approach to hide libwebrtc symbols, particularly beacuse of boringssl, which
migth collide with system's libssl. It compiles libwebrtc with visibility set to hidden.

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2021-02-05
Reviewed by Michael Catanzaro.

  • CMakeLists.txt:
6:29 AM Changeset in webkit [272412] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Incorrect last potential wrap position when inline box is present
https://bugs.webkit.org/show_bug.cgi?id=221437

Reviewed by Antti Koivisto.

The trailing run of the continuous content is not necessarily a legal wrap position.
In some cases when the text content is embedded in an inline box, the wrap position may be part of
the subsequent content e.g.

<div>content<span> <-space</span></div>

This maps to the following set of inline items:
[content][inline box start][ ][<-space][inline box end]

This content produces 3 sets of continuous content for line breaking
[non-whitespace content]
[inline box start][whitespace content]
[non-whitespace content][inline box end]

While the soft wrap opportunity is at [whitespace content], the content boundary is at a different position, right before
the [inline box start] since the content inside the inline box always belongs to the inline box.
(as opposed to [non-whitespace content][inline box start] and a separate [whitespace content] set)

In this patch we start tracking the "has trailing soft wrap opportunity" in LineCandidate and pass it to the InlineContentBreaker
as part of the line status.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::isWrappingAllowed):
(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::processOverflowingContentWithText const):
(WebCore::Layout::InlineContentBreaker::wordBreakBehavior const):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):
(WebCore::Layout::isWrappingAllowed): Deleted.
(WebCore::Layout::lastWrapOpportunityIndex): Deleted.

  • layout/inlineformatting/InlineContentBreaker.h:
  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineCandidate::InlineContent::setHasTrailingSoftWrapOpportunity):
(WebCore::Layout::LineCandidate::InlineContent::hasTrailingSoftWrapOpportunity const):
(WebCore::Layout::LineBuilder::candidateContentForLine):
(WebCore::Layout::LineBuilder::handleInlineContent):

6:26 AM Changeset in webkit [272411] by Alexey Shvayka
  • 4 edits in trunk

Object.assign should throw for property creation on non-extensible target
https://bugs.webkit.org/show_bug.cgi?id=220712

Reviewed by Ross Kirsling.

JSTests:

  • stress/object-assign-fast-path.js:

Source/JavaScriptCore:

This performance-neutral change precludes Object.assign from taking the
fast path if target is a non-extensible JSFinalObject, which ensures
a TypeError is thrown for property creation via Set.

Aligns JSC with the spec [1], V8, and SpiderMonkey.

[1]: https://tc39.es/ecma262/#sec-validateandapplypropertydescriptor (step 2.a)

  • runtime/ObjectConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

5:23 AM Changeset in webkit [272410] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[SOUP] Fix error handling in WebKitFormDataInputStream
https://bugs.webkit.org/show_bug.cgi?id=221459

Reviewed by Adrian Perez de Castro.

We are checking the error parameter passed, that can be nullptr when not provided, we should be checking the
return value of g_input_stream_read() instead.

  • platform/network/soup/WebKitFormDataInputStream.cpp:

(webkitFormDataInputStreamRead):

5:22 AM Changeset in webkit [272409] by Carlos Garcia Campos
  • 4 edits in trunk

REGRESSION(r271879) [SOUP] webrtc/datachannel/gather-candidates-networkprocess-crash.html is crashing in debug mode
https://bugs.webkit.org/show_bug.cgi?id=221379

Reviewed by Youenn Fablet.

Source/WebKit:

  • NetworkProcess/soup/WebKitDirectoryInputStream.cpp:

(webkitDirectoryInputStreamRead): Fix bytes read calculation.

LayoutTests:

Remove expectations for tests that are now passing.

  • platform/glib/TestExpectations:
3:02 AM Changeset in webkit [272408] by Philippe Normand
  • 4 edits in trunk/Source/WebKit

[GTK] clang warnings
https://bugs.webkit.org/show_bug.cgi?id=221410

Reviewed by Adrian Perez de Castro.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::resourceLoadInfo): Remove ifdef added in r272313, the
corresponding enum value is not ifdeffed either.

  • UIProcess/SpeechRecognitionServer.cpp:

(WebKit::SpeechRecognitionServer::sendUpdate): Use portable format specifier for uint64_t.

  • WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp: Ifdef member variable

currently used only on Cocoa platforms.

2:03 AM Changeset in webkit [272407] by aboya@igalia.com
  • 2 edits in trunk/Tools

[GTK] run-gtk-tests: Support running individual tests for GTest test suites
https://bugs.webkit.org/show_bug.cgi?id=221050

Reviewed by Adrian Perez de Castro.

run-gtk-tests accepts any number of optional -p arguments to run
only certain tests. Unfortunately, this feature is only currently
implemented for glib tests suites.

This patch adds support for this feature with gtest suites as well.

  • glib/api_test_runner.py:

(TestRunner._run_google_test_suite):
(TestRunner._run_test):

12:45 AM Changeset in webkit [272406] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] JSImmutableButterfly's toString cache should not happen for generic join
https://bugs.webkit.org/show_bug.cgi?id=221444
<rdar://problem/73972862>

Reviewed by Mark Lam.

JSTests:

  • stress/immutable-butterfly-to-string-cache-should-not-happen-for-generic-join.js: Added.

(foo):

Source/JavaScriptCore:

We should not cache Array#toString results with JSImmutableButterfly if
its join operation becomes generic join: including objects in array, since
this can invoke object.toString(), and it isn't side-effect free.

  • runtime/ArrayPrototype.cpp:

(JSC::fastJoin):
(JSC::JSC_DEFINE_HOST_FUNCTION):

12:45 AM Changeset in webkit [272405] by ysuzuki@apple.com
  • 8 edits
    6 adds in trunk

[JSC] Atomics.store in DFG / FTL should return ToNumber(input) value
https://bugs.webkit.org/show_bug.cgi?id=221438
<rdar://problem/73973264>

Reviewed by Filip Pizlo.

JSTests:

  • stress/atomic-store-result-type-in-ai.js: Added.
  • stress/atomics-store-result-double-nan.js: Added.

(shouldBe):
(test):

  • stress/atomics-store-result-double-negative-zero.js: Added.

(shouldBe):
(test):

  • stress/atomics-store-result-double.js: Added.

(shouldBe):
(test):

  • stress/atomics-store-result-int52.js: Added.

(shouldBe):

  • stress/atomics-store-result.js: Added.

(shouldBe):

Source/JavaScriptCore:

Atomics.store is different from the other ReadModifyWrite atomics. It returns the input value without truncating it into TypedArray's requirement.
For example,

var u8 = new Uint8Array(8);
Atomics.store(u8, 0, 0xffff) === 0xffff Not 0xff.

However DFG and FTL implementations do not handle it correctly.
This patch fixes AI, fixup, and code generations to handle this.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::getIntTypedArrayStoreOperandForAtomics):

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

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileAtomicsReadModifyWrite):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::setIntTypedArrayLoadResult):
(JSC::FTL::DFG::LowerDFGToB3::toIntegerOrInfinity):

Feb 4, 2021:

11:40 PM Changeset in webkit [272404] by Devin Rousso
  • 3 edits in trunk/LayoutTests

Add intermediate volume icon states between "mute" and "max"
https://bugs.webkit.org/show_bug.cgi?id=221371

Unreviewed test fix.

  • media/modern-media-controls/mute-button/mute-button.html:
  • media/modern-media-controls/mute-button/mute-button-expected.txt:
7:56 PM Changeset in webkit [272403] by Lauro Moura
  • 3 edits
    1 add in trunk/LayoutTests

[GLIB] Gardening accessibility and font failures

Unreviewed test gardening.

The img-with-svg-source.html test differed only in the content of the
image.description field, with empty AXDescription text, like other
accessibility tests.

  • platform/glib/TestExpectations:
  • platform/glib/accessibility/img-with-svg-source-expected.txt: Added.
  • platform/gtk/TestExpectations:
5:36 PM Changeset in webkit [272402] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.31.1

WPE WebKit 2.31.31

5:35 PM Changeset in webkit [272401] by Adrian Perez de Castro
  • 4 edits in trunk

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.31.1 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.31.1.
5:11 PM Changeset in webkit [272400] by Ross Kirsling
  • 3 edits in trunk/Source/WebKit

REGRESSION (r272382): 2 webkit.messages_unittest.GeneratedFileContentsTest tests failing after Semaphore.h rename
https://bugs.webkit.org/show_bug.cgi?id=221433

Reviewed by Don Olmstead.

Looks like some changes were accidentally dropped prior to landing.

  • Scripts/webkit/tests/MessageArgumentDescriptions.cpp:
  • Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:
4:55 PM Changeset in webkit [272399] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[build.webkit.org] Update dashboard links for layout test results
https://bugs.webkit.org/show_bug.cgi?id=221280

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/public_html/dashboard/Scripts/Buildbot.js:

(Buildbot): Set baseURLForResults.
(Buildbot.prototype.layoutTestResultsDirectoryURLForIteration): Use baseURLForResults if available.

  • CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot): Pass baseURLForResults appropriately.

4:54 PM Changeset in webkit [272398] by Jonathan Bedard
  • 3 edits
    1 delete in trunk/Tools

[Python-3] Change shebang in test-webkitpy (Part-2)
https://bugs.webkit.org/show_bug.cgi?id=221415
<rdar://problem/73986503>

Reviewed by Michael Catanzaro.

  • CISupport/build-webkit-org/steps.py:

(RunWebKitPyTests): Run test-webkitpy with Python 3.

  • Scripts/test-webkitpy: Change shebang.
  • Scripts/test-webkitpy-python3: Removed.
4:27 PM Changeset in webkit [272397] by Jonathan Bedard
  • 2 edits in trunk/Tools

[Python-3] Change shebang in git-webkit (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=221412
<rdar://problem/73983881>

Unreviewed follow-up fix.

  • Scripts/libraries/webkitcorepy/webkitcorepy/subprocess_utils.py:

(run): Python 3.6 does not support capture_output in subprocess.run()

4:17 PM Changeset in webkit [272396] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

Null dereference in DocumentLoader::commitData()
https://bugs.webkit.org/show_bug.cgi?id=221097

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-02-04
Reviewed by Alex Christensen.

Source/WebCore:

Be careful to check the return value of DocumentWriter::begin()
before calling DocumentWriter::setDocumentWasLoadedAsPartOfNavigation().
This work involves exposing MediaDocument.h.

Test: loader/cancel-load-crash.html

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::commitData):

Source/WebKit:

As we add another return-early case to commitData(),
WebFrameLoaderClient::committedLoad() has to allow for
the absence of a Document.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::committedLoad):

LayoutTests:

Add a test that catches the null dereference
in DocumentLoader::commitData().

  • loader/cancel-load-crash-expected.txt: Added.
  • loader/cancel-load-crash.html: Added.
4:15 PM Changeset in webkit [272395] by Chris Dumez
  • 5 edits
    3 adds in trunk

Potential crash under BaseAudioContext's toJSNewlyCreated()
https://bugs.webkit.org/show_bug.cgi?id=221423
<rdar://73352543>

Reviewed by Darin Adler.

Source/WebCore:

BaseAudioContext has subclasses (AudioContext & OfflineAudioContext) that are exposed to JS
(for which we call toJS() for). As a result, BaseAudioContext needs a custom toJS()
implementation which returns the correct subclass wrapper (JSOfflineAudioContext &
JSAudioContext), instead of a JSBaseAudioContext.

Test: webaudio/base-audio-context-wrapper-gc.html

  • Modules/webaudio/BaseAudioContext.idl:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBaseAudioContextCustom.cpp: Added.

(WebCore::toJSNewlyCreated):
(WebCore::toJS):

LayoutTests:

Add layout test coverage.

  • webaudio/base-audio-context-wrapper-gc-expected.txt: Added.
  • webaudio/base-audio-context-wrapper-gc.html: Added.
4:10 PM Changeset in webkit [272394] by rniwa@webkit.org
  • 5 edits in trunk/Source/WebCore

Avoid creating JS wrapper on a removed node when the subtree is not observable
https://bugs.webkit.org/show_bug.cgi?id=221243
<rdar://problem/73719386>

Reviewed by Geoffrey Garen.

Prior to this patch, WebKit forced the creation the JS wrapper on the root DOM node of a removed subtree
to avoid script observable deletion of nodes. This is necessary because DOM nodes are reference counted
in the C++ side, and while a DOM node keeps its child nodes alive, it won't keep its parent node alive
to avoid reference cycles (leaks). If we didn't force the creation of the JS wrapper and the root node
of the removed subtree didn't have any external reference to it in C++ side, we would happily delete it
and all its descendant nodes above any subtree with a JS wrapper or an external C++ reference.

While this turned out to be an effective strategy for implementing DOM nodes' GC semantics correctly,
it has a significant runtime and memory cost - the latter is because we don't collect the JS wrappers
of DOM nodes once they're created until they're ready to be destructed.

This patch introduces a new optimization to avoid creating these JS wrappers when the removed subtree
won't be observable by scripts in the future. The current heuristic is to check if the removed node
has any external reference to it (i.e. refCount() > 0 excluding any reference counting that happens within
our algorithm). This is sufficient because a given node should not be observable at a later time unless
it has an external reference to it. This is ~0.5% progression on Speedometer-2.0 on MacBookAir7,2.

To do this, we take advantage of the fact notifyChildNodeRemoved already traverses each removed subtree,
and check if any of them has a reference count greater than 1 (greater than 1 because notifyChildNodeRemoved
itself increments node's reference count before calling itself on child nodes). Note that we exclude the
root node of the removed subtree as these JS wrapper creation is only needed to keep the root node alive.
If the root node is already kept alive by some external reference to it, there is no need to keep it alive
again by creating a JS wrapper on it.

No new tests since existing tests such as fast/dom/gc-3.html covers it.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeAllChildrenWithScriptAssertion): Call willCreatePossiblyOrphanedTreeByRemoval
if the removed subtree contains an observable node.
(WebCore::ContainerNode::removeNodeWithScriptAssertion): Ditto.
(WebCore::ContainerNode::removeSelfOrChildNodesForInsertion): Renamed from collectChildrenAndRemoveFromOldParent.
Avoid collecting the removed nodes in this function in addition to removeAllChildrenWithScriptAssertion.
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck):
(WebCore::dispatchChildRemovalEvents): Don't call willCreatePossiblyOrphanedTreeByRemoval here.

  • dom/ContainerNode.h:
  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::observabilityOfRemovedNode): Added. Checks the observability of a node excluding the root node of
the removed subtree since it needs a special case in removeAllChildrenWithScriptAssertion.
As notifyNodeRemovedFromDocument and notifyNodeRemovedFromTree ref's each child node before recursing on itself,
we check refCount() > 1 here.
(WebCore::updateObservability): Added. A helper function to update RemovedSubtreeObservability.
(WebCore::notifyNodeRemovedFromDocument): Now returns RemovedSubtreeObservability,
(WebCore::notifyNodeRemovedFromTree): Ditto.
(WebCore::notifyChildNodeRemoved): Ditto.

  • dom/ContainerNodeAlgorithms.h:
3:59 PM Changeset in webkit [272393] by Chris Dumez
  • 13 edits
    2 adds in trunk

RELEASE_ASSERT(bigInt) in VM constructor when constructing a WorkletGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=221425
<rdar://73747997>

Reviewed by Keith Miller.

Source/WebCore:

WorkletGlobalScope should use VM::tryCreate() instead of VM::create() to deal with out-of-memory
errors.

Test: webaudio/audioworket-out-of-memory.html

  • Modules/webaudio/AudioWorkletGlobalScope.cpp:

(WebCore::AudioWorkletGlobalScope::tryCreate):
(WebCore::AudioWorkletGlobalScope::AudioWorkletGlobalScope):

  • Modules/webaudio/AudioWorkletGlobalScope.h:
  • Modules/webaudio/AudioWorkletThread.cpp:

(WebCore::AudioWorkletThread::createGlobalScope):

  • Modules/webaudio/AudioWorkletThread.h:
  • WebCore.xcodeproj/project.pbxproj:
  • workers/WorkerOrWorkletThread.cpp:

(WebCore::WorkerOrWorkletThread::workerOrWorkletThread):

  • workers/WorkerOrWorkletThread.h:
  • workers/WorkerThread.cpp:

(WebCore::WorkerThread::createGlobalScope):

  • workers/WorkerThread.h:
  • worklets/WorkletGlobalScope.cpp:

(WebCore::WorkletGlobalScope::WorkletGlobalScope):

  • worklets/WorkletGlobalScope.h:

LayoutTests:

Add layout test coverage.

  • webaudio/audioworket-out-of-memory-expected.txt: Added.
  • webaudio/audioworket-out-of-memory.html: Added.
3:52 PM Changeset in webkit [272392] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

WTF::dynamic_cf_cast<> should not assert in Debug builds
<https://webkit.org/b/221428>
<rdar://problem/73451079>

Reviewed by Geoff Garen.

  • wtf/cf/TypeCastsCF.h:

(WTF::dynamic_cf_cast):

  • Remove ASSERT_WITH_SECURITY_IMPLICATION().

(WTF::checked_cf_cast):

  • Add comments about how to use these template functions correctly.
3:48 PM Changeset in webkit [272391] by Alan Coon
  • 8 edits in branches/safari-612.1.2-branch/Source

Versioning.

WebKit-7612.1.2.1

2:33 PM Changeset in webkit [272390] by Chris Fleizach
  • 5 edits
    2 adds in trunk

AX: expose focusable elements even if element or ancestor has aria-hidden=true
https://bugs.webkit.org/show_bug.cgi?id=220534
<rdar://problem/71865875>

Reviewed by Zalan Bujtas.

Source/WebCore:

ARIA states that if an item is focused, then it should override aria-hidden status.
https://github.com/w3c/aria/pull/1387/files

Test: accessibility/focusable-inside-hidden.html

  • accessibility/AXObjectCache.cpp:

(WebCore::isNodeAriaVisible):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isAXHidden const):
(WebCore::AccessibilityObject::setIsIgnoredFromParentDataForChild):

LayoutTests:

  • accessibility/focusable-inside-hidden-expected.txt: Added.
  • accessibility/focusable-inside-hidden.html: Added.
2:29 PM Changeset in webkit [272389] by Alan Coon
  • 1 copy in tags/Safari-612.1.2

Tag Safari-612.1.2.

2:25 PM Changeset in webkit [272388] by Alan Coon
  • 3 edits in branches/safari-612.1.2-branch/Source/WebKit

Cherry-pick r272229. rdar://problem/73997275

REGRESSION(r271744): Broke Microsoft live login in internal builds
https://bugs.webkit.org/show_bug.cgi?id=221271
<rdar://problem/73848416>

Reviewed by Alex Christensen.

If a user goes straight to login.live.com without first visiting
microsoft.com, we crash when checking for storage access because
we assume the user has interacted with the page. Since this is a
quirked flow, we should not assume that, and should insert the
domain into the database.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt): (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const): Deleted.
  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:

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

2:24 PM Changeset in webkit [272387] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Link libnetworkextension at compile time
https://bugs.webkit.org/show_bug.cgi?id=221372
<rdar://problem/73855844>

Reviewed by Brent Fulgham.

Network Extension is not available on tvOS.

  • Configurations/WebKit.xcconfig:
2:20 PM Changeset in webkit [272386] by Megan Gardner
  • 4 edits in trunk/Source/WebKit

Allow highlight delegate to be set on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=221362

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
1:59 PM Changeset in webkit [272385] by Jonathan Bedard
  • 1 edit
    1 add in trunk/Tools

[Python-3] Change shebang in test-webkitpy (Part-1)
https://bugs.webkit.org/show_bug.cgi?id=221415
<rdar://problem/73986503>

Reviewed by Michael Catanzaro.

  • Scripts/test-webkitpy-python2: Added.
1:59 PM Changeset in webkit [272384] by Jonathan Bedard
  • 3 edits in trunk/Tools

[Python-3] Change shebang in git-webkit (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=221412
<rdar://problem/73983881>

Reviewed by Michael Catanzaro.

  • CISupport/ews-build/steps.py:

(ShowIdentifier.start): Invoke git-webkit with Python 3.

  • CISupport/ews-build/steps_unittest.py:
1:54 PM Changeset in webkit [272383] by achristensen@apple.com
  • 4 edits in trunk

Don't launch a network process when registering URL schemes
https://bugs.webkit.org/show_bug.cgi?id=221427

Reviewed by Chris Dumez.

Source/WebKit:

When Safari on macOS is launching, it calls registerURLSchemeAsSecure and registerURLSchemeAsBypassingContentSecurityPolicy.
This causes the network process to launch before the app has finished launching. Since values are stored in the UI process
and sent in NetworkProcessCreationParameters whenever a network process starts, so it's not necessary to start the network
process when calling these two functions. This should decrease Safari's launch time.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::registerURLSchemeAsSecure):
(WebKit::WebProcessPool::registerURLSchemeAsBypassingContentSecurityPolicy):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

(TEST):

1:41 PM Changeset in webkit [272382] by Ross Kirsling
  • 11 edits
    3 moves in trunk/Source/WebKit

Don't use Semaphore.h as a filename
https://bugs.webkit.org/show_bug.cgi?id=221418

Reviewed by Don Olmstead.

IPC::Semaphore was recently moved to IPC/Semaphore.h; let's ensure that it's IPC/IPCSemaphore.h instead.
Semaphore.h is a filename that may exist in platform SDKs and thus can cause a WK build break based on ordering.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:
  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/media/RemoteAudioDestinationManager.cpp:
  • GPUProcess/media/RemoteAudioDestinationManager.h:
  • Platform/IPC/IPCSemaphore.cpp: Renamed from Source/WebKit/Platform/IPC/Semaphore.cpp.
  • Platform/IPC/IPCSemaphore.h: Renamed from Source/WebKit/Platform/IPC/Semaphore.h.
  • Platform/IPC/darwin/IPCSemaphoreDarwin.cpp: Renamed from Source/WebKit/Platform/IPC/darwin/SemaphoreDarwin.cpp.
  • Scripts/webkit/messages.py:
  • Scripts/webkit/tests/MessageArgumentDescriptions.cpp:
  • Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
  • WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
1:32 PM Changeset in webkit [272381] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

Test landed flaky: [iOS] TestWebKitAPI.WebKit2.CrashGPUProcessWhileCapturing
https://bugs.webkit.org/show_bug.cgi?id=221331
<rdar://problem/73935129>

Reviewed by Eric Carlson.

For video sources tied to a remote source in GPUProcess, we are calling requestToEnd instead of end
since the same remote source may be shared with other cloned video sources.
In that case, the source in WebProcess should be considered as ended as soon as requestToEnd is called.

This is important as in case of GPUProcess, we are recreating sources that are not ended.
We were thus recreating a source which was actually ended in WebProcess.
This appears in particular on iOS where only one source can be active at a time.

A further refactoring should probably change the way we clone video sources given we are now supporting size and frame rate adaptations in RealtimeVideoSource.

Covered by API test no longer falkily failing.

  • WebProcess/cocoa/RemoteRealtimeMediaSource.cpp:

(WebKit::RemoteRealtimeMediaSource::captureFailed):
(WebKit::RemoteRealtimeMediaSource::requestToEnd):

  • WebProcess/cocoa/RemoteRealtimeMediaSource.h:
1:31 PM Changeset in webkit [272380] by Jonathan Bedard
  • 4 edits in trunk/Tools

[Python-3] Change shebang in check-webkit-style
https://bugs.webkit.org/show_bug.cgi?id=221420
<rdar://problem/73990232>

Reviewed by Michael Catanzaro.

  • CISupport/ews-build/steps.py:

(CheckStyle): Invoke check-webkit-style with python3.

  • CISupport/ews-build/steps_unittest.py:

(TestCheckStyle.test_success_internal): Invoke check-webkit-style with python3.
(TestCheckStyle.test_failure_unknown_try_codebase): Ditto.
(TestCheckStyle.test_failures_with_style_issues): Ditto.
(test_failures_no_style_issues): Ditto.
(test_failures_no_changes): Ditto.

  • Scripts/check-webkit-style: Change python shebang to Python 3.
1:28 PM Changeset in webkit [272379] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

Supplementary code points (U+10000 - U+10FFFF) are not shaped correctly in the fast text codepath
https://bugs.webkit.org/show_bug.cgi?id=221356
<rdar://problem/72555297>

Reviewed by Zalan Bujtas.

Source/WebCore:

Supplementary code points are represented in UTF-16 as two adjacent (surrogate) code units. When we map code
points to glyphs, we were originally mapping these two code units to a single glyph. However, shaping
routines require that the number of code units and glyphs be equal, by injecting a 0 glyph for the trailing
surrogate.

Luckily, we don't actually have to delete these extra 0 glyphs, because the shaping engine will do that for us.

Test: fast/text/multi-code-unit-simple-path.html

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advanceInternal):

LayoutTests:

  • fast/text/multi-code-unit-simple-path-expected-mismatch.html: Added.
  • fast/text/multi-code-unit-simple-path.html: Added.
11:38 AM Changeset in webkit [272378] by Jonathan Bedard
  • 5 edits in trunk/Tools

[Python-3] Change shebang in git-webkit
https://bugs.webkit.org/show_bug.cgi?id=221412
<rdar://problem/73983881>

Reviewed by Stephanie Lewis.

  • Scripts/git-webkit: Change python shebang to python3.
  • Scripts/libraries/webkitscmpy/git-webkit: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/committer.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/message.py: Ditto.
11:16 AM Changeset in webkit [272377] by Megan Gardner
  • 6 edits
    1 add in trunk/Source/WebCore

Process LocalizableAdditions string file correctly.
https://bugs.webkit.org/show_bug.cgi?id=221358

Reviewed by Tim Horton.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/scripts/preprocessor.pm:

(applyPreprocessor):

10:10 AM Changeset in webkit [272376] by achristensen@apple.com
  • 9 edits in trunk

REGRESSION(r267763) Network process launches earlier than before
https://bugs.webkit.org/show_bug.cgi?id=221384
<rdar://problem/73507706>

Patch by Alex Christensen <achristensen@apple.com> on 2021-02-04
Reviewed by Chris Dumez.

Source/WebKit:

Before r267763 we could have an app launch, allocate a WKWebView, and set _resourceLoadStatisticsEnabled
all without having a network process launch.

When setting _resourceLoadStatisticsEnabled, we don't need to launch a network process if we haven't already
because when we do, WebsiteDataStore::parameters will send the correct value. I added a test that verifies this doesn't
launch the network process if it hasn't already been launched.

We also don't need to update the process assertion or the process suspension state if there is no network process.

sendNetworkProcessXPCEndpointToWebProcess is also called when opening Safari on iOS and would be the next thing to
unnecessarily launch the network process during app initialization. I manually verified that if we add an early return
if there is no network process yet, we do send the XPC endpoint to the web process when the network process does launch
through the call site in sendNetworkProcessXPCEndpointToAllWebProcesses.

I verified on my phone that this is the minimal change needed for Safari on iOS to not launch the network process before
application:didFinishLaunchingWithOptions: is called as it did before r267763.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::updateProcessSuppressionState):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::updateProcessAssertions):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::sendNetworkProcessXPCEndpointToWebProcess):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::networkProcessIfExists):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

(TEST):

10:01 AM Changeset in webkit [272375] by Devin Rousso
  • 29 edits
    4 copies
    4 moves
    12 adds
    11 deletes in trunk

Add intermediate volume icon states between "mute" and "max"
https://bugs.webkit.org/show_bug.cgi?id=221371

Reviewed by Eric Carlson.

Source/WebCore:

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

(MuteButton):
(MuteButton.prototype.get volume): Added.
(MuteButton.prototype.set volume): Added.
(MuteButton.prototype.set usesLTRUserInterfaceLayoutDirection): Added.
(MuteButton.prototype.layout):
(MuteButton.prototype.set usesRTLIconVariant): Removed.
Keep track of the volume in addition to muted so that the icon can change more granularly:

  • muted (VolumeMuted.svg and VolumeMuted-RTL.svg)
  • 0% < 25% (Volume0.svg and Volume0-RTL.svg)
  • 25% < 50% (Volume1.svg and Volume1-RTL.svg)
  • 50% < 75% (Volume2.svg and Volume2-RTL.svg)
  • 75% <= 100% (Volume3.svg and Volume3-RTL.svg)

Drive-by: rename set usesRTLIconVariant to set usesLTRUserInterfaceLayoutDirection so

that it matches MediaControls.prototype.set usesLTRUserInterfaceLayoutDirection.

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

(MediaControls.prototype.set usesLTRUserInterfaceLayoutDirection):

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

(InlineMediaControls.prototype.layout):
(InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
Propagate usesLTRUserInterfaceLayoutDirection to volumeButton whenever it's changed.

  • Modules/modern-media-controls/media/mute-support.js:

(MuteSupport.prototype.syncControl):
Also pass along the volume.

  • Modules/modern-media-controls/media/volume-support.js:

(VolumeSupport.prototype.controlValueWillStartChanging):
Don't unmute in controlValueWillStartChanging (from "pointerdown") as the user hasn't
actually changed the volume yet.

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

(MacOSFullscreenMediaControls.prototype._volumeControlsForCurrentDirection):

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

(.media-controls.mac.fullscreen:not(.uses-ltr-user-interface-layout-direction) .volume.slider): Added.
(.media-controls.mac.fullscreen:not(.uses-ltr-user-interface-layout-direction) :is(.volume-down, .volume.slider, .volume-up)): Deleted.

  • Modules/modern-media-controls/controls/volume-down-button.js: Removed.
  • Modules/modern-media-controls/controls/volume-up-button.js: Removed.
  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype._supportingObjectClasses):

  • Modules/modern-media-controls/media/volume-down-support.js: Removed.
  • Modules/modern-media-controls/media/volume-up-support.js: Removed.

Use the same MuteButton in fullscreen instead of VolumeDownButton and VolumeUpButton.

  • Modules/modern-media-controls/controls/icon-service.js:
  • Modules/modern-media-controls/images/iOS/Mute-RTL.svg: Removed.
  • Modules/modern-media-controls/images/iOS/Mute.svg: Removed.
  • Modules/modern-media-controls/images/iOS/Volume0-RTL.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume0.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume1-RTL.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume1.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume2-RTL.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume2.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume3-RTL.svg: Copied from Source/WebCore/Modules/modern-media-controls/images/macOS/VolumeHi-RTL.svg.
  • Modules/modern-media-controls/images/iOS/Volume3.svg: Copied from Source/WebCore/Modules/modern-media-controls/images/macOS/VolumeHi.svg.
  • Modules/modern-media-controls/images/iOS/VolumeHi-RTL.svg: Removed.
  • Modules/modern-media-controls/images/iOS/VolumeHi.svg: Removed.
  • Modules/modern-media-controls/images/iOS/VolumeMuted-RTL.svg: Copied from Source/WebCore/Modules/modern-media-controls/images/macOS/Mute-RTL.svg.
  • Modules/modern-media-controls/images/iOS/VolumeMuted.svg: Copied from Source/WebCore/Modules/modern-media-controls/images/macOS/Mute.svg.
  • Modules/modern-media-controls/images/macOS/Volume0-RTL.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume0.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume1-RTL.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume1.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume2-RTL.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume2.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume3-RTL.svg: Renamed from Source/WebCore/Modules/modern-media-controls/images/macOS/VolumeHi-RTL.svg.
  • Modules/modern-media-controls/images/macOS/Volume3.svg: Renamed from Source/WebCore/Modules/modern-media-controls/images/macOS/VolumeHi.svg.
  • Modules/modern-media-controls/images/macOS/VolumeLo.svg: Removed.
  • Modules/modern-media-controls/images/macOS/VolumeMuted-RTL.svg: Renamed from Source/WebCore/Modules/modern-media-controls/images/macOS/Mute-RTL.svg.
  • Modules/modern-media-controls/images/macOS/VolumeMuted.svg: Renamed from Source/WebCore/Modules/modern-media-controls/images/macOS/Mute.svg.
  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
Add an ENGINEERING_BUILD compile flag so that the media controls JS/CSS is also available
in Web Inspector for engineering builds (in addition to debug builds).

LayoutTests:

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl-expected.txt:
  • media/modern-media-controls/mute-button/mute-button.html:
  • media/modern-media-controls/mute-button/mute-button-expected.txt:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • media/modern-media-controls/volume-down-support/volume-down-support.html: Removed.
  • media/modern-media-controls/volume-down-support/volume-down-support-expected.txt: Removed.
  • media/modern-media-controls/volume-up-support/volume-up-support.html: Removed.
  • media/modern-media-controls/volume-up-support/volume-up-support-expected.txt: Removed.
9:39 AM Changeset in webkit [272374] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r272217): clang warnings in ExtensionsGLOpenGLCommon.h
https://bugs.webkit.org/show_bug.cgi?id=221409

Patch by Philippe Normand <pnormand@igalia.com> on 2021-02-04
Reviewed by Darin Adler.

  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: Re-add the override qualifier for a

few methods, which was removed in r272217.

9:39 AM Changeset in webkit [272373] by Devin Rousso
  • 17 edits in trunk

[macOS] Default to showing the total duration, only switching to time remaining when clicked
https://bugs.webkit.org/show_bug.cgi?id=221364

Reviewed by Eric Carlson.

Source/WebCore:

  • Modules/modern-media-controls/controls/time-label.js:

(TimeLabel.prototype.setValueWithNumberOfDigits):
(TimeLabel.prototype.commitProperty):
(TimeLabel.prototype._formattedTime):
Add TimeLabel.Type.Duration.
Drive-by: rename Types to Type as most enums are singular.

  • Modules/modern-media-controls/controls/time-control.js:

(TimeControl):
(TimeControl.prototype.get minimumWidth):
(TimeControl.prototype.get idealMinimumWidth):
(TimeControl.prototype.layout):
(TimeControl.prototype.handleEvent): Added.
(TimeControl.prototype._durationOrRemainingTimeLabel): Added.
(TimeControl.prototype._performIdealLayout):
Add another TimeLabel with the new TimeLabel.Type.Duration that is used instead of the
existing TimeLabel.Type.Remaining after the latter has been clicked (and the former has
not also been clicked to switch back).

  • en.lproj/modern-media-controls-localized-strings.js:

Add "Duration".

LayoutTests:

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt:
  • media/modern-media-controls/time-label/ios-time-label.html:
  • media/modern-media-controls/time-label/ios-time-label-expected.txt:
  • media/modern-media-controls/time-label/time-label.html:
  • media/modern-media-controls/time-label/time-label-expected.txt:
  • media/modern-media-controls/time-labels-support/remaining-time.html:
9:34 AM Changeset in webkit [272372] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Update .eslintrc to account for ECMAScript 2020
https://bugs.webkit.org/show_bug.cgi?id=221402

Patch by Razvan Caliman <Razvan Caliman> on 2021-02-04
Reviewed by Devin Rousso.

Add ES2020 parser option so ESLint-based linters don't throw errors
for newer JavaScript language features used in WebInspectorUI.

Note: The linter in an editor must support ESLint v6.2.0 or newer to
understand ES2020.

  • .eslintrc:

Drive-by: add 4 spaces indentation rule to match Coding Style Guidelines.

9:16 AM Changeset in webkit [272371] by Nikita Vasilyev
  • 17 edits
    1 copy
    1 add in trunk

Web Inspector: Collapse blackboxed call frames in Sources
https://bugs.webkit.org/show_bug.cgi?id=216897

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Stack traces often have dozens of blackboxed call frames when using blackboxing for JS-frameworks such as React.js.
It makes it hard to see more relevant non-framework code.

To improve this, introduce "Collapse blackboxed call frames" experimental setting, that collapses adjacent
blackboxed call frames into expandable items.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:
  • UserInterface/Base/Utilities.js:
  • UserInterface/Images/TypeIcons.svg:
  • UserInterface/Main.html:
  • UserInterface/Models/CallFrame.js:

(WI.CallFrame):
(WI.CallFrame.prototype.get blackboxed):
(WI.CallFrame.fromDebuggerPayload):
(WI.CallFrame.fromPayload):

  • UserInterface/Views/BlackboxedGroupTreeElement.css: Added.

(.tree-outline .item.blackboxed-group):
(.tree-outline .item.blackboxed-group .icon):
(@media (prefers-color-scheme: dark) .tree-outline .item.blackboxed-group .icon):

  • UserInterface/Views/BlackboxedGroupTreeElement.js: Added.

(WI.BlackboxedGroupTreeElement):
(WI.BlackboxedGroupTreeElement.prototype.expand):

  • UserInterface/Views/CallFrameTreeElement.css:

(.tree-outline .item.call-frame.blackboxed:not(.selected)):

  • UserInterface/Views/CallFrameView.css:

(.call-frame.blackboxed > .title,):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):

  • UserInterface/Views/ThreadTreeElement.js:

(WI.ThreadTreeElement.prototype.refresh):

  • UserInterface/Views/TreeElement.js:

(WI.TreeElement.treeElementToggled):
This is necessary since WI.BlackboxedGroupTreeElement removes itself when expanded.

  • UserInterface/Views/Variables.css:

(:root):

LayoutTests:

Test Array.prototype.groupBy.

  • inspector/unit-tests/array-utilities-expected.txt:
  • inspector/unit-tests/array-utilities.html:
8:56 AM Changeset in webkit [272370] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Remove the Timer from Style::Scope
https://bugs.webkit.org/show_bug.cgi?id=221221
<rdar://problem/73918532>

Reviewed by Sam Weinig.

Just request a rendering update instead. It already flushes any pending style scope updates.

  • dom/Document.cpp:

(WebCore::Document::didInsertInDocumentShadowRoot):

  • dom/Element.cpp:

(WebCore::Element::isVisibleWithoutResolvingFullStyle const):

Flush.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::Scope):
(WebCore::Style::Scope::flushPendingSelfUpdate):
(WebCore::Style::Scope::scheduleUpdate):
(WebCore::Style::Scope::insertedInDocument):

Ensure that m_hasDescendantWithPendingUpdate bit gets set if a shadow root with pending update is inserted in document.

(WebCore::Style::Scope::clearPendingUpdate): Deleted.
(WebCore::Style::Scope::pendingUpdateTimerFired): Deleted.

  • style/StyleScope.h:
8:36 AM Changeset in webkit [272369] by Philippe Normand
  • 9 edits in trunk

[GStreamer] Misc Thunder nitpicks
https://bugs.webkit.org/show_bug.cgi?id=221398

Reviewed by Xabier Rodriguez-Calvar.

.:

  • Source/cmake/FindThunder.cmake: Look-up Thunder through pkg-config before attempting a

direct libocdm lookup.

Source/WebCore:

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresFirefoxBrowser): For Netflix we should use a Firefox User-Agent, when
Thunder is enabled.

  • platform/graphics/gstreamer/eme/CDMThunder.cpp:

(WebCore::CDMFactoryThunder::singleton): Use a dedicated gst debug category for this module,
in order to decouple from the decryptor.
(WebCore::CDMFactoryThunder::supportedKeySystems const): Use explicit return value, removing
possible misunderstandings.
(WebCore::CDMPrivateThunder::CDMPrivateThunder):
(WebCore::CDMPrivateThunder::supportedRobustnesses const): Thunder supports secure decode/crypto in software.
(WebCore::CDMPrivateThunder::supportsServerCertificates const): Plumb to new
opencdm_system_supports_certificate API.
(WebCore::CDMInstanceThunder::setStorageDirectory): Ensure storage directory exists.
(WebCore::ParsedResponseMessage::hasType const): Simplify a bit.
(WebCore::CDMInstanceSessionThunder::updateLicense):

  • platform/graphics/gstreamer/eme/CDMThunder.h:
  • platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:

(webkit_media_thunder_decrypt_class_init): Use a more explicit name for the debug category.

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST): Add test for Netflix WPE/GTK UA quirk.

6:59 AM Changeset in webkit [272368] by Aditya Keerthi
  • 15 edits
    2 adds in trunk

[macOS] Selecting a date on datetime-local inputs unexpectedly adds second and millisecond fields
https://bugs.webkit.org/show_bug.cgi?id=221350
<rdar://problem/73943517>

Reviewed by Devin Rousso.

Source/WebCore:

Currently, when setting the value of a datetime-local input using the
picker, the length of the current value of the input is used to determine
whether or not to return a value with second/millisecond precision.

This is approach is incorrect, since the value could be empty, while the
step attribute can specify second/millisecond precision. To fix, ensure
the DateTimeChooserParameters knows whether the input has second and
millisecond fields. That information can then be used by the UIProcess
to return a correctly formatted value to the WebProcess.

Test: fast/forms/datetimelocal/datetimelocal-editable-components/datetimelocal-choose-value-from-picker.html

  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::handleDOMActivateEvent):
(WebCore::BaseDateAndTimeInputType::didChangeValueFromControl):
(WebCore::BaseDateAndTimeInputType::setupDateTimeChooserParameters):

Moved this method from HTMLInputElement to the input type, since it is
specific to date/time input types, and to leverage the existing
shouldHaveSecondField and shouldHaveMillisecondField methods when
building the DateTimeChooserParameters.

  • html/BaseDateAndTimeInputType.h:
  • html/HTMLInputElement.cpp:
  • html/HTMLInputElement.h:
  • platform/DateTimeChooserParameters.h:

Added hasSecondField and hasMillisecondField members, so that the UIProcess
knows whether or not to return a string that contains seconds/milliseconds.

(WebCore::DateTimeChooserParameters::encode const):
(WebCore::DateTimeChooserParameters::decode):

Source/WebKit:

  • UIProcess/mac/WebDateTimePickerMac.mm:

(-[WKDateTimePicker updatePicker:]):
(-[WKDateTimePicker dateFormatStringForType:]):

Do not use the length of the value to determine whether or seconds and
milliseconds should be present, since the value can be empty.

Instead, use the new information in DateTimeChooserParameters, matching
the visual appearance of the input.

Tools:

Added a method to UIScriptController to simulate selecting a date using
the presented date picker.

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h:

(WTR::UIScriptController::chooseDateTimePickerValue):

  • WebKitTestRunner/mac/UIScriptControllerMac.h:
  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptControllerMac::chooseDateTimePickerValue):

LayoutTests:

Added a test to to verify that the presence of seconds and milliseconds
in the value of a datetime-local input after selecting a date using the
picker matches the configuration.

  • fast/forms/datetimelocal/datetimelocal-editable-components/datetimelocal-choose-value-from-picker-expected.txt: Added.
  • fast/forms/datetimelocal/datetimelocal-editable-components/datetimelocal-choose-value-from-picker.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.chooseDateTimePickerValue):

4:48 AM Changeset in webkit [272367] by commit-queue@webkit.org
  • 6 edits
    2 deletes in trunk

Unreviewed, reverting r272338.
https://bugs.webkit.org/show_bug.cgi?id=221403

Broke a layout test percentage-height-in-flexbox.html

Reverted changeset:

"the nested grid container which has replaced item with 'max-
height' has wrong width(0px)."
https://bugs.webkit.org/show_bug.cgi?id=219194
https://trac.webkit.org/changeset/272338

4:01 AM Changeset in webkit [272366] by Martin Robinson
  • 19 edits in trunk

Improve the serialization of scroll-snap-type and scroll-snap-align
https://bugs.webkit.org/show_bug.cgi?id=221324

LayoutTests/imported/w3c:

Reviewed by Alex Christensen.

  • web-platform-tests/css/css-scroll-snap/inheritance-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-computed-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-valid-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-valid-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

Reviewed by Alex Christensen.

Improve serialization of scroll-snap-type and scroll-snap-align. When the values
are the same for both dimensions or a default value is used, don't add it to
the list of consumed tokens. The primitive conversion process will handle this
default correctly and serialization will produce a canonical serialization correctly.

We handle this case for both serialization of the style (eg getPropertyValue) and
for serialization of computed style.

No new tests.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForScrollSnapAlignment): For the computed style don't serialize
the second value if it is the same as the first.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeScrollSnapAlign): Only add the second value to the value list if it
exists and if it is different than the first value.
(WebCore::consumeScrollSnapType): Only add the second value if it is a non-default value.

LayoutTests:

Reviewed by Alex Christensen.

  • css3/scroll-snap/resources/iframe-content-rtl.html:
  • css3/scroll-snap/resources/iframe-content.html:
  • css3/scroll-snap/scroll-snap-inherit-expected.txt:
  • css3/scroll-snap/scroll-snap-inherit.html:
  • css3/scroll-snap/scroll-snap-initial-expected.txt:
  • css3/scroll-snap/scroll-snap-initial.html:
  • css3/scroll-snap/scroll-snap-property-computed-style-expected.txt:
  • css3/scroll-snap/scroll-snap-property-computed-style.js:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
3:02 AM Changeset in webkit [272365] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Modifications to Tools/wpe/install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=221254

Patch by Eleni Maria Stea <hikiko> on 2021-02-04
Reviewed by Adrian Perez de Castro.

  • wpe/install-dependencies: python-psutil is replaced with

python3-psutil that is present in Debian/Ubuntu/Raspbian. libegl-mesa0
is added in the dependencies list as it's required for libegl1-mesa-dev
to be installed.

2:42 AM Changeset in webkit [272364] by ysuzuki@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

[JSC] Implement Object.entries in C++
https://bugs.webkit.org/show_bug.cgi?id=221380

Reviewed by Alexey Shvayka.

This patch implements Object.entries in C++ because it is more efficient.
It is not using dynamic feature (like, calling a callback). And in C++,
we can avoid JSArray allocations for @Object.@getOwnPropertyNames.

This patch also removes unnecessary JS private functions, @propertyIsEnumerable,
and @getOwnPropertyNames.

  • builtins/BuiltinNames.h:
  • builtins/ObjectConstructor.js:

(entries): Deleted.

  • bytecode/LinkTimeConstant.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObjectFunctions.cpp:
  • runtime/JSGlobalObjectFunctions.h:
  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructor::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

1:11 AM Changeset in webkit [272363] by commit-queue@webkit.org
  • 4 edits in trunk

Make shouldComputeLogicalWidthFromAspectRatioAndInsets writing mode aware
https://bugs.webkit.org/show_bug.cgi?id=221328

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-04
Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

Commit r271061 added support for aspect-ratio on positioned elements, taking into account
insets, but it failed to take writing-mode into account when checking insets. This change fixes
that by asking logical values.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatioAndInsets const):

LayoutTests:

Enable some tests that pass now.

12:47 AM Changeset in webkit [272362] by Lauro Moura
  • 2 edits in trunk/Source/WebKit

REGRESSION(r267763): [GTK][WPE] Broken main thread assertion in MemoryPressureMonitor
https://bugs.webkit.org/show_bug.cgi?id=217363

Reviewed by Carlos Garcia Campos.

r267763 changed a number of NetworkProcessProxy methods to be
accessible only from the main thread, including allNetworkProcesses().
This function was called from the memory pressure monitor thread
directly to notify high memory usage.

This was causing the debug bots to abort prematurely with many crashes
when in reality just a memory pressure warning would be enough.

Covered by existing tests.

  • UIProcess/linux/MemoryPressureMonitor.cpp:

(WebKit::MemoryPressureMonitor::start): Dispatch the memory pressure
notification in the main thread.

12:42 AM Changeset in webkit [272361] by magomez@igalia.com
  • 4 edits in trunk

[WPE][GTK] Wrong rendering when using opacity filters on hw accelerated layers
https://bugs.webkit.org/show_bug.cgi?id=221330

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Apply the opacity filter value to the color components as well, as we need premultiplied alpha
for blending.

Covered by existent tests.

  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:

LayoutTests:

Update expected image.

  • platform/gtk/css3/filters/effect-opacity-hw-expected.png:

Feb 3, 2021:

11:59 PM Changeset in webkit [272360] by commit-queue@webkit.org
  • 4 edits in trunk

Handle aspect-ratio: auto m/n for replaced elements
https://bugs.webkit.org/show_bug.cgi?id=221323

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-03
Reviewed by Simon Fraser.

Source/WebCore:

In the aspect-ratio: auto m/n case, replaced elements with natural aspect ratio
should use that aspect-ratio instead of the provided aspect ratio [1].

[1] https://drafts.csswg.org/css-sizing-4/#ratios

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeLogicalWidthInFragment const):

LayoutTests:

replaced-element-030.html now passes.

10:00 PM Changeset in webkit [272359] by Peng Liu
  • 5 edits in trunk

[MSE] Move the call to didParseInitializationDataCallback() from the beginning of a cluster to the end of "tracks" element
https://bugs.webkit.org/show_bug.cgi?id=221120

Reviewed by Daniel Bates.

Source/WebCore:

This patch updates the WebM parser regarding the timing to call didParseInitializationDataCallback()
based on a discussion with Jer.

Based on the spec, https://w3c.github.io/mse-byte-stream-format-webm/#webm-init-segments, "The user
agent MUST accept and ignore any elements other than an EBML Header or a Cluster that occur before,
in between, or after the Segment Information and Tracks elements." So the parser should have collected
all required information of the initialization segment when it finishes parsing the "Tracks" element.

Tests: media/media-source/media-source-webm.html

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::OnElementEnd):
(WebCore::SourceBufferParserWebM::OnClusterBegin):

LayoutTests:

  • media/media-source/media-source-webm-expected.txt:
  • media/media-source/media-source-webm.html:
9:21 PM Changeset in webkit [272358] by Simon Fraser
  • 8 edits in trunk/Source/WebCore

Avoid an ancestor walk in HTMLFormControlElement::computeWillValidate()
https://bugs.webkit.org/show_bug.cgi?id=221357

Reviewed by Ryosuke Niwa.

HTMLFormControlElement::computeWillValidate() does an ancestor DOM walk to look
for enclosing data list elements, but these are fairly uncommon so we can avoid
this work if we know the Document has none.

  • dom/Document.h:

(WebCore::Document::hasDataListElements const):
(WebCore::Document::incrementDataListElementCount):
(WebCore::Document::decrementDataListElementCount):

  • dom/Element.cpp:

(WebCore::Element::removedFromAncestor): Avoid fetching the page twice.

  • html/HTMLDataListElement.cpp:

(WebCore::HTMLDataListElement::HTMLDataListElement):
(WebCore::HTMLDataListElement::~HTMLDataListElement):
(WebCore::HTMLDataListElement::didMoveToNewDocument):

  • html/HTMLDataListElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::computeWillValidate const):

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::elementWasRemoved): Renamed for consistency.
(WebCore::PointerLockController::elementRemoved): Deleted.

  • page/PointerLockController.h:
9:13 PM Changeset in webkit [272357] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GLIB] Gardening more debug crashes

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/wpe/TestExpectations:
9:07 PM Changeset in webkit [272356] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore
REGRESSION(r272128): ASSERTION FAILED: run.inlineItem.isText()
run.inlineItem.isInlineBoxStart() run.inlineItem.isInlineBoxEnd() on fast/layoutformattingcontext/table-basic-row-baseline-align.html

https://bugs.webkit.org/show_bug.cgi?id=221275
<rdar://problem/73888807>

Reviewed by Simon Fraser.

Normally due to soft wrap opportunity rules, text followed by image can never be in the same continuous inline content (input to line breaking). However due to
a table quirk, inside the table cells there's no soft wrap opportunity (see InlineFormattingContext::Quirks::hasSoftWrapOpportunityAtImage).
Let's loosen the ASSERT at processOverflowingContentWithText::isBreakableRun by including image content (and adjust some of the function names to reflect the not-only-text nature).

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::hasTrailingTextContent):
(WebCore::Layout::hasLeadingTextContent):
(WebCore::Layout::hasTextRun):
(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::processOverflowingContentWithText const):
(WebCore::Layout::isTextContent): Deleted.
(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const): Deleted.

  • layout/inlineformatting/InlineContentBreaker.h:
8:43 PM Changeset in webkit [272355] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

ASSERTION FAILED: !size.isEmpty() under platformInitializeWebProcess

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):
Follow-up to r272335; don't call IOSurface::setMaximumSize if the UI process
did not send us a size. Caused all Web Content processes to assert in debug on launch.

8:09 PM Changeset in webkit [272354] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Avoid frequent calls to HTMLFormControlElement::updateValidity() when constructing form control elements
https://bugs.webkit.org/show_bug.cgi?id=221320

Reviewed by Geoffrey Garen.

HTMLFormControlElement::updateValidity() can get called multiple times inside
HTMLInputElement::parserDidSetAttributes(), so add a simple delaying scope so that
validity is only updated once at the end.

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::endDelayingUpdateValidity):
(WebCore::HTMLFormControlElement::computeWillValidate const):
(WebCore::HTMLFormControlElement::updateValidity):

  • html/HTMLFormControlElement.h:

(WebCore::HTMLFormControlElement::startDelayingUpdateValidity):
(WebCore::DelayedUpdateValidityScope::DelayedUpdateValidityScope):
(WebCore::DelayedUpdateValidityScope::~DelayedUpdateValidityScope):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::parserDidSetAttributes):

8:06 PM Changeset in webkit [272353] by jer.noble@apple.com
  • 7 edits in trunk/Source

[Cocoa] WebM audio goes out-of-sync or stops playing after a seek
https://bugs.webkit.org/show_bug.cgi?id=221354
<rdar://73471690>

Reviewed by Eric Carlson.

Source/WebCore:

Add a new flag to MediaSample indicating whether the sample has any information about whether
it is an sync-sample or not, and expose that through a new method hasSyncInfo().

Drive-by Fix: Force all video samples to contain a sample attachments dictionary, whether or
not the sample is sync.

Drive-by Fix #2: SampleMap does an equality comparison for flags() == MediaSample::IsSync.
This breaks as soon as any sample has both IsSync and any other flag. Replace with a specific
call to isSync() instead.

  • platform/MediaSample.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::doesCMSampleBufferHaveSyncInfo):
(WebCore::MediaSampleAVFObjC::flags const):

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::VideoTrackData::createSampleBuffer):

Source/WebKit:

The MTPluginFormatReader will attempt to determine whether an audio sample needs priming frames
by querying for, among other things, its "syncInfo". Previously, we had just presumed all samples
without a sample attachment dictionary were sync samples, and reported them as such from
MediaSampleCursor, but this causes the format reader plugin to walk backwards all the way to the
beginning of the audio track looking for priming samples. Instead, since the sample in question
has no sync info (it was synthesized by MediaSample), return kCMBaseObjectError_ValueNotAvailable
in this case, which causes the plugin format reader to assume all samples are both sync and do
not require explicit priming frames.

  • Shared/mac/MediaFormatReader/MediaSampleCursor.cpp:

(WebKit::MediaSampleCursor::getSampleTiming const):
(WebKit::MediaSampleCursor::getSyncInfo const):

7:55 PM Changeset in webkit [272352] by Devin Rousso
  • 6 edits in trunk/Source/WebCore

[macOS] update media controls time scrubber styles
https://bugs.webkit.org/show_bug.cgi?id=221360

Reviewed by Eric Carlson.

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

(Slider):
(Slider.prototype.commit):

  • Modules/modern-media-controls/controls/slider.css:

(.slider > .custom-slider > .fill):
(.slider > .custom-slider > .primary):
(.slider > .custom-slider > .secondary):
(.slider > .custom-slider > .knob):
(.slider > .custom-slider > .knob.circle): Added.
(.slider > .custom-slider > .knob.bar): Added.
(.slider > .custom-slider > .track): Deleted.
Add a new KnobStyle enum that's used to control the CSS applied to the knob. Currently
there are two values: Circle (default) and Bar.

  • Modules/modern-media-controls/controls/time-control.js:

Use Slider.KnobStyle.Bar.

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

(MacOSInlineMediaControls):

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

(MacOSFullscreenMediaControls):
Set the secondaryValue so that the track after the knob is visible. The default value of
secondaryValue is 0, meaning that it sets right: 100%; on the track after the knob.
By setting the secondaryValue to 1 it causes right: 0%;, which fills the space.

6:43 PM Changeset in webkit [272351] by ysuzuki@apple.com
  • 31 edits
    17 adds in trunk/JSTests

[JSC] Update test262
https://bugs.webkit.org/show_bug.cgi?id=221367

Reviewed by Ross Kirsling.

This patch updates test262 results. And since test262 bot is upgraded to Big Sur,
we also clean up some of failures in config.yaml.
Still some of Intl tests are failing because test262 strongly assumes a certain
kind of format. We should fix it in test262 side since the spec does not require that.

  • test262/config.yaml:
  • test262/latest-changes-summary.txt:
  • test262/test/built-ins/Function/property-order.js: Added.
  • test262/test/built-ins/Function/prototype/property-order.js: Added.
  • test262/test/built-ins/Object/property-order.js: Added.
  • test262/test/built-ins/Promise/all/resolve-element-function-property-order.js: Added.

(thenable.then):
(NotPromise):
(NotPromise.resolve):

  • test262/test/built-ins/Promise/allSettled/reject-element-function-property-order.js: Added.

(thenable.then):
(NotPromise):
(NotPromise.resolve):

  • test262/test/built-ins/Promise/allSettled/resolve-element-function-property-order.js: Added.

(thenable.then):
(NotPromise):
(NotPromise.resolve):

  • test262/test/built-ins/Promise/any/reject-element-function-property-order.js: Added.

(thenable.then):
(NotPromise):
(NotPromise.resolve):

  • test262/test/built-ins/Promise/executor-function-property-order.js: Added.

(NotPromise):

  • test262/test/built-ins/Promise/property-order.js: Added.
  • test262/test/built-ins/Promise/reject-function-property-order.js: Added.

(new.Promise):

  • test262/test/built-ins/Promise/resolve-function-property-order.js: Added.

(new.Promise):

  • test262/test/built-ins/Proxy/property-order.js: Added.
  • test262/test/built-ins/Proxy/revocable/revocation-function-property-order.js: Added.
  • test262/test/built-ins/ThrowTypeError/property-order.js: Added.

(ThrowTypeError.Object.getOwnPropertyDescriptor):

  • test262/test/intl402/Collator/prototype/compare/compare-function-property-order.js: Added.
  • test262/test/intl402/DateTimeFormat/prototype/format/format-function-property-order.js: Added.
  • test262/test/intl402/NumberFormat/prototype/format/format-function-property-order.js: Added.
  • test262/test/language/export/escaped-as-export-specifier.js:
  • test262/test/language/export/escaped-default.js:
  • test262/test/language/export/escaped-from.js:
  • test262/test/language/expressions/async-arrow-function/escaped-async-line-terminator.js:
  • test262/test/language/expressions/async-arrow-function/escaped-async.js:
  • test262/test/language/expressions/async-function/escaped-async.js:
  • test262/test/language/expressions/async-generator/escaped-async.js:
  • test262/test/language/expressions/dynamic-import/escape-sequence-import.js:
  • test262/test/language/expressions/import.meta/syntax/escape-sequence-import.js:
  • test262/test/language/expressions/import.meta/syntax/escape-sequence-meta.js:
  • test262/test/language/expressions/new.target/escaped-new.js:
  • test262/test/language/expressions/new.target/escaped-target.js:
  • test262/test/language/expressions/object/method-definition/async-gen-meth-escaped-async.js:
  • test262/test/language/expressions/object/method-definition/async-meth-escaped-async.js:
  • test262/test/language/expressions/object/method-definition/escaped-get.js:
  • test262/test/language/expressions/object/method-definition/escaped-set.js:
  • test262/test/language/import/escaped-as-import-specifier.js:
  • test262/test/language/import/escaped-as-namespace-import.js:
  • test262/test/language/import/escaped-from.js:
  • test262/test/language/statements/async-function/escaped-async.js:
  • test262/test/language/statements/async-generator/escaped-async.js:
  • test262/test/language/statements/class/async-gen-meth-escaped-async.js:
  • test262/test/language/statements/class/async-meth-escaped-async.js:
  • test262/test/language/statements/class/syntax/escaped-static.js:
  • test262/test/language/statements/for-await-of/escaped-of.js:
  • test262/test/language/statements/for-of/escaped-of.js:
  • test262/test/language/statements/let/syntax/escaped-let.js:
  • test262/test262-Revision.txt:
5:43 PM Changeset in webkit [272350] by aestes@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] Shrink MediaSampleByteRange by 8 bytes
https://bugs.webkit.org/show_bug.cgi?id=221363

Reviewed by Eric Carlson.

Reordered member variables to shrink MediaSampleByteRange from 160 bytes to 152 bytes.

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp:

(WebKit::MediaSampleByteRange::MediaSampleByteRange):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.h:
4:10 PM Changeset in webkit [272349] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Insert PhantomLocal just before SetLocal for |this| to ensure liveness
https://bugs.webkit.org/show_bug.cgi?id=221353
<rdar://problem/70373862>

Reviewed by Saam Barati.

Let's consider the following case before SSA conversion.

BB#0:

SetArgumentDefinitely(this)
...

@a: SomethingFun()

MoveHint(@a, this)
SetLocal(@a, this)
Jump #1

BB#1:

...
ExitOK (this point)
...

@b: SomethingFun()

MoveHint(@b, this)
SetLocal(@b, this)
...

BB#2: (Catch entry point)

...

@c: SetArgumentDefinitely(this)

...
Jump #1

We have two entry points. And BB#0 sets @a to |this| while BB#2 does not update |this|, so it is using @c.
We have several patterns we can store |this|: arrow functions' |this| loading, derived constructors' |this| update. So we can see
SetLocal(@x, this) at arbitrary code points in CodeBlocks having them.

The problem is that DFG strongly assumed that |this| is initialized in the root basic block only once. So usually, we do not insert Flush/PhantomLocal for |this|.
But this is problematic when we can store |this| at arbitrary basic blocks since we do not properly insert Flush/PhantomLocal(this) in BB#1's just before Store.

Not inserting that in the above case makes |this| dead in BB#1's head liveness. Then we do not properly insert Phi(BB#0, BB#2) for |this|.
This is OK for non |this| locals since literally that local is not used at all in BB#1. But |this| is special since it is always live in bytecode.
So, OSR availability will be broken in the above graph: at ExitOK place, |this| must be live in bytecode. But |this| is pointing ConflictingFlush since
BB#0 says @a and BB#2 says @c while we do not have Phi.

The problem is that we do not keep liveness of |this| properly in BB#1. When setting a new |this|, we insert PhantomLocal to keep liveness so that appropriate Phi
will be inserted when two predecessors have different DFG nodes for |this|, and this graph can appear in arrow functions, derived constructors, and code with catch.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::setArgument):

  • dfg/DFGVariableAccessDataDump.cpp:

(JSC::DFG::VariableAccessDataDump::dump const):

4:08 PM Changeset in webkit [272348] by achristensen@apple.com
  • 2 edits in trunk/Source/WTF

Fix Catalyst build after r272228
https://bugs.webkit.org/show_bug.cgi?id=220683
<rdar://problem/73940814>

  • wtf/PlatformHave.h:

Turn off our use of UIEventAttribution on Catalyst until we update our internal bots.

3:59 PM Changeset in webkit [272347] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebCore

Unreviewed, GTK Ubuntu LTS build fix after r272311.

  • platform/graphics/ColorSpace.h: Include <functional>, needed for std::invoke().
3:58 PM Changeset in webkit [272346] by Kate Cheney
  • 9 edits in trunk/Source/WebKit

PCM: earliestTimeToSend should be treated as an independent time value, not relative to timeOfAdClick
https://bugs.webkit.org/show_bug.cgi?id=221303
<rdar://problem/73902668>

Reviewed by John Wilander.

r270136 assumed that PCM's earliestTimeToSend attribute was the
difference between timeOfAdClick and when the attribution should be
sent. As a result, it began each new browser session by adjusting
this value based on the amount of time the session was closed.
In reality, earliestTimeToSend is a raw secondsSinceEpoch() value, so we don't
need any adjustment after a new session.

No new tests, this is covered by
http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start.html
now that the corresponding test SPI has been updated.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::createTableQueries):
(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
(WebKit::ResourceLoadStatisticsDatabaseStore::createSchema):
(WebKit::ResourceLoadStatisticsDatabaseStore::destroyStatements):
(WebKit::ResourceLoadStatisticsDatabaseStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
Update the testing SPI to insert an expired time of now minus one
hour as the earliestTimeToSend.

(WebKit::ResourceLoadStatisticsDatabaseStore::updateTimerLastFired): Deleted.
(WebKit::ResourceLoadStatisticsDatabaseStore::timerLastFired): Deleted.
(WebKit::ResourceLoadStatisticsDatabaseStore::updatePrivateClickMeasurementAttributionTimes): Deleted.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::updateTimerLastFired): Deleted.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
(WebKit::PrivateClickMeasurementManager::updateTimerLastFired): Deleted.

  • NetworkProcess/PrivateClickMeasurementManager.h:
3:46 PM Changeset in webkit [272345] by jiewen_tan@apple.com
  • 46 edits in trunk

[WebAuthn] Allow one user gesture free prompt for each navigation
https://bugs.webkit.org/show_bug.cgi?id=220897
<rdar://problem/73541303>

Reviewed by Brent Fulgham.

Source/WebCore:

  • Modules/webauthn/AuthenticatorCoordinator.cpp:

(WebCore::AuthenticatorCoordinator::resetUserGestureRequirement):

  • Modules/webauthn/AuthenticatorCoordinator.h:
  • Modules/webauthn/AuthenticatorCoordinatorClient.h:
  • page/Quirks.cpp:
  • page/Quirks.cpp.h:
  • replay/UserInputBridge.cpp:

(WebCore::UserInputBridge::loadRequest):
(WebCore::UserInputBridge::reloadFrame):
Adds the ability to reset the user gesture requirement flag for user initiated reloads and quirks.

Source/WebKit:

This is a quirk that only allows certain websites.

Covered by existing tests.

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::filterTransports const):
(WebKit::AuthenticatorManager::runPanel):
(WebKit::AuthenticatorManager::runPresenter):
Cancel the whole WebAuthn operation if no user gesture is indicated.

  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:

(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):

  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h:

Set a boolean to indicate a free coupon for each navigation.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

LayoutTests:

  • http/wpt/webauthn/ctap-hid-failure.https-expected.txt:
  • http/wpt/webauthn/ctap-hid-success.https-expected.txt:
  • http/wpt/webauthn/ctap-nfc-failure.https-expected.txt:
  • http/wpt/webauthn/idl.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-local-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-local-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt:
3:37 PM Changeset in webkit [272344] by weinig@apple.com
  • 10 edits
    12 adds in trunk

Add support for hwb() colors defined in CSS Color 4
https://bugs.webkit.org/show_bug.cgi?id=221352

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Add some new WPT tests for hwb() that will be upstreamed shortly.

  • web-platform-tests/css/css-color/color-resolving-hwb-expected.txt: Added.
  • web-platform-tests/css/css-color/color-resolving-hwb.html: Added.
  • web-platform-tests/css/css-color/hwb-001-expected.html: Added.
  • web-platform-tests/css/css-color/hwb-001.html: Added.
  • web-platform-tests/css/css-color/hwb-002-expected.html: Added.
  • web-platform-tests/css/css-color/hwb-002.html: Added.
  • web-platform-tests/css/css-color/hwb-003-expected.html: Added.
  • web-platform-tests/css/css-color/hwb-003.html: Added.
  • web-platform-tests/css/css-color/hwb-004-expected.html: Added.
  • web-platform-tests/css/css-color/hwb-004.html: Added.
  • web-platform-tests/css/css-color/hwb-005-expected.html: Added.
  • web-platform-tests/css/css-color/hwb-005.html: Added.

Source/WebCore:

Add support for hwb() colors. They are similar to the existing
hsl()/hsla() colors, in that they are a transformation of sRGB
specified using a "hue" component and two additional values.
In the case of hwb(), it is hue, whiteness and blackness.

Tests: imported/w3c/web-platform-tests/css/css-color/color-resolving-hwb.html

imported/w3c/web-platform-tests/css/css-color/hwb-001.html
imported/w3c/web-platform-tests/css/css-color/hwb-002.html
imported/w3c/web-platform-tests/css/css-color/hwb-003.html
imported/w3c/web-platform-tests/css/css-color/hwb-004.html
imported/w3c/web-platform-tests/css/css-color/hwb-005.html

  • css/CSSValueKeywords.in:

Add hwb keyword.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunction):
Add parsing support for hwb(). Canonicalizing to 0-1 to match
how HSL/HSLA is canonicalized.

  • platform/graphics/ColorConversion.cpp:

(WebCore::calculateHSLHue):
(WebCore::toHSLA):
(WebCore::toSRGBA):
(WebCore::toHWBA):
(WebCore::toXYZA):
(WebCore::calcHue): Deleted.

  • platform/graphics/ColorConversion.h:

Implement conversions to/from sRGB, refactoring HSL conversion
code to reuse hue calculation which is the same.

  • platform/graphics/ColorModels.h:

Add HWBModel and fix HSLModel which incorrectly expanded allowed ranges
to the parsed form, rather than the form we use internally. We may want
change this in the future, as it is a bit confusing and pretty unnessary.

  • platform/graphics/ColorTypes.h:

(WebCore::HWBA::HWBA):
(WebCore::asColorComponents):
Add HWBA color type.

LayoutTests:

  • tests-options.json:

Mark WPT test as slow, matching the HSL/HSLA test it based on.

3:17 PM Changeset in webkit [272343] by jiewen_tan@apple.com
  • 3 edits in trunk/Source

PCM: Add fraud prevention experimental feature flag
https://bugs.webkit.org/show_bug.cgi?id=221292
<rdar://problem/73581064>

Reviewed by John Wilander.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
3:17 PM Changeset in webkit [272342] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] webkit_settings_set_enable_plugins deprecation warning breaks unit tests
https://bugs.webkit.org/show_bug.cgi?id=220620

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-03
Reviewed by Carlos Garcia Campos.

Don't print a warning when calling webkit_settings_set_enable_plugins() to disable plugins.
We'll still print a warning if attempting to enable plugins, or if checking whether plugins
are enabled.

  • UIProcess/API/glib/WebKitSettings.cpp:

(webkit_settings_get_enable_plugins):
(webkit_settings_set_enable_plugins):

3:07 PM Changeset in webkit [272341] by ysuzuki@apple.com
  • 8 edits
    5 adds in trunk

[JSC] Atomics should support BigInt64Array / BigUint64Array
https://bugs.webkit.org/show_bug.cgi?id=221245

Reviewed by Keith Miller.

JSTests:

  • stress/atomic-increment-bigint64.js: Added.

(shouldBe):
(i.agent.start.262.agent.receiveBroadcast):

  • stress/bigint-atomics-fail.js: Added.

(shouldThrow):

  • stress/bigint64-atomics.js: Added.

(shouldBe):
(test):

  • stress/biguint64-atomics.js: Added.

(shouldBe):
(test):

  • stress/isLockFree.js:

(foo6):
(foo7):
(foo8):
(foo9):

  • stress/shared-array-buffer-bigint.js: Added.

(shouldFail):
(shouldSucceed):
(runAtomic):

  • test262/config.yaml:

Source/JavaScriptCore:

This patch adds BigInt64Array / BigUint64Array support for Atomics.

  1. Atomics.store should be rewritten since it returns non-type-coerced result, so we cannot use atomicReadModifyWrite. The spec also describes Atomics.store without using AtomicReadModifyWrite[1].
  2. Extend Atomics.isLockFree to also accept a size of 8.
  3. Currently, DFG / FTL handle Atomics + BigInt64Array/BigUint64Array as Array::Generic.

[1]: https://tc39.es/ecma262/#sec-atomics.store

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileAtomicsIsLockFree):

  • runtime/AtomicsObject.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::atomicsWaitImpl):
(JSC::JSC_DEFINE_JIT_OPERATION):

  • runtime/ToNativeFromValue.h:

(JSC::toNativeFromValue):

2:46 PM Changeset in webkit [272340] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebCore

Add missing header to fix non-unified builds.

Unreviewed non-unified build fix.

No new tests needed.

  • platform/network/soup/AuthenticationChallengeSoup.cpp:
2:20 PM Changeset in webkit [272339] by Devin Rousso
  • 25 edits in trunk

[macOS] update media controls to use new SF Symbols
https://bugs.webkit.org/show_bug.cgi?id=221307

Reviewed by Eric Carlson.

Source/WebCore:

  • Modules/modern-media-controls/images/macOS/Airplay-fullscreen.svg:
  • Modules/modern-media-controls/images/macOS/Airplay.svg:
  • Modules/modern-media-controls/images/macOS/EnterFullscreen.svg:
  • Modules/modern-media-controls/images/macOS/ExitFullscreen.svg:
  • Modules/modern-media-controls/images/macOS/Forward.svg:
  • Modules/modern-media-controls/images/macOS/MediaSelector-fullscreen.svg:
  • Modules/modern-media-controls/images/macOS/MediaSelector.svg:
  • Modules/modern-media-controls/images/macOS/Mute-RTL.svg:
  • Modules/modern-media-controls/images/macOS/Mute.svg:
  • Modules/modern-media-controls/images/macOS/Pause.svg:
  • Modules/modern-media-controls/images/macOS/PipIn-fullscreen.svg:
  • Modules/modern-media-controls/images/macOS/PipIn.svg:
  • Modules/modern-media-controls/images/macOS/Play.svg:
  • Modules/modern-media-controls/images/macOS/Rewind.svg:
  • Modules/modern-media-controls/images/macOS/SkipBack15.svg:
  • Modules/modern-media-controls/images/macOS/SkipForward15.svg:
  • Modules/modern-media-controls/images/macOS/VolumeHi-RTL.svg:
  • Modules/modern-media-controls/images/macOS/VolumeHi.svg:
  • Modules/modern-media-controls/images/macOS/VolumeLo.svg:

LayoutTests:

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
1:22 PM Changeset in webkit [272338] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

the nested grid container which has replaced item with 'max-height' has wrong width(0px).
https://bugs.webkit.org/show_bug.cgi?id=219194

Patch by Ziran Sun <Ziran Sun> on 2021-02-03
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

The test is imported from WPT.

  • web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html: Added.

Source/WebCore:

Width of a nested grid container with margin:auto returns 0 when their item has "max-height".
This causes the grid item's position wrong due to the wrongly comuputed auto-margin value.
This change is to check whether the preferred logical width is dirty when the grid area changes.

This is an import of Chromium change at
https://chromium-review.googlesource.com/c/chromium/src/+/2503910
This change also imported needsPreferredWidthsRecalculation() from Chromium to RenderReplaced to
address the test case specified here.

Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithmStrategy::minContentForChild const):
(WebCore::GridTrackSizingAlgorithmStrategy::maxContentForChild const):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::needsPreferredWidthsRecalculation const):

  • rendering/RenderReplaced.h:
12:40 PM Changeset in webkit [272337] by commit-queue@webkit.org
  • 7 edits in trunk/Source

Create a SpeechRecognizer for each SpeechRecognitionRequest
https://bugs.webkit.org/show_bug.cgi?id=219699
<rdar://problem/72392097>

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-02-03
Reviewed by Youenn Fablet.

Source/WebCore:

Make SpeechRecognizer take the ownerwhip of the SpeechRecognitionRequest it's about to handle, and manage its
state.

  • Modules/speech/SpeechRecognizer.cpp:

(WebCore::SpeechRecognizer::SpeechRecognizer):
(WebCore::SpeechRecognizer::~SpeechRecognizer):
(WebCore::SpeechRecognizer::abort):
(WebCore::SpeechRecognizer::stop):
(WebCore::SpeechRecognizer::clientIdentifier const):
(WebCore::SpeechRecognizer::start):
(WebCore::SpeechRecognizer::startCapture):
(WebCore::SpeechRecognizer::stopCapture):
(WebCore::SpeechRecognizer::startRecognition):
(WebCore::SpeechRecognizer::abortRecognition):
(WebCore::SpeechRecognizer::stopRecognition):
(WebCore::SpeechRecognizer::reset): Deleted.
(WebCore::SpeechRecognizer::resetRecognition): Deleted.

  • Modules/speech/SpeechRecognizer.h:

(WebCore::SpeechRecognizer::setInactive):
(WebCore::SpeechRecognizer::currentClientIdentifier const): Deleted.

  • Modules/speech/cocoa/SpeechRecognizerCocoa.mm:

(WebCore::SpeechRecognizer::startRecognition):
(WebCore::SpeechRecognizer::resetRecognition): Deleted.

Source/WebKit:

We used the same SpeechRecognizer for multiple requests, so we had to reset SpeechRecognizer state between
requests, which makes things complicated and hard to debug (like nested reset calls). Now we have one dedicated
SpeechRecognizer for each request.

  • UIProcess/SpeechRecognitionServer.cpp:

(WebKit::SpeechRecognitionServer::requestPermissionForRequest):
(WebKit::SpeechRecognitionServer::handleRequest):
(WebKit::SpeechRecognitionServer::stop):
(WebKit::SpeechRecognitionServer::abort):
(WebKit::SpeechRecognitionServer::invalidate):

  • UIProcess/SpeechRecognitionServer.h:
12:36 PM Changeset in webkit [272336] by Ryan Haddad
  • 4 edits in trunk/Source/WebCore

Unreviewed, reverting r272300.

Caused imported/w3c/web-platform-tests/css/css-scoping/css-
scoping-shadow-dynamic-remove-style-detached.html to
consistently fail on bots

Reverted changeset:

"Remove the Timer from Style::Scope"
https://bugs.webkit.org/show_bug.cgi?id=221221
https://trac.webkit.org/changeset/272300

12:32 PM Changeset in webkit [272335] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r270392): Launch time regression under IOSurface::maximumSize()
https://bugs.webkit.org/show_bug.cgi?id=221346
<rdar://problem/73507706>

Reviewed by Sam Weinig.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):
Scope r270392 to only the case where it is needed, when DOM rendering in the GPU process
is enabled and the Web Content process does not have access to IOSurface,
because it causes a small launch time regression.

12:27 PM Changeset in webkit [272334] by Aditya Keerthi
  • 9 edits
    2 adds in trunk

[iOS][FCR] Add new picker for select elements
https://bugs.webkit.org/show_bug.cgi?id=221153
<rdar://problem/73770389>

Reviewed by Tim Horton.

Source/WebKit:

Tapping on a select element should display an context menu that allows
users to choose one of the specified options. Rather than presenting a
UIPickerView, tapping on select elements now create UIContextMenuInteractions,
similar to date and file inputs.

Test: fast/forms/ios/form-control-refresh/select/choose-select-option.html

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

(-[WKContentView _shouldShowAutomaticKeyboardUIIgnoringInputMode]):

The new picker does not bring up the keyboard view on all devices.

(-[WKContentView _elementTypeRequiresAccessoryView:]):

Changed from a static method to an instance method, as the returned
value depends on a flag which is only accessible through the instance.

(-[WKContentView requiresAccessoryView]):
(-[WKContentView _formControlRefreshEnabled]):
(-[WKContentView _shouldShowKeyboardForElement:]):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
(-[WKContentView _removeContextMenuViewIfPossible]):

Do not remove the context menu if an select element is actively being
interacted with.

(-[WKContentView selectControl]):

  • UIProcess/ios/forms/WKFormSelectControl.mm:

(-[WKFormSelectControl initWithView:]):

  • UIProcess/ios/forms/WKFormSelectPicker.h:
  • UIProcess/ios/forms/WKFormSelectPicker.mm:

(-[WKSelectPicker initWithView:]):
(-[WKSelectPicker controlView]):
(-[WKSelectPicker controlBeginEditing]):

Ensure the position information is up-to-date prior to presenting the
context menu.

(-[WKSelectPicker controlEndEditing]):
(-[WKSelectPicker dealloc]):
(-[WKSelectPicker didSelectOptionIndex:]):
(-[WKSelectPicker createMenu]):

Build the menu using UIActions and UIMenus. Since optgroup elements
cannot be nested, only the root UIMenu can contain UIMenus. Submenus
can only contain UIActions.

(-[WKSelectPicker actionForOptionItem:withIndex:]):
(-[WKSelectPicker contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
(-[WKSelectPicker _contextMenuInteraction:styleForMenuWithConfiguration:]):
(-[WKSelectPicker contextMenuInteraction:configurationForMenuAtLocation:]):
(-[WKSelectPicker contextMenuInteraction:willDisplayMenuForConfiguration:animator:]):
(-[WKSelectPicker contextMenuInteraction:willEndForConfiguration:animator:]):
(-[WKSelectPicker removeContextMenuInteraction]):
(-[WKSelectPicker ensureContextMenuInteraction]):
(-[WKSelectPicker showSelectPicker]):
(-[WKSelectPicker selectRow:inComponent:extendingSelection:]):

Implement method for testing select pickers.

LayoutTests:

  • fast/forms/ios/form-control-refresh/select/choose-select-option-expected.txt: Added.
  • fast/forms/ios/form-control-refresh/select/choose-select-option.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.waitForContextMenuToShow):

Added a new UIHelper method to wait until a context menu is displayed.

12:16 PM Changeset in webkit [272333] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Remove access to graphics related user clients
https://bugs.webkit.org/show_bug.cgi?id=221327
<rdar://problem/70496539>

Reviewed by Brent Fulgham.

Remove access to graphics related IOKit classes in the WebContent process on macOS when the GPU process is enabled.

  • WebProcess/com.apple.WebProcess.sb.in:
11:48 AM Changeset in webkit [272332] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Move away from using RenderStyle::preserveNewline
https://bugs.webkit.org/show_bug.cgi?id=221338

Reviewed by Antti Koivisto.

RenderStyle should just be a collection of setter and getter functions.

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::shouldPreserveSpacesAndTabs):
(WebCore::Layout::TextUtil::shouldPreserveNewline):

  • layout/inlineformatting/text/TextUtil.h:
10:41 AM Changeset in webkit [272331] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Optimize PointerCaptureController::elementWasRemoved()
https://bugs.webkit.org/show_bug.cgi?id=221316

Reviewed by Ryosuke Niwa.

Speedometer profiles show HashTable iteration code under PointerCaptureController::elementWasRemoved()
because we always add a hash entry for the mouse pointer.

Optimize away by setting a flag that's only true if any element is referenced by pointer capture.

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::pointerCaptureElement const):
(WebCore::PointerCaptureController::setPointerCapture):
(WebCore::PointerCaptureController::releasePointerCapture):
(WebCore::PointerCaptureController::hasPointerCapture):
(WebCore::PointerCaptureController::pointerLockWasApplied):
(WebCore::PointerCaptureController::elementWasRemoved):
(WebCore::PointerCaptureController::reset):
(WebCore::PointerCaptureController::updateHaveAnyCapturingElement):
(WebCore::PointerCaptureController::touchWithIdentifierWasRemoved):
(WebCore::PointerCaptureController::hasCancelledPointerEventForIdentifier const):
(WebCore::PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier const):
(WebCore::PointerCaptureController::pointerCaptureElement): Deleted.
(WebCore::PointerCaptureController::hasCancelledPointerEventForIdentifier): Deleted.
(WebCore::PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier): Deleted.

  • page/PointerCaptureController.h:
10:40 AM Changeset in webkit [272330] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[AppleWin 32bit][LLInt] LLIntData.h(104) : warning C4172: returning address of local variable or temporary: id
https://bugs.webkit.org/show_bug.cgi?id=220714

Reviewed by Mark Lam.

This patch fixes LLInt build when ENABLE(COMPUTED_GOTO_OPCODES) is false.

  • llint/LLIntData.h:

(JSC::LLInt::getOpcode):
(JSC::LLInt::getOpcodeWide16):
(JSC::LLInt::getOpcodeWide32):
(JSC::LLInt::getOpcodeAddress):
(JSC::LLInt::getOpcodeWide16Address):
(JSC::LLInt::getOpcodeWide32Address):
(JSC::LLInt::getCodePtr):
(JSC::LLInt::getWide16CodePtr):
(JSC::LLInt::getWide32CodePtr):

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

[macOS] Remove access to com.apple.cvmsServ
https://bugs.webkit.org/show_bug.cgi?id=221336
<rdar://problem/70495789>

Reviewed by Brent Fulgham.

Remove access to com.apple.cvmsServ in the WebContent process when the GPU Process is enabled.

  • WebProcess/com.apple.WebProcess.sb.in:
10:35 AM Changeset in webkit [272328] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Remove access to RootDomainUserClient
https://bugs.webkit.org/show_bug.cgi?id=221326
<rdar://problem/73928098>

Reviewed by Brent Fulgham.

After r272241, access to the IOKit class RootDomainUserClient can be removed from the WebContent process.

  • WebProcess/com.apple.WebProcess.sb.in:
10:35 AM Changeset in webkit [272327] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Add internal additions to NetworkSessionCocoa
https://bugs.webkit.org/show_bug.cgi?id=221060
<rdar://problem/68431471>

Reviewed by Brent Fulgham.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):

10:34 AM Changeset in webkit [272326] by Devin Rousso
  • 5 edits in trunk

[iOS] delay +[BKSMousePointerService sharedInstance] so that it doesn't impact launch perf
https://bugs.webkit.org/show_bug.cgi?id=221298

Reviewed by Geoffrey Garen.

Source/WebKit:

  • UIProcess/ios/WKMouseDeviceObserver.h:
  • UIProcess/ios/WKMouseDeviceObserver.mm:

(-[WKMouseDeviceObserver init]): Added.
(-[WKMouseDeviceObserver startWithCompletionHandler:]): Added.
(-[WKMouseDeviceObserver start]):
(-[WKMouseDeviceObserver stop]):
(-[WKMouseDeviceObserver stopWithCompletionHandler:]): Added.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:

(iOSMouseSupport.MouseInitiallyDisconnected):
(iOSMouseSupport.MouseInitiallyConnected):
(iOSMouseSupport.MouseLaterDisconnected):
(iOSMouseSupport.MouseLaterConnected):

10:26 AM Changeset in webkit [272325] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Every leading whitespace character is tested twice
https://bugs.webkit.org/show_bug.cgi?id=221335

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::moveToNextNonWhitespacePosition):
(WebCore::Layout::InlineTextItem::createAndAppendTextItems):
(WebCore::Layout::isWhitespaceCharacter): Deleted.

9:48 AM Changeset in webkit [272324] by youenn@apple.com
  • 13 edits
    1 add in trunk

Make sure GPUProcess MediaRecorder handles correctly muted tracks
https://bugs.webkit.org/show_bug.cgi?id=221325

Reviewed by Eric Carlson.

Source/WebCore:

Export new methods.
Covered by updated test.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/cocoa/WebAudioBufferList.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:

Source/WebKit:

In case of muted audio, zero the audio buffer before writing it in the ring buffer.
In case of muted video, send a black frame instead of the real frame.
For that purpose, create a black frame and convert it to IOSurface.
Apply this to any non IOSurface based video sample.

Fix unified build.

  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:

(WebKit::MediaRecorderPrivate::videoSampleAvailable):
(WebKit::MediaRecorderPrivate::audioSamplesAvailable):

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.mm: Added.
  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:

LayoutTests:

  • http/wpt/mediarecorder/mute-tracks.html:

Enable media recorder in GPUProcess and reduce the number of retries to have the test fail and not timeout.

9:44 AM Changeset in webkit [272323] by achristensen@apple.com
  • 2 edits in trunk/Tools

Flaky API Test: TestWebKitAPI.WebKitLegacy.CrossPartitionFileSchemeAccess
https://bugs.webkit.org/show_bug.cgi?id=206956

Reviewed by Alexey Proskuryakov.

createPartition is timing out on the bots but not locally.
Don't hide the output of hdiutil so we can see what is happening on the bots.

  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm:

(createPartition):

9:38 AM Changeset in webkit [272322] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Fix watch and tv build after r272228
https://bugs.webkit.org/show_bug.cgi?id=220683

UIEventAttribution is special in that the symbol is declared as unavailable on watchOS and tvOS.
To fix the build, we need to not use this symbol on those operating systems.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:
9:36 AM Changeset in webkit [272321] by Russell Epstein
  • 6 edits in branches/safari-611-branch/Source/WebCore

Apply patch. rdar://problem/73890906

9:33 AM Changeset in webkit [272320] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Source/WebCore

Apply patch. rdar://problem/73904694

9:18 AM Changeset in webkit [272319] by Ryan Haddad
  • 2 edits in trunk/Tools

Replace Apple-Catalina-Release-JSC-Tests bot due to hardware failure
https://bugs.webkit.org/show_bug.cgi?id=221315

Reviewed by Alexey Proskuryakov.

  • CISupport/build-webkit-org/config.json: Replace bot157 with bot610.
9:17 AM Changeset in webkit [272318] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271898. rdar://problem/73935028

ScopedHighPerformanceGPURequest.h not marked framework private
https://bugs.webkit.org/show_bug.cgi?id=220989

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

The header was listed twice in the project, causing build failures.

No new tests, build fix.

  • WebCore.xcodeproj/project.pbxproj:

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

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

Make sure samples stay valid in LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData
https://bugs.webkit.org/show_bug.cgi?id=221264

Reviewed by Eric Carlson.

Covered by existing tests.

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

(WebCore::LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData):

8:41 AM Changeset in webkit [272316] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[GStreamer] Add DASH support in the registry scanner
https://bugs.webkit.org/show_bug.cgi?id=215922

Patch by Fernando Jimenez Moreno <Fernando Jiménez Moreno> on 2021-02-03
Reviewed by Philippe Normand.

Source/WebCore:

Test: platform/glib/media/media-can-play-dash.html

  • platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:

(WebCore::GStreamerRegistryScanner::initializeDecoders):

LayoutTests:

Add test to check that 'application/dash+xml' can potentially be played

  • platform/glib/media/media-can-play-dash-expected.txt: Added.
  • platform/glib/media/media-can-play-dash.html: Added.
8:12 AM Changeset in webkit [272315] by commit-queue@webkit.org
  • 4 edits
    6 moves in trunk/LayoutTests

Rename aspect-ratio/parsing/contain-intrinsic-size*
https://bugs.webkit.org/show_bug.cgi?id=221329

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-03
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Rename aspect-ratio/parsing/contain-intrinsic-size* since they deal with
parsing aspect-ratio, not contain-intrinsic-size.

Relevant WPT PR is https://github.com/web-platform-tests/wpt/pull/27457.

  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-computed-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-computed-expected.txt.
  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-computed.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-computed.html.
  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-invalid-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-invalid-expected.txt.
  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-invalid.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-invalid.html.
  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-valid-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-valid-expected.txt.
  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-valid.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-valid.html.

LayoutTests:

Remove entry for test that passes.

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

[LFC][IFC] Remove font.size() == 0 optimization in TextUtil::width
https://bugs.webkit.org/show_bug.cgi?id=221301

Reviewed by Simon Fraser.

It does not work with tabs (see tab-size property) and probably not much of a win anyway.

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::width):

7:08 AM Changeset in webkit [272313] by graouts@webkit.org
  • 20 edits in trunk

Add a loader for <model> resources
https://bugs.webkit.org/show_bug.cgi?id=221255

Reviewed by Youenn Fablet.

Source/WebCore:

In order to load <model> resources, we make the MediaResourceLoader constructor take
a FetchOptions::Destination to determine the type of resource loaded. We piggyback on
the media loading code for <model> resources since it handles things like CORS and CSP,
contrary to CachedRawResource.

  • Modules/fetch/FetchRequest.idl:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):

  • loader/FetchOptions.h:
  • loader/LinkLoader.cpp:

(WebCore::createLinkPreloadResourceClient):

  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResourceLoader::MediaResourceLoader):
(WebCore::MediaResourceLoader::contextDestroyed):
(WebCore::MediaResourceLoader::requestResource):

  • loader/MediaResourceLoader.h:
  • loader/ResourceLoadInfo.cpp:

(WebCore::ContentExtensions::toResourceType):

  • loader/SubresourceLoader.cpp:

(WebCore::logResourceLoaded):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::defaultPriorityForResourceType):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::createResource):
(WebCore::CachedResourceLoader::requestMedia):
(WebCore::contentTypeFromResourceType):
(WebCore::CachedResourceLoader::checkInsecureContent const):
(WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
(WebCore::destinationForType):

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

(WebCore::CachedResourceMediaLoader::create): Explicitly set the destination, which used to
default to EmptyString, to ensure we don't hit the ASSERT_NOT_REACHED() added to
CachedResourceLoader::requestMedia().

  • platform/network/ResourceRequestBase.h:

Source/WebKit:

  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::NetworkLoadChecker::isAllowedByContentSecurityPolicy):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::resourceLoadInfo):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::maximumBufferingTime):

Tools:

  • TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm:

(TestWebKitAPI::WebCoreNSURLSessionTest::SetUp):

6:40 AM Changeset in webkit [272312] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Handles cases when the candidate content is overflowing from the get-go
https://bugs.webkit.org/show_bug.cgi?id=221306

Reviewed by Antti Koivisto.

This is the case when we keep adding content to a line with "white-space: nowrap". At some point the candidate content overlaps from
the get-go and while the run is breakable, there's no trailing run.
(see imported/w3c/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-trailing-spaces-011.html).

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):

6:38 AM Changeset in webkit [272311] by weinig@apple.com
  • 19 edits
    10 adds in trunk

Add support for color(xyz ...) as part of CSS Color 4
https://bugs.webkit.org/show_bug.cgi?id=221190

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Add some new WPT tests for color(xyz ) that will be upstreamed shortly.

  • web-platform-tests/css/css-color/xyz-001-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-001.html: Added.
  • web-platform-tests/css/css-color/xyz-002-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-002.html: Added.
  • web-platform-tests/css/css-color/xyz-003-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-003.html: Added.
  • web-platform-tests/css/css-color/xyz-004-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-004.html: Added.
  • web-platform-tests/css/css-color/xyz-005-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-005.html: Added.

Source/WebCore:

Add final (for now) predefined color space supported by color() in CSS Color 4, XYZ.

The specific XYZ use by CSS is the XYZ with D50 white point. To make the generic
XYZA<T, WhitePoint> type work in the infrastrucure, the colorSpace member was removed
from the color types, and the mapping from ColorSpace enum value to ColorType was
converted to use template specialization and can now be extracted using the syntax:

ColorSpaceFor<ColorType>

This change also removed the inclusion of all of the color type specific serialiazation
function declarations in ColorSerialization.h, and instead moved them to the cpp file.
They weren't being used, and to support the XYZA<float, WhitePoint::D50> would have required
incluing more headers, which seemed like the wrong tradeoff. If accessing serialization
without constructing a WebCore::Color is useful in the future, we can always add them back.

Tests: imported/w3c/web-platform-tests/css/css-color/xyz-001.html

imported/w3c/web-platform-tests/css/css-color/xyz-002.html
imported/w3c/web-platform-tests/css/css-color/xyz-003.html
imported/w3c/web-platform-tests/css/css-color/xyz-004.html
imported/w3c/web-platform-tests/css/css-color/xyz-005.html

  • css/CSSValueKeywords.in:

Add xyz keyword.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorFunctionForXYZParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
Add parsing for color(xyz ) parameters. This can't reuse the RGB parameter
parsing because xyz does not allow percentages for any parameter.

  • platform/graphics/ColorConversion.h:

(WebCore::callWithColorType): Deleted.
Moved callWithColorType to ColorSpace.h, where it makes a bit more sense
now that the color mapping is also defined there. This puts most of the
color mapping in one place.

  • platform/graphics/ColorModels.h:

Add some needed includes that fiddling with headers exposed.

  • platform/graphics/ColorSerialization.cpp:

(WebCore::serialization):
(WebCore::serializationForCSS):
(WebCore::serializationForHTML):
(WebCore::serializationForRenderTreeAsText):

  • platform/graphics/ColorSerialization.h:

Add support for serializing XYZA<float, WhitePoint::D50>, taking the chance
to move all the unnecessarily exposed type specific serialization functions.

  • platform/graphics/ColorSpace.cpp:

(WebCore::operator<<):
Add support for XYZ_D50.

  • platform/graphics/ColorSpace.h:

Add color mapping replacing previous explicit static members for colorSpace
mapping which are no longer usable due to the generic nature of XYZA.

(WebCore::callWithColorType):
Moved from ColorConversion.h.

  • platform/graphics/ColorTypes.h:

Remove colorSpace members. Replaced by color space mapping in ColorSpace.h

  • platform/graphics/ColorUtilities.h:

(WebCore::isBlack):
(WebCore::isWhite):
Add overloads for XYZA needed by Color.

  • platform/graphics/ExtendedColor.h:

(WebCore::ExtendedColor::create):
Replace color.colorSpace with ColorSpaceFor<ColorType>.

  • platform/graphics/cg/ColorSpaceCG.cpp:

(WebCore::xyzD50ColorSpaceRef):

  • platform/graphics/cg/ColorSpaceCG.h:

(WebCore::cachedCGColorSpace):
Add CoreGraphics support for the XYZ color space. (kCGColorSpaceGenericXYZ maps to XYZ with a D50 white point.)

LayoutTests:

Remove now passing xyz test. Update comment for the other xyz test which is invalid.
Getting it removed in https://github.com/web-platform-tests/wpt/pull/27416.

  • fast/css/parsing-color-function-expected.txt:
  • fast/css/parsing-color-function.html:

Add xyz specific parsing tests, as the rgb ones can't be reusued due to xyz
not supporting percentages for any component.

6:28 AM Changeset in webkit [272310] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Use the overflowing run to decide if the unbreakable content should stay on the current line
https://bugs.webkit.org/show_bug.cgi?id=221295

Reviewed by Antti Koivisto.

When an unbreakable set of runs overflow the available space, we need to check if the content is allowed to get wrapped to the next line.
Let's use the _overflowing_ run's style to decided if the content stays on the line (e.g. white-space: nowrap)
e.g. <span><nowrap>this_content_should_not_wrapped</nowrap>this_overflows</span>
in this case the overflowing run's style allows wrapping so we wrap entire content (see imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-white-space-crash-002.html)

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):

6:04 AM Changeset in webkit [272309] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

[css-grid] max-height percentages are wrongly resolved for replaced grid items
https://bugs.webkit.org/show_bug.cgi?id=220733

Patch by Ziran Sun <Ziran Sun> on 2021-02-03
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

The following tests are imported from WPT.

  • web-platform-tests/css/css-grid/grid-items/grid-img-item-percent-max-height-001-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-img-item-percent-max-height-001.html: Added.

Source/WebCore:

Make replacedMinMaxLogicalHeightComputesAsNone check the override cb height. If the
override height is indefinite, this function should return true. Otherwise returns false.

This is an import of Chromium changes at
https://chromium-review.googlesource.com/c/chromium/src/+/2100771
and
https://chromium-review.googlesource.com/c/chromium/src/+/2287370.
The Chromium code checks on Quirks mode. In WebKit, this check doesn't seem making any
impact.
Test percentage-max-height-001.html already works in WebKit without this change. Test
percentage-max-height-002.html is not ported as it still doesn't work even with this
change. This change intends to fix the grid bug raised.

Test grid-img-item-percent-max-height-001.html was ported to WPT at
https://github.com/web-platform-tests/wpt/commit/4816b3d70f98777afd1757995af84c3adc67d433

Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-img-item-percent-max-height-001.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::replacedMinMaxLogicalHeightComputesAsNone const):

6:03 AM Changeset in webkit [272308] by commit-queue@webkit.org
  • 4 edits in trunk

[css-grid][css-flex] <table> grid item should fill the grid area for 'stretch'/'normal' self alignment
https://bugs.webkit.org/show_bug.cgi?id=191463

Patch by Ziran Sun <Ziran Sun> on 2021-02-03
Reviewed by Sergio Villar Senin.

Source/WebCore:

Avoid table sizing peculiarities for grid items. Let the grid render algorithm determine
the size of tables that are grid items. Don't let the intrinsic width of table columns
affect the width of the item. This change only deals with widths.

This is an import of Chromium changes at
https://chromium-review.googlesource.com/c/chromium/src/+/781859/
This issue seems only affect grid-items and not flexbox any more hence only changes from
grid are imported.

Test for this change has already been imported from WPT

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::updateLogicalWidth):

LayoutTests:

5:05 AM Changeset in webkit [272307] by commit-queue@webkit.org
  • 5 edits in trunk

Support aspect-ratio on grid items
https://bugs.webkit.org/show_bug.cgi?id=220977

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-03
Reviewed by Javier Fernandez.

Source/WebCore:

Support aspect-ratio for grid items by correcting
the auto-size determination for row/columns-axis
when the child has aspect-ratio set.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::hasAutoSizeInColumnAxis const):
(WebCore::RenderGrid::hasAutoSizeInRowAxis const):

  • rendering/RenderGrid.h:

LayoutTests:

Enable some tests that pass now.

3:48 AM Changeset in webkit [272306] by Ryan Haddad
  • 2 edits in trunk/Tools

Big Sur test262 queues failing download-built-product step
https://bugs.webkit.org/show_bug.cgi?id=221314

Reviewed by Aakash Jain.

  • CISupport/build-webkit-org/config.json: Since we are building both x86

and arm64 on Big Sur, we need to both architectures to be listed in the
config so that the test262 bots can find the archives.

3:13 AM Changeset in webkit [272305] by commit-queue@webkit.org
  • 23 edits
    1 copy
    2 moves
    5 adds
    1 delete in trunk/Source

MachSemaphore does not work well with IPC messages
https://bugs.webkit.org/show_bug.cgi?id=220919
<rdar://problem/73826848>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-02-03
Reviewed by Sam Weinig.

Move WTF::MachSemaphore to WebKit IPC::Semaphore. Currently the
MachSemaphore is useful only in cross-process IPC, implemented by the
IPC::.

Source/WebKit:

Adds a stub IPC::Semaphore to all non-COCOA platforms, so that
constructors do not need to ifdef'ed to be able to compile platforms
that do not yet support GPU process fully.

Implement move constructor and move assignment operator for Semaphore.
Makes it possible to create types that hold Semaphore but still are
decode()able from a IPC message. The decoded objects are held with
Optional, and this forces the subobjects to have move assignment
operator.

Add asserts that the moved-away object is not used. Add the asserts as
asserts on the call return values, so the values are also checked on
normal objects on normal operation.

Implement an encoder and decoder for IPC::Semaphore. Makes it possible
to send it via IPC as its own type, not as MachSendRight.

As an example, changes existing uses of MachSendRight for semaphores in
messages as Semaphores, described below.

No new tests, a refactor.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::createRenderingBackend):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUConnectionToWebProcess.messages.in:
  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::create):
(WebKit::RemoteRenderingBackend::RemoteRenderingBackend):
(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • Shared/RemoteRenderingBackendCreationParameters.h: Removed.

Changes RemoteRenderingBackend to receive its parameters from the normal
message parameters instead of redundant
RemoteRenderingBackendCreationParameters. The IPC generator already
generates 1:1 identical structure, it is just the message
Messages::GPUConnectionToWebProcess::CreateRenderingBackend. There is no
need to double-wrap the simple list of parameters. The double-wrapping
is a problem: The message system parameters are of ownership "const
reference", which is what is expected.
RemoteRenderingBackendCreationParameters contents were of ownership
"value", which works as expected only for simple primitive types.
Essentially previously calling the IPC function meant transfering
objects to RemoteRenderingBackendCreationParameters. This is not how the
IPC system is meant to work. The intention of a IPC call is to, by
default, reference its arguments for the purpose of encoding.

  • GPUProcess/media/RemoteAudioDestinationManager.cpp:

(WebKit::RemoteAudioDestination::create):
(WebKit::RemoteAudioDestination::RemoteAudioDestination):
(WebKit::RemoteAudioDestinationManager::createAudioDestination):

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

Receive the semaphore from RemoteAudioDestinationProxy. Previously
it was created during RemoteAudioDestination creation and
be sent back by RemoteAudioDestinationManager.

  • Platform/IPC/Semaphore.cpp: Renamed from Source/WTF/wtf/cocoa/MachSemaphore.cpp.

(IPC::Semaphore::encode const):
(IPC::Semaphore::decode):

  • Platform/IPC/Semaphore.h: Renamed from Source/WTF/wtf/cocoa/MachSemaphore.h.

(IPC::Semaphore::operator bool const):

  • Platform/IPC/cocoa/SemaphoreCocoa.cpp: Added.

(IPC::Semaphore::Semaphore):
(IPC::Semaphore::~Semaphore):
(IPC::Semaphore::operator=):
(IPC::Semaphore::signal):
(IPC::Semaphore::wait):
(IPC::Semaphore::waitFor):
(IPC::Semaphore::createSendRight const):
(IPC::Semaphore::encode const):
(IPC::Semaphore::decode):
(IPC::Semaphore::destroy):

  • Scripts/webkit/messages.py:
  • Scripts/webkit/messages_unittest.py:
  • Scripts/webkit/tests/Makefile:
  • Scripts/webkit/tests/MessageArgumentDescriptions.cpp:

(IPC::jsValueForArguments):
(IPC::messageArgumentDescriptions):

  • Scripts/webkit/tests/MessageNames.cpp:

(IPC::description):
(IPC::receiverName):
(IPC::isValidMessageName):

  • Scripts/webkit/tests/MessageNames.h:
  • Scripts/webkit/tests/TestWithMachSemaphore.messages.in: Copied from Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in.
  • Scripts/webkit/tests/TestWithMachSemaphoreMessageReceiver.cpp: Added.
  • Scripts/webkit/tests/TestWithMachSemaphoreMessages.h: Added.
  • Scripts/webkit/tests/TestWithMachSemaphoreMessagesReplies.h: Added.
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::connectToGPUProcess):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
  • WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:

(WebKit::RemoteAudioDestinationProxy::startRenderingThread):
(WebKit::RemoteAudioDestinationProxy::stopRenderingThread):
Change the semaphore usage from unique_ptr to the normal
object access. The semaphore is now created by the proxy,
so there is no unique_ptr.

(WebKit::RemoteAudioDestinationProxy::connectToGPUProcess):
(WebKit::RemoteAudioDestinationProxy::gpuProcessConnectionDidClose):

  • WebProcess/GPU/media/RemoteAudioDestinationProxy.h:

Changes RemoteAudioDestinationProxy to send its own semaphore from
WebProcess to GPUProcess. Previously the semaphore would be sent back by
RemoteAudioDestinationManager. Previously the code structure is more
complicated than neccessary, as the semaphore holder was being
null-checked, reset and re-seated. The WebProcess gets already to choose
the semaphores GPUProcess uses, so this should not increase security
surface. The change chosen here side-steps the shortcoming of the IPC
system where unpacking objects from the Reply messages mandates that a
constructed version of that type exists. For previous MachSendRight
empty-constructed object is simple, but for MachSemaphore
empty-constructed object creates unnecessary complication that is not
required otherwise at the moment. The alternative to what was chosen
here would be to hold with Optional<MachSemaphore> and add a
empty-initializing constructor to hold the object where to unpack the
semaphore object from the Reply.

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
2:34 AM Changeset in webkit [272304] by youenn@apple.com
  • 7 edits in trunk

Enable webrtc video capture in GPUProcess for iOS WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=220966

Reviewed by Eric Carlson.

Tools:

  • WebKitTestRunner/TestOptions.cpp:

LayoutTests:

Disable capture in GPUProcess for now in these tests as:

  • SpeechRecognition in GPUProcess needs some work
  • Internals API in platform/ios/mediastream/video-muted-in-background-tab.html are not supported with GPUProcess.
  • fast/speechrecognition/ios/audio-capture.html:
  • fast/speechrecognition/ios/restart-recognition-after-stop.html:
  • fast/speechrecognition/ios/start-recognition-then-stop.html:
  • platform/ios/mediastream/video-muted-in-background-tab.html:
2:15 AM WebKitGTK/Debugging edited by fred.wang@free.fr
(diff)
2:02 AM WebKitFlatpakSDK/DebugWithRR edited by fred.wang@free.fr
Add alternative way by running in the flatpack shell, as well as how … (diff)
1:44 AM Changeset in webkit [272303] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

Animation of "rotate" or "scale" property does not correctly account for static "translate" property
https://bugs.webkit.org/show_bug.cgi?id=219894
<rdar://problem/72342798>

Unreviewed build fix for Mojave.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateAnimations):

12:42 AM Changeset in webkit [272302] by commit-queue@webkit.org
  • 4 edits in trunk

[css-grid] WPT test css/css-grid/grid-model/grid-box-sizing-001.html fails
https://bugs.webkit.org/show_bug.cgi?id=204578

Patch by Ziran Sun <Ziran Sun> on 2021-02-03
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

All test cases in grid-box-sizing-001.html should pass now due to this change.

  • web-platform-tests/css/css-grid/grid-model/grid-box-sizing-001-expected.txt:

Source/WebCore:

For a positioned element that specified both top/bottom should be treated as though
it has a height explicitly specified. Check on this case is missing in
RenderGrid::layoutBlock. This change adds check on hasDefiniteLogicalHeight() and make
sure we have a specific value of logical-height for the positioned elment that has
both top/bottom specified.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutBlock):

12:30 AM Changeset in webkit [272301] by Carlos Garcia Campos
  • 5 edits in trunk/Source

[GTK][WPE] Reduce the use of SoupURI in preparation for libsoup3
https://bugs.webkit.org/show_bug.cgi?id=221251

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • platform/network/soup/AuthenticationChallengeSoup.cpp:

(WebCore::protectionSpaceServerTypeFromURL):
(WebCore::protectionSpaceFromSoupAuthAndURL):
(WebCore::AuthenticationChallenge::AuthenticationChallenge):
(WebCore::protectionSpaceServerTypeFromURI): Deleted.
(WebCore::protectionSpaceFromSoupAuthAndMessage): Deleted.

Source/WebKit:

  • UIProcess/API/glib/WebKitURISchemeRequest.cpp:

(webkit_uri_scheme_request_get_scheme):
(webkit_uri_scheme_request_get_path):

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_load_uri):

Feb 2, 2021:

11:35 PM Changeset in webkit [272300] by Antti Koivisto
  • 4 edits in trunk/Source/WebCore

Remove the Timer from Style::Scope
https://bugs.webkit.org/show_bug.cgi?id=221221

Reviewed by Sam Weinig.

Just request a rendering update instead. It already flushes any pending style scope updates.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::Scope):
(WebCore::Style::Scope::clearPendingUpdate):
(WebCore::Style::Scope::scheduleUpdate):
(WebCore::Style::Scope::pendingUpdateTimerFired): Deleted.

  • style/StyleScope.h:
11:14 PM Changeset in webkit [272299] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Avoid a virtual function call in HTMLFormControlElement::isDisabledOrReadOnly()
https://bugs.webkit.org/show_bug.cgi?id=221319

Reviewed by Wenson Hsieh.

Avoid calling isDisabledFormControl() which is a virtual function on Element.
HTMLFormControlElement is the only class in its hierarchy that implements this,
so we can just copy its implementation.

  • html/HTMLFormControlElement.h:

(WebCore::HTMLFormControlElement::isDisabledOrReadOnly const):

11:08 PM Changeset in webkit [272298] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Avoid a virtual function call in HTMLInputElement::value()
https://bugs.webkit.org/show_bug.cgi?id=221318

Reviewed by Wenson Hsieh.

Only file upload controls override getTypeSpecificValue(), so to avoid a virtual
function call, check the type first via canHaveTypeSpecificValue().

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::value const):

  • html/InputType.h:

(WebCore::InputType::canHaveTypeSpecificValue const):

9:23 PM Changeset in webkit [272297] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GLIB] Gardening debug timeouts

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/wpe/TestExpectations:
9:10 PM Changeset in webkit [272296] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

http/wpt/mediarecorder/mute-tracks.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=221195

Reviewed by Eric Carlson.

In case bot is slow, we were doing more than one analysis.
For each analysis, we were creating a new MediaElementSourceNode for the same video element which is not allowed.
Instead, do the AudioContext setup once and run the analysis steps as long as needed.

  • http/wpt/mediarecorder/mute-tracks-expected.txt:
  • http/wpt/mediarecorder/mute-tracks.html:
9:10 PM Changeset in webkit [272295] by Darin Adler
  • 2 edits in trunk/Source/WebCore

REGRESSION (r271439): null-dereference in useSmoothScrolling
https://bugs.webkit.org/show_bug.cgi?id=221302

Reviewed by Simon Fraser.

  • page/ScrollBehavior.cpp:

(WebCore::useSmoothScrolling): Move the null check before any dereferencing
of the element pointer.

8:00 PM Changeset in webkit [272294] by Ryan Haddad
  • 3 edits in trunk/Tools

Update Test262 bot to Big Sur
https://bugs.webkit.org/show_bug.cgi?id=218844

Unreviewed infrastructure fix.

  • CISupport/build-webkit-org/config.json: Remove an old trigger.
  • CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot): Fix typo in queue name.

7:08 PM Changeset in webkit [272293] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Add stub in ContentExtensionsBackend for HTTPS upgrade
https://bugs.webkit.org/show_bug.cgi?id=220959

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

In order for it to be called, I needed to remove a few unnecessary early returns that prevent us from doing trivial tasks like getting a Document pointer
if there are no WKContentRuleLists installed.
I also removed some dead code.

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::makeSecureIfNecessary):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForPingLoad):

  • page/UserContentProvider.cpp:

(WebCore::contentRuleListsEnabled):
(WebCore::UserContentProvider::processContentRuleListsForLoad):
(WebCore::contentExtensionsEnabled): Deleted.
(WebCore::UserContentProvider::actionsForResourceLoad): Deleted.
(WebCore::UserContentProvider::forEachContentExtension): Deleted.

  • page/UserContentProvider.h:
5:42 PM Changeset in webkit [272292] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r272229. rdar://problem/73907002

REGRESSION(r271744): Broke Microsoft live login in internal builds
https://bugs.webkit.org/show_bug.cgi?id=221271
<rdar://problem/73848416>

Reviewed by Alex Christensen.

If a user goes straight to login.live.com without first visiting
microsoft.com, we crash when checking for storage access because
we assume the user has interacted with the page. Since this is a
quirked flow, we should not assume that, and should insert the
domain into the database.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt): (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const): Deleted.
  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:

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

5:42 PM Changeset in webkit [272291] by Russell Epstein
  • 52 edits in branches/safari-611-branch/Source

Cherry-pick r271813. rdar://problem/73888012

Update availability annotations to match the macOS 11.0 and iOS 14.0 GM SDKs
https://bugs.webkit.org/show_bug.cgi?id=220874
<rdar://73474368>

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • API/JSContextPrivate.h:
  • API/JSContextRefPrivate.h:

Source/WebKit:

  • UIProcess/API/Cocoa/WKContentWorld.h:
  • UIProcess/API/Cocoa/WKError.h:
  • UIProcess/API/Cocoa/WKFindConfiguration.h:
  • UIProcess/API/Cocoa/WKFindResult.h:
  • UIProcess/API/Cocoa/WKFrameInfoPrivate.h:
  • UIProcess/API/Cocoa/WKHTTPCookieStorePrivate.h:
  • UIProcess/API/Cocoa/WKNavigationDelegate.h:
  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKOpenPanelParametersPrivate.h:
  • UIProcess/API/Cocoa/WKPDFConfiguration.h:
  • UIProcess/API/Cocoa/WKPreferences.h:
  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/API/Cocoa/WKScriptMessage.h:
  • UIProcess/API/Cocoa/WKScriptMessageHandlerWithReply.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKURLSchemeTaskPrivate.h:
  • UIProcess/API/Cocoa/WKUserContentController.h:
  • UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
  • UIProcess/API/Cocoa/WKUserScript.h:
  • UIProcess/API/Cocoa/WKUserScriptPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.h:
  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.h:
  • UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/API/Cocoa/_WKDownload.h:
  • UIProcess/API/Cocoa/_WKFrameTreeNode.h:
  • UIProcess/API/Cocoa/_WKInputDelegate.h:
  • UIProcess/API/Cocoa/_WKInspectorDebuggableInfo.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKResourceLoadDelegate.h:
  • UIProcess/API/Cocoa/_WKResourceLoadInfo.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsFirstParty.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsThirdParty.h:
  • UIProcess/API/Cocoa/_WKTextManipulationConfiguration.h:
  • UIProcess/API/Cocoa/_WKTextManipulationExclusionRule.h:
  • UIProcess/API/Cocoa/_WKTextManipulationItem.h:
  • UIProcess/API/Cocoa/_WKTextManipulationToken.h:
  • UIProcess/API/Cocoa/_WKUserContentWorld.h:
  • UIProcess/API/Cocoa/_WKUserStyleSheet.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:

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

5:42 PM Changeset in webkit [272290] by Russell Epstein
  • 5 edits
    1 delete in branches/safari-611-branch

Cherry-pick r271730. rdar://problem/73890237

Scroll-chaining not triggering before complete end of overscroll
https://bugs.webkit.org/show_bug.cgi?id=219960
<rdar://problem/72595521>

Reviewed by Tim Horton.

Source/WebCore:

Scroll latching for momentum scrolls was too sticky; it would keep latching to the same
scroller within a 100ms of the last event that was handled, which was exacerbated by the
fact that ScrollController can go into "ignoreMomentumScrolls" mode which results in
no visible scrolling but continued consumption of momentum wheel events.

Fix by releasing the latch as soon as we see the end of a momentum scroll,
so that we always re-evaluate latching at the start of the next gesture.

Tested by fast/scrolling/latching/nested-cross-axis-latch-expiration.html

  • page/scrolling/ScrollingTreeLatchingController.cpp: (WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent):

LayoutTests:

Adjusted test for new behavior. No longer need WK1 result.

  • fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt:
  • fast/scrolling/latching/nested-cross-axis-latch-expiration.html:
  • platform/mac-wk1/fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt: Removed.

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

5:41 PM Changeset in webkit [272289] by Russell Epstein
  • 4 edits
    5 adds in branches/safari-611-branch

Cherry-pick r271701. rdar://problem/73889964

Source/WebCore:
REGRESSION (Async overflow): Scroll stutters/blocked with nested scrolling
https://bugs.webkit.org/show_bug.cgi?id=219923
<rdar://72390196>

Reviewed by Sam Weinig.

When handling wheel events in overflow:scroll areas which are only scrollable on
one axis, particularly when nested, we need to account for the different
scrollability on each axis in a couple of places.

First, address the FIXME in ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection()
by consulting node scrollability; this prevents attempts to rubberband on a non-scrollable
axis.

Second, ScrollController should only allow stretching on a scrollable axis.

The effects of these changes are that we no longer keep sending events to a node which
ends up not handling them; this resulted in latching "timing out", re-hit-testing
in the middle of a gesture and causing stuttery position changes on a different
scroller.

Tests: fast/scrolling/latching/nested-cross-axis-latch-expiration.html

fast/scrolling/latching/overflow-hidden-on-one-axis.html

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: (WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection const):
  • platform/cocoa/ScrollController.mm: (WebCore::ScrollController::handleWheelEvent):
  • rendering/RenderLayerScrollableArea.cpp: (WebCore::RenderLayerScrollableArea::scrollTo): Add the scrollingNodeID to the logging.

LayoutTests:
REGRESSION (?): Scroll stutters/blocked with nested scrolling
https://bugs.webkit.org/show_bug.cgi?id=219923
<rdar://72390196>

Reviewed by Sam Weinig.

  • fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt: Added.
  • fast/scrolling/latching/nested-cross-axis-latch-expiration.html: Added.
  • fast/scrolling/latching/overflow-hidden-on-one-axis-expected.txt: Added.
  • fast/scrolling/latching/overflow-hidden-on-one-axis.html: Added.

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

5:41 PM Changeset in webkit [272288] by Russell Epstein
  • 11 edits
    18 adds in branches/safari-611-branch

Cherry-pick r272073. rdar://problem/73847891

font-stretch is not applied to system-ui
https://bugs.webkit.org/show_bug.cgi?id=221103
<rdar://problem/73719139>

Reviewed by Darin Adler.

Source/WebCore:

We just never hooked it up.

Tests: fast/text/system-font-width-2.html

fast/text/system-font-width-3.html
fast/text/system-font-width-4.html
fast/text/system-font-width-5.html
fast/text/system-font-width-6.html
fast/text/system-font-width-7.html
fast/text/system-font-width-8.html
fast/text/system-font-width-9.html
fast/text/system-font-width.html

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: (WebCore::SystemFontDatabaseCoreText::createSystemUIFont): (WebCore::SystemFontDatabaseCoreText::createSystemDesignFont): (WebCore::SystemFontDatabaseCoreText::createTextStyleFont): (WebCore::SystemFontDatabaseCoreText::createFontByApplyingWeightWidthItalicsAndFallbackBehavior): (WebCore::mapWeight): (WebCore::mapWidth): (WebCore::SystemFontDatabaseCoreText::systemFontParameters): (WebCore::SystemFontDatabaseCoreText::createFontByApplyingWeightItalicsAndFallbackBehavior): Deleted.
  • platform/graphics/cocoa/SystemFontDatabaseCoreText.h: (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::operator== const): (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::hash const):

Source/WebCore/PAL:

  • pal/spi/cocoa/CoreTextSPI.h:

Source/WTF:

  • wtf/PlatformHave.h:

LayoutTests:

  • fast/text/system-font-width-2-expected-mismatch.html: Added.
  • fast/text/system-font-width-2.html: Added.
  • fast/text/system-font-width-3-expected-mismatch.html: Added.
  • fast/text/system-font-width-3.html: Added.
  • fast/text/system-font-width-4-expected-mismatch.html: Added.
  • fast/text/system-font-width-4.html: Added.
  • fast/text/system-font-width-5-expected.html: Added.
  • fast/text/system-font-width-5.html: Added.
  • fast/text/system-font-width-6-expected-mismatch.html: Added.
  • fast/text/system-font-width-6.html: Added.
  • fast/text/system-font-width-7-expected-mismatch.html: Added.
  • fast/text/system-font-width-7.html: Added.
  • fast/text/system-font-width-8-expected-mismatch.html: Added.
  • fast/text/system-font-width-8.html: Added.
  • fast/text/system-font-width-9-expected-mismatch.html: Added.
  • fast/text/system-font-width-9.html: Added.
  • fast/text/system-font-width-expected-mismatch.html: Added.
  • fast/text/system-font-width.html: Added.
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:

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

5:41 PM Changeset in webkit [272287] by Russell Epstein
  • 4 edits in branches/safari-611-branch/PerformanceTests

Cherry-pick r272044. rdar://problem/73847930

MotionMark focus test can cause extreme variance in whichever test runs directly after it
https://bugs.webkit.org/show_bug.cgi?id=221075
<rdar://problem/72143661>

Reviewed by Said Abou-Hallawa.

The focus test loads up the window server with work, which runs asynchronously from WebKit's run loop.
This means that the window server can still be busy when the next test starts.

In r270959 we already tried to combat this, and it was mostly successful, but not as successful as we'd
like. This patch goes further by:

  1. Bumping up the warmup timeout to 2000ms from 1000ms
  2. Making the warmup render at least 30 frames. This means that a single extremely long frame can't fill up the entire warmup period.
  • MotionMark/developer.html:
  • MotionMark/resources/runner/motionmark.js: (this.clear):
  • MotionMark/tests/resources/main.js: (Benchmark.Utilities.createClass): (_animateLoop):

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

5:41 PM Changeset in webkit [272286] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r272040. rdar://problem/73887486

[WebAuthn] Adopt new SPI to show no credentials error for the platform authenticator
https://bugs.webkit.org/show_bug.cgi?id=220894
<rdar://problem/73538568>

Reviewed by Brent Fulgham.

Covered by manual tests.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm: (WebKit::AuthenticatorPresenterCoordinator::updatePresenter):

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

5:41 PM Changeset in webkit [272285] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r272024. rdar://problem/73847822

AX: Long narrow tables should not be made in data tables unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=221061
<rdar://problem/73681149>

Reviewed by Zalan Bujtas.

Source/WebCore:

Some web authors use long columns/rows of cells for layout purposes. We shouldn't
automatically turn these into data tables based on row count only.
Instead let's ensure there are at least two rows/cols of content before automatically
turning into a data table.

Test: accessibility/narrow-tables-ignored.html

  • accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::isDataTable const):

LayoutTests:

  • accessibility/narrow-tables-ignored-expected.txt: Added.
  • accessibility/narrow-tables-ignored.html: Added.

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

5:41 PM Changeset in webkit [272284] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271958. rdar://problem/73887977

Use SFTranscription instead of SFTranscriptionSegment for SpeechRecognitionAlternative
https://bugs.webkit.org/show_bug.cgi?id=221026

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-01-27
Reviewed by Youenn Fablet.

So SpeechRecognitionAlternative contains a sentence instead of a word, which matches Blink's behavior.

Manually tested in MiniBrowser.

  • Modules/speech/cocoa/WebSpeechRecognizerTask.mm: (-[WebSpeechRecognizerTaskImpl callbackWithTranscriptions:isFinal:]): (-[WebSpeechRecognizerTaskImpl speechRecognitionTask:didHypothesizeTranscription:]): (-[WebSpeechRecognizerTaskImpl speechRecognitionTask:didFinishRecognition:]): (-[WebSpeechRecognizerTaskImpl callbackWithResult:isFinal:]): Deleted.

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

5:41 PM Changeset in webkit [272283] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebInspectorUI

Cherry-pick r271953. rdar://problem/73847831

Web Inspector: REGRESSION(r269166): not enough space around up/down arrows in execution context picker
https://bugs.webkit.org/show_bug.cgi?id=221014
<rdar://problem/73635556>

Patch by Razvan Caliman <Razvan Caliman> on 2021-01-27
Reviewed by BJ Burg.

Fix shorthand notation for logical property margin-start
used on active execution context picker.

  • UserInterface/Views/QuickConsole.css: (.quick-console > .navigation-bar .active-execution-context > .selector-arrows):

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

5:41 PM Changeset in webkit [272282] by Russell Epstein
  • 15 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271930. rdar://problem/73886919

REGRESSION (r271584): Hovering slowly over and out of "Top 100" items on liberation.fr does not restore animated state
https://bugs.webkit.org/show_bug.cgi?id=220862
<rdar://problem/73501684>

Reviewed by Simon Fraser.

Source/WebCore:

The optimization in r271584 fails to invalidate hover/active style when clearing the existing state under some circumstances.

Test: fast/selectors/hover-invalidation-descendant-clear.html

  • dom/Document.cpp: (WebCore::Document::updateHoverActiveState):

We would do descendant invalidation when changing the hover/active state of the rootmost changing element.
However since the state of descendants was changed before this invalidation happened we would try to invalidate
them in a tree that was already in the new state.

Fix by scoping the descendant invalidation over all changes.

  • dom/Element.cpp: (WebCore::Element::setActive): (WebCore::Element::setHovered):

Switch to new 3-state enum type that allows us to skip descendant invalidation that has already been done by the caller.
Skope it to Style namepace.

  • dom/Element.h:
  • html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive):
  • html/HTMLAnchorElement.h:
  • html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::setActive): (WebCore::HTMLLabelElement::setHovered):
  • html/HTMLLabelElement.h:
  • html/shadow/SpinButtonElement.cpp: (WebCore::SpinButtonElement::setHovered):
  • html/shadow/SpinButtonElement.h:
  • style/PseudoClassChangeInvalidation.cpp: (WebCore::Style::PseudoClassChangeInvalidation::computeInvalidation):
  • style/PseudoClassChangeInvalidation.h: (WebCore::Style::PseudoClassChangeInvalidation::PseudoClassChangeInvalidation):
  • style/StyleValidity.h:

LayoutTests:

  • fast/selectors/hover-invalidation-descendant-clear-expected.html: Added.
  • fast/selectors/hover-invalidation-descendant-clear.html: Added.

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

5:41 PM Changeset in webkit [272281] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebInspectorUI

Cherry-pick r271927. rdar://problem/73887777

REGRESSION(r270637) Filtering does not work in Styles sidebar panel
https://bugs.webkit.org/show_bug.cgi?id=220993
<rdar://problem/73623818>

Patch by Razvan Caliman <Razvan Caliman> on 2021-01-26
Reviewed by Devin Rousso.

Stop expecting StyleDetailsPanel to define an abstract filterDidChange() method.
Subclasses implement their own on a per-use case basis.

  • UserInterface/Views/ComputedStyleDetailsPanel.js: (WI.ComputedStyleDetailsPanel.prototype.filterDidChange):
  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel.prototype.filterDidChange):

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

5:41 PM Changeset in webkit [272280] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Source

Cherry-pick r271926. rdar://problem/73889676

REGRESSION(r267641): WebKitDeveloperExtras preference has no effect for WebKitLegacy clients
https://bugs.webkit.org/show_bug.cgi?id=220996
<rdar://72173139>

Reviewed by Sam Weinig.

Source/WebKitLegacy/mac:

Read back this preference when propagating it, because the value depends on
more than just the preference key. For example, it allows Debug builds to act
as if the preference is always enabled.

  • WebView/WebView.mm: (-[WebView _preferencesChanged:]):

Source/WTF:

This preference should use custom bindings for WebKitLegacy.

  • Scripts/Preferences/WebPreferencesDebug.yaml:

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

5:41 PM Changeset in webkit [272279] by Russell Epstein
  • 20 edits
    2 copies
    1 add in branches/safari-611-branch/Source

Cherry-pick r271880. rdar://problem/73889737

WebGL power preference and discrete/internal gpu selection implemented incorrectly with ANGLE
https://bugs.webkit.org/show_bug.cgi?id=220843

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

Source/WebCore:

Use ANGLE extension EGL_ANGLE_power_preference to signal to ANGLE that the underlying
CGL context should be updated as a response to display reconfiguration signal.
This ensures that ANGLE state stays consistent with the actual CGL context behavior, as
we don't change the context behind ANGLE's back.

Remove the feature where the context GPU is selected based on the display the window is
on. This cannot work with the logic of "powerPreference = "high-performance" goes to
discrete GPU". Also, this cannot work with ANGLE at all, since all contexts are backed
by a single platform context. Thus all contexts will use the same underlying GPU.

No new tests due to the test runner missing features. The bug blockers track the testing.

  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/WebGLRenderingContextBase.cpp: (WebCore::isHighPerformanceContext):
  • page/Chrome.cpp: (WebCore::Chrome::windowScreenDidChange):
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.cpp:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.h:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::create): (WebCore::GraphicsContextGLOpenGL::createShared): (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::setContextVisibility): (WebCore::GraphicsContextGLOpenGL::displayWasReconfigured): (WebCore::GraphicsContextGLOpenGL::simulateContextChanged):
  • platform/graphics/mac/GraphicsChecksMac.cpp: Added. (WebCore::attachToAppleGraphicsControl): (WebCore::hasMuxCapability): (WebCore::hasLowAndHighPowerGPUs):
  • platform/graphics/mac/GraphicsChecksMac.h: Copied from Source/WebKit/WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.h.
  • platform/graphics/mac/ScopedHighPerformanceGPURequest.h: Copied from Source/WebCore/platform/graphics/mac/SwitchingGPUClient.h. (WebCore::ScopedHighPerformanceGPURequest::ScopedHighPerformanceGPURequest): (WebCore::ScopedHighPerformanceGPURequest::~ScopedHighPerformanceGPURequest): (WebCore::ScopedHighPerformanceGPURequest::operator=): (WebCore::ScopedHighPerformanceGPURequest::acquire):
  • platform/graphics/mac/SwitchingGPUClient.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: (WebCore::GraphicsContextGLOpenGLManager::displayWasReconfigured): (WebCore::GraphicsContextGLOpenGLManager::addContext): (WebCore::GraphicsContextGLOpenGLManager::removeContext):
  • platform/graphics/opengl/GraphicsContextGLOpenGLManager.h:
  • testing/Internals.cpp:

Source/WebKit:

Move the high-performance GPU shutdown timer from individual web processes to the main class
in the ui process. This simplifies the implementation and reduces the number of timers.

  • UIProcess/mac/HighPerformanceGPUManager.h:
  • UIProcess/mac/HighPerformanceGPUManager.mm: (WebKit::HighPerformanceGPUManager::HighPerformanceGPUManager): (WebKit::HighPerformanceGPUManager::removeProcessRequiringHighPerformance): (WebKit::HighPerformanceGPUManager::updateState):
  • WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.cpp: (WebKit::WebSwitchingGPUClient::requestHighPerformanceGPU): (WebKit::WebSwitchingGPUClient::releaseHighPerformanceGPU):
  • WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.h:

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

5:41 PM Changeset in webkit [272278] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/JavaScriptCore

Cherry-pick r271876. rdar://problem/73887844

Crash when remote inspecting in debug builds
https://bugs.webkit.org/show_bug.cgi?id=220956
<rdar://73379637>

Reviewed by Devin Rousso.

Convert RemoteConnectionToTarget from using BlockPtr<> to Function<> because BlockPtr<>
was triggering crashes which seem to be related to mixing ARC and non-ARC code.

  • inspector/remote/RemoteConnectionToTarget.h:
  • inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm: (Inspector::RemoteTargetHandleRunSourceGlobal): (Inspector::RemoteTargetQueueTaskOnGlobalQueue): (Inspector::RemoteTargetHandleRunSourceWithInfo): (Inspector::RemoteConnectionToTarget::dispatchAsyncOnTarget): (Inspector::RemoteConnectionToTarget::setup): (Inspector::RemoteConnectionToTarget::close): (Inspector::RemoteConnectionToTarget::sendMessageToTarget): (Inspector::RemoteConnectionToTarget::queueTaskOnPrivateRunLoop): (Inspector::RemoteConnectionToTarget::takeQueue):

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

5:41 PM Changeset in webkit [272277] by Russell Epstein
  • 3 edits
    3 deletes in branches/safari-611-branch/LayoutTests

Cherry-pick r271810. rdar://problem/73889904

REGRESSION (Big Sur): Some tests in http/tests/security/http-0.9 flakily fail
https://bugs.webkit.org/show_bug.cgi?id=220188
<rdar://problem/72709565>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-25
Reviewed by Alexey Proskuryakov.

rdar://69534004 caused two tests to become flaky on Big Sur.
That change was correct, but caused issues with our test infrastructure.
r271652 successfully made default-port-script-blocked.html no longer flaky, but made default-port-plugin-blocked.html a flaky timeout.
Now that all plugins are blocked, let's just remove this test, which is no longer needed.

  • http/tests/security/http-0.9/default-port-plugin-blocked-expected.txt: Removed.
  • http/tests/security/http-0.9/default-port-plugin-blocked.html: Removed.
  • http/tests/security/http-0.9/resources/nph-load-plugin-fail.pl: Removed.
  • platform/mac-wk1/TestExpectations:
  • platform/wk2/TestExpectations:

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

5:41 PM Changeset in webkit [272276] by Russell Epstein
  • 13 edits in branches/safari-611-branch

Cherry-pick r271797. rdar://problem/73847580

Activate simulcast through addTransceiver
https://bugs.webkit.org/show_bug.cgi?id=173262
<rdar://problem/32713416>

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCPeerConnection-addTransceiver.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-transceivers.https-expected.txt:
  • web-platform-tests/webrtc/protocol/simulcast-offer-expected.txt:

Source/WebCore:

Update WebIDL according latest version of the spec.
Add binding code to go from WebIDL to webrtc backend for sendEncodings parameters.
Minor refactoring to bring to web pages information on addTransceiver failures.

Covered by rebased tests.

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCPeerConnection.idl:
  • Modules/mediastream/RTCRtpEncodingParameters.idl:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::createTransceiverBackends): (WebCore::LibWebRTCMediaEndpoint::addTransceiver):
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::LibWebRTCPeerConnectionBackend::addTransceiverFromTrackOrKind):
  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp: (WebCore::fromRTCEncodingParameters): (WebCore::fromRtpTransceiverInit):

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

5:41 PM Changeset in webkit [272275] by Russell Epstein
  • 7 edits
    4 adds in branches/safari-611-branch

Cherry-pick r271796. rdar://problem/73847788

AX: @alt and bounds ignored when using img[src] points to an inaccessible SVG
https://bugs.webkit.org/show_bug.cgi?id=160705
<rdar://problem/27771579>

Reviewed by Chris Fleizach and Darin Adler.

Source/WebCore:

Tests: accessibility/img-with-svg-source.html

accessibility/ios-simulator/img-with-svg-source.html

The problem was caused by AccessibilityRenderObject::determineAccessibilityRole
that was returning AccessibilityRole::SVGRoot for all images with a remote
SVG source, regardless whether the SVG hierarchy contained some accessibility
data or not. This resulted in VoiceOver reading the image like an empty
group on Mac, or completely ignoring the image on iOS.
The solution in this patch is to only return AccessibilityRole::SVGRoot
if the SVG has some accessibility conveyable data. Added the method
AccessibilitySVGRoot::hasAccessibleContent for this purpose.

  • accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): (WebCore::AccessibilityRenderObject::remoteSVGRootElement const): Comment was missplaced, moved it to the right place. (WebCore::AccessibilityRenderObject::addRemoteSVGChildren):
  • accessibility/AccessibilitySVGRoot.cpp: (WebCore::AccessibilitySVGRoot::hasAccessibleContent const):
  • accessibility/AccessibilitySVGRoot.h:

LayoutTests:

  • accessibility/img-with-svg-source-expected.txt: Added.
  • accessibility/img-with-svg-source.html: Added.
  • accessibility/ios-simulator/img-with-svg-source-expected.txt: Added.
  • accessibility/ios-simulator/img-with-svg-source.html: Added.
  • accessibility/svg-shape-labelled-expected.txt:
  • accessibility/svg-shape-labelled.html: Removed the <img> test cases since they are covered correctly in the new test img-with-svg-source.html.

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

5:40 PM Changeset in webkit [272274] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source/ThirdParty/libwebrtc

Cherry-pick r271793. rdar://problem/73887809

Resync libwebrtc with M87 latest branch
https://bugs.webkit.org/show_bug.cgi?id=220913

Reviewed by Eric Carlson.

Cherry-picking two changes that have been cherry-picked in upstream M87 after our latest resync.
This includes: https://webrtc-review.googlesource.com/c/src/+/187349 and https://webrtc-review.googlesource.com/c/src/+/191485.

  • Source/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc:
  • Source/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h:
  • Source/webrtc/modules/audio_coding/codecs/opus/opus_interface.cc:
  • Source/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc:
  • Source/webrtc/modules/audio_coding/test/TestVADDTX.cc:
  • Source/webrtc/pc/peer_connection_rtp_unittest.cc:
  • Source/webrtc/pc/sdp_offer_answer.cc:

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

5:40 PM Changeset in webkit [272273] by Russell Epstein
  • 10 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271790. rdar://problem/73847621

AX: iOS: VO: Web: Column Names Not Announced
https://bugs.webkit.org/show_bug.cgi?id=220829
<rdar://problem/73469037>

Reviewed by Zalan Bujtas.

Source/WebCore:

We no longer use containedInTraits, but mean to override the tableAncestor methods.
Those need to account for the three types of tables.

Test: accessibility/ios-simulator/table-ancestory.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]): (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):

Tools:

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: (WTR::AccessibilityUIElement::isInTable const): (WTR::AccessibilityUIElement::isInLandmark const): (WTR::AccessibilityUIElement::isInList const):
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::isInTable const): (WTR::AccessibilityUIElement::isInLandmark const): (WTR::AccessibilityUIElement::isInList const):

LayoutTests:

  • accessibility/ios-simulator/table-ancestory.html: Added.
  • accessibility/ios-simulator/table-ancestory-expected.txt: Added.
  • accessibility/ios-simulator/tables-lists.html: Updated.

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

5:40 PM Changeset in webkit [272272] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271733. rdar://problem/73887744

Protect against sampleRate being 0 in IIRFilter::tailTime()
https://bugs.webkit.org/show_bug.cgi?id=220837
<rdar://73395924>

Reviewed by Eric Carlson.

  • platform/audio/IIRFilter.cpp: (WebCore::IIRFilter::tailTime): Return early if sampleRate is 0 (invalid). Add a release assertion to make sure that numberOfBlocks is greater than 0 since this is the size of the |magnitude| array and we access magnitude[0] later on.

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

5:40 PM Changeset in webkit [272271] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebInspectorUI

Cherry-pick r271726. rdar://problem/73889694

Web Inspector: Fix bidi confusion when evaluation result has RTL text
https://bugs.webkit.org/show_bug.cgi?id=220639

Patch by Ebrahim Byagowi <ebrahim@gnu.org> on 2021-01-21
Reviewed by BJ Burg.

Apply unicode-bidi: isolate to formatted string and regexp so that
when they contain RTL text the bidi algorithm won't mix
saved variable name ($1, $2, ...) with the content.

  • UserInterface/Views/FormattedValue.css: (.formatted-string, .formatted-regexp):

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

5:40 PM Changeset in webkit [272270] by Russell Epstein
  • 5 edits in branches/safari-611-branch

Cherry-pick r271696. rdar://problem/73887913

Check for TURN username/credentials sizes in RTCPeerConnection constructor
https://bugs.webkit.org/show_bug.cgi?id=220789

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated test.

  • Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::iceServersFromConfiguration):

LayoutTests:

  • webrtc/stun-server-filtering-expected.txt:
  • webrtc/stun-server-filtering.html:

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

5:40 PM Changeset in webkit [272269] by Russell Epstein
  • 2 edits
    4 copies
    6 adds in branches/safari-611-branch/LayoutTests

Cherry-pick r271674. rdar://problem/73889860

[ Big Sur ] platform/mac/fast/text/international/bidi-fallback-font-weight.html is failing
https://bugs.webkit.org/show_bug.cgi?id=220756
<rdar://problem/73048055>

Unreviewed test gardening.

  • platform/mac-catalina/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac-catalina/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac-mojave/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac-mojave/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac/TestExpectations:
  • platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt:

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

5:40 PM Changeset in webkit [272268] by Russell Epstein
  • 3 edits
    9 adds in branches/safari-611-branch

Cherry-pick r271651. rdar://problem/73889797

REGRESSION (Big Sur): position:absolute elements inside nested overflow:scroll don't track scrolling
https://bugs.webkit.org/show_bug.cgi?id=220761
<rdar://problem/69075263>

Reviewed by Antti Koivisto.
Source/WebCore:

When a position:absolute element is inside nested overflow scroll, and its containing block is the outer
scroller, then we failed to make a positioning scrolling tree node for it, so it would fail
to track during async scrolling.

The bug was that RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor() failed
to deal with nested scrollers. The correct question to ask when determining if we need a "Moves" node
is "is there an overflow scroll layer between this layer and its composited ancestor". Previously,
we would just find the enclosing scroller (with the same scrolling scope) and assume we didn't need
a node.

We can also simplify the "Stationary" code path to just ask about scrolling scopes.

Tests: scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-2.html

scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking.html
scrollingcoordinator/ios/absolute-in-nested-overflow-scroll.html
scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll.html

  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor): (WebCore::isScrolledByOverflowScrollLayer): Deleted. (WebCore::enclosingCompositedScrollingLayer): Deleted.

LayoutTests:

Add a scrolling tree dump test, and three iOS interactive tests, since testing scrolling-tree-only
behaviors is easier on iOS than macOS. absolute-in-nested-overflow-scroll.html is the basic test.
The two "stacking" variants have an opacity layer below and above the inner scroller to test some
more layer configurations.

  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll-expected.txt: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-expected.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-2-expected.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-2.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-expected.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll.html: Added.
  • scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll.html: Added.

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

5:40 PM Changeset in webkit [272267] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271744. rdar://problem/73886483

Denying storage access on playstation.com then clicking sign-in fails to show the prompt again
https://bugs.webkit.org/show_bug.cgi?id=220838
<rdar://problem/73477444>

Reviewed by Alex Christensen.

Temporary cross-page storage access in the Web Process for quirks
should only be granted if the user hits "Allow" on the prompt.
This was causing the prompt to fail to show if a user clicks "Don't
Allow" then tries to sign in, then sign-in would fail without
storage access in the Network Process.

  • page/Quirks.cpp: (WebCore::Quirks::requestStorageAccessAndHandleClick const):

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

5:40 PM Changeset in webkit [272266] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r272072. rdar://problem/73890534

[iOS] Stop observing changes in one preference domain
https://bugs.webkit.org/show_bug.cgi?id=221130
<rdar://problem/70729182>

Reviewed by Brent Fulgham.

It has been determined that there is no need to observe preference changes in the domain 'com.apple.Preferences'.

  • UIProcess/Cocoa/PreferenceObserver.mm: (-[WKPreferenceObserver init]):

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

5:40 PM Changeset in webkit [272265] by Russell Epstein
  • 4 edits in branches/safari-611-branch/LayoutTests

Cherry-pick r272030. rdar://problem/73890478

REGRESSION(r271119) Check for nullness of preamble.caller
https://bugs.webkit.org/show_bug.cgi?id=220610

Reviewed by Yusuke Suzuki.

r271119 changed some kinds of functions to return null when trying to
access its caller property.

This made the preamble helper from indexeddb tests to fail when used
in places like arrow functions, like in
storage/indexeddb/result-request-cycle.html.

This commit makes preamble default to an empty name if the caller is
null.

  • http/tests/IndexedDB/resources/shared.js: (preamble):
  • imported/blink/storage/indexeddb/resources/shared.js: (preamble):
  • storage/indexeddb/resources/shared.js: (preamble):

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

5:40 PM Changeset in webkit [272264] by Russell Epstein
  • 6 edits
    11 adds in branches/safari-611-branch

Cherry-pick r272004. rdar://problem/73890647

REGRESSION(r268615): images flicker on apple.com/ios/ios-14
https://bugs.webkit.org/show_bug.cgi?id=221054
<rdar://problem/72880447>

Reviewed by Dean Jackson.

Source/WebCore:

When we added support for accelerated animations of individual transform properties in r268615 (bug 217842),
we made it so that base values of each transform-related property had a non-interpolating animation in the
Core Animation animations list that would combine with interpolating animations for that property as additive
animations. Prior to any of those animations, we'd reset the combined transform with an identity transform
as another non-interpolating animation.

However, we neglected to consider the case where one of the interpolating animations would not start right
away if a positive delay was set. In the case of this apple.com page, the target element would be composited
due to a "will-change: transform" style, and a non-animated "transform" was set as well as an animation for
the "transform" property with a delay.

Since we had a "transform" animation, we'd create a Core Animation animations lists as follows:

  1. non-interpolating, non-additive animation set to the identity matrix
  2. interpolating, additive animation with the keyframes set in the CSS animation, with a begin time set to the current time plus the specified delay

The result of this was that during the animation delay, the static "transform" property was overridden
by animation #1 until animation #2 would kick in.

We now make it so that for each transform-related property, we create a non-interpoloating, additive animation
to represent the static value for that property for the duration of any potential delay until the first
interpolating animation for this property starts.

In this example, the Core Animation animations list is now as follows:

  1. non-interpolating, non-additive animation set to the identity matrix
  2. non-interpolating, additive animation set to the static transform value
  3. interpolating, additive animation with the keyframes set in the CSS animation, with a begin time set to the current time plus the specified delay

We implement this with a new lambda function within GraphicsLayerCA::updateAnimations() called
addAnimationsForProperty() which adds a non-interpolating animation in two cases:

  1. if there is no animation for this property at all, making it last forever
  2. if all animations have a delay, making it last until the first animation starts

Tests: webanimations/multiple-transform-properties-and-multiple-transform-properties-animation-with-delay-on-forced-layer.html

webanimations/rotate-property-and-rotate-animation-with-delay-on-forced-layer.html
webanimations/scale-property-and-scale-animation-with-delay-on-forced-layer.html
webanimations/transform-property-and-transform-animation-with-delay-on-forced-layer.html
webanimations/translate-property-and-translate-animation-with-delay-on-forced-layer.html

  • platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateAnimations):

LayoutTests:

Add a series of tests ensuring that starting an animation for transform-related properties does not clobber the static
value for this property. We only run those tests on WK2 because running those in WK1 is flaky as there doesn't seem
to be a solid test utility to determine that Core Animation animations have been committed, even with long delays
that would make tests run slow.

  • TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • webanimations/multiple-transform-properties-and-multiple-transform-properties-animation-with-delay-on-forced-layer-expected.html: Added.
  • webanimations/multiple-transform-properties-and-multiple-transform-properties-animation-with-delay-on-forced-layer.html: Added.
  • webanimations/resources/wait-until-animations-are-committed.js: Added.
  • webanimations/rotate-property-and-rotate-animation-with-delay-on-forced-layer-expected.html: Added.
  • webanimations/rotate-property-and-rotate-animation-with-delay-on-forced-layer.html: Added.
  • webanimations/scale-property-and-scale-animation-with-delay-on-forced-layer-expected.html: Added.
  • webanimations/scale-property-and-scale-animation-with-delay-on-forced-layer.html: Added.
  • webanimations/transform-property-and-transform-animation-with-delay-on-forced-layer-expected.html: Added.
  • webanimations/transform-property-and-transform-animation-with-delay-on-forced-layer.html: Added.
  • webanimations/translate-property-and-translate-animation-with-delay-on-forced-layer-expected.html: Added.
  • webanimations/translate-property-and-translate-animation-with-delay-on-forced-layer.html: Added.

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

5:40 PM Changeset in webkit [272263] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271895. rdar://problem/73890430

REGRESSION(r261238): WKWebView crashes on launch inside a quicklook preview
https://bugs.webkit.org/show_bug.cgi?id=219632
<rdar://problem/72154830>

Reviewed by Alexey Proskuryakov.

Partially revert r261238 to allow applications without access to 'nsurlsessiond' to still
be able to use WebKit for local file access. This workaround should be removed once we
complete the work needed to support true offline WebKit use.

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm: (WebKit::XPCServiceInitializerDelegate::checkEntitlements): Add an early return if the application possesses the 'com.apple.security.network.client' entitlement.

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

5:40 PM Changeset in webkit [272262] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271890. rdar://problem/73890942

[CoreIPC] Add size check in decodeSharedBuffer to allow it to be validated against the SharedMemory received
https://bugs.webkit.org/show_bug.cgi?id=220962
<rdar://problem/68204552>

Reviewed by Darin Adler.

Add a new check during decoding so that we fail if the expected buffer size is larger than the block of
shared memory supplied in the IPC call.

  • Shared/WebCoreArgumentCoders.cpp: (IPC::decodeSharedBuffer):

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

5:40 PM Changeset in webkit [272261] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271861. rdar://problem/73890854

[iOS] Obscured elements should not be focusable using the accessory bar
https://bugs.webkit.org/show_bug.cgi?id=220929
<rdar://problem/73239409>

Reviewed by Tim Horton.

Source/WebCore:

  • rendering/HitTestResult.h:

Export function so it can be called from WebKit layer.

Source/WebKit:
Currently, assistable elements hidden behind unassistable elements can
be focused using the next/previous buttons on the accessory bar. This
behavior is undesirable since users cannot see the focused element, but
are still presented UI to enter information into the element.

While the current behavior has been longstanding, its undesirability was
exposed after r269059, which made it possible to use the accessory bar
to focus elements across focusable scopes. As a result, it became possible
to focus a hidden input field on appleid.apple.com using the accessory bar.
Note that the hidden field is inside a subframe, which was previously
excluded from accessory bar next/previous operations. However, the same
bug would still exist even if the field was not inside a subframe, which
means that r269059 is not the root cause of the issue, but simply exposed
a larger underlying problem.

To prevent obscured elements from being focusable using the accessory bar,
we now use hit testing to determine whether or not an element is obscured,
before considering the element "assistable".

Test: fast/forms/ios/accessory-bar-navigation-obscured-input.html

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::isObscuredElement):

An element is considered obscured if a hit test at its center position
relative to the main document targets a different element.

(WebKit::nextAssistableElement):

Obscured elements should not be assistable.

LayoutTests:

  • fast/forms/ios/accessory-bar-navigation-obscured-input-expected.txt: Added.
  • fast/forms/ios/accessory-bar-navigation-obscured-input.html: Added.

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

5:40 PM Changeset in webkit [272260] by Russell Epstein
  • 19 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271786. rdar://problem/73890368

[iOS WK2] theverge.com - rubber band scrolling at the top of the page causes an abrupt jump
https://bugs.webkit.org/show_bug.cgi?id=220886
<rdar://71177566>

Reviewed by Sam Weinig.
Source/WebCore:

theverge.com on iOS is a page that has long main thread stalls with forced layouts on a timer
that alter the page height; this caused the post-layout updateScrollbars() called from
FrameView::adjustViewSize() to call scrollToPosition() after adjusting the scroll position
to the allowed range.

If the page laid out while rubberbanding was happening, the current scroll position would
be negative, then clamped to 0, then sent to the UI process as a requested scroll to 0,
triggering the jump to top in the UI process.

There's existing code to prevent this from happening if we know that rubberbanding is
happening; this patch makes isRubberBandInProgress() work for iOS WK2. It does so
by having updateVisibleContentRects() push information about rubberbanding nodes onto
RemoteScrollingCoordinator.

We remove an unnecessary shouldUpdateScrollLayerPositionSynchronously() check in
FrameView::isRubberBandInProgress() - if it's true, then the scrolling coordinator
won't see any rubberbanding nodes anyway.

Test: fast/scrolling/ios/content-size-change-during-rubberband.html

  • page/FrameView.cpp: (WebCore::FrameView::isRubberBandInProgress const):
  • page/FrameView.h:
  • platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars):

Source/WebKit:

theverge.com on iOS is a page that has long main thread stalls with forced layouts on a timer
that alter the page height; this caused the post-layout updateScrollbars() called from
FrameView::adjustViewSize() to call scrollToPosition() after adjusting the scroll position
to the allowed range.

If the page laid out while rubberbanding was happening, the current scroll position would
be negative, then clamped to 0, then sent to the UI process as a requested scroll to 0,
triggering the jump to top in the UI process.

There's existing code to prevent this from happening if we know that rubberbanding is
happening; this patch makes isRubberBandInProgress() work for iOS WK2. It does so
by having updateVisibleContentRects() push information about rubberbanding nodes onto
RemoteScrollingCoordinator.

We remove an unnecessary shouldUpdateScrollLayerPositionSynchronously() check in
FrameView::isRubberBandInProgress() - if it's true, then the scrolling coordinator
won't see any rubberbanding nodes anyway.

  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm: (WebKit::RemoteScrollingCoordinator::addNodeWithActiveRubberBanding): (WebKit::RemoteScrollingCoordinator::removeNodeWithActiveRubberBanding):
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::updateVisibleContentRects):

Tools:

Add test infrastructure to allow UIScriptController::scrollToOffset() and
UIScriptController::immediateScrollToOffset() to take an options argument with
a 'unconstrained' property, which allows scrolling to unstable offset to simulate
rubberbanding.

  • DumpRenderTree/ios/UIScriptControllerIOS.h:
  • DumpRenderTree/ios/UIScriptControllerIOS.mm: (WTR::contentOffsetBoundedIfNecessary): (WTR::UIScriptControllerIOS::scrollToOffset): (WTR::UIScriptControllerIOS::immediateScrollToOffset): (WTR::contentOffsetBoundedInValidRange): Deleted.
  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::scrollToOffset): (WTR::UIScriptController::immediateScrollToOffset):
  • TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toScrollToOptions):
  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::contentOffsetBoundedIfNecessary): (WTR::UIScriptControllerIOS::scrollToOffset): (WTR::UIScriptControllerIOS::immediateScrollToOffset): (WTR::contentOffsetBoundedInValidRange): Deleted.

LayoutTests:

Add test infrastructure to allow UIScriptController::scrollToOffset() and
UIScriptController::immediateScrollToOffset() to take an options argument with
a 'unconstrained' property, which allows scrolling to unstable offset to simulate
rubberbanding.

  • fast/scrolling/ios/content-size-change-during-rubberband-expected.txt: Added.
  • fast/scrolling/ios/content-size-change-during-rubberband.html: Added.
  • resources/ui-helper.js: (window.UIHelper.scrollTo.return.new.Promise.): (window.UIHelper.scrollTo.return.new.Promise): (window.UIHelper.scrollTo): (window.UIHelper.immediateScrollTo): (window.UIHelper.immediateUnstableScrollTo):

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

5:39 PM Changeset in webkit [272259] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271771. rdar://problem/73890368

[iOS WK2] Make the "in stable state" bit in visible content rect updates more fine-grained
https://bugs.webkit.org/show_bug.cgi?id=220875

Reviewed by Tim Horton.

VisibleContentRectUpdateInfo contains a single "in stable state" bit, but in a future
patch the web process will need to know if the UI process is rubberbanding. In addition,
we can fold "isChangingObscuredInsetsInteractively" into the same state bits.

So give VisibleContentRectUpdateInfo a OptionSet<ViewStabilityFlag>.

To give the correct state for non-main UIScrollViews, have _scrollViewIsRubberBanding
take the UIScrollView in question, and only include isChangingObscuredInsetsInteractively
if the question is being asked of the main UIScrollView.

  • Shared/VisibleContentRectUpdateInfo.cpp: (WebKit::VisibleContentRectUpdateInfo::encode const): (WebKit::VisibleContentRectUpdateInfo::decode): (WebKit::operator<<):
  • Shared/VisibleContentRectUpdateInfo.h: (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo): (WebKit::VisibleContentRectUpdateInfo::inStableState const): (WebKit::VisibleContentRectUpdateInfo::viewStability const): (WebKit::VisibleContentRectUpdateInfo::isFirstUpdateForNewViewSize const): (WebKit::operator==): (WebKit::VisibleContentRectUpdateInfo::isChangingObscuredInsetsInteractively const): Deleted.
  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _didRelaunchProcess]): (-[WKWebView _scrollViewIsRubberBanding:]): (-[WKWebView _viewStabilityState:]): (-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]): (-[WKWebView _updateVisibleContentRects]): (-[WKWebView _scrollViewIsRubberBanding]): Deleted. (-[WKWebView _scrollViewIsInStableState:]): Deleted.
  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm: (-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:viewStability:enclosedInScrollableAncestorView:sendEvenIfUnchanged:]): (-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:sendEvenIfUnchanged:]): Deleted.
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::updateVisibleContentRects):

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

5:39 PM Changeset in webkit [272258] by Russell Epstein
  • 4 edits in branches/safari-611-branch

Cherry-pick r271770. rdar://problem/73890671

REGRESSION(r266148) Cancelling a navigation in decidePolicyForNavigationAction should not suspend the previous document's font loading timer
https://bugs.webkit.org/show_bug.cgi?id=220882
<rdar://problem/71634501>

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

Source/WebCore:

Things like the load event and didFinishNavigation wait until loading of things like fonts and iframes has completed.

If we navigate to a document that immediately tries to navigate to a different document after starting the loads of fonts,
then we momentarily have two DocumentLoaders with m_frame pointing to the same main frame.

If we cancel that second navigation using WKNavigationActionPolicyCancel, then it calls DocumentLoader::stopLoading on the second DocumentLoader.
This is fine. This is the way things have worked for a very long time.

r266148 introduced a call to the document's font loader's suspendFontLoadingTimer inside of DocumentLoader::stopLoading which is also fine.
What is not fine is the way we get that document. Using m_frame->document() in this case gets us the first document, which may still be loading fonts that we do still want.
Using this->document() only returns non-null if this DocumentLoader is the DocumentLoader that was used to load the Frame's Document,
and in this case the DocumentLoader should only stop the font loading timer if that is true.

I added an API test that reproduces the issue before but not after this fix.
For further verification, you can replace server.request() in my API test with a request to the URL in the radar ending in "Authentication.htm"
and verify it times out before the fix but not after.

This is close to the largest amount of time spent per character changed I've ever written to change "m_frame" to "this".

  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::stopLoading):

Tools:

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

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

5:39 PM Changeset in webkit [272257] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271761. rdar://problem/73890346

Crash under FFTFrame::fftSetupForSize()
https://bugs.webkit.org/show_bug.cgi?id=220866
<rdar://73199504>

Reviewed by Darin Adler.

Follow-up to r271751 to address comment from Darin Adler. Stop using the double-checked
locking pattern as it is likely not safe [1].

[1] http://erdani.org/publications/DDJ_Jul_Aug_2004_revised.pdf

  • platform/audio/mac/FFTFrameMac.cpp: (WebCore::fftSetups): (WebCore::FFTFrame::fftSetupForSize):

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

5:39 PM Changeset in webkit [272256] by Russell Epstein
  • 11 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271760. rdar://problem/73890156

AX: AT-synthesized key events for common user actions (increment/decrement) are detectably different in many ways, potentially causing both web app breakage and AT identification
https://bugs.webkit.org/show_bug.cgi?id=220675
<rdar://problem/73263977>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: accessibility/keyevents-for-actions-mimic-real-key-events.html

When accessibility posts keyboard events in response to ax actions, they should mimic
real key events so as to be indistinguishable.

https://github.com/WICG/aom/blob/gh-pages/explainer.md#deprecated-keyboardevent-object-properties-optional

  • accessibility/AccessibilityNodeObject.cpp: (WebCore::dispatchSimulatedKeyboardUpDownEvent): (WebCore::InitializeLegacyKeyInitProperties): (WebCore::AccessibilityNodeObject::performDismissAction): (WebCore::AccessibilityNodeObject::postKeyboardKeysForValueChange):
  • dom/KeyboardEvent.cpp: (WebCore::KeyboardEvent::KeyboardEvent): (WebCore::KeyboardEvent::create):
  • dom/KeyboardEvent.h:
  • dom/UIEvent.cpp: (WebCore::UIEvent::UIEvent):
  • dom/UIEvent.h: (WebCore::UIEvent::create):
  • dom/UIEventWithKeyState.h: (WebCore::UIEventWithKeyState::UIEventWithKeyState):

LayoutTests:

  • accessibility/keyevents-for-actions-mimic-real-key-events-expected.txt: Added.
  • accessibility/keyevents-for-actions-mimic-real-key-events.html: Added.

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

5:39 PM Changeset in webkit [272255] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271754. rdar://problem/73890755

[WebAuthn] No error is visible after user enters the incorrect PIN
https://bugs.webkit.org/show_bug.cgi?id=220839
<rdar://problem/73378319>

Reviewed by Brent Fulgham.

To fix that, let's have a boolean to indicate the PIN entry UI has already been presented within this session.
And then rely on the error UI to let users retry the PIN.

Covered by manual tests.

  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.h:
  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm: (WebKit::AuthenticatorPresenterCoordinator::requestPin): (WebKit::AuthenticatorPresenterCoordinator::selectAssertionResponse): Besides above, this patch also fixes some crashes.

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

5:39 PM Changeset in webkit [272254] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271751. rdar://problem/73890346

Crash under FFTFrame::fftSetupForSize()
https://bugs.webkit.org/show_bug.cgi?id=220866
<rdar://73199504>

Reviewed by Eric Carlson.

Source/WebCore:

The crash was caused by FFTFrame::fftSetupForSize() but being called concurrently
from "HRTF database loader" threads. This patch makes FFTFrame::fftSetupForSize()
thread safe to address the issue.

Test: webaudio/Panner/PannerNode-crash.html

  • platform/audio/mac/FFTFrameMac.cpp: (WebCore::fftSetups): (WebCore::FFTFrame::fftSetupForSize):

LayoutTests:

Add layout test coverage.

  • webaudio/Panner/PannerNode-crash-expected.txt: Added.
  • webaudio/Panner/PannerNode-crash.html: Added.

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

5:39 PM Changeset in webkit [272253] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271737. rdar://problem/73890706

PiP video subtitles stop updating when Safari is backgrounded
https://bugs.webkit.org/show_bug.cgi?id=220660

Reviewed by Darin Adler.

Subtitles in the picture-in-picture window will stop updating when the browser is
in the background because we freeze the layer tree when a browser is in the background.
This patch fixes this issue by avoiding freezing the layer tree if a video is playing
in picture-in-picture when the browser is in the background.

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updateDrawingAreaLayerTreeFreezeState):
  • WebProcess/cocoa/VideoFullscreenManager.h:
  • WebProcess/cocoa/VideoFullscreenManager.mm: (WebKit::VideoFullscreenManager::videoInPictureInPicture const): (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement): (WebKit::VideoFullscreenManager::exitVideoFullscreenForVideoElement): (WebKit::VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):

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

5:39 PM Changeset in webkit [272252] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271704. rdar://problem/73890824

[Payment Request] increment the current version
https://bugs.webkit.org/show_bug.cgi?id=220807
<rdar://problem/68622300>

Reviewed by Andy Estes.

  • Modules/applepay/cocoa/PaymentAPIVersionCocoa.mm: (WebCore::PaymentAPIVersion::current):

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

5:39 PM Changeset in webkit [272251] by Russell Epstein
  • 3 edits
    1 add in branches/safari-611-branch

Cherry-pick r271656. rdar://problem/73890220

[Mac] Netflix controls do not fade out after entering fullscreen
https://bugs.webkit.org/show_bug.cgi?id=220472
<rdar://70602577>

Reviewed by Eric Carlson.

Test: TestWebKitAPI/Tests/mac/FullscreenPointerLeave.mm

Netflix uses a "pointerleave" event over their playback controls to trigger setting their "fade out controls"
timer, but a "pointerleave" event isn't fired when the element moves out from under the pointer (either due to
style changes, or the window screen location moving due to entering fullscreen).

Work around this behavior by sending a synthetic mouse event after entering fullscreen, which causes the
"pointerleave" event to be fired if, indeed, the pointer is no longer over the element in question.

  • UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):

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

5:39 PM Changeset in webkit [272250] by Russell Epstein
  • 4 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271644. rdar://problem/73890311

[css-multicol] OOM with 1px height columns
https://bugs.webkit.org/show_bug.cgi?id=220490

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/multicol/newmulticol/zero-height-columns-oom-crash.html

Multicol sometimes computes <= 0 heights for the columns. For all those cases the code was adjusting them to 1px
values apparently to avoid creating an "infinite" amount of columns. However that adjustment was precisely causing
OOM situations in those cases where there was a relatively large amount of free space. In those cases the code was
creating dozens of thousands of 1px height columns (with all their associated structures) until we run out of memory.

Using zero heights in those cases seem sane because it's already being properly handled in the current code.

  • rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset const): cap negative heights to 0.

LayoutTests:

  • fast/multicol/newmulticol/zero-height-columns-oom-crash-expected.txt: Added.
  • fast/multicol/newmulticol/zero-height-columns-oom-crash.html: Added.
  • imported/blink/fast/pagination/first-letter-inherit-all-crash-expected.txt: Updated expectations.

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

5:39 PM Changeset in webkit [272249] by Russell Epstein
  • 6 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271635. rdar://problem/73890109

Elements in a table are incorrectly selected in JavaScript.
https://bugs.webkit.org/show_bug.cgi?id=220607

Reviewed by Wenson Hsieh.

Source/WebCore:

After the fix for https://bugs.webkit.org/show_bug.cgi?id=130844 in https://trac.webkit.org/changeset/260207/webkit a regression was found for
table cell selections through JavaScript. The previous fix was for an issue in the difference between how PositionIterator and Position calculated
if it was canonical (::isCandidate) in the cases where the renderer was a BR. Instead of only converging isCandidate for BR, this function in PositionIterator
was completely subsumed by just calling the implementation for Position. While there are many similarities, there are important differences, especially in the
table code, therefore PositionIterator::isCandidate is being reinstated, but with the convergence in the BR case only.
Also, moved the check added in http://webkit.org/b/211864 so it will cover cases that were missed due to this code being wrong while that fix was added.

Test: editing/selection/editable-table-cell-selection.html

  • dom/PositionIterator.cpp: (WebCore::PositionIterator::isCandidate const):
  • editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply):

LayoutTests:

  • editing/execCommand/null_calc_primitive_value_for_css_property.html: Added ending tag that was missing and does not affect the issue the test was verifying.
  • editing/inserting/insert-list-in-table-cell-07-expected.txt: Restored expected text file to original output.
  • editing/selection/editable-table-cell-selection-expected.txt: Added.
  • editing/selection/editable-table-cell-selection.html: Added.

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

5:39 PM Changeset in webkit [272248] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271521. rdar://problem/73890570

Mark only child for layout
https://bugs.webkit.org/show_bug.cgi?id=218554

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-15
Reviewed by Antti Koivisto.

Mark only child for layout in applyStretchAlignmentToChildIfNeeded.

  • rendering/RenderGrid.cpp: (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):

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

5:32 PM Changeset in webkit [272247] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

Rename HTMLFormControlElement::setNeedsWillValidateCheck() to updateWillValidateAndValidity()
https://bugs.webkit.org/show_bug.cgi?id=221297

Reviewed by Wenson Hsieh.

Simple rename: setNeedsWillValidateCheck() eagerly updated both 'willValid' and 'isValid'
so call it what it is.

  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::parseAttribute):

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::disabledStateChanged):
(WebCore::HTMLFormControlElement::readOnlyStateChanged):
(WebCore::HTMLFormControlElement::insertedIntoAncestor):
(WebCore::HTMLFormControlElement::removedFromAncestor):
(WebCore::HTMLFormControlElement::willValidate const):
(WebCore::HTMLFormControlElement::updateWillValidateAndValidity):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck): Deleted.

  • html/HTMLFormControlElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::initializeInputType):

4:26 PM Changeset in webkit [272246] by Matt Lewis
  • 6 edits in trunk/Tools

Remove Apple macOS Mojave queues
https://bugs.webkit.org/show_bug.cgi?id=221211

Reviewed by Aakash Jain.

  • CISupport/build-webkit-org/config.json:
  • CISupport/build-webkit-org/public_html/dashboard/Scripts/Dashboard.js:
  • CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

  • CISupport/build-webkit-org/public_html/dashboard/Styles/Main.css:

(table.queue-grid tr.platform.macos-mojave img.logo): Deleted.

4:20 PM Changeset in webkit [272245] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[BigSur WK1] imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-v* is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=221300

Unreviewed test gardening.

Patch by Amir Mark Jr <Amir Mark Jr.> on 2021-02-02

  • platform/mac-wk1/TestExpectations:
3:44 PM Changeset in webkit [272244] by jonlee@apple.com
  • 28 edits in trunk/LayoutTests

Update WebGL2 TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=221282

Reviewed by Dean Jackson.

  • platform/ios/TestExpectations: fast/canvas/webgl/program-test.html and webgl/1.0.3/conformance/programs/program-test.html always pass.
  • platform/mac/TestExpectations:

These tests now fully pass.

  • webgl/2.0.0/deqp/functional/gles3/fragmentoutput/random_00-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fragmentoutput/random_01-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fragmentoutput/random_02-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/framebufferblit/conversion_04-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/framebufferblit/conversion_08-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/framebufferblit/conversion_10-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/framebufferblit/conversion_11-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/framebufferblit/conversion_12-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/framebufferblit/conversion_13-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/framebufferblit/conversion_18-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/framebufferblit/conversion_25-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/pixelbufferobject-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/teximage2d_pbo_2d_00-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/teximage2d_pbo_2d_01-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/teximage3d_pbo_2d_array_00-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/teximage3d_pbo_2d_array_01-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/teximage3d_pbo_3d_00-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/teximage3d_pbo_3d_01-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/texsubimage2d_pbo_2d_00-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/texsubimage2d_pbo_2d_01-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/texsubimage2d_pbo_cube_01-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/texsubimage2d_pbo_cube_03-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/texsubimage3d_pbo_3d_00-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/texsubimage3d_pbo_3d_01-expected.txt:

This test progressed from 13 to 2 sub-test failures.

  • webgl/2.0.0/deqp/functional/gles3/negativestateapi-expected.txt:
3:24 PM Changeset in webkit [272243] by Ross Kirsling
  • 5 edits in trunk

Completion value of a finally block should not be ignored if completion is abrupt
https://bugs.webkit.org/show_bug.cgi?id=221238

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/completion-value.js:

Correct tests to match spec.

  • test262/expectations.yaml:

Mark two test cases as passing.

Source/JavaScriptCore:

Per https://tc39.es/ecma262/#sec-try-statement-runtime-semantics-evaluation,
the completion value of a finally block is ignored *just* when it is a normal completion,
but we've been ignoring it in all cases.

This patch ensures that when a finally block is exited with a break or continue statement,
its completion value is used as the completion value for the entire TryStatement.

(Note: This behavior will be important for the upcoming "do expressions" proposal,
as it is effectively a reification of completion values.)

  • bytecompiler/NodesCodegen.cpp:

(JSC::TryNode::emitBytecode):

  1. Don't throw away the result of evaluating the finally block.
  2. Only use the try or catch block result if we make it all the way to the end of the finally block.
3:23 PM Changeset in webkit [272242] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GPU Process] Repopulate the TestExpectations file
https://bugs.webkit.org/show_bug.cgi?id=221284

Patch by Rini Patel <rini_patel@apple.com> on 2021-02-02
Reviewed by Simon Fraser.

  • gpu-process/TestExpectations:
3:15 PM Changeset in webkit [272241] by pvollan@apple.com
  • 11 edits in trunk/Source

Register for power notifications in the UI process
https://bugs.webkit.org/show_bug.cgi?id=221258

Reviewed by Brent Fulgham.

Source/WebCore:

Power notifications should be registered for in the UI process instead of the WebContent process. This patch addresses
this by creating a PowerObserver instance in the UI process, which will notify every WebContent when the power has been
turned on. Each WebContent process will in response restart their shared timer.

No new tests, since testing this involves putting the machine to sleep and wake it up, which is not trivial in the
testing framework.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/cf/MainThreadSharedTimerCF.cpp:

(WebCore::restartSharedTimer):
(WebCore::MainThreadSharedTimer::setFireInterval):
(WebCore::applicationDidBecomeActive): Deleted.
(WebCore::setupPowerObserver): Deleted.

  • platform/cf/SetupPowerObserver.cpp: Added.

(WebCore::shouldSetupPowerObserver):
(WebCore::applicationDidBecomeActive):
(WebCore::setupPowerObserver):
(WebCore::runPowerOnHandler):

  • platform/cf/SetupPowerObserver.h: Added.
  • platform/mac/PowerObserverMac.h:

Source/WebKit:

Create a PowerObserver object when the Web process pool is registering notification observers. Notify all WebContent processes
When a power on notification is received.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeProcess):
(WebKit::WebProcess::systemWillPowerOn):

3:10 PM Changeset in webkit [272240] by don.olmstead@sony.com
  • 2 edits in trunk/Tools

[webkitcorepy] Autoinstaller can fail on packages containing write protected files
https://bugs.webkit.org/show_bug.cgi?id=221266

Reviewed by Jonathan Bedard.

The autoinstaller extracts an archive containing the package to a temporary directory and
then installs it from there. If the autoinstaller attempts to extract the archive again into
the same temporary directory it can fail if there was a write protected file. The extraction
will fail and the installer cannot continue until the temporary directory is cleared.

To prevent this the permissions for each file/directory in the tarball is manually set.

This was originally observed with the logilab-common package which ships with a test containing
a write protected file.

  • Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:

(Package.Archive.unpack):

2:44 PM Changeset in webkit [272239] by Kate Cheney
  • 9 edits in trunk/Source

PCM: Indicate if network load data is user identifiable
https://bugs.webkit.org/show_bug.cgi?id=221113
<rdar://problem/71348187>

Reviewed by John Wilander.

Source/WebCore:

  • loader/PrivateClickMeasurement.h:

Source/WebKit:

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create):

  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):

  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::fireConversionRequest):

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

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

2:38 PM Changeset in webkit [272238] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Commit queue failure message should indicate that cq+ flag can be set again
https://bugs.webkit.org/show_bug.cgi?id=221269

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(PushCommitToWebKitRepo.comment_text_for_bug):

  • CISupport/ews-build/steps_unittest.py:
2:34 PM Changeset in webkit [272237] by achristensen@apple.com
  • 6 edits
    2 deletes in trunk/Source/WebKit

Remove all use of _UIEventAttribution
https://bugs.webkit.org/show_bug.cgi?id=221289
<rdar://problem/73629041>

Reviewed by John Wilander.

It has been replaced by UIEventAttribution API.

  • Platform/ios/UIKitSoftLink.h: Removed.
  • Platform/ios/UIKitSoftLink.mm: Removed.
  • Platform/spi/ios/UIKitSPI.h:
  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _setEventAttribution:]): Deleted.
(-[WKWebView _eventAttribution]): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
2:25 PM Changeset in webkit [272236] by Wenson Hsieh
  • 17 edits in trunk/Source

Add scaffolding to request image extraction after a delay when hovering over images
https://bugs.webkit.org/show_bug.cgi?id=221226

Reviewed by Devin Rousso.

Source/WebCore:

See comments below. There should be no changes in behavior (yet), although this infrastructure will eventually
service a new accessibility feature in subsequent patches.

  • page/ChromeClient.h:

(WebCore::ChromeClient::requestImageExtraction):

Adds a new hook to inform the client layer when we should consider requesting image extraction for a hovered
element. See WebKit changes for more information.

  • page/EventHandler.cpp:

(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::mouseMoved):
(WebCore::EventHandler::updateMouseEventTargetNode):
(WebCore::EventHandler::imageExtractionTimerFired):

Add a mechanism to call into the above chrome client hook when the user has hovered their mouse cursor over an
image (e.g. img or picture element) for at least 250 ms without moving.

  • page/EventHandler.h:

Source/WebKit:

Work towards allowing clients to extract image data when hovering over rendered image elements, for new
accessibility-related features. See changes below for more details.

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

(WebKit::WebViewImpl::requestImageExtraction):

Leave this method stub unimplemented for the time being.

  • UIProcess/PageClient.h:

(WebKit::PageClient::requestImageExtraction):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestImageExtraction):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::requestImageExtraction):

Add plumbing to allow the web process to asynchronously request image extraction data from the UI process.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::requestImageExtraction):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::requestImageExtraction):

  • WebProcess/WebPage/WebPage.h:

Add a weak set of elements that we've attempted to extract, so that we won't end up extracting elements more
than once. Although this set this currently only cleared upon navigation, this should eventually be updated when
(for instance) an element's image source changes, such that we can re-extract the new image data if needed.

2:00 PM Changeset in webkit [272235] by Darin Adler
  • 12 edits in trunk/Source/WebCore

Null check renderers consistently in StyleImage code
https://bugs.webkit.org/show_bug.cgi?id=221287
rdar://73356955

Reviewed by Simon Fraser.

Many of these functions were asserting renderers are non-null, without a
strong guarantee that is true. Adding a few null checks makes the code
easier to reason about. An exception was add/removeClient, which never
need to be called with a null pointer, so for that we change the argument
type from a pointer to a reference.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::updateFillImages): Pass a reference.
(WebCore::RenderElement::updateImage): Ditto.
(WebCore::RenderElement::willBeDestroyed): Ditto.

  • rendering/RenderImageResource.cpp:

(WebCore::RenderImageResource::setCachedImage): Check renderer for null.
(WebCore::RenderImageResource::resetAnimation): Ditto.
(WebCore::RenderImageResource::setContainerContext): Ditto.

  • rendering/RenderImageResourceStyleImage.cpp:

(WebCore::RenderImageResourceStyleImage::initialize): Pass a reference.
(WebCore::RenderImageResourceStyleImage::shutdown): Check the renderer for
null before passing a reference.
(WebCore::RenderImageResourceStyleImage::setContainerContext): Ditto.

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::willBeDestroyed): Pass a reference.
(WebCore::RenderListMarker::styleDidChange): Ditto.

  • rendering/style/StyleCachedImage.cpp:

(WebCore::StyleCachedImage::addClient): Take a reference.
(WebCore::StyleCachedImage::removeClient): Ditto.

  • rendering/style/StyleGeneratedImage.cpp:

(WebCore::StyleGeneratedImage::imageSize const): Check renderer for null.
(WebCore::StyleGeneratedImage::addClient): Take a reference.
(WebCore::StyleGeneratedImage::removeClient): Ditto.
(WebCore::StyleGeneratedImage::image const): Check renderer for null.
(WebCore::StyleGeneratedImage::knownToBeOpaque const): Ditto.

  • rendering/style/StyleMultiImage.cpp:

(WebCore::StyleMultiImage::addClient): Take a reference.
(WebCore::StyleMultiImage::removeClient): Ditto.

  • rendering/style/StyleCachedImage.h: Update add/removeClient to take

a reference.

  • rendering/style/StyleGeneratedImage.h: Ditto.
  • rendering/style/StyleImage.h: Ditto.
  • rendering/style/StyleMultiImage.h: Ditto.
1:54 PM Changeset in webkit [272234] by Said Abou-Hallawa
  • 4 edits in trunk/Source

[macOS] Force loading the HEIF reader symbols before transcoding any HEIF image
https://bugs.webkit.org/show_bug.cgi?id=221191
<rdar://problem/70942158>

Reviewed by Tim Horton.

Source/WebCore:

Transcoding the HEIF images requires loading the HEIF reader symbols which
is not happening in macOS Catalina. A workaround for this bug in WebKit is
to call CGImageSourceGetCount() for the CGImageSource of the HEIF image.

  • platform/graphics/cg/ImageUtilitiesCG.cpp:

(WebCore::transcodeImage):

Source/WTF:

Add a HAVE macro for the fix of <rdar://problem/59589723>.

  • wtf/PlatformHave.h:
1:50 PM Changeset in webkit [272233] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Disable inline box content with border images
https://bugs.webkit.org/show_bug.cgi?id=221276

Reviewed by Antti Koivisto.

Not supported yet.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForChild):

1:39 PM Changeset in webkit [272232] by BJ Burg
  • 1 edit
    3 adds in trunk/Source/WebInspectorUI

Web Inspector: Add another Protocol Version (iOS 14.5)
https://bugs.webkit.org/show_bug.cgi?id=221288
<rdar://66351870>

Reviewed by Devin Rousso.

  • UserInterface/Protocol/Legacy/14.5/InspectorBackendCommands.js: Added.
  • Versions/Inspector-iOS-14.5.json: Added.
1:36 PM Changeset in webkit [272231] by ysuzuki@apple.com
  • 3 edits in trunk/LayoutTests/imported/w3c

Unreviewed, update expect files for wasm tests
https://bugs.webkit.org/show_bug.cgi?id=221281

  • web-platform-tests/wasm/wasm_stream_compile_test-expected.txt:
  • web-platform-tests/wasm/wasm_stream_instantiate_test-expected.txt:
1:23 PM Changeset in webkit [272230] by don.olmstead@sony.com
  • 2 edits in trunk/Tools

[webkitpy] WinPort.delete_sem_locks is cygwin specific
https://bugs.webkit.org/show_bug.cgi?id=221277

Reviewed by Jonathan Bedard.

WinPort.delete_sem_locks does rm -rf /dev/shm/sem.* which is only relavent when
running cygwin. Just put a test for cygwin around the command invocation.

  • Scripts/webkitpy/port/win.py:

(WinPort.delete_sem_locks):

1:15 PM Changeset in webkit [272229] by Kate Cheney
  • 3 edits in trunk/Source/WebKit

REGRESSION(r271744): Broke Microsoft live login in internal builds
https://bugs.webkit.org/show_bug.cgi?id=221271
<rdar://problem/73848416>

Reviewed by Alex Christensen.

If a user goes straight to login.live.com without first visiting
microsoft.com, we crash when checking for storage access because
we assume the user has interacted with the page. Since this is a
quirked flow, we should not assume that, and should insert the
domain into the database.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt):
(WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const): Deleted.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
12:57 PM Changeset in webkit [272228] by achristensen@apple.com
  • 7 edits in trunk

Adopt UIEventAttribution instead of _UIEventAttribution
https://bugs.webkit.org/show_bug.cgi?id=220683

Reviewed by John Wilander.

Source/WebKit:

UIKit introduced UIEventAttribution, so let's adopt it so they can remove their SPI.
See rdar://73629041

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _setUIEventAttribution:]):
(-[WKWebView _uiEventAttribution]):

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(-[MockEventAttribution initWithReportEndpoint:destinationURL:]):
(TestWebKitAPI::TEST):
(-[MockEventAttribution initWithReportEndpoint:attributeOn:]): Deleted.

12:55 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
12:18 PM Changeset in webkit [272227] by Chris Dumez
  • 4 edits
    2 adds in trunk

Assertion failure when calling matchMedia('a'.repeat(2 30)) in JS
https://bugs.webkit.org/show_bug.cgi?id=221272
<rdar://66323284>

Reviewed by Simon Fraser.

Source/WebCore:

Update code to properly deal with parsing failing due to the query string being too
large.

Test: fast/css/window-watch-media-large-query.html

  • css/MediaList.cpp:

(WebCore::MediaQuerySet::create):

  • css/parser/MediaQueryParser.cpp:

(WebCore::MediaQueryParser::parseMediaQuerySet):

LayoutTests:

Add layout test coverage.

  • fast/css/window-watch-media-large-query-expected.txt: Added.
  • fast/css/window-watch-media-large-query.html: Added.
12:13 PM Changeset in webkit [272226] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Fix long standing FIXME in parseNumericColor about not doubly clamping color components
https://bugs.webkit.org/show_bug.cgi?id=221194

Reviewed by Darin Adler.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::parseColorIntOrPercentage):
(WebCore::parseAlphaValue):
Switch to returning an Optional<uint8_t> and add assertion that the component
is clamped. Use convertFloatAlphaTo helper in parseAlphaValue to remove some
duplicate logic.

(WebCore::parseNumericColor):
Replace call to makeFromComponentsClamping with calling the constructors directly
now that the types are correct.

11:34 AM Changeset in webkit [272225] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[BigSur wk1] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=221230

Unreviewed test gardening.

Patch by Amir Mark Jr <Amir Mark Jr.> on 2021-02-02

  • platform/mac-wk1/TestExpectations:
10:59 AM Changeset in webkit [272224] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r271219): [Mojave] imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_timeupdate_on_seek.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=220447
<rdar://problem/72910551>

Reviewed by Eric Carlson.

Changing the pitch algorithm in the handler for playerItemStatusDidChange() causes problems on the Mojave test bots
where the media element never reaches the canplay state. Back out the change from r271219 only on Mojave.

  • WebCore.xcodeproj/project.pbxproj:
  • page/Quirks.cpp:

(WebCore::Quirks::needsPerDocumentAutoplayBehavior const):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange):

10:56 AM Changeset in webkit [272223] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Disable inline-box content with non-initial line-box-contain values
https://bugs.webkit.org/show_bug.cgi?id=221270

Reviewed by Antti Koivisto.

Not supported yet.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForChild):

10:43 AM Changeset in webkit [272222] by BJ Burg
  • 4 edits in trunk/Source/JavaScriptCore

REGRESSION(r269309): [Cocoa] RemoteInspectorCocoa files are being compiled twice
https://bugs.webkit.org/show_bug.cgi?id=220951
<rdar://problem/73848263>

Patch by Don Olmstead <don.olmstead@sony.com> on 2021-02-02
Reviewed by BJ Burg.

Refactor our SourcesCocoa files in JavaScriptCore to avoid double-listing
or double-building remote inspection-related files. Properly track
inspector/remote/SourcesCocoa.txt as a build dependency.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/generate-unified-sources.sh:
  • SourcesCocoa.txt:
10:30 AM Changeset in webkit [272221] by ysuzuki@apple.com
  • 7 edits in trunk

WebAssembly: add support for stream APIs - JavaScript API: Implement loading for the Blob type
https://bugs.webkit.org/show_bug.cgi?id=184886

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/wasm/wasm_stream_compile_test-expected.txt:
  • web-platform-tests/wasm/wasm_stream_compile_test.html:
  • web-platform-tests/wasm/wasm_stream_instantiate_test-expected.txt:
  • web-platform-tests/wasm/wasm_stream_instantiate_test.html:

Source/WebCore:

This patch adds compileStreaming / instantiateStreaming with FetchResponse created from Blob.
We materialize ReadableStream to load Blob for now. In the future, if more efficient way is
implemented, we will switch to that.
More complex FormData is not supported, tracked in https://bugs.webkit.org/show_bug.cgi?id=221248.

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::handleResponseOnStreamingAction):

10:23 AM Changeset in webkit [272220] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[build.webkit.org] unzip layout-test-results in background
https://bugs.webkit.org/show_bug.cgi?id=221263

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/steps.py:

(ExtractTestResults.init):

10:20 AM Changeset in webkit [272219] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Small cleanup in StackVisitor::readNonInlinedFrame
https://bugs.webkit.org/show_bug.cgi?id=221259

Patch by Xan Lopez <Xan Lopez> on 2021-02-02
Reviewed by Yusuke Suzuki.

isAnyWasmCallee() will never be true if WebAssembly is disabled at
compile time, so we can move a good chunk of code inside the
USE(WEBASSEMBLY) check. Also move all constant initializations at
the beginning of the method, and remove an unnecessary extra
variable.

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::readNonInlinedFrame):

10:13 AM Changeset in webkit [272218] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Promote debug assertion to release assertion in cookiesForURL()
https://bugs.webkit.org/show_bug.cgi?id=221268

Reviewed by Alex Christensen.

Promote debug assertion to release assertion in cookiesForURL(). We have a weird/rare crash in this
area and I want to rule out that this is not what is happening.

  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::cookiesForURL):

10:10 AM Changeset in webkit [272217] by commit-queue@webkit.org
  • 24 edits in trunk/Source

Remove unused functions from GraphicsContextGL and ExtensionsGL
https://bugs.webkit.org/show_bug.cgi?id=218896

Patch by Rini Patel <rini_patel@apple.com> on 2021-02-02
Reviewed by Dean Jackson.

Source/WebCore:

Remove unused functions from GraphicsContextGL and ExtensionsGL
They're dead code and make it harder to implement the GPU Process version.

  • If the function is unused, remove it fully
  • If the function is unused in USE(ANGLE) WebGL part, remove the function from GraphicsContextGL and ANGLE GraphicsContextGLOpenGL
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):

  • platform/graphics/ExtensionsGL.h:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.cpp:

(WebCore::RemoteGraphicsContextGLProxyBase::getnUniformivEXT):
(WebCore::RemoteGraphicsContextGLProxyBase::isNVIDIA): Deleted.
(WebCore::RemoteGraphicsContextGLProxyBase::isAMD): Deleted.
(WebCore::RemoteGraphicsContextGLProxyBase::isIntel): Deleted.
(WebCore::RemoteGraphicsContextGLProxyBase::isImagination): Deleted.
(WebCore::RemoteGraphicsContextGLProxyBase::vendor): Deleted.
(WebCore::RemoteGraphicsContextGLProxyBase::requiresBuiltInFunctionEmulation): Deleted.
(WebCore::RemoteGraphicsContextGLProxyBase::requiresRestrictedMaximumTextureSize): Deleted.

  • platform/graphics/RemoteGraphicsContextGLProxyBase.h:
  • platform/graphics/angle/ExtensionsGLANGLE.cpp:

(WebCore::ExtensionsGLANGLE::ExtensionsGLANGLE):
(WebCore::ExtensionsGLANGLE::initializeAvailableExtensions):
(WebCore::ExtensionsGLANGLE::blitFramebufferANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::renderbufferStorageMultisampleANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::insertEventMarkerEXT): Deleted.
(WebCore::ExtensionsGLANGLE::pushGroupMarkerEXT): Deleted.
(WebCore::ExtensionsGLANGLE::popGroupMarkerEXT): Deleted.
(WebCore::ExtensionsGLANGLE::readPixelsRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::texParameterfvRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::texParameterivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getQueryivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getQueryObjectuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getBufferPointervRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getVertexAttribIivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getVertexAttribIuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getUniformuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getBufferParameteri64vRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::samplerParameterivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::samplerParameterfvRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getSamplerParameterivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getSamplerParameterfvRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getFramebufferParameterivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getProgramInterfaceivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getBooleani_vRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getMultisamplefvRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getTexLevelParameterfvRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getPointervRobustANGLERobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getnUniformfvRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getnUniformivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getnUniformuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::texParameterIivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::texParameterIuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getTexParameterIivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getTexParameterIuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::samplerParameterIivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::samplerParameterIuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getSamplerParameterIivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getSamplerParameterIuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getQueryObjectivRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getQueryObjecti64vRobustANGLE): Deleted.
(WebCore::ExtensionsGLANGLE::getQueryObjectui64vRobustANGLE): Deleted.

  • platform/graphics/angle/ExtensionsGLANGLE.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::markLayerComposited):

  • platform/graphics/opengl/ExtensionsGLOpenGL.cpp:

(WebCore::ExtensionsGLOpenGL::blitFramebufferANGLE): Deleted.
(WebCore::ExtensionsGLOpenGL::renderbufferStorageMultisampleANGLE): Deleted.
(WebCore::ExtensionsGLOpenGL::insertEventMarkerEXT): Deleted.
(WebCore::ExtensionsGLOpenGL::pushGroupMarkerEXT): Deleted.
(WebCore::ExtensionsGLOpenGL::popGroupMarkerEXT): Deleted.

  • platform/graphics/opengl/ExtensionsGLOpenGL.h:
  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp:

(WebCore::ExtensionsGLOpenGLCommon::readPixelsRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::texParameterfvRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::texParameterivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getQueryivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getQueryObjectuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getBufferPointervRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getVertexAttribIivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getVertexAttribIuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getUniformuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getBufferParameteri64vRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::samplerParameterivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::samplerParameterfvRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getSamplerParameterivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getSamplerParameterfvRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getFramebufferParameterivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getProgramInterfaceivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getBooleani_vRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getMultisamplefvRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getTexLevelParameterivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getTexLevelParameterfvRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getPointervRobustANGLERobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getnUniformfvRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getnUniformivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getnUniformuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::texParameterIivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::texParameterIuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getTexParameterIivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getTexParameterIuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::samplerParameterIivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::samplerParameterIuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getSamplerParameterIivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getSamplerParameterIuivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getQueryObjectivRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getQueryObjecti64vRobustANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLCommon::getQueryObjectui64vRobustANGLE): Deleted.

  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.h:

(WebCore::ExtensionsGLOpenGLCommon::isNVIDIA const):
(WebCore::ExtensionsGLOpenGLCommon::isAMD const):
(WebCore::ExtensionsGLOpenGLCommon::isIntel const):
(WebCore::ExtensionsGLOpenGLCommon::isImagination const):
(WebCore::ExtensionsGLOpenGLCommon::vendor const):
(WebCore::ExtensionsGLOpenGLCommon::requiresBuiltInFunctionEmulation const):
(WebCore::ExtensionsGLOpenGLCommon::requiresRestrictedMaximumTextureSize const):

  • platform/graphics/opengl/ExtensionsGLOpenGLES.cpp:

(WebCore::ExtensionsGLOpenGLES::blitFramebufferANGLE): Deleted.
(WebCore::ExtensionsGLOpenGLES::insertEventMarkerEXT): Deleted.
(WebCore::ExtensionsGLOpenGLES::pushGroupMarkerEXT): Deleted.
(WebCore::ExtensionsGLOpenGLES::popGroupMarkerEXT): Deleted.

  • platform/graphics/opengl/ExtensionsGLOpenGLES.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:

(WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
(WebCore::GraphicsContextGLOpenGL::getExtensions):

  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

(WebCore::GraphicsContextGLOpenGL::validateDepthStencil):

  • platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp:

(WebCore::GraphicsContextGLOpenGL::getExtensions):

  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::GraphicsContextGLOpenGL::getExtensions):

Source/WebKit:

  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:

(getGraphicsResetStatusARB):
(getTranslatedShaderSourceANGLE):
(blitFramebufferANGLE): Deleted.
(renderbufferStorageMultisampleANGLE): Deleted.
(insertEventMarkerEXT): Deleted.
(pushGroupMarkerEXT): Deleted.
(popGroupMarkerEXT): Deleted.

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:

(WebKit::RemoteGraphicsContextGLProxy::blitFramebufferANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::renderbufferStorageMultisampleANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::insertEventMarkerEXT): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::pushGroupMarkerEXT): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::popGroupMarkerEXT): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::readPixelsRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::texParameterfvRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::texParameterivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getQueryivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getQueryObjectuivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getBufferPointervRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIuivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getUniformuivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getBufferParameteri64vRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::samplerParameterivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::samplerParameterfvRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterfvRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getFramebufferParameterivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getProgramInterfaceivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getBooleani_vRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getMultisamplefvRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterfvRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getPointervRobustANGLERobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getnUniformfvRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getnUniformivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getnUniformuivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::texParameterIivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::texParameterIuivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getTexParameterIivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getTexParameterIuivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::samplerParameterIivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::samplerParameterIuivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIuivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getQueryObjectivRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getQueryObjecti64vRobustANGLE): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::getQueryObjectui64vRobustANGLE): Deleted.

9:46 AM Changeset in webkit [272216] by youenn@apple.com
  • 48 edits
    1 delete in trunk/Source/ThirdParty/libwebrtc

Update WebRTC usrsctp to M88
https://bugs.webkit.org/show_bug.cgi?id=221205

Reviewed by Eric Carlson.

  • Source/third_party/usrsctp/usrsctplib/.github/workflows/build-with-cmake.yml: Removed.
  • Source/third_party/usrsctp/usrsctplib/CMakeLists.txt:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/CMakeLists.txt:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_asconf.c:

(sctp_process_asconf_set_primary):
(sctp_handle_asconf):
(sctp_handle_asconf_ack):
(sctp_asconf_iterator_ep_end):
(sctp_asconf_iterator_stcb):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_asconf.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_auth.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_auth.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_bsd_addr.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_bsd_addr.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_cc_functions.c:

(sctp_enforce_cwnd_limit):
(sctp_cwnd_update_after_fr):
(cc_bw_same):
(cc_bw_decrease):
(sctp_cwnd_update_after_sack_common):
(sctp_cwnd_update_after_ecn_echo_common):
(sctp_cwnd_update_after_output):
(sctp_cwnd_update_after_sack):
(sctp_cwnd_update_after_ecn_echo):
(sctp_cwnd_update_rtcc_after_ecn_echo):
(sctp_cwnd_update_rtcc_tsn_acknowledged):
(sctp_cwnd_prepare_rtcc_net_for_sack):
(sctp_cwnd_new_rtcc_transmission_begins):
(sctp_set_rtcc_initial_cc_param):
(sctp_cwnd_rtcc_socket_option):
(sctp_cwnd_update_rtcc_after_sack):
(sctp_hs_cwnd_update_after_sack):
(htcp_alpha_update):
(htcp_cong_avoid):
(sctp_htcp_cwnd_update_after_sack):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_constants.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_header.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_indata.c:

(sctp_mark_non_revokable):
(sctp_place_control_in_stream):
(sctp_queue_data_to_stream):
(sctp_inject_old_unordered_data):
(sctp_deliver_reasm_check):
(sctp_process_a_data_chunk):
(sctp_sack_check):
(sctp_process_segment_range):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_indata.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c:

(sctp_process_init):
(sctp_handle_heartbeat_ack):
(sctp_handle_error):
(sctp_process_cookie_existing):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_os.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_os_userspace.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c:

(sctp_choose_boundspecific_stcb):
(sctp_select_nth_preferred_addr_from_ifn_boundall):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_ss_functions.c:

(sctp_ss_prio_clear):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_structs.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_sysctl.c:

(sctp_init_sysctls):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_sysctl.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_timer.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_timer.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_uio.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_userspace.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_usrreq.c:

(sctp_finish):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_var.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctputil.c:

(sctp_auditing):
(sctp_timeout_handler):
(sctp_timer_start):
(sctp_notify_remote_error):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctputil.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c:

(in6_sin_2_v4mapsin6):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_environment.c:

(init_random):
(read_random):
(finish_random):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_environment.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_inpcb.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_ip6_var.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_ip_icmp.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_malloc.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_mbuf.c:

(mbuf_initialize):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_queue.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_recv_thread.c:

(recv_function_raw):
(recv_function_raw6):
(recv_function_udp):
(recv_function_udp6):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_route.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_socket.c:

(usrsctp_init_nothreads):
(usrsctp_socket):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_socketvar.h:
9:45 AM Changeset in webkit [272215] by ysuzuki@apple.com
  • 5 edits in trunk

Support BigInt64Array/BigUint64Array in structured-cloning
https://bugs.webkit.org/show_bug.cgi?id=221247

Reviewed by Alexey Shvayka.

Source/WebCore:

This patch adds BigInt64Array/BigUint64Array support in structured-cloning so that
we can serialize and deserialize BigInt64Array/BigUint64Array.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::typedArrayElementSize):
(WebCore::CloneSerializer::dumpArrayBufferView):
(WebCore::CloneDeserializer::readArrayBufferView):

LayoutTests:

  • storage/indexeddb/resources/structured-clone.js:
  • storage/indexeddb/structured-clone-expected.txt:
9:37 AM Changeset in webkit [272214] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, address post-landing review comment by Darin Adler for r272211.

  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::cookiesForURL):

9:21 AM Changeset in webkit [272213] by youenn@apple.com
  • 7 edits in trunk/Source

Recover MediaStreamTrack audio rendering from GPUProcess crash
https://bugs.webkit.org/show_bug.cgi?id=221128

Reviewed by Eric Carlson.

Source/WebCore:

Add a callback to allow AudioMediaStreamTrackRenderer to notify its AudioTrackPrivateMediaStream of crash.
In case of crash, AudioTrackPrivateMediaStream will stop rendering, recreate a new renderer and restart rendering.

Manually tested since correct rendering is not easily observable.

  • platform/mediastream/AudioMediaStreamTrackRenderer.h:

(WebCore::AudioMediaStreamTrackRenderer::crashed):

  • platform/mediastream/AudioTrackPrivateMediaStream.cpp:

(WebCore::AudioTrackPrivateMediaStream::AudioTrackPrivateMediaStream):
(WebCore::AudioTrackPrivateMediaStream::createRenderer):
(WebCore::AudioTrackPrivateMediaStream::createNewRenderer):

  • platform/mediastream/AudioTrackPrivateMediaStream.h:

Source/WebKit:

Make AudioMediaStreamTrackRenderer observe GPUProcess crash.
Notify its owner in case of crash.

  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp:

(WebKit::AudioMediaStreamTrackRenderer::AudioMediaStreamTrackRenderer):
(WebKit::AudioMediaStreamTrackRenderer::~AudioMediaStreamTrackRenderer):
(WebKit::AudioMediaStreamTrackRenderer::initialize):
(WebKit::AudioMediaStreamTrackRenderer::gpuProcessConnectionDidClose):

  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.h:
9:17 AM Changeset in webkit [272212] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Make sure NetworkRTCProvider stays valid for all NetworkRTCSocketCocoa callbacks
https://bugs.webkit.org/show_bug.cgi?id=221249
<rdar://problem/72671547>

Reviewed by Eric Carlson.

Make the connection callback take a ref of the NetworkRTCProvider.
The ref cycle will break at NetworkConnectionToWebProcess destruction since it will call NetworkRTCProvider::close
which deletes all sockets owning the connection.

  • NetworkProcess/webrtc/NetworkRTCSocketCocoa.mm:

(WebKit::NetworkRTCSocketCocoa::NetworkRTCSocketCocoa):

9:07 AM Changeset in webkit [272211] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Crash under NetworkStorageSession::cookiesForSession()
https://bugs.webkit.org/show_bug.cgi?id=221227
<rdar://71975008>

Reviewed by Geoffrey Garen.

Retain NSArray of cookies in NetworkStorageSession::cookiesForSession() for clearer lifetime
management. This is a speculative fix for <rdar://71975008>.

  • platform/network/NetworkStorageSession.h:
  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::NetworkStorageSession::httpCookies const):
(WebCore::cookiesForURL):
(WebCore::NetworkStorageSession::httpCookiesForURL const):
(WebCore::NetworkStorageSession::cookiesForURL const):
(WebCore::NetworkStorageSession::cookiesForSession const):
(WebCore::NetworkStorageSession::getRawCookies const):
(WebCore::NetworkStorageSession::deleteCookie const):
(WebCore::NetworkStorageSession::getHostnamesWithCookies):
(WebCore::NetworkStorageSession::deleteCookiesForHostnames):

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

Unreviewed build fix after 272154.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:
8:31 AM Changeset in webkit [272209] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

[macOS] Regression(r271897) Prewarmed WebProcesses no longer get a user-friendly process name in Activity Monitor
https://bugs.webkit.org/show_bug.cgi?id=221094
<rdar://73658122>

Reviewed by Per Arne Vollan.

Prewarmed WebProcesses currently do not have a network process connection because they do not have a sessionID yet
and initiating a connection to the network process currently requires a sessionID. r271897 made it so that
WebProcess::updateProcessName() early returns when there is no network process connection, which means that our
prewarmed WebProcesses no longer get the "Safari Web Content (prewarmed)" user-friendly name in activity monitor.

This patch relies on the fact that we are allowed to talk to launchservices when WebProcess::updateProcessName()
gets called during process initialization (The sandbox extension gets revoked during process initialization right
after calling updateProcessName). As a result, if updateProcessName() gets called during process initialization,
we now set the process name directly within the process instead of messaging the network process. This fixes the
issue with prewarmed WebProcesses.

This patch also gets rid of the early returns when the network connection is not present and calls
ensureNetworkProcessConnection() instead. We want to make sure to set the process name even if the process does
not have a network process connection yet (either because none has been initiated yet or because the network
process crashed).

Finally, this patch replaces some WTFLogAlways() for error cases with RELEASE_LOG_ERROR() so that the errors
stand out in the logs.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::tryTakePrewarmedProcess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setIsInProcessCache):
(WebKit::WebProcess::markIsNoLongerPrewarmed):

  • WebProcess/WebProcess.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::updateProcessName):
(WebKit::WebProcess::updateActivePages):

8:11 AM Changeset in webkit [272208] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] InlineContentBreaker::processOverflowingTextContent should return the overflowing run index
https://bugs.webkit.org/show_bug.cgi?id=221242

Reviewed by Antti Koivisto.

This is in preparation for supporting correct content wrapping when the unbreakable content has multiple runs
and each run has different wrapping rules
e.g. <nowrap>this_content_does_not_wrap</nowrap>but_this_does.

In this patch processOverflowingTextContent returns the overflowing run index so that later
we can use this information to decide if this overflowing content should stay or get wrapped to the next line.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):

  • layout/inlineformatting/InlineContentBreaker.h:
7:35 AM Changeset in webkit [272207] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] Initialize PrintInfo::PrintMode
https://bugs.webkit.org/show_bug.cgi?id=221256

Patch by Frédéric Wang <fwang@igalia.com> on 2021-02-02
Reviewed by Carlos Garcia Campos.

  • Shared/PrintInfo.h:
4:31 AM Changeset in webkit [272206] by youenn@apple.com
  • 14 edits
    2 deletes in trunk

Use WebRTC GPU process flag for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=220967

Reviewed by Eric Carlson.

Source/WebCore:

Remove Internals::setUseGPUProcessForWebRTC and rely on WebRTC codec feature flag.

  • Modules/mediarecorder/MediaRecorderProvider.h:
  • testing/Internals.cpp:

(WebCore::Internals::setUseGPUProcessForWebRTC): Deleted.

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

Source/WebKit:

  • WebProcess/GPU/webrtc/MediaRecorderProvider.cpp:

(WebKit::MediaRecorderProvider::createMediaRecorderPrivate):

LayoutTests:

Update test to use feature flag instead of internals API.
Removing webrtc/video-gpuProcess.html since it is now equivalent to webrtc/video.html.

  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html:
  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html:
  • http/wpt/mediarecorder/MediaRecorder-requestData.html:
  • http/wpt/mediarecorder/mute-tracks.html:
  • http/wpt/mediarecorder/pause-recording.html:
  • platform/glib/TestExpectations:
  • webrtc/video-gpuProcess-expected.txt: Deleted.
  • webrtc/video-gpuProcess.html: Deleted.
4:12 AM Changeset in webkit [272205] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

Only update IPC connection of RemoteCaptureSampleManager for audio sources
https://bugs.webkit.org/show_bug.cgi?id=221200

Reviewed by Eric Carlson.

There is no need to update the connection for sources that are not added to the RemoteCaptureSampleManager.

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::addSource):
(WebKit::UserMediaCaptureManager::didUpdateSourceConnection):

  • WebProcess/cocoa/UserMediaCaptureManager.h:
3:12 AM Changeset in webkit [272204] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

ews isn't retrying builds when kill-old-processes fails
https://bugs.webkit.org/show_bug.cgi?id=221235

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(KillOldProcesses.init): Increased timeout to 2 minutes.
(KillOldProcesses.evaluateCommand): Used rc since self.results is None at this step.

  • CISupport/ews-build/steps_unittest.py: Updated unit-tests.
3:07 AM Changeset in webkit [272203] by graouts@webkit.org
  • 2 edits in trunk/Source/WebKit

WKASCAuthorizationPresenterDelegate needs to import RunLoop.h and BlockPtr.h
https://bugs.webkit.org/show_bug.cgi?id=221250

Reviewed by Antti Koivisto.

  • UIProcess/WebAuthentication/Cocoa/WKASCAuthorizationPresenterDelegate.mm:
3:00 AM Changeset in webkit [272202] by youenn@apple.com
  • 8 edits in trunk

Recover WebRTC codecs in case of GPUProcess crash
https://bugs.webkit.org/show_bug.cgi?id=221138

Reviewed by Eric Carlson.

Source/WebKit:

Make LibWebRTCCodecs listen to GPUProcess crash on creation of LibWebRTCCodec.
Set the connection also at the same time.
This allows to remove the hop to main thread when creating/releasing encoders and decoders.
Everything now happens in the dedicated queue, in particular updating of m_connection, encoder and decoder connections,
as well as encoders and decoders maps.
When using encoder/decoder connection outside of the dedicated queue, a lock is needed.

Update LibWebRTCCodecs use of gpu process when creating a peer connection so that this happens in main thread.

In case of process crash, we do some setup in main thread (listening to IPC messages for instance).
But most of the work is done in a task run in the dedicated queue.
In this task, we set the new IPC connection of all running decoders and encoders.
We also send IPC message to recreate encoders and decoders.
For that purpose, we store some states in encoders and decoders.

Covered by API test.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::formatNameFromWebRTCCodecType):
(WebKit::createRemoteDecoder):
(WebKit::LibWebRTCCodecs::LibWebRTCCodecs):
(WebKit::LibWebRTCCodecs::createDecoder):
(WebKit::LibWebRTCCodecs::releaseDecoder):
(WebKit::LibWebRTCCodecs::decodeFrame):
(WebKit::LibWebRTCCodecs::createEncoder):
(WebKit::LibWebRTCCodecs::releaseEncoder):
(WebKit::LibWebRTCCodecs::initializeEncoder):
(WebKit::LibWebRTCCodecs::encodeFrame):
(WebKit::LibWebRTCCodecs::setEncodeRates):
(WebKit::LibWebRTCCodecs::gpuProcessConnectionDidClose):
(WebKit::LibWebRTCCodecs::setConnection): Deleted.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:

(WebKit::LibWebRTCProvider::createPeerConnection):
(WebKit::LibWebRTCProvider::createDecoderFactory):
(WebKit::LibWebRTCProvider::createEncoderFactory):

Tools:

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/getUserMedia.html:
2:59 AM Changeset in webkit [272201] by graouts@webkit.org
  • 4 edits
    4 adds in trunk

Animation of "rotate" or "scale" property does not correctly account for static "translate" property
https://bugs.webkit.org/show_bug.cgi?id=219894
<rdar://problem/72342798>

Reviewed by Dean Jackson.

Source/WebCore:

The CSS transform-related properties are designed to be applied in a specific order, guaranteeing that
"translate" is applied prior to both "scale" and "rotate". Since Core Animation has no concept of these
individual transform-related CSS properties, we use additive Core Animation animations to apply the value
of each CSS property, using non-interpolating animations set to start at the earliest time in the Core
Animation timeline and lasting forever to set the value of any underlying, non-animated value.

As such, in an example where an element would have a static "translate" property set as well as a "rotate"
or "scale" animation, we would yield the following animations, added in this order:

  1. non-interpolating animation beginning at 1s setting the identity transform (the "clean slate" animation)
  2. interpolating animation beginning at a time > 1s for the "scale" or "rotate" animation
  3. non-interpolating animation beginning at 1s setting the "translate" value

Note that animations 2 and 3 are additive and thus added in the inverse order that we expect animations to be
applied. Due to a peculiarity of Core Animation (introduced in macOS 10.15), additive animations are applied
in an inverse order, hence the build-time flag CA_WHERE_ADDITIVE_TRANSFORMS_ARE_REVERSED.

However, Core Animation will first sort all animations based on their begin time, only respecting the order
in which animations are added when their begin time is equal. This means that in practice, our animations were
applied in the order 1, 3, 2, and thus the "translate" property was applied after the "rotate" or "scale" animation.

In order to address this, we now create a CAAnimationGroup for each set of animations created for a given CSS
property. Each of these groups shares the same begin time, 1s, to allow for "forever" non-interpolating animations
to be applied, but also to set a common base time for animations to be applied in the expected order.

Tests: webanimations/relative-ordering-of-translate-and-rotate-properties-accelerated.html

webanimations/relative-ordering-of-translate-and-scale-properties-accelerated.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateAnimations):

  • platform/graphics/ca/GraphicsLayerCA.h:

(WebCore::GraphicsLayerCA::LayerPropertyAnimation::computedBeginTime const):

LayoutTests:

Add two new tests that ensure that translate is indeed applied before rotate and scale.

  • webanimations/relative-ordering-of-translate-and-rotate-properties-accelerated-expected.html: Added.
  • webanimations/relative-ordering-of-translate-and-rotate-properties-accelerated.html: Added.
  • webanimations/relative-ordering-of-translate-and-scale-properties-accelerated-expected.html: Added.
  • webanimations/relative-ordering-of-translate-and-scale-properties-accelerated.html: Added.
2:25 AM Changeset in webkit [272200] by youenn@apple.com
  • 15 edits in trunk/Source

imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-stop.html is flaky when GPUProcess is enabled
https://bugs.webkit.org/show_bug.cgi?id=221197

Reviewed by Eric Carlson.

Source/WebCore:

When a track is removed, we should stop recording and fire an error event.
Previously, we were enqueuing a task, stopping the recording and dispatching the error event.
This could trigger the error event to be dispatched before the start event which does:

  • Call start on MediaRecorderPrivate
  • Wait for start to finish
  • Enqueue a task and dispatch start event.

To fix this, we add a completion handler when stopping recording so that the order of events is guaranteed.

Covered by imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-stop.html no longer flaky when GPUProcess is on for MediaRecorder.

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::stopRecordingInternal):
(WebCore::MediaRecorder::handleTrackChange):
(WebCore::MediaRecorder::trackEnded):

  • Modules/mediarecorder/MediaRecorder.h:
  • platform/mediarecorder/MediaRecorderPrivate.cpp:

(WebCore::MediaRecorderPrivate::stop):

  • platform/mediarecorder/MediaRecorderPrivate.h:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:

(WebCore::MediaRecorderPrivateAVFImpl::stopRecording):

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:

(WebCore::MediaRecorderPrivateMock::stopRecording):

  • platform/mediarecorder/MediaRecorderPrivateMock.h:

Source/WebKit:

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:

(WebKit::RemoteMediaRecorder::stopRecording):

  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.messages.in:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:

(WebKit::MediaRecorderPrivate::stopRecording):

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
1:33 AM Changeset in webkit [272199] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Missing exception check with new MediaStream(0)
https://bugs.webkit.org/show_bug.cgi?id=220355

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-02-02
Reviewed by Mark Lam.

This is because the MediaStream constructor calls hasIteratorMethod() that can throw a exception, but it's not checked.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateOverloadDispatcher): Handle overload calls when the condition can throw a exception.

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunction_overloadedMethodOverloadDispatcher):

  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:

(WebCore::JSTestOverloadedConstructorsWithSequenceDOMConstructor::construct):

1:22 AM Changeset in webkit [272198] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Provide mock dtmf sender
https://bugs.webkit.org/show_bug.cgi?id=220382

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-02
Reviewed by Youenn Fablet.

Source/WebCore:

Provide mock dtmf sender.

Test: webrtc/dmtf-getter-crash.html

  • testing/MockLibWebRTCPeerConnection.h:

LayoutTests:

Add test for this.

  • webrtc/dmtf-getter-crash-expected.txt: Added.
  • webrtc/dmtf-getter-crash.html: Added.
1:02 AM Changeset in webkit [272197] by BJ Burg
  • 22 edits
    2 adds in trunk

Web Inspector: implement the basics for showing/hiding grid overlays
https://bugs.webkit.org/show_bug.cgi?id=221062

Reviewed by Devin Rousso.

Source/JavaScriptCore:

Add new commands to show and hide CSS grid overlays:

  • DOM.showGridOverlay
  • DOM.hideGridOverlay
  • inspector/protocol/DOM.json:

Source/WebCore:

Implement backend commands for showing and hiding CSS grid overlays.
This patch draws a very simplistic grid overlay. Support for the
various grid overlay options will be added in later patches.

New test: inspector/dom/showGridOverlay.html

  • inspector/InspectorOverlay.h:

(WebCore::InspectorOverlay::gridOverlayCount const):
Added, for testing only.

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::paint):
(WebCore::InspectorOverlay::shouldShowOverlay const):
Hook up the painting of any active grid overlays.

(WebCore::InspectorOverlay::setGridOverlayForNode):
(WebCore::InspectorOverlay::clearGridOverlayForNode):
(WebCore::InspectorOverlay::clearAllGridOverlays):
Maintain the list of active grid overlays. A node can only
have one grid overlay at a time.

(WebCore::InspectorOverlay::drawNodeHighlight):
Add a note about why grid overlays are not considered when
calculating the ruler exclusion area.

(WebCore::InspectorOverlay::drawGridOverlay): Added.
This drawing code exists to flesh out the rest of this patch,
and is obviously incomplete.

Draw grid lines that extend to the edge of the viewport,
equivalent to config.showExtendedGridLines = true.

  • inspector/agents/InspectorDOMAgent.h:
  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::showGridOverlay):
(WebCore::InspectorDOMAgent::hideGridOverlay):
Translate protocol commands into InspectorOverlay method calls.

  • inspector/InspectorController.h:
  • inspector/InspectorController.cpp:

(WebCore::InspectorController::gridOverlayCount const):
Added. This is used for testing purposes only.

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

(WebCore::Internals::inspectorGridOverlayCount): Added.

Source/WebInspectorUI:

Expose new DOM.showGridOverlay and DOM.hideGridOverlay commands
via WI.DOMNode. Add initial engineering UI to toggle grid overlays.

New methods are covered by a new test:

inspector/dom/showGridOverlay.html

Additions to WI.DOMManager.prototype.requestDocument are covered
by existing tests (callback case) and a new test (promise case).

Additions to WI.Color are covered by a new test case in:

inspector/model/color.html

  • UserInterface/Controllers/DOMManager.js:

(WI.DOMManager.prototype.requestDocument):
(WI.DOMManager.prototype._requestDocumentWithPromise):
Drive-by: upgrade requestDocument() to return a promise if
no callback argument was passed. This is used by a new test.

  • UserInterface/Models/Color.js:

(WI.Color.prototype.toProtocol): Added. The protocol object is
DOM.RGBAColor, which is the same thing as WI.Color.Format.RGBA.

  • UserInterface/Models/DOMNode.js:

(WI.DOMNode.prototype.showGridOverlay):
(WI.DOMNode.prototype.hideGridOverlay):
Added. These are the methods that the rest of WebInspectorUI uses
to interact with grid overlays for a particular node. Note that
these methods return either an unsettled promise (from the agent call)
or a rejected promise (in the case that the node is destroyed).
This allows test cases to await before checking the grid overlay count.

  • UserInterface/Test/TestHarness.js:

(TestHarness.prototype.expectException): Improve logging output
when InspectorTest.expectException does not catch an exception.

  • UserInterface/Views/ContextMenuUtilities.js:

Add some engineering-only context menu items for showing/hiding
grid overlays to DOMTreeElements in the Elements Tab.

These are in place for development purposes and should eventually
be removed when no longer needed.

LayoutTests:

  • inspector/dom/showGridOverlay-expected.txt: Added.
  • inspector/dom/showGridOverlay.html: Added.

This test does not cover the actual drawing code. The drawing method
will change a lot and is not easy to test currently. The new test
covers the behavior of showGridOverlay/hideGridOverlay by querying
how many grid overlays are active according to InspectorOverlay.

  • inspector/model/color-expected.txt:
  • inspector/model/color.html:

Add a test case to exercise WI.Color.prototype.toProtocol().

  • inspector/unit-tests/test-harness-expect-functions-async-expected.txt:

Rebaseline results after adding more state dumping in the failure case
for InspectorTest.expectException().

12:52 AM Changeset in webkit [272196] by Carlos Garcia Campos
  • 13 edits
    2 moves
    3 deletes in trunk/Source

[SOUP] Stop using SoupBuffer in preparation for libsoup3
https://bugs.webkit.org/show_bug.cgi?id=221206

Reviewed by Sergio Villar Senin.

Source/WebCore:

Remove use of SoupBuffer from platform since it's now unused.

  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::DataSegment::data const):
(WebCore::SharedBuffer::DataSegment::size const):

  • platform/SharedBuffer.h:
  • platform/Soup.cmake:
  • platform/SourcesSoup.txt:
  • platform/network/soup/GRefPtrSoup.cpp: Removed.
  • platform/network/soup/GRefPtrSoup.h: Removed.
  • platform/network/soup/GUniquePtrSoup.h:
  • platform/network/soup/ResourceRequestSoup.cpp:

(WebCore::ResourceRequest::updateSoupMessageBody const):

  • platform/soup/SharedBufferSoup.cpp: Removed.

Source/WebKit:

Use GBytes instead of SoupBuffer.

  • NetworkProcess/cache/NetworkCacheData.h:

(WebKit::NetworkCache::Data::bytes const):

  • NetworkProcess/cache/NetworkCacheDataGLib.cpp: Renamed from Source/WebKit/NetworkProcess/cache/NetworkCacheDataSoup.cpp.

(WebKit::NetworkCache::Data::Data):
(WebKit::NetworkCache::Data::empty):
(WebKit::NetworkCache::Data::data const):
(WebKit::NetworkCache::Data::apply const):
(WebKit::NetworkCache::Data::subrange const):
(WebKit::NetworkCache::concatenate):
(WebKit::NetworkCache::Data::adoptMap):
(WebKit::NetworkCache::Data::tryCreateSharedMemory const):

  • NetworkProcess/cache/NetworkCacheIOChannel.h:
  • NetworkProcess/cache/NetworkCacheIOChannelGLib.cpp: Renamed from Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp.

(WebKit::NetworkCache::runTaskInQueue):
(WebKit::NetworkCache::fillDataFromReadBuffer):
(WebKit::NetworkCache::inputStreamReadReadyCallback):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSyncInThread):
(WebKit::NetworkCache::outputStreamWriteReadyCallback):
(WebKit::NetworkCache::IOChannel::write):

  • Shared/ShareableResource.cpp:

(WebKit::ShareableResource::wrapInSharedBuffer):

  • SourcesGTK.txt:
  • SourcesWPE.txt:
12:50 AM Changeset in webkit [272195] by Carlos Garcia Campos
  • 8 edits in trunk

[GTK][WPE] Migrate WebKitTestServer to libsoup 2.48 API
https://bugs.webkit.org/show_bug.cgi?id=219160
<rdar://problem/71620310>

Reviewed by Michael Catanzaro.

Source/WTF:

  • wtf/Platform.h: Bump libsoup minimum required version to 2.54.

Tools:

  • TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:

(serverCallback):

  • TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp:

(serverCallback):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:

(serverCallback):

  • TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:

(WebKitTestServer::WebKitTestServer):
(WebKitTestServer::run):
(WebKitTestServer::port const):

  • TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.h:
12:34 AM Changeset in webkit [272194] by Adrian Perez de Castro
  • 19 edits in trunk/Source

Non-unified build fixes, late January 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=221044

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • wasm/WasmStreamingCompiler.cpp: Add missing WasmWorklist.h header.
  • wasm/WasmStreamingCompiler.h: Add missing JSCJSValue.h header and forwars declarations

for JSGlobalObject, JSObject, and VM.

  • wasm/WasmStreamingPlan.cpp: Add missing WasmLLIntPlan.h header.
  • wasm/js/WebAssemblyGlobalConstructor.cpp: Add missing JSWebAssemblyHelpers.h and

JSWebAssemblyRuntimeError.h headers.

Source/WebCore:

No new tests needed.

  • accessibility/AccessibilitySVGRoot.cpp: Add missing header includes for

SVGDescElement.h, SVGTitleElement.h, and TypedElementDescendantIterator.h.
(WebCore::AccessibilitySVGRoot::hasAccessibleContent const): Sprinkle missing HTMLNames::
namespace prefixes.

  • html/canvas/WebGLRenderingContextBase.cpp: Add missing WebGLMultiDraw.h header inclusion.
  • inspector/agents/InspectorIndexedDBAgent.cpp: Add missing AddEventListenerOptions.h

header inclusion.

  • rendering/RenderBlockFlow.cpp: Add missing RenderLayerScrollableArea.h header inclusion.
  • rendering/RenderTreeAsText.cpp: Add missing RenderQuote.h header inclusion.

Source/WebKit:

  • NetworkProcess/NetworkLoadScheduler.cpp: Add missing wtf/ListHashSet.h header inclusion.

(WebKit::NetworkLoadScheduler::HostContext::schedule): Add missing WebCore:: namespace in
usage of WebCore::ResourceLoadPriority enum.

  • Platform/unix/SharedMemoryUnix.cpp: Add missing ArgumentCoders.h header inclusion.
  • Shared/API/APIFrameHandle.cpp: Ditto.
  • Shared/API/APIGeometry.cpp: Ditto.
  • Shared/API/APIPageGroupHandle.cpp: Ditto.
  • Shared/API/APIPageHandle.cpp: Ditto.
  • Shared/LayerTreeContext.cpp: Ditto.
12:10 AM Changeset in webkit [272193] by commit-queue@webkit.org
  • 4 edits in trunk

Support aspect-ratio on <body> in quirks mode
https://bugs.webkit.org/show_bug.cgi?id=219489

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-02
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update test expectation.

  • web-platform-tests/css/css-sizing/aspect-ratio/quirks-mode-001-expected.txt:

Source/WebCore:

If the logical height is auto, the actual computed height could still be
non-auto because of aspect-ratio, so add a check for that case.

Test: imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/quirks-mode-001.html

  • rendering/RenderBox.h:

(WebCore::RenderBox::stretchesToViewport const):

Note: See TracTimeline for information about the timeline view.