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

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):

Note: See TracTimeline for information about the timeline view.