Timeline



Feb 16, 2021:

11:21 PM Changeset in webkit [272988] by Peng Liu
  • 2 edits in trunk/Source/WebKit

[GPUP] Video as image source triggers IOSurface readback (unnecessarily slow)
https://bugs.webkit.org/show_bug.cgi?id=221993

Reviewed by Tim Horton.

Use IOSurface::sinkIntoImage() instead of IOSurface::createImage() to avoid expensive GPU readback.

Manually tested.

  • WebProcess/GPU/media/RemoteImageDecoderAVF.cpp:

(WebKit::RemoteImageDecoderAVF::createFrameImageAtIndex):

10:47 PM Changeset in webkit [272987] by weinig@apple.com
  • 15 edits in trunk/Source

Add CSS property to enable separated bit on GraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=222010

Reviewed by Dean Jackson.

Add internal access to the separated bit on graphics layer via a
new "optimized-3d" transform-style. This is all off by default and
is expected to change, but is useful and non-invasive for experimentation.

Source/WebCore:

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TransformStyle3D const):

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • css/parser/CSSParserContext.cpp:

(WebCore::operator==):

  • css/parser/CSSParserContext.h:

(WebCore::CSSParserContextHash::hash):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareNonInheritedData.h:

Plumb optimized-3d all the way to graphics layer. Currently we are just mapping
optimized-3d to separated, but I expect to change this a bit to make it a bit
more useful for experimentation.

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • wtf/PlatformEnable.h:
10:16 PM Changeset in webkit [272986] by Fujii Hironori
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r272476.

GTK port is crashing.

Reverted changeset:

"[CoordinatedGraphics] The whole content is unnecessarily
repainted by animations in non-AC mode pages"
https://bugs.webkit.org/show_bug.cgi?id=221391
https://commits.webkit.org/r272476

10:16 PM Changeset in webkit [272985] by Chris Dumez
  • 5 edits in trunk/Source/WTF

Clients of ARC-dependent WTF functions may get incorrect/crashy behavior
https://bugs.webkit.org/show_bug.cgi?id=222004
<rdar://73620184>

Reviewed by Geoffrey Garen.

ARC is enabled in WTF but not in our other frameworks. This can lead to bad/crashy
behavior. To address the issue, renames functions like adoptNS() to adoptNSArc()
when ARC is enabled, via a #define.

This patch was written by Geoff Garen.

  • wtf/BlockPtr.h:
  • wtf/OSObjectPtr.h:
  • wtf/RetainPtr.h:
  • wtf/WeakObjCPtr.h:
10:10 PM Changeset in webkit [272984] by Carlos Garcia Campos
  • 8 edits in trunk/Tools

[GTK][WPE] Reduce the use of SoupURI in unit tests in preparation for libsoup3
https://bugs.webkit.org/show_bug.cgi?id=221963

Reviewed by Adrian Perez de Castro.

Now that URL is in WTF we can just use it instead.

  • TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:

(testWebViewAuthenticationRequest):
(ProxyAuthenticationTest::ProxyAuthenticationTest):
(ProxyAuthenticationTest::proxyServerPortAsString):
(testWebViewAuthenticationProxy):
(testWebViewAuthenticationProxyHTTPS):

  • TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp:

(testLoadFailedWithTLSErrors):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:

(testWebExtensionPageID):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:

(ProxyTest::ProxyTest):
(ProxyTest::proxyServerPortAsString):
(testWebContextProxySettings):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(setInitialNotificationPermissionsAllowedCallback):
(setInitialNotificationPermissionsDisallowedCallback):

  • TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:

(WebKitTestServer::run):
(WebKitTestServer::addWebSocketHandler):
(WebKitTestServer::removeWebSocketHandler):
(WebKitTestServer::getWebSocketURIForPath const):
(WebKitTestServer::getURIForPath const):
(WebKitTestServer::port const):

  • TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.h:

(WebKitTestServer::baseURL const):
(WebKitTestServer::baseWebSocketURL const):

9:54 PM Changeset in webkit [272983] by Manuel Rego Casasnovas
  • 32 edits
    1 copy
    1 add in trunk

[selectors] :focus-visible parsing and experimental flag
https://bugs.webkit.org/show_bug.cgi?id=221895

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update expectations as now :focus-visible is a valid selector.

  • web-platform-tests/css/selectors/focus-in-focus-event-001-expected.txt:
  • web-platform-tests/css/selectors/focus-in-focusin-event-001-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-001-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-002-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-003-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-004-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-005-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-006-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-007-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-009-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-010-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-012-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-015-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-016-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-017-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-018-expected.txt:
  • web-platform-tests/css/selectors/parsing/parse-focus-visible-expected.txt:

Source/WebCore:

Add parsing for :focus-visible pseudo class, it'll only be enabled if the experimental feature flag is enabled.

Test: imported/w3c/web-platform-tests/css/selectors/parsing/parse-focus-visible.html

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::selectorText const):

  • css/CSSSelector.h:
  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne const):

  • css/SelectorCheckerTestFunctions.h:

(WebCore::matchesFocusVisiblePseudoClass):

  • css/SelectorPseudoClassAndCompatibilityElementMap.in:
  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):

  • css/parser/CSSParserContext.h:
  • css/parser/CSSSelectorParser.cpp:

(WebCore::isUserActionPseudoClass):
(WebCore::CSSSelectorParser::consumePseudo):

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::JSC_DEFINE_JIT_OPERATION):
(WebCore::SelectorCompiler::addPseudoClassType):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml: Add experimental feature flag.

LayoutTests:

  • platform/ios/TestExpectations: Skip test that timeouts in iOS platform.
  • platform/mac/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt:

Slightly different rebaseline due to default outline color on Mac.

9:36 PM Changeset in webkit [272982] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix typo in CSSProperties for "text-align" -- should be "url", not "ur"
https://bugs.webkit.org/show_bug.cgi?id=222027

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-02-16
Reviewed by Simon Fraser.

Fix typo for "text-align" property. Key should be "url", but is
instead "ur".

  • css/CSSProperties.json: Fix typo -- "ur" --> "url"
9:18 PM Changeset in webkit [272981] by commit-queue@webkit.org
  • 208 edits
    1 add
    1 delete in trunk/LayoutTests

[LayoutTests] Convert http/tests/resources/redirect.php to Python
https://bugs.webkit.org/show_bug.cgi?id=221784
<rdar://problem/74257227>

Patch by Jonathan Bedard <JonWBedard@gmail.com> on 2021-02-16
Reviewed by Dewei Zhu.

  • http/tests/appcache/decide-navigation-policy-after-delay.html:
  • http/tests/appcache/interrupted-update.html:
  • http/tests/appcache/main-resource-redirect-with-sw.html:
  • http/tests/contentextensions/main-resource-redirect-error-expected.txt:
  • http/tests/contentextensions/main-resource-redirect-error.html:
  • http/tests/contentextensions/sync-xhr-redirection-blocked-expected.txt:
  • http/tests/contentextensions/sync-xhr-redirection-blocked.html:
  • http/tests/contentfiltering/allow-after-redirect.html:
  • http/tests/contentfiltering/block-after-redirect.html:
  • http/tests/contentfiltering/load-substitute-data-from-appcache.html:
  • http/tests/contentfiltering/modify-redirect-request-url.html:
  • http/tests/cookies/same-site/fetch-after-top-level-cross-origin-redirect.html:
  • http/tests/cookies/same-site/fetch-after-top-level-same-origin-redirect.html:
  • http/tests/cookies/same-site/popup-same-site-via-cross-site-redirect.html:
  • http/tests/cookies/same-site/popup-same-site-via-same-site-redirect.html:
  • http/tests/cookies/same-site/user-load-cross-site-redirect.php:
  • http/tests/css/css-imports-redirect-cycle.css:
  • http/tests/css/css-imports-url-fragment.css:
  • http/tests/download/anchor-download-redirect.html:
  • http/tests/globalhistory/history-delegate-basic-302-redirect-expected.txt:
  • http/tests/globalhistory/history-delegate-basic-302-redirect.html:
  • http/tests/globalhistory/history-delegate-basic-refresh-redirect-expected.txt:
  • http/tests/globalhistory/history-delegate-basic-refresh-redirect.html:
  • http/tests/misc/form-submit-file-cross-site-redirect.html:
  • http/tests/misc/webtiming-two-redirects.php:
  • http/tests/plugins/get-url-redirect-notify.html:
  • http/tests/resources/redirect.php: Removed.
  • http/tests/resources/redirect.py: Added.

(addCacheControl):

  • http/tests/security/beforeload-iframe-server-redirect.html:
  • http/tests/security/blocked-on-redirect-expected.txt:
  • http/tests/security/blocked-on-redirect.html:
  • http/tests/security/cannot-read-cssrules-redirect.html:
  • http/tests/security/canvas-remote-read-data-url-image-redirect.html:
  • http/tests/security/canvas-remote-read-redirect-to-remote-image.html:
  • http/tests/security/canvas-remote-read-remote-image-redirect.html:
  • http/tests/security/canvas-remote-read-remote-video-redirect.html:
  • http/tests/security/contentSecurityPolicy/audio-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/audio-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/audio-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/block-all-mixed-content/resources/frame-with-secure-image-after-upgrade-redirect.html:
  • http/tests/security/contentSecurityPolicy/embed-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/embed-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/embed-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/embed-redirect-blocked2.html:
  • http/tests/security/contentSecurityPolicy/embed-redirect-blocked3.html:
  • http/tests/security/contentSecurityPolicy/font-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/font-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/font-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/form-action-src-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/form-action-src-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/frame-src-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/iframe-redirect-allowed-by-child-src.html:
  • http/tests/security/contentSecurityPolicy/iframe-redirect-allowed-by-child-src2.html:
  • http/tests/security/contentSecurityPolicy/iframe-redirect-allowed-by-frame-src.html:
  • http/tests/security/contentSecurityPolicy/iframe-redirect-allowed-by-frame-src2.html:
  • http/tests/security/contentSecurityPolicy/iframe-redirect-blocked-by-child-src.html:
  • http/tests/security/contentSecurityPolicy/iframe-redirect-blocked-by-frame-src.html:
  • http/tests/security/contentSecurityPolicy/image-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/image-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/image-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/object-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/object-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/object-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/object-redirect-blocked2.html:
  • http/tests/security/contentSecurityPolicy/object-redirect-blocked3.html:
  • http/tests/security/contentSecurityPolicy/resources/xsl-redirect-allowed.php:
  • http/tests/security/contentSecurityPolicy/resources/xsl-redirect-blocked.php:
  • http/tests/security/contentSecurityPolicy/script-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/script-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/script-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/stylesheet-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/stylesheet-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/stylesheet-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/svg-font-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/svg-font-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/svg-font-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/svg-image-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/svg-image-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/svg-image-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/track-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/track-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/track-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade-after-redirect.https.html:
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/frame-with-redirect-http-to-https-script.html:
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/frame-with-redirect-https-to-http-script.html:
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/insecure-sync-xhr-in-main-frame-window.html:
  • http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-after-redirect.html:
  • http/tests/security/contentSecurityPolicy/video-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/video-redirect-allowed2.html:
  • http/tests/security/contentSecurityPolicy/video-redirect-blocked.html:
  • http/tests/security/contentSecurityPolicy/worker-redirect-allowed-expected.txt:
  • http/tests/security/contentSecurityPolicy/worker-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/xsl-redirect-allowed.html:
  • http/tests/security/contentSecurityPolicy/xsl-redirect-allowed2.html:
  • http/tests/security/cors-post-redirect-301.html:
  • http/tests/security/cors-post-redirect-302.html:
  • http/tests/security/cors-post-redirect-303.html:
  • http/tests/security/cors-post-redirect-307-pson.html:
  • http/tests/security/cors-post-redirect-307.html:
  • http/tests/security/cors-post-redirect-308.html:
  • http/tests/security/cross-origin-css-1-expected.txt:
  • http/tests/security/cross-origin-css-1.html:
  • http/tests/security/cross-origin-css-2-expected.txt:
  • http/tests/security/cross-origin-css-2.html:
  • http/tests/security/cross-origin-css-3.html:
  • http/tests/security/cross-origin-css-5-expected.txt:
  • http/tests/security/cross-origin-css-5.html:
  • http/tests/security/cross-origin-css-6.html:
  • http/tests/security/cross-origin-css-in-quirks-1-expected.txt:
  • http/tests/security/cross-origin-css-in-quirks-1.html:
  • http/tests/security/cross-origin-css-in-quirks-2-expected.txt:
  • http/tests/security/cross-origin-css-in-quirks-2.html:
  • http/tests/security/cross-origin-css-in-quirks-3.html:
  • http/tests/security/cross-origin-css-in-quirks-5-expected.txt:
  • http/tests/security/cross-origin-css-in-quirks-5.html:
  • http/tests/security/cross-origin-css-in-quirks-6.html:
  • http/tests/security/cross-origin-script-error-event-redirected.html:
  • http/tests/security/cross-origin-script-window-onerror-redirected.html:
  • http/tests/security/load-image-after-redirection-2-expected.txt:
  • http/tests/security/load-image-after-redirection-2.html:
  • http/tests/security/load-image-after-redirection-expected.txt:
  • http/tests/security/load-image-after-redirection.html:
  • http/tests/security/mixedContent/insecure-image-redirects-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials-expected.txt:
  • http/tests/security/mixedContent/insecure-image-redirects-to-basic-auth-secure-image-expected.txt:
  • http/tests/security/mixedContent/insecure-script-redirects-to-basic-auth-secure-script-expected.https.txt:
  • http/tests/security/mixedContent/insecure-script-redirects-to-basic-auth-secure-script-expected.txt:
  • http/tests/security/mixedContent/insecure-stylesheet-redirects-to-basic-auth-secure-stylesheet-expected.txt:
  • http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame-expected.txt:
  • http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt:
  • http/tests/security/mixedContent/resources/frame-with-insecure-image-redirects-to-basic-auth-secure-image.html:
  • http/tests/security/mixedContent/resources/frame-with-insecure-script-redirects-to-basic-auth-secure-script.html:
  • http/tests/security/mixedContent/resources/frame-with-insecure-stylesheet-redirects-to-basic-auth-secure-stylesheet.html:
  • http/tests/security/mixedContent/resources/frame-with-programmatically-added-insecure-image-redirects-to-basic-auth-secure-image.html:
  • http/tests/security/mixedContent/resources/frame-with-redirect-http-to-https-frame.html:
  • http/tests/security/mixedContent/resources/frame-with-redirect-http-to-https-script.html:
  • http/tests/security/mixedContent/resources/frame-with-redirect-https-to-http-frame.html:
  • http/tests/security/mixedContent/resources/frame-with-redirect-https-to-http-image-secure-cookie-block.html:
  • http/tests/security/mixedContent/resources/frame-with-redirect-https-to-http-image-secure-cookie.html:
  • http/tests/security/mixedContent/resources/frame-with-redirect-https-to-http-script.html:
  • http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-secure-page-via-insecure-redirect.https-expected.txt:
  • http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-secure-page-via-insecure-redirect.https.html:
  • http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt:
  • http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https.html:
  • http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image.https-expected.txt:
  • http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image.https.html:
  • http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt:
  • http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image-allowCrossOriginSubresourcesToAskForCredentials.https.html:
  • http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image.https.html:
  • http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt:
  • http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https.html:
  • http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image.https.html:
  • http/tests/security/redirect-BLOCKED-to-localURL.html:
  • http/tests/security/regress-52192.html:
  • http/tests/security/resources/cross-origin-xsl-redirect.xml:
  • http/tests/security/resources/referrer-policy-redirect-link-downgrade.html:
  • http/tests/security/resources/referrer-policy-redirect-link.html:
  • http/tests/security/resources/referrer-policy-redirect.html:
  • http/tests/security/resources/xsl-using-document-redirect.xsl:
  • http/tests/security/resources/xsl-using-external-entity-redirect.xsl:
  • http/tests/security/same-origin-css-1-expected.txt:
  • http/tests/security/same-origin-css-1.html:
  • http/tests/security/same-origin-css-2-expected.txt:
  • http/tests/security/same-origin-css-2.html:
  • http/tests/security/same-origin-css-3.html:
  • http/tests/security/same-origin-css-5-expected.txt:
  • http/tests/security/same-origin-css-5.html:
  • http/tests/security/same-origin-css-6.html:
  • http/tests/security/same-origin-css-in-quirks.html:
  • http/tests/security/shape-image-cors-redirect-error-message-logging-1.html:
  • http/tests/security/shape-image-cors-redirect-error-message-logging-3.html:
  • http/tests/security/shape-image-cors-redirect.html:
  • http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode.html:
  • http/tests/security/stylesheet-href-redirect-expected.txt:
  • http/tests/security/stylesheet-href-redirect.html:
  • http/tests/security/worker-cross-origin-expected.txt:
  • http/tests/security/worker-cross-origin.html:
  • http/tests/security/worker-same-origin-expected.txt:
  • http/tests/security/worker-same-origin.html:
  • http/tests/security/xss-DENIED-xsl-external-entity-redirect-expected.txt:
  • http/tests/security/xssAuditor/block-does-not-leak-referrer.html:
  • http/tests/security/xssAuditor/script-tag-open-redirect.html:
  • http/tests/security/xssAuditor/script-tag-redirect.html:
  • http/tests/workers/resources/worker-importScripts-error.js:
  • http/tests/workers/resources/worker-importScripts.js:
  • http/tests/workers/resources/worker-redirect.js:
  • http/tests/xmlhttprequest/access-control-and-redirects-async-same-origin-expected.txt:
  • http/tests/xmlhttprequest/access-control-and-redirects-async-same-origin.html:
  • http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
  • http/tests/xmlhttprequest/access-control-and-redirects.html:
  • http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html:
  • http/tests/xmlhttprequest/redirect-cross-origin-2.html:
  • http/tests/xmlhttprequest/redirect-cross-origin-post-sync.html:
  • http/tests/xmlhttprequest/redirect-cross-origin-post.html:
  • http/tests/xmlhttprequest/redirect-cross-origin-sync-double.html:
  • http/tests/xmlhttprequest/redirect-cross-origin-sync.html:
  • http/tests/xmlhttprequest/redirect-cross-origin-tripmine.html:
  • http/tests/xmlhttprequest/redirect-cross-origin.html:
  • http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect.html:
  • platform/gtk/http/tests/security/xss-DENIED-xsl-external-entity-redirect-expected.txt:
  • platform/mac-wk1/http/tests/security/worker-cross-origin-expected.txt:
  • platform/mac-wk1/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
  • platform/win/http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image.https-expected.txt:
  • platform/win/http/tests/security/worker-cross-origin-expected.txt:
  • platform/win/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
  • platform/wk2/http/tests/security/blocked-on-redirect-expected.txt:
  • platform/wk2/http/tests/security/mixedContent/insecure-image-redirects-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials-expected.txt:
  • platform/wk2/http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame-expected.txt:
  • platform/wk2/http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt:
  • platform/wk2/http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt:
8:51 PM Changeset in webkit [272980] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Remove unnecessary hack for iOS7
https://bugs.webkit.org/show_bug.cgi?id=222017

Reviewed by Mark Lam.

Remove this symbol hack since we are not supporting iOS7.

  • API/JSBase.cpp:

(JSGetMemoryUsageStatistics):

8:41 PM Changeset in webkit [272979] by Lauro Moura
  • 3 edits
    4 adds in trunk/LayoutTests

[GLIB] Gardening GTK crashes and canvas failures

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.broken-expected.txt: Added

after r272776.

  • platform/gtk/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent-expected.txt:

Ditto.

8:20 PM Changeset in webkit [272978] by Devin Rousso
  • 2 edits in trunk/Source/WebKit

Unreviewed, build fix after r272925

  • UIProcess/ios/WKContentViewInteraction.mm:
8:10 PM Changeset in webkit [272977] by mmaxfield@apple.com
  • 7 edits in trunk/Source/WebCore

REGRESSION (r266695): Unable to scroll the menu in 北京114预约挂号 official account - WeChat
https://bugs.webkit.org/show_bug.cgi?id=221948
<rdar://problem/71661277>

Reviewed by Simon Fraser.

r266695 caused this to regress, but it actually is a progression, because all browsers agree
that this content, as it exists in the app, doesn't scroll. So, we don't want to revert the
change itself, because it's a good change, but we also want to make sure that WeChat continues
to work. So, we can temporarily quirk one particular element in the WeChat app, until the
the content can be fixed (<rdar://problem/74377902>).

Because this is a WeChat-specific quirk, it is untestable. I tested manually.

  • page/Quirks.cpp:

(WebCore::Quirks::needsWeChatScrollingQuirk const):

  • page/Quirks.h:
  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::IOSApplication::isWechat):

  • platform/cocoa/VersionChecks.h:
  • style/StyleAdjuster.cpp:

(WebCore::Style::Adjuster::adjustForSiteSpecificQuirks const):

7:47 PM Changeset in webkit [272976] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Grids with overlays that disappear and reappear remain checked in Layout pane, toggling hits assertion
https://bugs.webkit.org/show_bug.cgi?id=221919
<rdar://problem/74363006>

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

When a DOMNode's grid layout context changes to something else,
its corresponding shown grid overlay is automatically hidden on the backend.
The frontend needs to update its mapping of nodes to overlays and notify listeners of the change in state.

  • UserInterface/Controllers/OverlayManager.js:

(WI.OverlayManager):
(WI.OverlayManager.prototype._handleLayoutContextTypeChanged):

6:42 PM Changeset in webkit [272975] by pvollan@apple.com
  • 9 edits in trunk/Source/WebKit

[iOS] Remove access to the Mobile asset service
https://bugs.webkit.org/show_bug.cgi?id=221959
<rdar://problem/73362858>

Reviewed by Brent Fulgham.

Remove access to the Mobile asset service in the WebContent process, since there are no longer reports of this being in use.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::nonBrowserServices):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::grantAccessToAssetServices):

  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::grantAccessToAssetServices):

6:34 PM Changeset in webkit [272974] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Remove access to IOAccelerationUserClient
https://bugs.webkit.org/show_bug.cgi?id=221967
<rdar://problem/70495933>

Reviewed by Brent Fulgham.

Remove access to IOAccelerationUserClient in the WebContent process on macOS when the GPU process is enabled.

  • WebProcess/com.apple.WebProcess.sb.in:
6:33 PM Changeset in webkit [272973] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Update syntax in the sandbox bootstrap filter
https://bugs.webkit.org/show_bug.cgi?id=221913
<rdar://problem/73463985>

Reviewed by Brent Fulgham.

Update syntax in the sandbox bootstrap filter on macOS and iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
6:31 PM Changeset in webkit [272972] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r271493 ) Crash in +[NSAttributedString(WKPrivate) _loadFromHTMLWithOptions:contentLoader:completionHandler:] on background thread
<rdar://problem/74038372> and https://bugs.webkit.org/show_bug.cgi?id=222005

Reviewed by Geoffrey Garen.

Test not possible as TestWebKitAPI seems to always initialize WebKit on the main thread.

  • UIProcess/API/Cocoa/NSAttributedString.mm:

(+[NSAttributedString _loadFromHTMLWithOptions:contentLoader:completionHandler:]): Switch this RunLoop::main() back to dispatch_async to main.

6:27 PM Changeset in webkit [272971] by commit-queue@webkit.org
  • 5 edits in trunk/Websites/perf.webkit.org

[perf.webkit.org] Do not schedule jobs to Buildbot if the last job failed
https://bugs.webkit.org/show_bug.cgi?id=221943

Patch by Dean Johnson <dean_johnson@apple.com> on 2021-02-16
Reviewed by Dewei Zhu.

  • server-tests/resources/mock-data.js:

(MockData.sampleBuildData): Allow options.results to be specified.

  • server-tests/tools-buildbot-triggerable-tests.js:

(async const): Add tests for new functionality. Existing tests still pass.

  • tools/js/buildbot-syncer.js:

(BuildbotBuildEntry.prototype.initialize): Track the 'results' key from a build.
(BuildbotBuildEntry.prototype.result): Make the build result available.
(BuildbotSyncer): Track the last completed build.
(BuildbotSyncer.prototype.lastCompletedBuildSuccessful): Check if the last completed
build was successful.
(BuildbotSyncer.prototype.pullBuildbot):

  • tools/js/buildbot-triggerable.js: Do not schedule a job to a builder who failed

its last completedd build.
(BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable):

6:27 PM Changeset in webkit [272970] by Andres Gonzalez
  • 8 edits in trunk/Tools

Use makeJSArray in both AccessibilityUIElementMac/IOS.mm.
https://bugs.webkit.org/show_bug.cgi?id=221999
<rdar://problem/74407113>

Reviewed by Chris Fleizach.

We had functions makeJSArray and convertElementsToObjectArray doing
exactly the same thing, one for Mac and One for iOS.

  • Moved makeJSArray to the platform independent header so it can be used

in both platforms.

  • Moved the retrieval of the JS context inside makeJSArray, so that the

caller doesn't have to do that.

  • WebKitTestRunner/InjectedBundle/AccessibilityController.h:
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:

(WTR::makeJSArray): Added to platform independent header.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::elementsForRange):
(WTR::convertElementsToObjectArray): Deleted.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::rowHeaders const):
(WTR::AccessibilityUIElement::columnHeaders const):
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue const):
(WTR::AccessibilityUIElement::searchTextWithCriteria):
(WTR::makeJSArray): Deleted.

5:21 PM Changeset in webkit [272969] by Russell Epstein
  • 5 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r272880. rdar://problem/74409363

Crash under WorkerThreadableLoader::MainThreadBridge::notifyIsDone()
https://bugs.webkit.org/show_bug.cgi?id=221906
<rdar://74225448>

Reviewed by Alex Christensen.

  • loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::computeIsDone): r267227 added this function and this was the first case where the DocumentThreadableLoader would do an async operation and ref itself during the operation. I believe this was the source of the crash as this could cause DocumentThreadableLoader to outlive its client. When DocumentThreadableLoader::notifyIsDone() would get called later on, m_client may be bad. To maintain pre-r267227 behavior, we now capture a WeakPtr to |this| instead of a Ref<>, so that we don't unnecessarily extend the lifetime of the DocumentThreadableLoader.
  • loader/DocumentThreadableLoader.h: (WebCore::DocumentThreadableLoader::clearClient): Add new clearClient() function to DocumentThreadableLoader so that the client can clear the raw pointer the DocumentThreadableLoader holds to it before getting destroyed. I wanted to use WeakPtr but this did not work out due to multithreading.
  • loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::MainThreadBridge::destroy): Before destroying itself, WorkerThreadableLoader::MainThreadBridge now clears the raw pointer to it that DocumentThreadableLoader holds. This is important since DocumentThreadableLoader is RefCounted and its lifetime may get extended past the MainThreadBridge.
  • loader/WorkerThreadableLoader.h: Use tighter typing for clarity.

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

5:20 PM Changeset in webkit [272968] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r272856. rdar://problem/74410114

[LFC][IFC] Do not re-measure wrapped content
https://bugs.webkit.org/show_bug.cgi?id=221874

Reviewed by Antti Koivisto.

This patch addresses the performance issue with extremely long content when
the content gets re-measured many time while performing line breaking.

When a certain text content does not fit the line we can

  1. keep it on the current line and let it overflow or
  2. wrap the entire content to the next line or
  3. split it somewhere in the middle.

In case of 2 and 3 this overflowing content turns into the leading content on the subsequent line.
Now due to ligature (#3) and position dependent glyph sizing(#2) we need to remeasure this leading content again.
However with unreasonably long content and relatively small horizontal constraint, this could lead to
repeated, continuous text measuring.
In this patch we turn the overflow width into the leading width so that we measure the long text content only once.
(FIXME: This should be turned into a generic "use the overflow content as-is when turning it into leading content")

  • layout/inlineformatting/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::lineLayout):
  • layout/inlineformatting/InlineLineBuilder.cpp: (WebCore::Layout::LineBuilder::layoutInlineContent): (WebCore::Layout::LineBuilder::computedIntrinsicWidth): (WebCore::Layout::LineBuilder::placeInlineContent): (WebCore::Layout::LineBuilder::candidateContentForLine): (WebCore::Layout::LineBuilder::handleInlineContent):
  • layout/inlineformatting/InlineLineBuilder.h:

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

5:20 PM Changeset in webkit [272967] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r272841. rdar://problem/74409856

[iOS] MobileSafari crashes at WebCore: WebCore::VideoFullscreenInterfaceAVKit::doEnterFullscreen
https://bugs.webkit.org/show_bug.cgi?id=221863
<rdar://73861140>

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-02-14
Reviewed by Darin Adler.

On iPad, it's possible for AVKit to fail due to racing requests to exit full screen and enter full screen. The enterFullscreenHandler would attempt to immediately re-enter full screen.
For now we bail-out early to avoid the crash. In a follow-up patch we will ensure that the condition to enter fullscreen while there's a pending operation to exit fullscreen can't occur.
No new tests, can't reproduce. Analysis has been entirely theoretical.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm: (VideoFullscreenInterfaceAVKit::enterFullscreenHandler): Exit early if error returned.

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

5:20 PM Changeset in webkit [272966] by Russell Epstein
  • 7 edits
    2 adds in branches/safari-611-branch

Cherry-pick r272829. rdar://problem/74409245

[Mac] Sound does not play on YouTube after switching back to foreground
https://bugs.webkit.org/show_bug.cgi?id=221858
<rdar://70602677>

Reviewed by Eric Carlson.

Source/WebCore:

Test: platform/mac/media/unmute-after-loading.html

Remove a stray, unnecessary reset of a cached muted state which kept mute
state from being changed the first time after loading.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
  • testing/Internals.cpp: (WebCore::Internals::privatePlayerMuted):
  • testing/Internals.h:
  • testing/Internals.idl:
  • testing/Internals.mm: (WebCore::Internals::privatePlayerMuted):

LayoutTests:

  • platform/mac/media/unmute-after-loading-expected.txt: Added.
  • platform/mac/media/unmute-after-loading.html: Added.

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

5:20 PM Changeset in webkit [272965] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r272777. rdar://problem/74410399

Nullopt crash in DOMSelection::getRangeAt
https://bugs.webkit.org/show_bug.cgi?id=221786

Reviewed by Darin Adler.

No new tests since we don't have any way to reproduce this crash.

  • page/DOMSelection.cpp: (WebCore::DOMSelection::getRangeAt): Added a nullopt check with an assertion.

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

5:20 PM Changeset in webkit [272964] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r272723. rdar://problem/74410353

[macOS] Add syscall to allow list in WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=221705
<rdar://problem/74162777>

Reviewed by Brent Fulgham.

Add required syscall to allow list in WebContent sandbox on macOS.

  • WebProcess/com.apple.WebProcess.sb.in:

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

5:19 PM Changeset in webkit [272963] by Russell Epstein
  • 9 edits in branches/safari-611-branch/Source

Cherry-pick r272703. rdar://problem/74409698

Reduce the overhead of DocumentFragment in innerHTML & outerHTML
https://bugs.webkit.org/show_bug.cgi?id=221535
<rdar://problem/73861015>

Reviewed by Geoffrey Garen.

Source/WebCore:

This patch reduces the overhead of using DocumentFragment in innerHTMl and outerHTML setters by

  1. Cache DocumentFragment used for innerHTML and outerHTML.
  2. Adding a fast path to removeAllChildrenWithScriptAssertion when removing child nodes from (1) immediately before appending it to the new parent. This is safe for now since no DOM nodes or API store information about its root node or parent node when it's DocumentFragment, and and there are no node flags to be updated or invalidated since we're removing already-disconnected nodes to which no script ever had access up until this point. We release-assert these conditions before going into the fast path.

No new tests since there should be no observable behavior change.

  • dom/ContainerNode.cpp: (WebCore::ContainerNode::removeAllChildrenWithScriptAssertion): Added a fast path. See above.
  • dom/Document.cpp: (WebCore::Document::commonTeardown): Clear m_documentFragmentForInnerOuterHTML as it would keep the ownewr document (this Document) alive otherwise. (WebCore::Document::documentFragmentForInnerOuterHTML): Added. Lazily create a DocumentFragment used to parse the fragment for innerHTML and outerHTML setters. Remove any child nodes left in the document fragment in the case the last call to replaceChildrenWithFragment took a fast path for a single text node, which case we don't remove any child nodes from DocumentFragment.
  • dom/Document.h:
  • dom/DocumentFragment.h: (WebCore::DocumentFragment::setIsDocumentFragmentForInnerOuterHTML): Added.
  • dom/Node.h: (WebCore::Node::isDocumentFragmentForInnerOuterHTML const): Added.
  • editing/markup.cpp: (WebCore::createFragmentForMarkup): Extracted from createFragmentForInnerOuterHTML to share code between createFragmentForInnerOuterHTML and createContextualFragment. (WebCore::createFragmentForInnerOuterHTML): Reuse the fragment in createFragmentForMarkup. (WebCore::createContextualFragment): Don't reuse the fragment in createFragmentForMarkup as this function is used by Range::createContextualFragment which exposes the document fragment to arbitrary author scripts. (WebCore::hasOneChild): Deleted since we now have Node::hasOneChild. (WebCore::hasOneTextChild): Use Node::hasOneChild. (WebCore::replaceChildrenWithFragment): Added assertions to make sure we don't have any child nodes left after replacing the children.

Source/WTF:

Added a helper function for writing assertions.

  • wtf/WeakPtr.h: (WTF::WeakPtrFactory::isInitialized const): Added.

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

5:19 PM Changeset in webkit [272962] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r272698. rdar://problem/74410282

REGRESSION (r269824) IOSurface allocation failure causes crash in RemoteLayerBackingStore::display()
https://bugs.webkit.org/show_bug.cgi?id=221729
rdar://72651289

Reviewed by Tim Horton.

The refactoring in r269824 dropped a null check on the front buffer surface (IOSurface allocation
can fail when the process reaches a hardcoded limit). Restore the null check.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::display):

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

5:19 PM Changeset in webkit [272961] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/JavaScriptCore

Cherry-pick r272685. rdar://problem/74410538

We should not static_assert on an ENABLE() macro.
https://bugs.webkit.org/show_bug.cgi?id=221714
rdar://74197896

Reviewed by Yusuke Suzuki.

This is because the ENABLE() macro reduces to a macro expression
(defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE) which is not a C++
expression that a static_assert can evaluate.

  • llint/LLIntData.cpp:
  • llint/LLIntData.h: (JSC::LLInt::getCodePtr): (JSC::LLInt::getWide16CodePtr): (JSC::LLInt::getWide32CodePtr):

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

5:19 PM Changeset in webkit [272960] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/JavaScriptCore

Cherry-pick r272663. rdar://problem/74409155

Don't crash when reparsing an arrow function and the parsing invariant is broken
https://bugs.webkit.org/show_bug.cgi?id=221632
<rdar://71874091>

Reviewed by Tadeu Zagallo and Mark Lam.

We have code where we assert that when reparsing an arrow function,
we see the '=>' token after parsing the parameters. Since we already
parsed the arrow function before, this assertion makes sense. But somehow,
this is leading to crashes on real websites. We don't know why this invariant
is being broken. I'm changing this to a debug assert, and we're tracking
the full fix in:
https://bugs.webkit.org/show_bug.cgi?id=221633

  • parser/Parser.cpp: (JSC::Parser<LexerType>::parseInner):

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

5:19 PM Changeset in webkit [272959] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r272633. rdar://problem/74410421

REGRESSION: (r272458): [BigSur Debug] ASSERTION FAILED: m_haveAddedMediaUsageManagerSession in WebCore::MediaElementSession::updateMediaUsageIfChanged()
https://bugs.webkit.org/show_bug.cgi?id=221634
<rdar://problem/74161017>

Reviewed by Ryosuke Niwa.

No new tests, this fixes an assertion in an existing test.

  • html/MediaElementSession.cpp: (WebCore::MediaElementSession::MediaElementSession): (WebCore::MediaElementSession::addMediaUsageManagerSessionIfNecessary): (WebCore::MediaElementSession::inActiveDocumentChanged): (WebCore::MediaElementSession::updateMediaUsageIfChanged): (WebCore::MediaElementSession::addedMediaUsageManagerSessionIfNecessary): Deleted.
  • html/MediaElementSession.h:

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

5:18 PM Changeset in webkit [272958] by Russell Epstein
  • 7 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r272622. rdar://problem/74410599

Reduce the overhead of HTMLDocumentParser in innerHTML setter
https://bugs.webkit.org/show_bug.cgi?id=221596

Reviewed by Simon Fraser.

This patch reduces the overhead of HTMLDocumentParser for innerHTML.
This appears to be ~0.5% Speedometer progression.

No new tests since there should be no observable behavior differences.

  • dom/ScriptableDocumentParser.h: (WebCore::ScriptableDocumentParser:isWaitingForScripts): Removed since this abstract virtual function is only used in HTMLDocumentParser.
  • html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::isWaitingForScripts): Removed. There are no scripts in ftp directory document but there is no need to override it here.
  • html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizer): Exit early when we're parsing a fragment to avoid accessing the scheduler, preloader, and document loader for various things since they're all irrelevant for fragment parsing. (WebCore::HTMLDocumentParser::isWaitingForScripts const): Return false immediately when parsing a document fragment as a fast path.
  • html/parser/HTMLDocumentParser.h:
  • xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::isWaitingForScripts const): Removed. Unused.
  • xml/parser/XMLDocumentParser.h:

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

5:18 PM Changeset in webkit [272957] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r272602. rdar://problem/74409444

[LFC][IFC] Disable BIDI processing for modern line layout
https://bugs.webkit.org/show_bug.cgi?id=221615

Reviewed by Sam Weinig.

This was added in preparation for BIDI content support but we are not there yet. Let's just disable it for now.

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp: (WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLineRuns const):

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

5:18 PM Changeset in webkit [272956] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r272583. rdar://problem/74409637

MediaStream-backed video elements should not compute the mediaType based on track muted states
https://bugs.webkit.org/show_bug.cgi?id=221601

Reviewed by Eric Carlson.

Source/WebCore:

In case of entering background, two things happen:

  • video elements get paused
  • local video capture track gets muted When entering foreground:
  • video element should resume but did not as the local video track was muted and video element was considered as an audio element.
  • local video capture track gets unmuted but this is too late. To fix this, compute hasVideo/hasAudio based on available tracks, no matter their active state.

Test: fast/mediastream/MediaStream-video-element-enter-background.html

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasVideo const): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasAudio const):

LayoutTests:

  • fast/mediastream/MediaStream-video-element-enter-background-expected.txt: Added.
  • fast/mediastream/MediaStream-video-element-enter-background.html: Added.

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

5:18 PM Changeset in webkit [272955] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r272567. rdar://problem/74410033

REGRESSION (r269458): yahoo.com social / comments bar shows as transparent when scrolling page
https://bugs.webkit.org/show_bug.cgi?id=221582
Source/WebCore:

<rdar://problem/73795359>

Reviewed by Tim Horton.

Fix some copypasta in r269458 that resulted in scrolling state fixed nodes failing to get
the right dirty bits after attach, resulting bad viewport constraint data.

Test: scrollingcoordinator/fixed-node-reattach.html

  • page/scrolling/ScrollingStateFixedNode.cpp: (WebCore::ScrollingStateFixedNode::applicableProperties const):

LayoutTests:

Reviewed by Tim Horton.

  • scrollingcoordinator/fixed-node-reattach-expected.html: Added.
  • scrollingcoordinator/fixed-node-reattach.html: Added.

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

5:17 PM Changeset in webkit [272954] by Russell Epstein
  • 19 edits in branches/safari-611-branch/Source

Cherry-pick r272550. rdar://problem/74409264

Make the UserContentController for ServiceWorker pages be non-optional.
<rdar://problem/71434565> and https://bugs.webkit.org/show_bug.cgi?id=221503

Reviewed by Alex Christensen.
Source/WebCore:

  • loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients):
  • page/Page.cpp: (WebCore::Page::Page):
  • page/PageConfiguration.cpp: (WebCore::PageConfiguration::PageConfiguration):
  • page/PageConfiguration.h:

Source/WebKit:

Normal Pages always have a UserContentProvider, even if they just create an empty default one.

Same should be true for ServiceWorkers.

  • Shared/ServiceWorkerInitializationData.cpp: (WebKit::ServiceWorkerInitializationData::decode):
  • Shared/ServiceWorkerInitializationData.h:
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::userContentControllerIdentifierForServiceWorkers): (WebKit::WebProcessPool::createWebPage):
  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::enableServiceWorkers):
  • UIProcess/WebProcessProxy.h:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::m_userContentController): (WebKit::m_userAgent): Deleted.
  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains):

Source/WebKitLegacy/mac:

  • WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKitLegacy/win:

  • WebView.cpp: (WebView::initWithFrame):

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

5:17 PM Changeset in webkit [272953] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r272506. rdar://problem/74409747

Check that CGPDFDocumentRef is consistently unlocked and printable
<https://webkit.org/b/221512>
<rdar://problem/65277765>

Reviewed by Daniel Bates.

This patch does the following when printing PDFs:

  • Checks return value of CGPDFDocumentUnlockWithPassword().
  • Calls CGPDFDocumentAllowsPrinting() consistently.
  • Handles -_ensureDocumentForPrinting and -_wk_printedDocument returning nullptr.
  • UIProcess/_WKWebViewPrintFormatter.mm: (-[_WKWebViewPrintFormatter drawInRect:forPageAtIndex:]):
  • Check return value of -_wk_printedDocument since it may return nullptr now.
  • UIProcess/ios/WKPDFView.mm: (-[WKPDFView _ensureDocumentForPrinting]):
  • Check return value of CGPDFDocumentUnlockWithPassword(), and return nullptr if unsuccessful.
  • Add CGPDFDocumentAllowsPrinting() check and return nullptr if it fails. (-[WKPDFView _wk_pageCountForPrintFormatter:]):
  • Move the CGPDFDocumentAllowsPrinting() check into -[WKPDFView _ensureDocumentForPrinting].
  • Check return value of -_ensureDocumentForPrinting since it may return nullptr now.

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

5:17 PM Changeset in webkit [272952] by Russell Epstein
  • 12 edits
    4 adds in branches/safari-611-branch

Cherry-pick r272495. rdar://problem/74409320

[macOS] Return key binding for date inputs conflicts with return to submit form
https://bugs.webkit.org/show_bug.cgi?id=221532
<rdar://problem/74039204>

Reviewed by Wenson Hsieh.

Source/WebCore:

Currently, pressing the return key within a focused date input presents
the calendar view, rather than submitting an associated form. This is a
usability issue for keyboard users, and is different from the behavior
in Chrome. This patch matches the behavior in Chrome, and makes it so
that a return keypress submits an associated form.

However, since the return key is now reserved for form submission, we
need a new key to present the calendar view for the date input. Chrome
and Firefox use the space key for this functionality, so this patch
matches that behavior.

Note that r267281 updated date inputs to focus the next editable component
when pressing the space key. This behavior is now removed in favor of
presenting the calendar. Other separator keys, and arrow keys, can still be
used to focus the next editable component.

Tests: fast/forms/date/date-editable-components/date-picker-show-on-space-keypress.html

fast/forms/date/date-editable-components/form-submit-on-return-keypress.html

  • html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::handleKeypressEvent):

Date and time inputs are BaseClickableWithKeyInputTypes. This gives them
activation behavior on return and space keypresses, similar to button and
color inputs. However, since date/time inputs are closer to textfields,
than buttons, we elide activation behavior on a return keypress, allowing
the event to submit an associated form. Activation behavior on a space
keypress is supported by going through the existing code path.

  • html/shadow/DateTimeFieldElement.cpp: (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler):

Remove "Space" from the list of separator keys that focus the next
editable component.

LayoutTests:

Added tests to verify that pressing the space key in a focused date
input presents a calendar view, and pressing the enter key in a focused
date input submits a form.

Rebaselined existing tests to account for the fact that the space key
no longer focuses the next editable component within a date input.

  • fast/forms/date/date-editable-components/date-editable-components-keyboard-events-expected.txt:
  • fast/forms/date/date-editable-components/date-editable-components-keyboard-events.html:
  • fast/forms/date/date-editable-components/date-picker-show-on-space-keypress-expected.txt: Added.
  • fast/forms/date/date-editable-components/date-picker-show-on-space-keypress.html: Added.
  • fast/forms/date/date-editable-components/form-submit-on-return-keypress-expected.txt: Added.
  • fast/forms/date/date-editable-components/form-submit-on-return-keypress.html: Added.
  • fast/forms/datetimelocal/datetimelocal-editable-components/datetimelocal-editable-components-keyboard-events-expected.txt:
  • fast/forms/datetimelocal/datetimelocal-editable-components/datetimelocal-editable-components-keyboard-events.html:
  • fast/forms/month/month-editable-components/month-editable-components-keyboard-events-expected.txt:
  • fast/forms/month/month-editable-components/month-editable-components-keyboard-events.html:
  • fast/forms/time/time-editable-components/time-editable-components-keyboard-events-expected.txt:
  • fast/forms/time/time-editable-components/time-editable-components-keyboard-events.html:

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

5:16 PM Changeset in webkit [272951] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r272488. rdar://problem/74410510

Perform layout before running Editor::findString
https://bugs.webkit.org/show_bug.cgi?id=220384

Patch by Frédéric Wang <fwang@igalia.com> on 2021-02-08
Reviewed by Ryosuke Niwa.

This ensures that the layout is up-to-date before performing any search.
Also disable any post-resolution that could cause more changes to happen.

  • editing/Editor.cpp: (WebCore::Editor::findString):

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

5:16 PM Changeset in webkit [272950] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r272483. rdar://problem/74409975

Nullptr crash in editingIgnoresContent via InsertParagraphSeparatorCommand::doApply
https://bugs.webkit.org/show_bug.cgi?id=220349

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-02-08
Reviewed by Ryosuke Niwa.

Add an early return to InsertParagraphSeparatorCommand::doApply if insert position is null.

  • editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::insertNodeBefore): Return early if a InsertNodeBeforeCommand can't be created.
  • editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): Abort the insertion if the insert position is null.

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

5:16 PM Changeset in webkit [272949] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r272439. rdar://problem/74409122

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

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

5:16 PM Changeset in webkit [272948] by Patrick Angle
  • 3 edits in trunk/Source/WebCore

Web Inspector: Implement Grid Overlay "Show area names" drawing
https://bugs.webkit.org/show_bug.cgi?id=221979

Reviewed by Devin Rousso.

Added support for showing grid area names and bounds in the grid overlay.

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::drawLayoutLabel):

  • Added support for arrow-less layout labels.
  • Added support for providing a background color to allow area names to have a semi-translucent label background.
  • Added support for clipping labels to a target width.

(WebCore::InspectorOverlay::drawGridOverlay):

  • Added support for stroking grid areas and showing their names in a label.
  • inspector/InspectorOverlay.h:
5:16 PM Changeset in webkit [272947] by Russell Epstein
  • 4 edits
    2 adds in branches/safari-611-branch

Cherry-pick r272435. rdar://problem/74410448

[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.

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

5:15 PM Changeset in webkit [272946] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/JavaScriptCore

Cherry-pick r272430. rdar://problem/74409193

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

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

5:15 PM Changeset in webkit [272945] by Russell Epstein
  • 3 edits
    1 add in branches/safari-611-branch

Cherry-pick r272428. rdar://problem/74409193

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

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

5:15 PM Changeset in webkit [272944] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r272418. rdar://problem/74410581

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

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

5:15 PM Changeset in webkit [272943] by Russell Epstein
  • 3 edits
    1 add in branches/safari-611-branch

Cherry-pick r272406. rdar://problem/74410311

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

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

5:15 PM Changeset in webkit [272942] by Russell Epstein
  • 5 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r272394. rdar://problem/74409285

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:

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

5:15 PM Changeset in webkit [272941] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-611-branch

Cherry-pick r272390. rdar://problem/74409535

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.

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

5:14 PM Changeset in webkit [272940] by Russell Epstein
  • 7 edits in branches/safari-611-branch

Cherry-pick r271746. rdar://problem/74410558

Disable Options:useAtMethod because of compatibility issue.
https://bugs.webkit.org/show_bug.cgi?id=220788
rdar://72933608

Reviewed by Saam Barati and Yusuke Suzuki.

Source/JavaScriptCore:

See https://github.com/tc39/proposal-relative-indexing-method/issues/41.

  • jsc.cpp: (CommandLine::parseArguments):
  • enable Options::useAtMethod by default for the jsc shell for testing.
  • runtime/OptionsList.h:

LayoutTests:

Enable Options::useAtMethod for these tests.

  • inspector/model/remote-object-get-properties.html:
  • js/Object-getOwnPropertyNames.html:
  • js/array-unscopables-properties.html:

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

4:38 PM Changeset in webkit [272939] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Document package usage
https://bugs.webkit.org/show_bug.cgi?id=221986
<rdar://problem/74401363>

Reviewed by Stephanie Lewis.

  • Scripts/libraries/webkitcorepy/README.md: Add library.
  • Scripts/libraries/webkitscmpy/README.md:
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:

(Scm.from_path): Remove unneeded space.

4:33 PM Changeset in webkit [272938] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

operationNewArrayWithSize should call tryCreate instead of create
https://bugs.webkit.org/show_bug.cgi?id=221983
<rdar://74265630>

Reviewed by Mark Lam.

I disassembled crashlogs inside operationNewArrayWithSize. They are crashing
inside array allocation. They are crashing on OOM. By code inspection,
operationNewArrayWithSizeAndHint has the same problem.

Callsites to both functions already handle exceptions being thrown, so
converting both operationNewArrayWithSize and operationNewArrayWithSizeAndHint
to throw instead of crash on OOM is trivial.

I wasn't able to come up with a test case for this.

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • runtime/ObjectConstructor.cpp:

(JSC::ownPropertyKeys):

4:15 PM Changeset in webkit [272937] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.1.18

4:00 PM Changeset in webkit [272936] by Chris Dumez
  • 94 edits in trunk/Source

Reduce explicit usage of [objC autorelease] in WebKit
https://bugs.webkit.org/show_bug.cgi?id=221932

Reviewed by Geoff Garen.

Reduce explicit usage of [objC autorelease] in WebKit by using RetainPtr<>.

Source/JavaScriptCore:

  • API/JSContext.mm:

(-[JSContext init]):
(+[JSContext contextWithJSGlobalContextRef:]):

  • API/JSManagedValue.mm:

(+[JSManagedValue managedValueWithValue:]):
(+[JSManagedValue managedValueWithValue:andOwner:]):

  • API/JSScript.mm:

(+[JSScript scriptOfType:withSource:andSourceURL:andBytecodeCache:inVirtualMachine:error:]):
(+[JSScript scriptOfType:memoryMappedFromASCIIFile:withSourceURL:andBytecodeCache:inVirtualMachine:error:]):

  • API/JSVirtualMachine.mm:

(+[JSVirtualMachine virtualMachineWithContextGroupRef:]):

  • API/JSWrapperMap.mm:

(-[JSWrapperMap classInfoForClass:]):
(-[JSWrapperMap objcWrapperForJSValueRef:inContext:]):

  • inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:

(Inspector::RemoteConnectionToTarget::connectionIdentifier const):
(Inspector::RemoteConnectionToTarget::destination const):

  • inspector/scripts/codegen/objc_generator.py:

(ObjCGenerator.objc_protocol_import_expression_for_variable):

Source/WebCore:

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(+[WebAccessibilityTextMarker textMarkerWithVisiblePosition:cache:]):
(+[WebAccessibilityTextMarker textMarkerWithCharacterOffset:cache:]):
(+[WebAccessibilityTextMarker startOrEndTextMarkerForRange:isStart:cache:]):
(-[WebAccessibilityObjectWrapper _prepareAccessibilityCall]):
(-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
(-[WebAccessibilityObjectWrapper _stringFromStartMarker:toEndMarker:attributed:]):
(-[WebAccessibilityObjectWrapper nextMarkerForCharacterOffset:]):
(-[WebAccessibilityObjectWrapper previousMarkerForCharacterOffset:]):

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::textReplacementChangeDictionary):

  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(arrayRemovingNonSupportedTypes):
(dictionaryRemovingNonSupportedTypes):

  • bridge/objc/WebScriptObject.mm:

(WebCore::getJSWrapper):
(WebCore::createJSWrapper):
(+[WebUndefined undefined]):

  • bridge/testbindings.mm:

(-[MyFirstInterface setJSObject:]):
(-[MyFirstInterface callJSObject::]):

  • editing/cocoa/HTMLConverter.mm:

(_shadowForShadowStyle):
(HTMLConverter::_addAttachmentForElement):
(_dateForString):
(fileWrapperForURL):

  • editing/cocoa/WebArchiveResourceWebResourceHandler.mm:

(-[WebArchiveResourceWebResourceHandler resourceForData:URL:MIMEType:textEncodingName:frameName:]):

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::attributesForAttributedStringConversion):

  • loader/mac/LoaderNSURLExtras.mm:

(filenameByFixingIllegalCharacters):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):

  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController init]):

  • platform/ios/WebEvent.mm:

(-[WebEvent characters]):
(-[WebEvent charactersIgnoringModifiers]):
(-[WebEvent inputManagerHint]):

  • platform/ios/WebItemProviderPasteboard.mm:

(+[WebItemProviderLoadResult loadResultWithItemProvider:typesToLoad:]):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(-[WebVideoFullscreenController didFinishFullscreen:]):

  • platform/ios/wak/WAKView.mm:

(+[WAKView _wrapperForViewRef:]):
(-[WAKView dealloc]):

  • platform/mac/PasteboardMac.mm:

(WebCore::fileWrapper):

  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::URLByCanonicalizingURL):

  • platform/mac/WebNSAttributedStringExtras.mm:

(WebCore::attributedStringByStrippingAttachmentCharacters):

  • platform/network/cf/ResourceRequest.h:
  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::NetworkStorageSession::nsCookieStorage const):

  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::nsURLRequest const):
(WebCore::ResourceRequest::setStorageSession):
(WebCore::copyRequestWithStorageSession):
(WebCore::cachedResponseForRequest):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSession dataTaskWithRequest:]):
(-[WebCoreNSURLSession dataTaskWithURL:]):
(-[WebCoreNSURLSessionDataTask initWithSession:identifier:request:]):

  • platform/network/mac/AuthenticationMac.mm:

(WebCore::mac):

  • platform/network/mac/ResourceErrorMac.mm:

(dictionaryThatCanCode):

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::createNSURLConnection):

  • platform/network/mac/WebCoreURLResponse.mm:

(WebCore::synthesizeRedirectResponseIfNecessary):

  • platform/text/ios/LocalizedDateCache.h:
  • platform/text/ios/LocalizedDateCache.mm:

(WebCore::LocalizedDateCache::formatterForDateType):
(WebCore::LocalizedDateCache::createFormatterForType):
(WebCore::LocalizedDateCache::calculateMaximumWidth):

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(downgradeRequest):
(updateIgnoreStrictTransportSecuritySettingIfNecessary):
(WebKit::proxyDictionary):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::NetworkSessionCocoa::createWebSocketTask):

  • Platform/cocoa/WKPaymentAuthorizationDelegate.mm:

(-[WKPaymentAuthorizationDelegate completePaymentMethodSelection:]):
(-[WKPaymentAuthorizationDelegate completeShippingContactSelection:]):
(-[WKPaymentAuthorizationDelegate completeShippingMethodSelection:]):

  • Shared/API/Cocoa/WKRemoteObjectCoder.mm:

(encodeObject):

  • Shared/API/Cocoa/_WKRemoteObjectInterface.mm:

(+[_WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):

  • Shared/Cocoa/WKObject.h:

(WebKit::wrapper):

  • UIProcess/API/Cocoa/NSAttributedString.mm:

(+[_WKAttributedStringWebViewCache configuration]):
(+[NSAttributedString _loadFromHTMLWithOptions:contentLoader:completionHandler:]):

  • UIProcess/API/Cocoa/WKBrowsingContextController.mm:

(makePolicyDecisionBlock):
(setUpPagePolicyClient):
(-[WKBrowsingContextController handle]):

  • UIProcess/API/Cocoa/WKContentWorld.mm:

(-[WKContentWorld _userContentWorld]):

  • UIProcess/API/Cocoa/WKFrameInfo.mm:

(-[WKFrameInfo securityOrigin]):
(-[WKFrameInfo webView]):
(-[WKFrameInfo _handle]):
(-[WKFrameInfo _parentFrameHandle]):

  • UIProcess/API/Cocoa/WKUserScript.mm:

(-[WKUserScript _userContentWorld]):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView configuration]):
(-[WKWebView findString:withConfiguration:completionHandler:]):
(-[WKWebView _frames:]):
(-[WKWebView _handle]):
(-[WKWebView _takePDFSnapshotWithConfiguration:completionHandler:]):
(-[WKWebView _sessionState]):
(-[WKWebView _sessionStateWithFilter:]):
(-[WKWebView _getContentsAsAttributedStringWithCompletionHandler:]):

  • UIProcess/API/Cocoa/WKWebpagePreferences.mm:

(+[WKWebpagePreferences defaultPreferences]):

  • UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:

(-[WKWebsiteDataRecord _dataSize]):

  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:

(+[_WKActivatedElementInfo activatedElementInfoWithInteractionInformationAtPosition:userInfo:]):
(-[_WKActivatedElementInfo image]):

  • UIProcess/API/Cocoa/_WKAttachment.mm:

(-[_WKAttachment info]):

  • UIProcess/API/Cocoa/_WKAutomationSession.mm:

(-[_WKAutomationSession init]):
(-[_WKAutomationSession configuration]):

  • UIProcess/API/Cocoa/_WKDownload.mm:

(+[_WKDownload downloadWithDownload:]):
(-[_WKDownload originatingWebView]):

  • UIProcess/API/Cocoa/_WKElementAction.mm:

(+[_WKElementAction elementActionWithTitle:actionHandler:]):
(+[_WKElementAction _elementActionWithType:title:actionHandler:]):
(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):

  • UIProcess/API/Cocoa/_WKFrameTreeNode.mm:

(-[_WKFrameTreeNode securityOrigin]):
(-[_WKFrameTreeNode webView]):
(-[_WKFrameTreeNode _handle]):
(-[_WKFrameTreeNode _parentFrameHandle]):

  • UIProcess/API/Cocoa/_WKInspector.mm:

(-[_WKInspector registerExtensionWithID:displayName:completionHandler:]):

  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration customClassesForParameterCoder]):

  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:

(-[_WKRemoteWebInspectorViewController registerExtensionWithID:displayName:completionHandler:]):

  • UIProcess/API/Cocoa/_WKTextManipulationToken.mm:

(-[_WKTextManipulationToken _descriptionPreservingPrivacy:]):

  • UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:

(+[_WKUserContentExtensionStore defaultStore]):
(+[_WKUserContentExtensionStore storeWithURL:]):
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):

  • UIProcess/API/Cocoa/_WKUserContentWorld.mm:

(+[_WKUserContentWorld worldWithName:]):
(+[_WKUserContentWorld normalWorld]):

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _uiEventAttribution]):
(-[WKWebView _retainActiveFocusedState]):

  • UIProcess/Automation/ios/WebAutomationSessionIOS.mm:

(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):

  • UIProcess/Cocoa/AutomationClient.mm:

(WebKit::AutomationClient::requestAutomationSession):

  • UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:

(WebKit::addLinkAndReplace):
(WebKit::safeBrowsingDetailsText):

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

(-[WKLayerHostView makeBackingLayer]):

  • UIProcess/Cocoa/WKContactPicker.mm:

(-[WKContactPicker _contactsFromJSContacts:]):

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(makeButton):
(makeLabel):
(-[WKSafeBrowsingWarning addContent]):
(-[WKSafeBrowsingWarning showDetailsClicked]):
(-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::fullScreenWindow):

3:43 PM Changeset in webkit [272935] by BJ Burg
  • 4 edits in trunk/Source/WebKit

REGRESSION(r266890): [Cocoa] Fix InspectorDelegate / API::InspectorClient leak
https://bugs.webkit.org/show_bug.cgi?id=221988
<rdar://73594555>

Reviewed by Devin Rousso.

There was a logic error introduced into the new delegate situation after
moving _WKInspectorDelegate from WKWebView to _WKInspector. When setting
.delegate to nil, we shouldn't allocate dummy API::InspectorClient/
InspectorDelegate instances. As written, these instances form their own retain
cycle and cause a leak if Web Inspector has been opened or if
WKWebView._inspector is accessed (which lazily creates the delegates).

  • UIProcess/API/Cocoa/_WKInspector.mm:

(-[_WKInspector setDelegate:]):
Adopt new constructor and pass in the ObjC delegate.

  • UIProcess/Inspector/Cocoa/InspectorDelegate.h:
  • UIProcess/Inspector/Cocoa/InspectorDelegate.mm:

(WebKit::InspectorDelegate::InspectorDelegate):
(WebKit::InspectorDelegate::createInspectorClient): Deleted.
(WebKit::InspectorDelegate::setDelegate): Deleted.
Clean up this class so that we always receive the ObjC delegate
via the constructor. If a nil delegate is passed---for example, when
closing the WKWebView---then don't create an API::InspectorClient
and set the WebInspectorProxy's client to nullptr.

3:36 PM Changeset in webkit [272934] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Grid list in Layout panel missing empty message
https://bugs.webkit.org/show_bug.cgi?id=221763
<rdar://problem/74242610>

Patch by Razvan Caliman <Razvan Caliman> on 2021-02-16
Reviewed by BJ Burg.

Show a message instead of an empty list in the Layout sidebar panel
when there are no CSS Grid contexts found on the inspected page.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/CSSGridSection.js:

(WI.CSSGridSection.prototype.set gridNodeSet):
(WI.CSSGridSection.prototype.attached):
(WI.CSSGridSection.prototype.detached):
(WI.CSSGridSection.prototype._handleGridOverlayStateChanged):
(WI.CSSGridSection):
Move logic to update the gridNodeSet from CSSGridSection up to LayoutDetailsSidebarPanel
so the parent view can toggle between the empty message and the populated CSS grid section accordingly.

  • UserInterface/Views/LayoutDetailsSidebarPanel.js:

(WI.LayoutDetailsSidebarPanel):
(WI.LayoutDetailsSidebarPanel.prototype.attached):
(WI.LayoutDetailsSidebarPanel.prototype.detached):
(WI.LayoutDetailsSidebarPanel.prototype.initialLayout):
(WI.LayoutDetailsSidebarPanel.prototype.layout):
(WI.LayoutDetailsSidebarPanel.prototype._handleLayoutContextTypeChanged):
(WI.LayoutDetailsSidebarPanel.prototype._refreshGridNodeSet):

3:28 PM Changeset in webkit [272933] by ysuzuki@apple.com
  • 14 edits in trunk

WebAssembly: implement non-trapping float to int conversion
https://bugs.webkit.org/show_bug.cgi?id=173471

Patch by Yusuke Suzuki <ysuzuki@apple.com> and Sergey Rubanov <Sergey Rubanov> on 2021-02-16
Reviewed by Tadeu Zagallo.

JSTests:

  • wasm/spec-tests/binary-leb128.wast.js:
  • wasm/spec-tests/conversions.wast.js:
  • wasm/wasm.json:

Source/JavaScriptCore:

This patch implements trunc-saturated opcodes in Wasm. This does not trap, and instead it generates
saturated-truncated integer results from floats.

  1. If the input is NaN, then return 0.
  2. If the input is higher than the maximum value, then return the maximum value (e.g. INT_32MAX).
  3. If the input is lower than the minimum value, then return the minimum value (e.g. INT_32MIN).

These wasm opcodes are defined as two-byte opcodes. Currently, we do not have a mechanism to define
this kind of opcodes automatically, so we manually define them. We will clean up in the future patch.

We rename ExtTableOpType to Ext1OpType since it is no longer limited to table opcodes.

  • generator/Wasm.rb:
  • llint/WebAssembly.asm:
  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::truncSaturated):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::truncSaturated):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::truncSaturated):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::truncSaturated):

  • wasm/generateWasm.py:

(isNormal):

  • wasm/generateWasmOpsHeader.py:

(opcodeWithTypesMacroizer):
(saturatedTruncMacroizer):
(saturatedTruncMacroizer.modifier):
(Ext1OpType):
(ExtTableOpType): Deleted.

  • wasm/wasm.json:
2:57 PM Changeset in webkit [272932] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Unreviewed, reverting r272914.
https://bugs.webkit.org/show_bug.cgi?id=222001

broke macOS build

Reverted changeset:

"libwebrtc installs some files into incorrect locations in
/usr/local/include"
https://bugs.webkit.org/show_bug.cgi?id=221534
https://trac.webkit.org/changeset/272914

2:55 PM Changeset in webkit [272931] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

RenderElement::containingBlockForAbsolutePosition may call RenderObject::containingBlock recursively
https://bugs.webkit.org/show_bug.cgi?id=221976
<rdar://problem/72775667>

Reviewed by Simon Fraser.

When a RenderInline happens to be absolute positioned (this is a highly incorrect state, see webkit.org/b/221994), containingBlockForAbsolutePosition() calls containingBlock()
with |this| and in return containingBlock() calls back on containingBlockForAbsolutePosition() with the same renderer.
This patch ensures that we always call containingBlock() from containingBlockForAbsolutePosition() with an ancestor -mostly with the parent().

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::containingBlockForAbsolutePosition const):

2:47 PM Changeset in webkit [272930] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

Remove unneeded sandbox access to some file paths
https://bugs.webkit.org/show_bug.cgi?id=221946
<rdar://problem/62865856>

Reviewed by Per Arne Vollan.

Block access to /etc/passwd now that none of WebContent's dependencies
expect access.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
2:38 PM Changeset in webkit [272929] by timothy_horton@apple.com
  • 2 edits in trunk

Local macCatalyst builds should not build WebInspectorUI
https://bugs.webkit.org/show_bug.cgi?id=221992

Reviewed by Wenson Hsieh.

  • Source/Makefile:

This project is not used in macCatalyst, and is not even built in production builds.
We should stop building it in local release/debug builds as well.

2:05 PM Changeset in webkit [272928] by rniwa@webkit.org
  • 10 edits
    2 adds in trunk

EventHandler::updateSelectionForMouseDownDispatchingSelectStart should not use an orphaned selection
https://bugs.webkit.org/show_bug.cgi?id=221942

Reviewed by Wenson Hsieh.

Source/WebCore:

In r272777, we re-introduced a nullptr check in DOMSelection::getRangeAt as we were getting crash reports
in this code but we weren't sure of the root cause. Since then we've identified that one of the root causes
is that EventHandler::updateSelectionForMouseDownDispatchingSelectStart doesn't check if VisibleSelection
is still in a good state after dispatching selectstart event. This results in FrameSelection's
setSelectionWithoutUpdatingAppearance getting called with a selection with end points already being orphaned.

This patch fixes this bug in setSelectionWithoutUpdatingAppearance and also adds an additional check in
FrameSelection::setSelectionWithoutUpdatingAppearance itself to avoid using an orphaned selection. It also
introduces a number of release and debug assertions in a number of places to help catch similar bugs.

Test: editing/selection/click-selection-with-selectstart-node-removal.html

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeAllChildrenWithScriptAssertion): Added a debug-only assertion.
(WebCore::ContainerNode::removeNodeWithScriptAssertion): Ditto.

  • dom/Document.cpp:

(WebCore::Document::removedLastRef): Disallow script execution in this code entirely. Also release assert
that the selection had already been cleared by this point.
(WebCore::Document::willBeRemovedFromFrame): Disallow script execution once we've unloaded subframes.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): Return early if the new selection's
end points had been orphaned, and disallow script execution between that and until we update the selection.

  • editing/VisibleSelection.cpp:

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

  • editing/VisibleSelection.h:
  • page/DOMSelection.cpp:

(WebCore::DOMSelection::getRangeAt): Removed nullptr check added in r272777.

  • page/EventHandler.cpp:

(WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): Fixed what is now believed to be
the root cause of the bug 221786.

LayoutTests:

Added a regression test for the bug 221786 / r272777.

Also updated a test imported from blink to expect rangeCount of 0 instead of 1
since we no longer update the selection when the target node has been removed
during selectstart.

  • editing/selection/click-selection-with-selectstart-node-removal-expected.txt: Added.
  • editing/selection/click-selection-with-selectstart-node-removal.html: Added.
  • imported/blink/editing/selection/selectstart-event-crash.html:
2:01 PM Changeset in webkit [272927] by graouts@webkit.org
  • 4 edits in trunk

REGRESSION(r271515): ::marker fired at wrong time
https://bugs.webkit.org/show_bug.cgi?id=221961
<rdar://problem/74397846>

Reviewed by Dean Jackson.

Source/WebCore:

Restore the order in which we generate CSS Animations for pseudo-elements as it was prior to r271515.

  • style/StyleTreeResolver.cpp:

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

LayoutTests:

Remove flakiness for this test since it didn't allow us to spot the regression introduced by r271515.

1:46 PM Changeset in webkit [272926] by commit-queue@webkit.org
  • 17 edits
    9 adds
    9 deletes in trunk/LayoutTests

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

Patch by Chris Gambrell <Chris Gambrell> on 2021-02-16
Reviewed by Jonathan Bedard.

  • http/tests/eventsource/eventsource-content-type-charset.html:
  • http/tests/eventsource/eventsource-cors-basic-expected.txt:
  • http/tests/eventsource/eventsource-cors-basic.html:
  • http/tests/eventsource/eventsource-cors-with-credentials-expected.txt:
  • http/tests/eventsource/eventsource-cors-with-credentials.html:
  • http/tests/eventsource/eventsource-eof.html:
  • http/tests/eventsource/eventsource-events-after-close.html:
  • http/tests/eventsource/eventsource-page-cache-connected.html:
  • http/tests/eventsource/eventsource-page-cache-connecting.html:
  • http/tests/eventsource/eventsource-parse-event-stream.html:
  • http/tests/eventsource/eventsource-reconnect-during-navigate-crash.html:
  • http/tests/eventsource/eventsource-reconnect.html:
  • http/tests/eventsource/eventsource-status-code-states.html:
  • http/tests/eventsource/eventsource-url-attribute-expected.txt:
  • http/tests/eventsource/eventsource-url-attribute.html:
  • http/tests/eventsource/resources/es-cors-basic.php: Removed.
  • http/tests/eventsource/resources/es-cors-basic.py: Added.
  • http/tests/eventsource/resources/es-cors-credentials.php: Removed.
  • http/tests/eventsource/resources/es-cors-credentials.py: Added.
  • http/tests/eventsource/resources/es-eof.php: Removed.
  • http/tests/eventsource/resources/es-eof.py: Added.
  • http/tests/eventsource/resources/event-stream.php: Removed.
  • http/tests/eventsource/resources/event-stream.py: Added.
  • http/tests/eventsource/resources/infinite-event-stream.php: Removed.
  • http/tests/eventsource/resources/infinite-event-stream.py: Added.
  • http/tests/eventsource/resources/reconnect.php: Removed.
  • http/tests/eventsource/resources/reconnect.py: Added.
  • http/tests/eventsource/resources/request-existent-eventsource-error.html:
  • http/tests/eventsource/resources/response-content-type-charset.php: Removed.
  • http/tests/eventsource/resources/response-content-type-charset.py: Added.
  • http/tests/eventsource/resources/status-codes.php: Removed.
  • http/tests/eventsource/resources/status-codes.py: Added.
  • http/tests/eventsource/resources/wait-then-notify-done.php: Removed.
  • http/tests/eventsource/resources/wait-then-notify-done.py: Added.
1:44 PM Changeset in webkit [272925] by Megan Gardner
  • 33 edits
    1 move
    2 adds
    2 deletes in trunk/Source

Change App Highlights API to operate in terms of a single serialized highlight at a time
https://bugs.webkit.org/show_bug.cgi?id=221802

Reviewed by Tim Horton.

Source/WebCore:

Pipe through additional data needed for display, and update to allow for more information to be added more easily.

  • Modules/highlight/AppHighlightListData.cpp: Removed.
  • Modules/highlight/AppHighlightRangeData.h: Renamed from Source/WebCore/Modules/highlight/AppHighlightListData.h.
  • Modules/highlight/AppHighlightStorage.cpp:

(WebCore::createAppHighlightRangeData):
(WebCore::AppHighlightStorage::storeAppHighlight):
(WebCore::AppHighlightStorage::restoreAppHighlight):
(WebCore::AppHighlightStorage::updateAppHighlightsStorage): Deleted.
(WebCore::AppHighlightStorage::restoreAppHighlights): Deleted.

  • Modules/highlight/AppHighlightStorage.h:
  • Modules/highlight/HighlightRegister.cpp:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/EmptyClients.cpp:

(WebCore::EmptyChromeClient::storeAppHighlight const):
(WebCore::EmptyChromeClient::updateAppHighlightsStorage const): Deleted.

  • loader/EmptyClients.h:
  • page/Chrome.cpp:

(WebCore::Chrome::storeAppHighlight const):
(WebCore::Chrome::updateAppHighlightsStorage const): Deleted.

  • page/Chrome.h:
  • page/ChromeClient.h:

Source/WebKit:

Pipe through additional data needed for display, and update to allow for more information to be added more easily.

  • Shared/CreateNewGroupForHighlight.h: Removed.
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _storeAppHighlight:]):
(-[WKWebView _restoreAppHighlights:]):
(-[WKWebView _updateAppHighlightsStorage:]): Deleted.

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

(WebKit::PageClientImplCocoa::storeAppHighlight):
(WebKit::PageClientImplCocoa::updateAppHighlightsStorage): Deleted.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::createAppHighlightInSelectedRange):
(WebKit::WebPageProxy::restoreAppHighlights):

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

(WebKit::WebPageProxy::contextMenuItemSelected):
(WebKit::WebPageProxy::storeAppHighlight):
(WebKit::WebPageProxy::updateAppHighlightsStorage): Deleted.

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

(-[WKContentView createHighlightInCurrentGroupWithRange:]):
(-[WKContentView createHighlightInNewGroupWithRange:]):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::storeAppHighlight const):
(WebKit::WebChromeClient::updateAppHighlightsStorage const): Deleted.

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::createAppHighlightInSelectedRange):
(WebKit::WebPage::restoreAppHighlights):

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

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::storeAppHighlight const):
(WebChromeClient::updateAppHighlightsStorage const): Deleted.

1:43 PM Changeset in webkit [272924] by commit-queue@webkit.org
  • 2 edits
    1 add
    1 delete in trunk/LayoutTests

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

Patch by Chris Gambrell <Chris Gambrell> on 2021-02-16
Reviewed by Jonathan Bedard.

  • http/tests/plugins/get-url-redirect.html:
  • http/tests/plugins/resources/redirection-response.php: Removed.
  • http/tests/plugins/resources/redirection-response.py: Added.
1:27 PM WebKitGTK/2.30.x edited by Michael Catanzaro
(diff)
12:59 PM Changeset in webkit [272923] by Kate Cheney
  • 9 edits
    1 delete in trunk

Clean up WKWebView media API
https://bugs.webkit.org/show_bug.cgi?id=221929
<rdar://problem/73460121>

Reviewed by Youenn Fablet.

Source/WebKit:

A few fixes that came from API review:

1) Change closeAllMediaPresentations to be
closeAllMediaPresentationsWithCompletionHandler. Ditto for
pauseAllMediaPlayback and requestMediaPlaybackState. This leads to
better Swift imports.

2) Combine suspendAllMediaPlayback and resumeAllMediaPlayback into a
single setAllMediaPlaybackSuspended:completionHandler function which
takes a boolean. This reinforces the relationship between
suspend/resume and differentiates them from pause.

And a few other drive-by fixes, like moving WKMediaPlaybackState to
the WKWebView class because it is unlikely to be used outside of that
context, changing NSUInteger -> NSInteger, and changing the ordering
of the WKMediaPlaybackState enum to be more natural.

No new tests. No behavior change. Covered by existing API tests.

  • UIProcess/API/Cocoa/WKMediaPlaybackState.h: Removed.
  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView closeAllMediaPresentationsWithCompletionHandler:]):
(-[WKWebView pauseAllMediaPlaybackWithCompletionHandler:]):
(-[WKWebView setAllMediaPlaybackSuspended:completionHandler:]):
(toWKMediaPlaybackState):
(-[WKWebView requestMediaPlaybackStateWithCompletionHandler:]):
(-[WKWebView _closeAllMediaPresentations]):
(-[WKWebView _stopAllMediaPlayback]):
(-[WKWebView _suspendAllMediaPlayback]):
(-[WKWebView _resumeAllMediaPlayback]):
(-[WKWebView closeAllMediaPresentations:]): Deleted.
(-[WKWebView pauseAllMediaPlayback:]): Deleted.
(-[WKWebView suspendAllMediaPlayback:]): Deleted.
(-[WKWebView resumeAllMediaPlayback:]): Deleted.
(-[WKWebView requestMediaPlaybackState:]): Deleted.

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Update naming.

  • TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm:

(TEST):

12:51 PM Changeset in webkit [272922] by ysuzuki@apple.com
  • 7 edits in trunk/Source

[JSC] Enable JITCage on macOS
https://bugs.webkit.org/show_bug.cgi?id=221805
<rdar://problem/74153806>

Reviewed by Mark Lam.

Source/JavaScriptCore:

We enable JITCage too on macOS if it is ARM64E.
We need to add this entitlement only when building it on macOS 120000 or higher version.
Otherwise, we cannot launch the process. This means that we need to dynamically generate entitlements file
because we must not attach this entitlement when building JSC for non 120000 macOS.

We also remove install_name for jsc binary because it broke codesigning. Previously, it was OK since we didn't
have com.apple.private.xxx, but now this broken codesigning makes JSC binary unlaunchable.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/process-entitlements.sh:

Source/WebKit:

We need to add this entitlement only when building it on macOS 120000 or higher version.
Otherwise, we cannot launch the process. And we attach this entitlement only when building processes
with Apple Internal SDKs.

  • Scripts/process-entitlements.sh:

Source/WTF:

Enable JIT_CAGE when macOS is 120000 or higher with ARM64E.

  • wtf/PlatformEnable.h:
12:30 PM UsingGitWithWebKit edited by Fujii Hironori
(diff)
12:20 PM Changeset in webkit [272921] by commit-queue@webkit.org
  • 5 edits in trunk

[GTK] Need new user agent quirk for Google Docs and Google Drive
https://bugs.webkit.org/show_bug.cgi?id=221845

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-16
Reviewed by Adrian Perez de Castro.

Source/WebCore:

Switch Google Docs to use a Chrome browser quirk instead of an Internet Explorer quirk.
Remove the Google Drive quirk altogether. Remove the Internet Explorer and Windows platform
quirks, which are no longer used. Retarget the Google Docs quirk to apply only to
docs.google.com because we no longer need to send the quirk to accounts.youtube.com for it
to be effective. Lastly, update Chrome and Firefox version strings for good measure.

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresChromeBrowser):
(WebCore::urlRequiresLinuxDesktopPlatform):
(WebCore::UserAgentQuirks::quirksForURL):
(WebCore::UserAgentQuirks::stringForQuirk):
(WebCore::urlRequiresInternetExplorerBrowser): Deleted.
(WebCore::urlRequiresWindowsPlatform): Deleted.

  • platform/glib/UserAgentGLib.cpp:

(WebCore::buildUserAgentString):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::assertUserAgentForURLHasChromeBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasFirefoxBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasLinuxPlatformQuirk):
(TestWebKitAPI::assertUserAgentForURLHasMacPlatformQuirk):
(TestWebKitAPI::TEST):
(TestWebKitAPI::assertUserAgentForURLHasInternetExplorerBrowserQuirk): Deleted.
(TestWebKitAPI::assertUserAgentForURLHasWindowsPlatformQuirk): Deleted.

11:40 AM Changeset in webkit [272920] by achristensen@apple.com
  • 27 edits in trunk

Add API to disable HTTPS upgrade
https://bugs.webkit.org/show_bug.cgi?id=221591
<rdar://problem/56254945>

Reviewed by Geoff Garen.

Source/WebCore:

We are upgrading requests from HTTP to HTTPS, but an app may have a reason to want to make a plaintext connection.
Make API on WKWebViewConfiguration to enable that to happen, and use opensource.apple.com as a test host.

  • Modules/websockets/ThreadableWebSocketChannel.cpp:

(WebCore::ThreadableWebSocketChannel::validateURL):

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::makeSecureIfNecessary):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):

  • contentextensions/ContentExtensionsBackend.h:
  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::subresourcesAllowReuse const):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::loadResource):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadResourceSynchronously):

  • loader/PingLoader.cpp:

(WebCore::processContentRuleListsForLoad):

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::willSendRequestInternal):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::open):

  • page/Page.cpp:

(WebCore::m_httpsUpgradeEnabled):
(WebCore::m_textInteractionEnabled): Deleted.

  • page/Page.h:

(WebCore::Page::httpsUpgradeEnabled const):

  • page/PageConfiguration.h:
  • page/UserContentProvider.cpp:

(WebCore::UserContentProvider::processContentRuleListsForLoad):

  • page/UserContentProvider.h:

Source/WebKit:

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy const):

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::setHTTPSUpgradeEnabled):
(API::PageConfiguration::httpsUpgradeEnabled const):

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

(-[WKWebViewConfiguration upgradeCommonKnownRequestsToHTTPS]):
(-[WKWebViewConfiguration setUpgradeCommonKnownRequestsToHTTPS:]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm:

(TEST):

11:26 AM Changeset in webkit [272919] by Chris Dumez
  • 52 edits in trunk

Reduce explicit usage of [objC release] in WebKit even more
https://bugs.webkit.org/show_bug.cgi?id=221914

Reviewed by Alex Christensen.

Source/JavaScriptCore:

  • API/JSContext.mm:

(-[JSContext initWithVirtualMachine:]):
(-[JSContext dealloc]):
(-[JSContext virtualMachine]):
(-[JSContext initWithGlobalContextRef:]):

  • API/JSManagedValue.mm:

(-[JSManagedValue initWithValue:]):
(-[JSManagedValue dealloc]):
(-[JSManagedValue didAddOwner:]):
(-[JSManagedValue didRemoveOwner:]):

  • API/JSVirtualMachine.mm:

(-[JSVirtualMachine initWithContextGroupRef:]):
(-[JSVirtualMachine dealloc]):
(-[JSVirtualMachine contextForGlobalContextRef:]):
(-[JSVirtualMachine addContext:forGlobalContextRef:]):
(-[JSVirtualMachine externalObjectGraph]):
(-[JSVirtualMachine externalRememberedSet]):

  • API/JSWrapperMap.mm:

(createRenameMap):
(copyMethodsToObject):
(-[JSWrapperMap initWithGlobalContextRef:]):
(-[JSWrapperMap classInfoForClass:]):
(-[JSWrapperMap objcWrapperForJSValueRef:inContext:]):

  • inspector/scripts/codegen/generate_objc_configuration_implementation.py:

(ObjCConfigurationImplementationGenerator._generate_configuration_implementation_for_domains):
(ObjCConfigurationImplementationGenerator._generate_ivars):

  • inspector/scripts/codegen/objc_generator_templates.py:

Source/WebCore:

  • bridge/objc/objc_instance.mm:

(ObjcInstance::setGlobalException):
(ObjcInstance::moveGlobalExceptionToExecState):

  • bridge/testbindings.mm:

(-[MyFirstInterface init]):
(-[MyFirstInterface getMySecondInterface]):

  • platform/ios/wak/WAKView.mm:

(setGlobalFocusView):

  • platform/ios/wak/WAKWindow.mm:

(-[WAKWindow sendEventSynchronously:]):

  • platform/ios/wak/WebCoreThread.mm:

(MainThreadAdoptAndRelease):
(HandleWebThreadReleaseSource):

Source/WebKitLegacy/mac:

  • History/WebHistory.mm:

(+[WebHistory setOptionalSharedHistory:]):

  • Plugins/WebPluginDatabase.mm:

(+[WebPluginDatabase setAdditionalWebPlugInPaths:]):

  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::enterFullScreenForElement):

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::updateGlobalHistory):
(NetscapePluginWidget::getFormValue):

  • WebInspector/WebNodeHighlightView.mm:

(-[WebNodeHighlightView _attach:numLayers:]):

  • WebView/WebFrameView.mm:

(-[WebFrameView _makeDocumentViewForDataSource:]):

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
(-[WebView _closePluginDatabases]):
(-[WebView _close]):
(-[WebView inspector]):
(-[WebView setShowingInspectorIndication:]):
(-[WebView _setFormDelegate:]):
(-[WebView _formDelegateForwarder]):
(-[WebView _UIKitDelegateForwarder]):
(-[WebView _policyDelegateForwarder]):
(-[WebView _UIDelegateForwarder]):
(-[WebView _editingDelegateForwarder]):
(-[WebView _setUIKitDelegate:]):
(-[WebView caretChangeListeners]):
(-[WebView addCaretChangeListener:]):
(-[WebView _setAdditionalWebPlugInPaths:]):
(-[WebView setBackgroundColor:]):
(-[WebView backgroundColor]):
(-[WebView _fixedPositionContent]):
(-[WebView setUIDelegate:]):
(-[WebView _resourceLoadDelegateForwarder]):
(-[WebView setResourceLoadDelegate:]):
(-[WebView setPolicyDelegate:]):
(-[WebView _frameLoadDelegateForwarder]):
(-[WebView setFrameLoadDelegate:]):
(-[WebView setApplicationNameForUserAgent:]):
(-[WebView applicationNameForUserAgent]):
(-[WebView setMediaStyle:]):
(-[WebView mediaStyle]):
(-[WebView _userAgentString]):
(-[WebView setHostWindow:]):
(-[WebView hostWindow]):
(-[WebView setCurrentNodeHighlight:]):
(-[WebView currentNodeHighlight]):
(-[WebView _allowsLinkPreview]):
(-[WebView _setAllowsLinkPreview:]):
(-[WebView setEditingDelegate:]):
(-[WebView _immediateActionController]):

  • WebView/WebViewData.h:
  • WebView/WebViewData.mm:

(-[WebViewPrivate dealloc]):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(destroyWebViewAndOffscreenWindow):
(releaseAndZero):
(runTest):

  • DumpRenderTree/mac/DumpRenderTreePasteboard.mm:

(+[DumpRenderTreePasteboard releaseLocalPasteboards]):

  • DumpRenderTree/mac/EventSendingController.mm:

(+[EventSendingController clearSavedEvents]):

  • TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm:

(TestWebKitAPI::WebCoreNSURLSessionTest::SetUp):
(TestWebKitAPI::WebCoreNSURLSessionTest::TearDown):
(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebKitCocoa/AsyncFunction.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(setUpCookieTestWithWebsiteDataStore):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:

(runTestWithWebsiteDataStore):
(TEST):

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

(TEST_F):

  • TestWebKitAPI/Tests/WebKitObjC/WKBrowsingContextGroupTest.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitObjC/WKBrowsingContextLoadDelegateTest.mm:

(TEST_F):

  • TestWebKitAPI/Tests/ios/WKScrollViewDelegate.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/CandidateTests.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/SubresourceErrorCrash.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/TypingStyleCrash.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/WebScriptObjectDescription.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/WebViewCanPasteURL.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm:

(-[DidCreateJavaScriptContextFrameLoadDelegate webView:didCreateJavaScriptContext:forFrame:]):

  • TestWebKitAPI/cocoa/TestProtocol.mm:

(+[TestProtocol registerWithScheme:]):
(+[TestProtocol unregister]):

  • TestWebKitAPI/mac/InjectedBundleControllerMac.mm:

(TestWebKitAPI::InjectedBundleController::platformInitialize):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::initializeWebViewConfiguration):

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::addChromeInputField):

  • WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:

(+[WebKitTestRunnerPasteboard releaseLocalPasteboards]):

11:25 AM Changeset in webkit [272918] by Patrick Angle
  • 3 edits in trunk/Source/WebCore

Web Inspector: CSS Grid - implement grid overlay options
https://bugs.webkit.org/show_bug.cgi?id=221644

Reviewed by Devin Rousso.

Added support to grid overlays for showExtendedGridlines and showLineNumbers settings and resolved issue
where scrolling the page did not adjust the overlay accordingly.

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::drawLayoutHatching):

  • Draw a hatched fill for grid column and row gaps.

(WebCore::InspectorOverlay::drawLayoutLabel):

  • Draw a label inside a box with an arrow pointing to the target of the label.

(WebCore::InspectorOverlay::drawGridOverlay):

  • Added support for showExtendedGridlines setting.
  • Added support for showLineNumbers setting.
  • Overlay now scrolls with the page.
  • inspector/InspectorOverlay.h:
10:53 AM Changeset in webkit [272917] by Lauro Moura
  • 4 edits
    5 deletes in trunk/LayoutTests

[GLIB] Gardening and updating baselines

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:

Replaced these custom baselines with DumpJSConsoleLogInStdErr for the
soup messages to keep a single baseline. They were failing in WPE
after the php/py XMLHTTPRequest test server changes.

  • platform/wpe/http/tests/xmlhttprequest/XMLHttpRequestException-expected.txt: Removed.
  • platform/wpe/http/tests/xmlhttprequest/connection-error-sync-expected.txt: Removed.
  • platform/wpe/http/tests/xmlhttprequest/onloadend-event-after-error-expected.txt: Removed.
  • platform/wpe/http/tests/xmlhttprequest/onloadend-event-after-sync-requests-expected.txt: Removed.
  • platform/wpe/http/tests/xmlhttprequest/response-access-on-error-expected.txt: Removed.
10:47 AM Changeset in webkit [272916] by commit-queue@webkit.org
  • 5 edits
    4 adds in trunk/Source/WebKit

Connection clients should be able to obtain the messages as data instead of embedded in function references
https://bugs.webkit.org/show_bug.cgi?id=221560

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-02-16
Reviewed by Chris Dumez.

Add IPC::MessageReceiveQueue, an interface which obtains messages from
the message receive thread and forwards them to caller as data.
This is important in order to be able to skip messages that are stale
or originating from a sender which is incorrect. Before, the client
could only get the messages as Function references, and those cannot
be skipped as it would be undefined what not executing a function means.

IPC::MessageReceiveQueue is a generalization and simplification of current
IPC::Connection::ThreadMessageReceiverRefCounted and
IPC::Connection::WorkQueueMessageReceiver. It has different ref-count
semantics, in the way that client controls the life-time with add and
remove.

IPC::MessageReceiveQueue fixes message reordering bug with
WorkQueueMessageReceiver and ThreadMessageReceiver where first few messages
that are routed to main thread message queue can come later than some
other message that gets handled from message receive thread.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::addMessageReceiveQueue):
Add plain raw MessageReceiveQueue, to be used in WebGL IPC implementation.
Implement ThreadMessageReceiver and WorkQueueMessageReceiver with the
above.

(IPC::Connection::removeMessageReceiveQueue):
(IPC::Connection::dispatchMessageReceiverMessage):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::enqueueIncomingMessage):
(IPC::Connection::dispatchMessage):

  • Platform/IPC/Connection.h:
  • Platform/IPC/MessageReceiveQueue.h: Copied from Source/WTF/wtf/FunctionDispatcher.h.
  • Platform/IPC/MessageReceiveQueues.h: Added.
  • Platform/IPC/MessageReceiveQueueMap.cpp: Added.

(IPC::MessageReceiveQueueMap::addImpl):
(IPC::MessageReceiveQueueMap::remove):
(IPC::MessageReceiveQueueMap::get const):

  • Platform/IPC/MessageReceiveQueueMap.h: Copied from Source/WTF/wtf/FunctionDispatcher.h.

(IPC::MessageReceiveQueueMap::isValidMessage):
(IPC::MessageReceiveQueueMap::add):

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
10:08 AM Changeset in webkit [272915] by commit-queue@webkit.org
  • 10 edits in trunk/Source/WebKit

RemoteAudioSourceProviderManager is accessed in non-thread-safe manner
https://bugs.webkit.org/show_bug.cgi?id=221894

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-02-16
Reviewed by Chris Dumez.

Remove call to Connection::removeWorkQueueMessageReceiver() from the destructor.
The message receive destination is still active during destructor,
so Connection might dispatch new message tasks during that time.
This causes ref of the instance already being destroyed, which
then causes the tasks to use deleted instance and then later
deleting it again.

Other subclasses call add...() correctly.
Other subclasses never call remove..(). Assert that the instances are
never destroyed, as to never leave a dangling reference in the connection.

  • UIProcess/mac/SecItemShimProxy.cpp:

(WebKit::SecItemShimProxy::~SecItemShimProxy):

  • UIProcess/mac/SecItemShimProxy.h:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::~GPUProcessConnection):

  • WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp:

(WebKit::RemoteAudioSourceProviderManager::~RemoteAudioSourceProviderManager):
(WebKit::RemoteAudioSourceProviderManager::stopListeningForIPC):

  • WebProcess/GPU/media/RemoteAudioSourceProviderManager.h:
  • WebProcess/Inspector/WebInspectorInterruptDispatcher.cpp:

(WebKit::WebInspectorInterruptDispatcher::~WebInspectorInterruptDispatcher):

  • WebProcess/Plugins/PluginProcessConnectionManager.cpp:

(WebKit::PluginProcessConnectionManager::~PluginProcessConnectionManager):

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::~EventDispatcher):

  • WebProcess/WebPage/ViewUpdateDispatcher.cpp:

(WebKit::ViewUpdateDispatcher::~ViewUpdateDispatcher):

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

libwebrtc installs some files into incorrect locations in /usr/local/include
https://bugs.webkit.org/show_bug.cgi?id=221534
<rdar://problem/74333613>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

  • libwebrtc.xcodeproj/project.pbxproj:

Remove no longer needed private header copying.
Move vp9 header copying from common to webm.

Source/WebCore:

No change of behavior.

  • platform/graphics/cocoa/SourceBufferParserWebM.h:
  • platform/graphics/cocoa/VP9UtilitiesCocoa.mm:

Update according new vp9 header code path.

10:04 AM Changeset in webkit [272913] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

AVAudioSessionCaptureDeviceManager should disable its audio session in a background thread
https://bugs.webkit.org/show_bug.cgi?id=221949
<rdar://problem/74315824>

Reviewed by Eric Carlson.

Manually tested.

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:

(WebCore::AVAudioSessionCaptureDeviceManager::disableAllDevicesQuery):
Hop to a background thread before disabling the audio session.
Abort if audio session is no longer marked as unneeded.

10:04 AM Changeset in webkit [272912] by youenn@apple.com
  • 39 edits in trunk/LayoutTests

Reenable GPUProcess Media flag in WebRTC tests
https://bugs.webkit.org/show_bug.cgi?id=221911

Reviewed by Eric Carlson.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html:
  • webrtc/captureCanvas-webrtc-software-h264-baseline.html:
  • webrtc/captureCanvas-webrtc-software-h264-high.html:
  • webrtc/captureCanvas-webrtc.html:
  • webrtc/concurrentVideoPlayback2.html:
  • webrtc/direction-change.html:
  • webrtc/disable-encryption.html:
  • webrtc/h264-baseline.html:
  • webrtc/h264-high.html:
  • webrtc/multi-audio.html:
  • webrtc/multi-video.html:
  • webrtc/peer-connection-track-end.html:
  • webrtc/peerconnection-page-cache-long.html:
  • webrtc/peerconnection-page-cache.html:
  • webrtc/remove-track.html:
  • webrtc/utf8-sdp.html:
  • webrtc/video-addTrack.html:
  • webrtc/video-addTransceiver.html:
  • webrtc/video-autoplay.html:
  • webrtc/video-disabled-black.html:
  • webrtc/video-h264.html:
  • webrtc/video-interruption.html:
  • webrtc/video-mediastreamtrack-stats.html:
  • webrtc/video-mute.html:
  • webrtc/video-remote-mute.html:
  • webrtc/video-replace-muted-track.html:
  • webrtc/video-replace-track-to-null.html:
  • webrtc/video-replace-track.html:
  • webrtc/video-rotation-no-cvo.html:
  • webrtc/video-rotation.html:
  • webrtc/video-setDirection.html:
  • webrtc/video-sframe.html:
  • webrtc/video-stats.html:
  • webrtc/video-unmute.html:
  • webrtc/video-with-data-channel.html:
  • webrtc/video.html:
9:57 AM Changeset in webkit [272911] by youenn@apple.com
  • 5 edits in trunk

MediaRecorder.stop() does not work correctly when recording has been paused.
https://bugs.webkit.org/show_bug.cgi?id=221916
<rdar://problem/74366154>

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/mediacapture-record/MediaRecorder-pause-resume-expected.txt:
  • web-platform-tests/mediacapture-record/MediaRecorder-pause-resume.html:

Source/WebCore:

Proceed with stop steps in case of paused state, and not only in case of recording state.
Covered by added WPT test.

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::stopRecordingInternal):

9:56 AM Changeset in webkit [272910] by youenn@apple.com
  • 5 edits in trunk

Set a default path for device ID hash salts
https://bugs.webkit.org/show_bug.cgi?id=221955

Reviewed by Eric Carlson.

Source/WebKit:

The default path was the empty string, which leads to not persist device IDs.
Update this to provide a valid default path like for other persisting data types.
Covered by API test.

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

Tools:

  • TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:

(TestWebKitAPI::TEST):

9:26 AM Changeset in webkit [272909] by weinig@apple.com
  • 5 edits in trunk

lab() and lch() are not clamping out of bounds values at parse time
https://bugs.webkit.org/show_bug.cgi?id=221947

Reviewed by Simon Fraser.

The model level assertions caught this (yay). The spec requires that we
clamp negative lightness values to 0 for lab(), lch() and color(lab)
and negative chroma values to 0 for lch().

Source/WebCore:

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseLabParameters):
(WebCore::CSSPropertyParserHelpers::parseLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForLabParameters):

LayoutTests:

  • fast/css/parsing-lab-colors-expected.txt:
  • fast/css/parsing-lab-colors.html:
8:59 AM Changeset in webkit [272908] by achristensen@apple.com
  • 18 edits
    5 adds in trunk

Synthesize range responses if needed in WebCoreNSURLSession
https://bugs.webkit.org/show_bug.cgi?id=221072

Reviewed by Geoff Garen.

Source/WebCore:

When we make a media request with a Range HTTP header field and the server doesn't respond with a 206 with Content-Range header field,
until now we would just fail to play the video. In order to successfully play these videos, I introduce the RangeResponseGenerator class,
which will receive the data for a request for such a video and feed the data into WebCoreNSURLSession as the requested ranges are received.
Seeking is problematic, but at least we will try our best to play the video.

I added API tests that try to play a video that didn't play before using a server that doesn't support range requests. Manual verification is also necessary.

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/PlatformMediaResourceLoader.h:

(WebCore::PlatformMediaResource::setClient):

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

(WebCore::PlatformResourceMediaLoader::create):

  • platform/network/ParsedRequestRange.cpp: Added.

(WebCore::ParsedRequestRange::parse):

  • platform/network/ParsedRequestRange.h: Added.

(WebCore::ParsedRequestRange::begin const):
(WebCore::ParsedRequestRange::end const):
(WebCore::ParsedRequestRange::ParsedRequestRange):

  • platform/network/cocoa/RangeResponseGenerator.h: Added.
  • platform/network/cocoa/RangeResponseGenerator.mm: Added.

(WebCore::RangeResponseGenerator::Data::Data):
(WebCore::RangeResponseGenerator::Data::TaskData::TaskData):
(WebCore::synthesizedResponseForRange):
(WebCore::RangeResponseGenerator::removeTask):
(WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):
(WebCore::RangeResponseGenerator::expectedContentLengthFromData):
(WebCore::RangeResponseGenerator::giveResponseToTasksWithFinishedRanges):
(WebCore::RangeResponseGenerator::willHandleRequest):
(WebCore::RangeResponseGenerator::willSynthesizeRangeResponses):

  • platform/network/cocoa/WebCoreNSURLSession.h:
  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSession rangeResponseGenerator]):
(-[WebCoreNSURLSession dataTaskWithURL:]):
(WebCore::WebCoreNSURLSessionDataTaskClient::dataSent):
(WebCore::WebCoreNSURLSessionDataTaskClient::responseReceived):
(WebCore::WebCoreNSURLSessionDataTaskClient::shouldCacheResponse):
(WebCore::WebCoreNSURLSessionDataTaskClient::dataReceived):
(WebCore::WebCoreNSURLSessionDataTaskClient::redirectReceived):
(WebCore::WebCoreNSURLSessionDataTaskClient::accessControlCheckFailed):
(WebCore::WebCoreNSURLSessionDataTaskClient::loadFailed):
(WebCore::WebCoreNSURLSessionDataTaskClient::loadFinished):
(-[WebCoreNSURLSessionDataTask _restart]):
(-[WebCoreNSURLSessionDataTask _finish]):
(-[WebCoreNSURLSessionDataTask resource:sentBytes:totalBytesToBeSent:]):
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:completionHandler:]):
(-[WebCoreNSURLSessionDataTask resource:shouldCacheResponse:]):
(-[WebCoreNSURLSessionDataTask resource:receivedData:length:]):
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]):
(-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:metrics:]):
(-[WebCoreNSURLSessionDataTask resource:accessControlCheckFailedWithError:]):
(-[WebCoreNSURLSessionDataTask resource:loadFailedWithError:]):
(-[WebCoreNSURLSessionDataTask resourceFinished:metrics:]):
(-[WebCoreNSURLSessionDataTask initWithSession:identifier:URL:]): Deleted.

Source/WebKit:

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::requestResource):

Tools:

  • TestWebKitAPI/Tests/WebCore/ParsedContentRange.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(TestWebKitAPI::clientCertServer):

  • TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:

(TestWebKitAPI::testVideoBytes):
(TestWebKitAPI::runVideoTest):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/HTTPServer.h:

(TestWebKitAPI::HTTPResponse::HTTPResponse):
(TestWebKitAPI::HTTPServer::HTTPResponse::HTTPResponse): Deleted.

  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::HTTPServer::RequestData::RequestData):
(TestWebKitAPI::appendToVector):
(TestWebKitAPI::HTTPServer::parsePath):
(TestWebKitAPI::HTTPServer::respondToRequests):
(TestWebKitAPI::HTTPResponse::bodyFromString):
(TestWebKitAPI::HTTPResponse::serialize):

8:48 AM Changeset in webkit [272907] by commit-queue@webkit.org
  • 3 edits
    1 add
    1 delete in trunk/LayoutTests

[LayoutTests] Convert http/tests/in-app-browser-privacy convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=221928
<rdar://problem/74366517>

Patch by Chris Gambrell <Chris Gambrell> on 2021-02-16
Reviewed by Jonathan Bedard.

  • http/tests/in-app-browser-privacy/resources/redirect.php: Removed.
  • http/tests/in-app-browser-privacy/resources/redirect.py: Added.
  • http/tests/in-app-browser-privacy/sub-frame-redirect-to-non-app-bound-domain-blocked.html:
  • http/tests/in-app-browser-privacy/top-frame-redirect-to-non-app-bound-domain-blocked.html:
8:46 AM Changeset in webkit [272906] by Antti Koivisto
  • 5 edits
    2 adds in trunk

[LFC][Integration] Pass child inline block scroll overflow to parent
https://bugs.webkit.org/show_bug.cgi?id=221958
rdar://74050874

Reviewed by Zalan Bujtas.

Source/WebCore:

Integrated LFC fails to pass through overflow from nested inline blocks.

Test: fast/overflow/inline-block-scroll-overflow.html

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::InlineContentBuilder):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):

Find the associated RenderBox and collect overflow from it.

  • layout/integration/LayoutIntegrationInlineContentBuilder.h:
  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::constructContent):

LayoutTests:

  • fast/overflow/inline-block-scroll-overflow-expected.html: Added.
  • fast/overflow/inline-block-scroll-overflow.html: Added.
8:10 AM Changeset in webkit [272905] by commit-queue@webkit.org
  • 15 edits in trunk/Source/WebKit

ThreadMessageReceiverRefCounted subclasses are accessed in non-thread-safe way
https://bugs.webkit.org/show_bug.cgi?id=221891

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-02-16
Reviewed by Chris Dumez.

For each ThreadMessageReceiverRefCounted subclass, remove calls
to Connection::addThreadMessageReceiver() from the constructor.
The calls pass 'this' as the ThreadMessageReceiver*. If the
connection tries to dispatch a message during the constructor, this
results in some or all of below:

  • non-thread-safe read of mutated virtual function pointer
  • call to incorrect member function, mostly to MessageReceiver::didReceiveMessage
  • an assert from above
  • skipped message

For each ThreadMessageReceiverRefCounted subclass, remove calls
to Connection::removeThreadMessageReceiver() from the destructor.
The message receive destination is still active during destructor,
so Connection might dispatch new message tasks during that time.
This causes ref of the instance already being destroyed, which
then causes the tasks to use deleted instance and then later
deleting it again.

Does not try to fix any other potential thread-related issues in
the modified areas.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.cpp:

(WebKit::RemoteAudioMediaStreamTrackRendererManager::RemoteAudioMediaStreamTrackRendererManager):
(WebKit::RemoteAudioMediaStreamTrackRendererManager::startListeningForIPC):
(WebKit::RemoteAudioMediaStreamTrackRendererManager::close):

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:

(WebKit::RemoteSampleBufferDisplayLayerManager::RemoteSampleBufferDisplayLayerManager):
(WebKit::RemoteSampleBufferDisplayLayerManager::startListeningForIPC):
(WebKit::RemoteSampleBufferDisplayLayerManager::close):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h:
  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::NetworkRTCProvider):
(WebKit::NetworkRTCProvider::startListeningForIPC):

  • NetworkProcess/webrtc/NetworkRTCProvider.h:

(WebKit::NetworkRTCProvider::create):

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::LibWebRTCCodecs::LibWebRTCCodecs):
(WebKit::LibWebRTCCodecs::startListeningForIPC):
(WebKit::LibWebRTCCodecs::~LibWebRTCCodecs):
(WebKit::LibWebRTCCodecs::gpuProcessConnectionDidClose):

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:

(WebKit::LibWebRTCCodecs::create):

  • WebProcess/Network/webrtc/LibWebRTCNetwork.cpp:

(WebKit::LibWebRTCNetwork::~LibWebRTCNetwork):

  • WebProcess/Network/webrtc/LibWebRTCNetwork.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::libWebRTCCodecs):

  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::~RemoteCaptureSampleManager):
(WebKit::RemoteCaptureSampleManager::stopListeningForIPC):

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

(WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):

  • WebProcess/glib/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):

7:18 AM Changeset in webkit [272904] by graouts@webkit.org
  • 77 edits in trunk

Web Animations JS API does not support "inherit" CSS values for keyframes
https://bugs.webkit.org/show_bug.cgi?id=221931

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Mark WPT progressions.

  • web-platform-tests/css/css-align/animation/column-gap-interpolation-expected.txt:
  • web-platform-tests/css/css-align/animation/row-gap-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-color-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-image-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-position-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-position-origin-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-position-x-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-position-y-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-size-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-color-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-image-outset-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-image-slice-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-image-source-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-radius-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-width-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt:
  • web-platform-tests/css/css-box/animation/margin-interpolation-expected.txt:
  • web-platform-tests/css/css-box/animation/padding-interpolation-expected.txt:
  • web-platform-tests/css/css-color/animation/color-interpolation-expected.txt:
  • web-platform-tests/css/css-color/animation/opacity-interpolation-expected.txt:
  • web-platform-tests/css/css-flexbox/animation/flex-basis-interpolation-expected.txt:
  • web-platform-tests/css/css-flexbox/animation/flex-grow-interpolation-expected.txt:
  • web-platform-tests/css/css-flexbox/animation/flex-shrink-interpolation-expected.txt:
  • web-platform-tests/css/css-flexbox/animation/order-interpolation-expected.txt:
  • web-platform-tests/css/css-fonts/animations/font-size-interpolation-001-expected.txt:
  • web-platform-tests/css/css-fonts/animations/font-size-interpolation-002-expected.txt:
  • web-platform-tests/css/css-fonts/animations/font-stretch-interpolation-expected.txt:
  • web-platform-tests/css/css-lists/animations/list-style-image-interpolation-expected.txt:
  • web-platform-tests/css/css-multicol/animation/column-count-interpolation-expected.txt:
  • web-platform-tests/css/css-multicol/animation/column-rule-color-interpolation-expected.txt:
  • web-platform-tests/css/css-multicol/animation/column-width-interpolation-expected.txt:
  • web-platform-tests/css/css-position/animations/bottom-interpolation-expected.txt:
  • web-platform-tests/css/css-position/animations/left-interpolation-expected.txt:
  • web-platform-tests/css/css-position/animations/right-interpolation-expected.txt:
  • web-platform-tests/css/css-position/animations/top-interpolation-expected.txt:
  • web-platform-tests/css/css-shapes/animation/shape-image-threshold-interpolation-expected.txt:
  • web-platform-tests/css/css-shapes/animation/shape-margin-interpolation-expected.txt:
  • web-platform-tests/css/css-shapes/animation/shape-outside-interpolation-expected.txt:
  • web-platform-tests/css/css-sizing/animation/height-interpolation-expected.txt:
  • web-platform-tests/css/css-sizing/animation/max-height-interpolation-expected.txt:
  • web-platform-tests/css/css-sizing/animation/max-width-interpolation-expected.txt:
  • web-platform-tests/css/css-sizing/animation/min-height-interpolation-expected.txt:
  • web-platform-tests/css/css-sizing/animation/min-width-interpolation-expected.txt:
  • web-platform-tests/css/css-sizing/animation/width-interpolation-expected.txt:
  • web-platform-tests/css/css-text/animations/letter-spacing-interpolation-expected.txt:
  • web-platform-tests/css/css-text/animations/text-indent-interpolation-expected.txt:
  • web-platform-tests/css/css-text/animations/word-spacing-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/perspective-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/rotate-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/scale-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-006-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-origin-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt:
  • web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt:
  • web-platform-tests/css/css-transitions/animations/z-index-interpolation-expected.txt:
  • web-platform-tests/css/css-ui/animation/caret-color-interpolation-expected.txt:
  • web-platform-tests/css/css-ui/animation/outline-color-interpolation-expected.txt:
  • web-platform-tests/css/css-ui/animation/outline-offset-interpolation-expected.txt:
  • web-platform-tests/css/css-ui/animation/outline-width-interpolation-expected.txt:

Source/WebCore:

When a KeyframeEffect compute its blending keyframes with KeyframeEffect::updateBlendingKeyframes(),
it calls into Style::Resolver::styleForKeyframe(). However, we wouldn't have a parent element style
to pass into this method and thus the "inherit" value wouldn't have a parent element style to know
what it should be, which meant we just used the value set on the element as fallback.

In a similar fashion as to what was done in r272898, the fix for bug 221926, we send down the parent
element style throughout the Web Animations resolution code such that KeyframeEffect::apply() can
pass it to KeyframeEffect::updateBlendingKeyframes() and finally to Style::Resolver::styleForKeyframe().

This simple fix adds 354 new PASS results in the WPT test suite.

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

(WebCore::AnimationTimeline::updateCSSTransitionsForStyleableAndProperty):

  • animation/CSSTransition.cpp:

(WebCore::CSSTransition::resolve):

  • animation/CSSTransition.h:
  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::updateBlendingKeyframes):
(WebCore::KeyframeEffect::apply):
(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):

  • animation/KeyframeEffect.h:
  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::applyKeyframeEffects):

  • animation/KeyframeEffectStack.h:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::resolve):
(WebCore::WebAnimation::commitStyles):

  • animation/WebAnimation.h:
  • style/StyleTreeResolver.cpp:

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

  • style/Styleable.h:

(WebCore::Styleable::applyKeyframeEffects const):

LayoutTests:

Mark WPT progressions for a couple tests with platform-specific results.

  • platform/ios/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-width-interpolation-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/css/css-color/animation/opacity-interpolation-expected.txt:
6:15 AM Changeset in webkit [272903] by Chris Lord
  • 2 edits in trunk/LayoutTests

[GLIB] Many service worker tests unexpectedly pass consistently
https://bugs.webkit.org/show_bug.cgi?id=221954

Unreviewed test gardening.

  • platform/glib/TestExpectations: Remove a bunch of failure expectations in service worker tests
4:35 AM Changeset in webkit [272902] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Enable GPU WebRTC codecs in GPUProcess by default on iOS
https://bugs.webkit.org/show_bug.cgi?id=221562

Reviewed by Eric Carlson.

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultWebRTCCodecsInGPUProcess):

4:26 AM Changeset in webkit [272901] by Chris Lord
  • 2 edits in trunk/LayoutTests

[GTK][WPE] tex-image-and-sub-image-2d-with-video tests pass unexpectedly
https://bugs.webkit.org/show_bug.cgi?id=221951

Unreviewed test gardening.

  • platform/glib/TestExpectations:
3:57 AM Changeset in webkit [272900] by commit-queue@webkit.org
  • 4 edits in trunk

Teardown shadow root renderers on hostChildElementDidChange
https://bugs.webkit.org/show_bug.cgi?id=221386

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-02-16
Reviewed by Antti Koivisto.

Source/WebCore:

When details element has a display contents style, the default summary renderer is not cleared when a new
summary element is added. This causes that both summary elements are rendered at the same time, instead of the
active one. The crash happens when the details element is removed from the document, because the default summary
element still has a valid renderer on destroy.

  • dom/SlotAssignment.h:

(WebCore::ShadowRoot::hostChildElementDidChange):

LayoutTests:

  • tables/table-col-indent-crash-expected.txt:
2:26 AM Changeset in webkit [272899] by Chris Lord
  • 2 edits in trunk/LayoutTests

REGRESSION(r214503): [GTK] Test canvas/philip/tests/2d.pattern.animated.gif.html started to fail after r214503
https://bugs.webkit.org/show_bug.cgi?id=170335

It looks like this was fixed by r272776.

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
12:56 AM Changeset in webkit [272898] by graouts@webkit.org
  • 15 edits in trunk/Source/WebCore

Style::Resolver::styleForKeyframe() should take in the parent style
https://bugs.webkit.org/show_bug.cgi?id=221926

Reviewed by Darin Adler.

Address the FIXME in Style::TreeResolver::createAnimatedElementUpdate() such that the parent
style is passed all the way from that function down to Style::Resolver::styleForKeyframe()
removing the need for Style::Resolver::setParentElementStyleForKeyframes().

This is a refactoring change only, so there is no new test.

  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::updateCSSAnimationsForStyleable):

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

(WebCore::CSSAnimation::create):

  • animation/CSSAnimation.h:
  • animation/CSSTransition.cpp:

(WebCore::CSSTransition::create):

  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::initialize):

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

(WebCore::KeyframeEffect::updateBlendingKeyframes):
(WebCore::KeyframeEffect::computeDeclarativeAnimationBlendingKeyframes):
(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
(WebCore::KeyframeEffect::applyPendingAcceleratedActions):

  • animation/KeyframeEffect.h:
  • rendering/style/KeyframeList.cpp:

(WebCore::KeyframeList::fillImplicitKeyframes):

  • rendering/style/KeyframeList.h:
  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::styleForKeyframe):
(WebCore::Style::Resolver::keyframeStylesForAnimation):

  • style/StyleResolver.h:

(WebCore::Style::Resolver::setParentElementStyleForKeyframes): Deleted.

  • style/StyleTreeResolver.cpp:

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

12:54 AM Changeset in webkit [272897] by ysuzuki@apple.com
  • 5 edits
    1 copy
    1 add
    2 deletes in trunk/Source/JavaScriptCore

[JSC] Dynamically generate entitlements
https://bugs.webkit.org/show_bug.cgi?id=221944

Reviewed by Saam Barati.

This patch generates entitlements at compile time since we need to selectively add certain entitlements to binaries.
It follows r248164's way: we must not use CODE_SIGN_ENTITLEMENTS because XCode inserts implicit code-signing
and it breaks our pipeline. We need to disable this XCode's implicit behavior by setting CODE_SIGN_INJECT_BASE_ENTITLEMENTS.

And we also create TestAPI.xcconfig to apply generated entitlements only to testapi and jsc shell.

  • Configurations/Base.xcconfig:
  • Configurations/JSC.xcconfig:
  • Configurations/TestAPI.xcconfig: Copied from Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig.
  • Configurations/ToolExecutable.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/process-entitlements.sh: Added.
  • allow-jit-macOS.entitlements: Removed.
  • testapi.entitlements: Removed.

Feb 15, 2021:

8:29 PM Changeset in webkit [272896] by pvollan@apple.com
  • 4 edits in trunk/Source

[macOS] Close XPC connections before entering sandbox
https://bugs.webkit.org/show_bug.cgi?id=221905
<rdar://problem/70359582>

Reviewed by Brent Fulgham.

Source/WebKit:

XPC connections that are now allowed in the sandbox should be closed before entering the sandbox.

  • Shared/mac/AuxiliaryProcessMac.mm:

(WebKit::initializeSandboxParameters):

Source/WTF:

Add softlinking macro for libraries in /usr/lib/system/.

  • wtf/cocoa/SoftLinking.h:
8:21 PM Changeset in webkit [272895] by pvollan@apple.com
  • 7 edits in trunk/Source/WebKit

Remove 'com.apple.powerlog.plxpclogger.xpc' from WebKit sandboxes
https://bugs.webkit.org/show_bug.cgi?id=221840
<rdar://problem/73579040>

Reviewed by Brent Fulgham.

Remove this service from WebKit sandboxes, since it is not required for correctness.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::diagnosticServices):

  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
8:11 PM Changeset in webkit [272894] by wilander@apple.com
  • 8 edits in trunk

PCM: Add high entropy attributionSourceNonce attribute to anchor tags
https://bugs.webkit.org/show_bug.cgi?id=221934
<rdar://73581230>

Reviewed by Jiewen Tan.

In Private Click Measurement (PCM), the source site should have the option to
provide a high entropy nonce with which PCM can asynchronously validate its
subsequent, asynchronous request for a signature of its unlinkable token.

The nonce attribute's name is attributionSourceNonce and it's a
128-bit/16-byte Base64URL encoded string.

The attribute is behind the experimental feature flag
PrivateClickMeasurementFraudPrevention.

Source/WebCore:

New API tests added.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):

  • html/HTMLAnchorElement.idl:
  • html/HTMLAttributeNames.in:
  • loader/PrivateClickMeasurement.h:

(WebCore::PrivateClickMeasurement::EphemeralSourceNonce::EphemeralSourceNonce):
(WebCore::PrivateClickMeasurement::EphemeralSourceNonce::isValid const):
(WebCore::PrivateClickMeasurement::setEphemeralSourceNonce):
(WebCore::PrivateClickMeasurement::ephemeralSourceNonce const):
(WebCore::PrivateClickMeasurement::clearEphemeralSourceNonce):

  • page/Settings.yaml:

Tools:

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:

(TestWebKitAPI::TEST):

6:06 PM Changeset in webkit [272893] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore/PAL

Unreviewed, fix the Apple internal iOS build after r272878

Wrap NSScrollViewSPI.h in a USE(APPKIT) guard, so that we don't attempt to import AppKit headers when
building for iOS using the internal SDK.

  • pal/spi/mac/NSScrollViewSPI.h:
5:51 PM Changeset in webkit [272892] by msaboff@apple.com
  • 10 edits in trunk/Source

[ARM64] Change break instruction comment to indicate possible security failure
https://bugs.webkit.org/show_bug.cgi?id=221936

Reviewed by Mark Lam.

Source/bmalloc:

Change the ASSERT break comment immediate to the same value the C++ compiler uses.

  • bmalloc/BAssert.h:

Source/JavaScriptCore:

We change the comment value to indicate a possible security issue by
using the same value the C++ compiler emits.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::breakpoint):

  • disassembler/ARM64/A64DOpcode.cpp:

(JSC::ARM64Disassembler::A64OpcodeExceptionGeneration::format):

  • disassembler/ARM64/A64DOpcode.h:

(JSC::ARM64Disassembler::A64OpcodeExceptionGeneration::immediate16):

  • offlineasm/arm64.rb:

Source/WTF:

Change the ASSERT break comment immediate to the same value the C++ compiler uses.

  • wtf/Assertions.cpp:
  • wtf/Assertions.h:
4:27 PM Changeset in webkit [272891] by Truitt Savell
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r272867.

Broke 50+ fast/layoutformattingcontext/ tests on Mac Debug WK2

Reverted changeset:

"Page scrolling by wheel events doesn't work in non-AC mode
pages if Hardware Acceleration Policy is changed dynamically
from "always" to "never""
https://bugs.webkit.org/show_bug.cgi?id=221067
https://commits.webkit.org/r272867

4:18 PM Changeset in webkit [272890] by eric.carlson@apple.com
  • 29 edits in trunk/Source

[macOS] Connect Touch Bar to MediaSession
https://bugs.webkit.org/show_bug.cgi?id=221921
<rdar://problem/74363311>

Reviewed by Jer Noble.

Source/WebCore:

These changes can only be tested manually.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): PlatformMediaSession::RemoteCommandArgument
is a struct.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::didReceiveRemoteControlCommand): Ditto. Track BeginScrubbing
and EndScrubbing so we know when to set the 'fastSeek' flag when sending a SeekTo command.

  • html/MediaElementSession.h:
  • platform/NowPlayingManager.h:
  • platform/audio/PlatformMediaSession.cpp: PlatformMediaSession::RemoteCommandArgument

is a struct.
(WebCore::convertEnumerationToString):

  • platform/audio/PlatformMediaSession.h:

(WebCore::PlatformMediaSession::RemoteCommandArgument::encode const):
(WebCore::PlatformMediaSession::RemoteCommandArgument::decode):

  • platform/cocoa/PlaybackSessionModel.h:

(WebCore::PlaybackSessionModel::sendRemoteCommand): Ditto.

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

(WebCore::PlaybackSessionModelMediaElement::sendRemoteCommand): Ditto.

  • platform/ios/RemoteCommandListenerIOS.mm:

(WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): Ditto.

  • platform/mac/PlaybackSessionInterfaceMac.h:
  • platform/mac/PlaybackSessionInterfaceMac.mm:

(WebCore::PlaybackSessionInterfaceMac::willBeginScrubbing): Pull the logic to update
controls manager timing out of beginScrubbing so it can be used from WebPlaybackControlsManager.
(WebCore::PlaybackSessionInterfaceMac::beginScrubbing):

  • platform/mac/RemoteCommandListenerMac.mm:

(WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): PlatformMediaSession::RemoteCommandArgument
is a struct.

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager seekToTime:toleranceBefore:toleranceAfter:]): Call
sendRemoteCommand.
(-[WebPlaybackControlsManager beginTouchBarScrubbing]): Ditto.
(-[WebPlaybackControlsManager endTouchBarScrubbing]): Ditto.
(-[WebPlaybackControlsManager togglePlayback]): Ditto.
(-[WebPlaybackControlsManager setPlaying:]): Ditto.
(-[WebPlaybackControlsManager togglePictureInPicture]): Ditto.

  • testing/Internals.cpp:

(WebCore::Internals::postRemoteControlCommand): Ditto.

Source/WebKit:

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::didReceiveRemoteControlCommand): PlatformMediaSession::RemoteCommandArgument
is a struct.

  • GPUProcess/GPUConnectionToWebProcess.h:
  • UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:

(WebKit::PlaybackSessionModelContext::sendRemoteCommand):
(WebKit::PlaybackSessionManagerProxy::sendRemoteCommand):

  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::didReceiveRemoteCommand):

  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/GPUProcessConnection.messages.in:
  • WebProcess/GPU/media/RemoteRemoteCommandListener.messages.in:
  • WebProcess/cocoa/PlaybackSessionManager.h:
  • WebProcess/cocoa/PlaybackSessionManager.messages.in:
  • WebProcess/cocoa/PlaybackSessionManager.mm:

(WebKit::PlaybackSessionManager::sendRemoteCommand):

4:16 PM Changeset in webkit [272889] by timothy@apple.com
  • 8 edits in trunk/Source

Web Inspector: Add a way to wake up debuggables to the remote inspector protocol
https://bugs.webkit.org/show_bug.cgi?id=221871
rdar://70351644

Reviewed by Devin Rousso.

Source/JavaScriptCore:

  • inspector/remote/RemoteInspector.h:
  • inspector/remote/RemoteInspectorConstants.h:
  • inspector/remote/cocoa/RemoteInspectorCocoa.mm:

(Inspector::RemoteInspector::xpcConnectionReceivedMessage): Handle WIRApplicationWakeUpDebuggablesMessage.
(Inspector::RemoteInspector::receivedWakeUpDebuggables): Added. Call the client.

Source/WebKit:

  • UIProcess/API/Cocoa/_WKAutomationDelegate.h:
  • UIProcess/Cocoa/AutomationClient.h:
  • UIProcess/Cocoa/AutomationClient.mm:

(WebKit::AutomationClient::AutomationClient): Check if the delegate responds to new method.
(WebKit::AutomationClient::requestedDebuggablesToWakeUp): Added. Call new process pool delegate method.

4:09 PM Changeset in webkit [272888] by Said Abou-Hallawa
  • 8 edits in trunk/Source

[GPU Process] Ensure that no image decoders run in the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=221885
<rdar://problem/74341122>

Reviewed by Simon Fraser.

Source/WebCore:

Release assert no PDF image is created in the GPU Process.

  • platform/graphics/cg/PDFDocumentImage.h:

Source/WebCore/PAL:

Add CGImageSourceSetAllowableTypes() to the ImageIO SPI header file.

  • pal/spi/cg/ImageIOSPI.h:

Source/WebKit:

Make GPU Process force ImageIO to disable all image decoding.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::initializeGPUProcess):

Source/WTF:

CGImageSourceSetAllowableTypes() is available starting from macOS Big Sur
and iOS 14.0.

  • wtf/PlatformHave.h:
3:49 PM Changeset in webkit [272887] by Peng Liu
  • 2 edits in trunk/Source/WebKit

[GPUP] Ignore an IPC message if the message receiver has been destroyed
https://bugs.webkit.org/show_bug.cgi?id=221920

Reviewed by Eric Carlson.

No new tests, fixing test crashes due to assertion failures.

  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::dispatchMessage):

3:29 PM Changeset in webkit [272886] by msaboff@apple.com
  • 2 edits in trunk/Source/WTF

REGRESSION r272823): Crash in ARM64e Wasm tests
https://bugs.webkit.org/show_bug.cgi?id=221922

Reviewed by Mark Lam.

Updated to properly compute the size of thread_state_t as well as the offset of
the PC found in thread_state_t.

  • wtf/threads/Signals.cpp:

(WTF::hashThreadState):

3:08 PM Changeset in webkit [272885] by Alexey Shvayka
  • 31 edits
    6 adds
    2 deletes in trunk

[JSC] PropertySlot should allow passing custom setters
https://bugs.webkit.org/show_bug.cgi?id=221872

Reviewed by Yusuke Suzuki.

LayoutTests/imported/w3c:

  • web-platform-tests/WebIDL/ecmascript-binding/attributes-accessors-unique-function-objects-expected.txt: Added.
  • web-platform-tests/WebIDL/ecmascript-binding/attributes-accessors-unique-function-objects.html: Added.
  • web-platform-tests/dom/events/Event-isTrusted.any-expected.txt:
  • web-platform-tests/dom/events/Event-isTrusted.any.worker-expected.txt:
  • web-platform-tests/html/browsers/history/the-location-interface/document_location-expected.txt:
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.window-expected.txt:
  • web-platform-tests/html/browsers/windows/embedded-opener-expected.txt:

Source/JavaScriptCore:

This patch:

  1. Merges PropertySlot::TypeCustomAccessor into TypeCustom, allowing to pass a setter for CustomAccessor / CustomValue. Raw C++ function pointers are used to avoid creating CustomGetterSetter instances for non-reified static properties.
  2. Reworks JSObject::getOwnPropertyDescriptor() for custom accessors, making it simpler, more robust, and no longer required to reify all static properties.
  3. Hoists GetValueFunc / PutValueFunc declarations to JSC namespace so they can be used in header files.
  4. Moves CustomAccessor's wrapper maps to JSGlobalObject (because VM outlives it) and simplifies their keys to C++ function pointers.
  5. Splits JSCustomGetterSetterFunction into JSCustomGetterFunction / JSCustomSetterFunction since their signatures and Call? logic are quite different. This is a nice refactor that also simplifies garbage collection and reduces memory needed for setter wrappers.
  6. Removes PropertyDescriptor::setCustomDescriptor(), making PropertyDescriptor unaware of custom accessors. Also, drops CustomAccessor check from validateAndApplyPropertyDescriptor() that was incorrect (no error should be thrown if accessors are unchanged) yet unreachable because PropertyDescriptor::equalTo() ignores CustomAccessor.

This change fixes a) accessor functions of unforgeable properties [1] to be persistent
(in terms of referential equality) and b) cross-realm accessor functions to be of correct
global object (instead of lexical).

[1]: https://heycam.github.io/webidl/#dfn-unforgeable-on-an-interface

  • API/JSCallbackObject.h:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • runtime/JSCustomGetterFunction.cpp: Added.

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

  • runtime/JSCustomGetterFunction.h: Added.
  • runtime/JSCustomGetterSetterFunction.cpp: Removed.
  • runtime/JSCustomGetterSetterFunction.h: Removed.
  • runtime/JSCustomSetterFunction.cpp: Added.

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

  • runtime/JSCustomSetterFunction.h: Added.
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::customGetterFunctionMap):
(JSC::JSGlobalObject::customSetterFunctionMap):
(JSC::JSGlobalObject::customGetterFunctionStructure const):
(JSC::JSGlobalObject::customSetterFunctionStructure const):
(JSC::JSGlobalObject::customGetterSetterFunctionStructure const): Deleted.

  • runtime/JSObject.cpp:

(JSC::getCustomGetterFunction):
(JSC::getCustomSetterFunction):
(JSC::JSObject::getOwnPropertyDescriptor):
(JSC::validateAndApplyPropertyDescriptor):
(JSC::getCustomGetterSetterFunctionForGetterSetter): Deleted.

  • runtime/JSObject.h:

(JSC::JSObject::fillCustomGetterPropertySlot):

  • runtime/Lookup.h:

(JSC::getStaticPropertySlotFromTable):

  • runtime/PropertyDescriptor.cpp:

(JSC::PropertyDescriptor::setAccessorDescriptor):
(JSC::PropertyDescriptor::setCustomDescriptor): Deleted.

  • runtime/PropertyDescriptor.h:
  • runtime/PropertySlot.cpp:

(JSC::PropertySlot::customAccessorGetter const): Deleted.

  • runtime/PropertySlot.h:

(JSC::PropertySlot::isCustom const):
(JSC::PropertySlot::customGetter const):
(JSC::PropertySlot::customSetter const):
(JSC::PropertySlot::setCustom):
(JSC::PropertySlot::setCacheableCustom):
(JSC::PropertySlot::getValue const):
(JSC::PropertySlot::isCustomAccessor const): Deleted.
(JSC::PropertySlot::customGetterSetter const): Deleted.
(JSC::PropertySlot::setCustomGetterSetter): Deleted.

  • runtime/PutPropertySlot.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WebCore:

To prevent cross-origin accessor functions from different realms to have the same wrapper,
return PropertySlot::TypeGetter instead.

Tests: fast/dom/Window/getOwnPropertyDescriptor-other-window.html

js/instance-property-getter-other-instance.html
imported/w3c/web-platform-tests/dom/events/Event-isTrusted.any.js
imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/document_location.html

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::getOwnPropertySlotCommon):

LayoutTests:

  • fast/dom/Window/getOwnPropertyDescriptor-other-window-expected.txt:
  • fast/dom/Window/getOwnPropertyDescriptor-other-window.html:
  • js/instance-property-getter-other-instance-expected.txt:
  • js/instance-property-getter-other-instance.html:
3:03 PM Changeset in webkit [272884] by Wenson Hsieh
  • 8 edits
    2 adds in trunk/Source/WebKit

[macOS] Add a ShareableBitmap with decoded image data to WebHitTestResultData
https://bugs.webkit.org/show_bug.cgi?id=221869

Reviewed by Tim Horton.

Add WebHitTestResultData::imageBitmap; we'll use this in future patches to vend decoded image data to system
frameworks for image extraction.

  • Shared/WebHitTestResultData.cpp:

(WebKit::WebHitTestResultData::WebHitTestResultData):
(WebKit::WebHitTestResultData::encode const):
(WebKit::WebHitTestResultData::decode):

Add imageBitmap and decoding/encoding support using ShareableBitmap::Handle.

  • Shared/WebHitTestResultData.h:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp: Added.

(WebKit::createShareableBitmap):

  • WebProcess/WebCoreSupport/ShareableBitmapUtilities.h: Added.

Pull logic to decode rendered image data into a bitmap into a separate helper function; use this helper function
in WebHitTestResultData, as well as a couple of existing call sites in WebPage.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestImageExtraction):
(WebKit::WebPage::shareableBitmap const): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::imagePositionInformation):

2:40 PM Changeset in webkit [272883] by Caio Lima
  • 14 edits
    1 copy
    8 adds in trunk

[ESNext] Implement private accessors
https://bugs.webkit.org/show_bug.cgi?id=194435

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/private-accesor-duplicate-name-early-errors.js: Added.
  • stress/private-getter-brand-check.js: Added.
  • stress/private-getter-inner-class.js: Added.
  • stress/private-members-get-and-set.js: Added.
  • stress/private-methods-and-accessors-postfix-node.js: Added.
  • stress/private-methods-and-accessors-prefix-node.js: Added.
  • stress/private-names-available-on-direct-eval.js:
  • stress/private-names-available-on-eval-during-field-initialization.js: Copied from JSTests/stress/private-names-available-on-direct-eval.js.
  • stress/private-setter-brand-check.js: Added.
  • stress/private-setter-inner-class.js: Added.
  • test262/config.yaml:
  • test262/expectations.yaml:

Source/JavaScriptCore:

This patch is implementing support for instance private getters and
setters following the proposal on https://tc39.es/proposal-private-methods.
Private accessors also use the private brand check mechanism of
private methods, which means that we are using both
op_set_private_brand and op_check_private_brand to perform brand
checks. Accessors are also stored on class lexical scope as a pair of
getter and setter. This is done creating a new JSObject and
storing the getter on get property, and setter on set
property. This is designed in such way that we can always hit IC fast
path on get_by_id_direct to access the property, and also to allow
constant folding of accessors on DFG/FTL, since acessors objects are
going to be constant once created.

For reference, we have the following bytecode for a private getter
access:

`
class C {

get #m() {...}
access() {

return this.#m;

}

}
`

Bytecode for class declaration:

`
...
new_object dst:loc12, inlineCapacity:2 this is the object to store getter and setter pair
new_func_exp dst:loc13, scope:loc4, functionDecl:"get #m() {...}"
put_by_id base:loc13, property:@homeObject, value:loc11, flags:Strict
put_by_id base:loc12, property:@get, value:loc13, flags:IsDirect|Strict
put_to_scope scope:loc4, var:#m, value:loc12
loc4 is the class lexical scope
...

`

Bytecode for access():

`
...
resolve_scope dst:loc7, scope:loc4, var:"#m", resolveType:GlobalProperty, localScopeDepth:0
get_from_scope dst:loc8, scope:loc7, var:@privateBrand
check_private_brand base:this, brand:loc8
get_from_scope dst:loc8, scope:loc7, var:"#m"
get_by_id_direct dst:loc9, base:loc8, property:@get
mov dst:loc10, src:this
call dst:loc6, callee:loc9, argc:1, argv:16
...

`

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::instantiateLexicalVariables):
(JSC::BytecodeGenerator::getPrivateTraits):
(JSC::BytecodeGenerator::getAvailablePrivateAccessNames):
(JSC::BytecodeGenerator::isPrivateMethod): Deleted.

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

(JSC::PropertyListNode::emitBytecode):
(JSC::PropertyListNode::emitPutConstantProperty):
(JSC::BaseDotNode::emitGetPropertyValue):
(JSC::BaseDotNode::emitPutProperty):
(JSC::PostfixNode::emitDot):
(JSC::PrefixNode::emitDot):

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

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

  • parser/Parser.h:

(JSC::Scope::declarePrivateSetter):
(JSC::Scope::declarePrivateGetter):

  • parser/VariableEnvironment.cpp:

(JSC::VariableEnvironment::declarePrivateAccessor):
(JSC::VariableEnvironment::declarePrivateSetter):
(JSC::VariableEnvironment::declarePrivateGetter):

  • parser/VariableEnvironment.h:

(JSC::VariableEnvironmentEntry::isPrivateSetter const):
(JSC::VariableEnvironmentEntry::isPrivateGetter const):
(JSC::VariableEnvironmentEntry::setIsPrivateSetter):
(JSC::VariableEnvironmentEntry::setIsPrivateGetter):
(JSC::PrivateNameEntry::isSetter const):
(JSC::PrivateNameEntry::isGetter const):
(JSC::PrivateNameEntry::isField const):
(JSC::PrivateNameEntry::isPrivateMethodOrAcessor const):
(JSC::VariableEnvironment::declarePrivateSetter):
(JSC::VariableEnvironment::declarePrivateGetter):

  • runtime/ExceptionHelpers.cpp:

(JSC::createPrivateMethodAccessError):

2:28 PM Changeset in webkit [272882] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

[WPE][GTK] SleepDisabler does not inhibit sleep with bubblewrap sandbox enabled: need to run xdg-dbus-proxy under bwrap or xdg-desktop-portal does not read our app ID
https://bugs.webkit.org/show_bug.cgi?id=219010

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

We need to run xdg-dbus-proxy under bubblewrap so that we can mount /.flatpak-info in its
mount namespace. Why? Because xdg-desktop-portal checks the pid of its D-Bus peer using
Unix credentials, then looks in that process's mount namespace to read its app ID from
/.flatpak-info. If /.flatpak-info doesn't exist, then any portals that depend on the app ID
will break, including the inhibit portal that we need to prevent the system from suspending
during video playback. This normally works because flatpak runs xdg-dbus-proxy under
bubblewrap and mounts /.flatpak-info, but it breaks for WebKit because we don't. Start doing
so.

This method of getting the app ID might seem like a strange contortion, but it's really
required beacuse the sandboxed process cannot be trusted to provide its own app ID, and will
not have write access to its /.flatpak-info so we can rely on that.

  • UIProcess/Launcher/ProcessLauncher.h:
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::createFlatpakInfo):
(WebKit::XDGDBusProxyLauncher::launch):
(WebKit::bubblewrapSpawn):

2:22 PM Changeset in webkit [272881] by Aditya Keerthi
  • 10 edits in trunk

[iOS][FCR] Add new look for input type=range with datalist
https://bugs.webkit.org/show_bug.cgi?id=221782
<rdar://problem/74251214>

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/forms/ios/form-control-refresh/range/datalist.html

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::listOptionValueAsDouble):

Added a helper method to validate and sanitize an option element's
value, and return it as a double.

  • html/HTMLInputElement.h:
  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::paintSliderTicks):

  • rendering/RenderTheme.h:

Make paintSliderTicks a virtual method to support a custom implementation
for iOS. Use FloatRect instead of IntRect for subpixel accuracy.

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

(WebCore::RenderThemeIOS::paintSliderTicks):
(WebCore::RenderThemeIOS::paintSliderTrackWithFormControlRefresh):

LayoutTests:

Added a reference mismatch test to verify that range inputs with
different datalist option values do not appear the same.

  • fast/forms/ios/form-control-refresh/range/datalist-expected-mismatch.html:
  • fast/forms/ios/form-control-refresh/range/datalist.html:
2:16 PM Changeset in webkit [272880] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Crash under WorkerThreadableLoader::MainThreadBridge::notifyIsDone()
https://bugs.webkit.org/show_bug.cgi?id=221906
<rdar://74225448>

Reviewed by Alex Christensen.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::computeIsDone):
r267227 added this function and this was the first case where the DocumentThreadableLoader
would do an async operation and ref itself during the operation. I believe this was the
source of the crash as this could cause DocumentThreadableLoader to outlive its client.
When DocumentThreadableLoader::notifyIsDone() would get called later on, m_client may be
bad. To maintain pre-r267227 behavior, we now capture a WeakPtr to |this| instead of a
Ref<>, so that we don't unnecessarily extend the lifetime of the DocumentThreadableLoader.

  • loader/DocumentThreadableLoader.h:

(WebCore::DocumentThreadableLoader::clearClient):
Add new clearClient() function to DocumentThreadableLoader so that the client can clear
the raw pointer the DocumentThreadableLoader holds to it before getting destroyed. I wanted
to use WeakPtr but this did not work out due to multithreading.

  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
Before destroying itself, WorkerThreadableLoader::MainThreadBridge now clears the
raw pointer to it that DocumentThreadableLoader holds. This is important since
DocumentThreadableLoader is RefCounted and its lifetime may get extended past
the MainThreadBridge.

  • loader/WorkerThreadableLoader.h:

Use tighter typing for clarity.

2:03 PM Changeset in webkit [272879] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Fix -Wunused-variable warning
https://bugs.webkit.org/show_bug.cgi?id=221653
<rdar://problem/74280146>

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-15
Reviewed by Alex Christensen.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):

1:48 PM Changeset in webkit [272878] by commit-queue@webkit.org
  • 8 edits
    4 moves
    1 add in trunk/Source/WebCore

Pull Mac-only code out of ScrollController
https://bugs.webkit.org/show_bug.cgi?id=221462
<rdar://problem/74273853>

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-02-15
Reviewed by Simon Fraser.

No new tests. This should not change behavior.

Split out Mac-specific code from ScrollController and prepare it for use on
non-Cocoa platforms. This code must be pulled out primarily because it is
Objective-C++ code and should maintain the .mm extension. The idea here is to
isolate the basic platform-independent scroll snapping code and gradually make
the rest (related to handling wheel events) more-and-more platform-independent.

  • PlatformMac.cmake: Update source list.
  • Sources.txt: Ditto.
  • SourcesCocoa.txt: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • page/scrolling/ScrollingMomentumCalculator.cpp: Guard code with ENABLE(CSS_SCROLL_SNAP).
  • platform/ScrollController.cpp: Added.

This file contains only the platform-independent scroll snapping code that will be
used to add initial scroll snap support to other ports.

  • platform/ScrollController.h: Renamed from Source/WebCore/platform/cocoa/ScrollController.h.
  • platform/ScrollSnapAnimatorState.cpp: Renamed from Source/WebCore/platform/cocoa/ScrollSnapAnimatorState.mm.
  • platform/ScrollSnapAnimatorState.h: Renamed from Source/WebCore/platform/cocoa/ScrollSnapAnimatorState.h.
  • platform/graphics/cg/GraphicsContextGLCG.cpp: Fix unified source build issue exposed by this

change.

  • platform/mac/ScrollController.mm: Renamed from Source/WebCore/platform/cocoa/ScrollController.mm.
  • platform/mac/VideoFullscreenInterfaceMac.mm: Fix unified source build issue.
1:42 PM Changeset in webkit [272877] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][Integration] Fix fast/text/justify-nbsp.html tests with inlines enabled
https://bugs.webkit.org/show_bug.cgi?id=221908

Reviewed by Antti Koivisto.

Non-breaking-space is not taken into account when counting the number of expansion opportunities. Disable IFC for now.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForCharacter):

  • layout/integration/LayoutIntegrationCoverage.h:
1:40 PM Changeset in webkit [272876] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Unreviewed, silence -Wreturn-type warning
https://bugs.webkit.org/show_bug.cgi?id=221881
<rdar://problem/74358043>

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-15

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseRGBParameters):

1:21 PM Changeset in webkit [272875] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

Unreviewed, reverting r272863.
https://bugs.webkit.org/show_bug.cgi?id=221918

broke process launching

Reverted changeset:

"[WPE][GTK] SleepDisabler does not inhibit sleep with
bubblewrap sandbox enabled: need to run xdg-dbus-proxy under
bwrap or xdg-desktop-portal does not read our app ID"
https://bugs.webkit.org/show_bug.cgi?id=219010
https://trac.webkit.org/changeset/272863

12:42 PM Changeset in webkit [272874] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[ews] Add python 3 support - part 2
https://bugs.webkit.org/show_bug.cgi?id=221899

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py: Map unicode() to str() for python 3, in order to keep code compatible with

both Python 2 and 3.
(ValidateCommiterAndReviewer.load_contributors): Used items instead of iteritems.
(PrintConfiguration.convert_build_to_os_name): Ditto.

  • CISupport/ews-build/steps_unittest.py:

(BuildStepMixinAdditions.executedSteps): Converted filter to list comprehension.

  • CISupport/ews-build/factories_unittest.py: Ditto.
12:28 PM Changeset in webkit [272873] by achristensen@apple.com
  • 11 edits in trunk/Source/WebKit

Unexpected ASSERT when touch events are dispatched on the main thread
https://bugs.webkit.org/show_bug.cgi?id=221832

Reviewed by Dean Jackson.

The TouchEvent message is special. It's received on a non-main thread and completed on the main thread, which asserts.
Rather than lose our asserts making sure our message CompletionHandlers are called on the correct thread,
mark this one with a new attribute, MainThreadCallback, which indicates that it is ok for the callback to be called on the main thread
like it was before r272558 in a different form.

  • Platform/IPC/HandleMessage.h:

(IPC::handleMessageAsync):

  • Scripts/webkit/messages.py:
  • Scripts/webkit/model.py:
  • Scripts/webkit/tests/TestWithImageDataMessages.h:
  • Scripts/webkit/tests/TestWithLegacyReceiverMessages.h:
  • Scripts/webkit/tests/TestWithSemaphoreMessages.h:
  • Scripts/webkit/tests/TestWithSuperclass.messages.in:
  • Scripts/webkit/tests/TestWithSuperclassMessages.h:
  • Scripts/webkit/tests/TestWithoutAttributesMessages.h:
  • WebProcess/WebPage/EventDispatcher.messages.in:
11:58 AM Changeset in webkit [272872] by Jonathan Bedard
  • 2 edits in trunk/Tools

[results.webkit.org] Distinguish hash and revision
https://bugs.webkit.org/show_bug.cgi?id=221861
<rdar://problem/74298457>

Reviewed by Aakash Jain.

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

(Commit.from_json): Pass hash and revision via json.
(Commit.init): Convert id to hash or revision.

11:50 AM Changeset in webkit [272871] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebCore

[GPU Process] (REGRESSION r272776): Incorrect order for decoding the Pattern repeat properties
https://bugs.webkit.org/show_bug.cgi?id=221910

Reviewed by Simon Fraser.

The order of decoding the repeatX and repeatY properties is reversed.

This is already caught by the GPU bots. Some of the wpt canvas tests have
been failing unexpectedly like 2d.pattern.paint.repeatx.basic.html.

  • platform/graphics/Pattern.h:

(WebCore::Pattern::Parameters::decode):

11:24 AM Changeset in webkit [272870] by weinig@apple.com
  • 13 edits in trunk

Prepare for adding relative color support
https://bugs.webkit.org/show_bug.cgi?id=221881

Reviewed by Darin Adler.

Source/WebCore:

In preparation for adding experimental relative color support a little cleanup
is in order. This change:

  • Threads a CSSParserContext through the color parsing functions. This will be needed to check if the feature is enabled or not.
  • Does a small cleanup of CSSParserContext, sorting features and using the initialization list in the constructor.
  • Refactors some of the color parsing helpers to extract more helpers. These clarify the code better and will be shared by the relative parsers.
  • Move normalization of components to after parsing to avoid unnecessary work in the case of failure and separate the phases a bit more.
  • Removes some unnecessary ValueRangeAll parameters that were already the default.
  • Switch HSLA and HWBA to stop storing their components in a 0-1 normalization and instead use values that match the input, 0-360 for hue, and 0-100 for the the remaining two components. This seems more natural, and will simplify future color function work that expects the values in this form.
  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseColorWorkerSafe):

  • css/parser/CSSParserContext.cpp:

(WebCore::shouldEnableLegacyOverflowScrollingTouch):
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):

  • css/parser/CSSParserContext.h:

(WebCore::CSSParserContextHash::hash):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeShadow):
(WebCore::consumeCaretColor):
(WebCore::consumeOutlineColor):
(WebCore::consumePaintStroke):
(WebCore::consumeBackgroundComponent):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::consumeBorder):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeOptionalAlpha):
(WebCore::CSSPropertyParserHelpers::consumeHue):
(WebCore::CSSPropertyParserHelpers::normalizeHue):
(WebCore::CSSPropertyParserHelpers::clampRGBComponent):
(WebCore::CSSPropertyParserHelpers::parseRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseHSLParameters):
(WebCore::CSSPropertyParserHelpers::normalizeWhitenessBlackness):
(WebCore::CSSPropertyParserHelpers::parseHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseLabParameters):
(WebCore::CSSPropertyParserHelpers::parseLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForLabParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForXYZParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunction):
(WebCore::CSSPropertyParserHelpers::consumeColorWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeColor):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientStopColor):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradient):
(WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumeLinearGradient):
(WebCore::CSSPropertyParserHelpers::consumeConicGradient):
(WebCore::CSSPropertyParserHelpers::consumeImageOrNone):
(WebCore::CSSPropertyParserHelpers::consumeCrossFade):
(WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
(WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
(WebCore::CSSPropertyParserHelpers::consumeSingleShadow):
(WebCore::CSSPropertyParserHelpers::consumeImage):
(WebCore::CSSPropertyParserHelpers::parseOptionalAlpha): Deleted.

  • css/parser/CSSPropertyParserHelpers.h:

(WebCore::CSSPropertyParserHelpers::consumeImage):

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::detectContentInRange):

  • platform/graphics/ColorConversion.cpp:

(WebCore::calculateHSLHue):
(WebCore::SRGBA<float>>::convert):
(WebCore::HSLA<float>>::convert):
(WebCore::HWBA<float>>::convert):

  • platform/graphics/ColorModels.h:
  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::datePlaceholderTextColor const):

Tools:

  • TestWebKitAPI/Tests/WebCore/ColorTests.cpp:

Update HSLA tests to account for HSLA now using 0-360, 0-100, 0-100 bounds rather than 0-1, 0-1, 0-1.

11:21 AM Changeset in webkit [272869] by Russell Epstein
  • 1 copy in branches/safari-612.1.4-branch

New branch.

11:18 AM Changeset in webkit [272868] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

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

Unreviewed test gardening.

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

  • gpu-process/TestExpectations:
11:12 AM Changeset in webkit [272867] by Fujii Hironori
  • 3 edits in trunk/Source/WebKit

Page scrolling by wheel events doesn't work in non-AC mode pages if Hardware Acceleration Policy is changed dynamically from "always" to "never"
https://bugs.webkit.org/show_bug.cgi?id=221067

Reviewed by Carlos Garcia Campos.

GTK port is still supporting non-AC mode in WebKit2, and it can
enable/disable accelerated compositing dynamically.

r271235 fixed the bug that wheel event scrolling didn't work in
non-AC mode pages by checking if EventDispatcher's
m_scrollingTrees has a scrolling tree for a WebKit::WebPage.
However, if accelerated compositing is disabled dynamically,
m_scrollingTrees keeps to have a scrolling tree for the WebPage.
m_scrollingTrees should remove the item if accelerated compositing
is disabled.

r271235 added a code to check m_scrollingTrees, but it didn't lock
m_scrollingTreesMutex. The code can be removed. Removed it by
moving to above code.

EventDispatcher::wheelEvent was using a local lambda expression.
However the return value wasn't used. It can be a do-while
statement.

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent): Replaced the lambda
expression with a do-while statement. Unified code of the checking
scrolling tree existence.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):
(WebKit::WebPage::enterAcceleratedCompositingMode):
(WebKit::WebPage::exitAcceleratedCompositingMode):
(WebKit::WebPage::close):

11:10 AM Changeset in webkit [272866] by graouts@webkit.org
  • 8 edits in trunk

Getting the computed style should resolve animations using the last style change event style
https://bugs.webkit.org/show_bug.cgi?id=221882

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark 20 new PASS results.

  • web-platform-tests/css/css-color/animation/opacity-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/rotate-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/scale-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-006-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt:

Source/WebCore:

We would fail some WTP tests when animating from the "neutral" value to some explicit value,
where "neutral" is the underlying value for the element, because we cloned the current element
style to be the target style when resolving animations under KeyframeEffect::getAnimatedStyle().
However, that current style may already carry the result of animation resolution, so we should
use the "last style change event style" set on the target to not see any unanimated styles.

If it's not set, then we can use the current element style since it means we will not have
resolved styles for this element yet.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::getAnimatedStyle):

10:48 AM Changeset in webkit [272865] by Russell Epstein
  • 1 edit in branches/safari-612.1.3-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb

Revert "Unreviewed infrastructure test."

This reverts commit r272864.

10:42 AM Changeset in webkit [272864] by Russell Epstein
  • 1 edit in branches/safari-612.1.3-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb

Unreviewed infrastructure test.

10:40 AM Changeset in webkit [272863] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

[WPE][GTK] SleepDisabler does not inhibit sleep with bubblewrap sandbox enabled: need to run xdg-dbus-proxy under bwrap or xdg-desktop-portal does not read our app ID
https://bugs.webkit.org/show_bug.cgi?id=219010

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

We need to run xdg-dbus-proxy under bubblewrap so that we can mount /.flatpak-info in its
mount namespace. Why? Because xdg-desktop-portal checks the pid of its D-Bus peer using
Unix credentials, then looks in that process's mount namespace to read its app ID from
/.flatpak-info. If /.flatpak-info doesn't exist, then any portals that depend on the app ID
will break, including the inhibit portal that we need to prevent the system from suspending
during video playback. This normally works because flatpak runs xdg-dbus-proxy under
bubblewrap and mounts /.flatpak-info, but it breaks for WebKit because we don't. Start doing
so.

This method of getting the app ID might seem like a strange contortion, but it's really
required beacuse the sandboxed process cannot be trusted to provide its own app ID, and will
not have write access to its /.flatpak-info so we can rely on that.

  • UIProcess/Launcher/ProcessLauncher.h:
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::createFlatpakInfo):
(WebKit::XDGDBusProxyLauncher::launch):
(WebKit::bubblewrapSpawn):

10:17 AM Changeset in webkit [272862] by commit-queue@webkit.org
  • 9 edits
    2 adds
    2 deletes in trunk/Source

Unreviewed, reverting r272831.
https://bugs.webkit.org/show_bug.cgi?id=221907

breaking internal build

Reverted changeset:

"[JSC] Enable JITCage on macOS"
https://bugs.webkit.org/show_bug.cgi?id=221805
https://trac.webkit.org/changeset/272831

10:06 AM Changeset in webkit [272861] by Ruben Turcios
  • 8 edits in trunk/Source

Versioning.

WebKit-7612.1.5

10:00 AM Changeset in webkit [272860] by commit-queue@webkit.org
  • 3 edits
    1 add
    1 delete in trunk/LayoutTests

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

Patch by Chris Gambrell <Chris Gambrell> on 2021-02-15
Reviewed by Jonathan Bedard.

  • http/tests/svg/cached-image-sizing.html:
  • http/tests/svg/resources/delayCachedLoad.php: Removed.
  • http/tests/svg/resources/delayCachedLoad.py: Added.
  • imported/blink/http/tests/svg/svgload-vs-load.svg:
10:00 AM Changeset in webkit [272859] by commit-queue@webkit.org
  • 2 edits
    1 add
    1 delete in trunk/LayoutTests

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

Patch by Chris Gambrell <Chris Gambrell> on 2021-02-15
Reviewed by Jonathan Bedard.

  • http/tests/incremental/resources/delayed-css.php: Removed.
  • http/tests/incremental/resources/delayed-css.py: Added.
  • http/tests/incremental/stylesheet-body-incremental-rendering.html:
9:35 AM Changeset in webkit [272858] by youenn@apple.com
  • 16 edits in trunk/Source

Move WebRTCPlatformCodecsInGPUProcessEnabled to Page Settings
https://bugs.webkit.org/show_bug.cgi?id=221893

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Always use the remote factory to simplify things. This ensures that factories remain in sync whether callbacks are set or not.
We check anyway whether callbacks are set and use them if needed.
Otherwise, we default to the in-process code path.

  • Source/webrtc/sdk/WebKit/WebKitDecoder.mm:

(webrtc::createWebKitDecoderFactory):

  • Source/webrtc/sdk/WebKit/WebKitEncoder.mm:

(webrtc::createWebKitEncoderFactory):

Source/WebCore:

Covered by existing tests.

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setWebRTCH264SimulcastEnabled):
(WebCore::RuntimeEnabledFeatures::webRTCPlatformCodecsInGPUProcessEnabled const): Deleted.
(WebCore::RuntimeEnabledFeatures::setWebRTCPlatformCodecsInGPUProcessEnabled): Deleted.

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::setWebRTCPlatformCodecsInGPUProcessEnabled): Deleted.

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

Source/WebKit:

Make LibWebRTCProvider and MediaRecorder provider keep a WebPage reference.
Use it to get WebRTCPlatformCodecsInGPUProcessEnabled setting when needed.
For LibWebRTCProvider, set callback only once before creating the first peer connection.
This makes sure we do not change callbacks while using them in another thread.

  • WebProcess/GPU/webrtc/MediaRecorderProvider.cpp:

(WebKit::MediaRecorderProvider::createMediaRecorderPrivate):

  • WebProcess/GPU/webrtc/MediaRecorderProvider.h:

(WebKit::MediaRecorderProvider::MediaRecorderProvider):

  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:

(WebKit::LibWebRTCProvider::createPeerConnection):

  • WebProcess/Network/webrtc/LibWebRTCProvider.h:

(WebKit::LibWebRTCProvider::LibWebRTCProvider):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
9:26 AM Changeset in webkit [272857] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add git commit -v support to commit-log-editor
https://bugs.webkit.org/show_bug.cgi?id=221903

Patch by Adam Roben <Adam Roben> on 2021-02-15
Reviewed by Darin Adler.

From the git-commit documentation:

-v, --verbose

Show unified diff between the HEAD commit and what would be
committed at the bottom of the commit message template to help
the user describe the commit by reminding what changes the
commit has. Note that this diff output doesn't have its lines
prefixed with #. This diff will not be a part of the commit
message. See the commit.verbose configuration variable in
git-config(1).

commit-log-editor was getting confused about the diff not being prefixed
with #. Now it looks for the "cut line" that Git puts in the log just
before the diff. It looks like this:

# ------------------------ >8 ------------------------

See https://github.com/git/git/blob/e6362826a0409539642a5738db61827e5978e2e4/wt-status.c#L24-L25

  • Scripts/commit-log-editor: Keep track of whether the "cut line" has been found. If it has, consider it and everything after it to be part of the log contents but not the existing log message.
9:11 AM Changeset in webkit [272856] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Do not re-measure wrapped content
https://bugs.webkit.org/show_bug.cgi?id=221874

Reviewed by Antti Koivisto.

This patch addresses the performance issue with extremely long content when
the content gets re-measured many time while performing line breaking.

When a certain text content does not fit the line we can

  1. keep it on the current line and let it overflow or
  2. wrap the entire content to the next line or
  3. split it somewhere in the middle.

In case of 2 and 3 this overflowing content turns into the leading content on the subsequent line.
Now due to ligature (#3) and position dependent glyph sizing(#2) we need to remeasure this leading content again.
However with unreasonably long content and relatively small horizontal constraint, this could lead to
repeated, continuous text measuring.
In this patch we turn the overflow width into the leading width so that we measure the long text content only once.
(FIXME: This should be turned into a generic "use the overflow content as-is when turning it into leading content")

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::computedIntrinsicWidth):
(WebCore::Layout::LineBuilder::placeInlineContent):
(WebCore::Layout::LineBuilder::candidateContentForLine):
(WebCore::Layout::LineBuilder::handleInlineContent):

  • layout/inlineformatting/InlineLineBuilder.h:
9:09 AM Changeset in webkit [272855] by youenn@apple.com
  • 7 edits
    2 adds in trunk/Source/WebKit

Share more code between RemoteRealtimeAudioSource and RemoteRealtimeVideoSource
https://bugs.webkit.org/show_bug.cgi?id=221898

Reviewed by Eric Carlson.

Introduce RemoteRealtimeMediaSourceProxy to share more code between the two classes.
This class implements most of the messaging with capture process.
No change of behavior.

  • WebProcess/cocoa/RemoteRealtimeAudioSource.cpp:

(WebKit::RemoteRealtimeAudioSource::createRemoteMediaSource):

  • WebProcess/cocoa/RemoteRealtimeAudioSource.h:

(WebKit::RemoteRealtimeAudioSource::identifier const): Deleted.
(WebKit::RemoteRealtimeAudioSource::connection): Deleted.
(WebKit::RemoteRealtimeAudioSource::applyConstraintsFailed): Deleted.

  • WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.h:

(WebKit::RemoteRealtimeMediaSourceProxy::isReady const):

  • WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:

(WebKit::RemoteRealtimeVideoSource::RemoteRealtimeVideoSource):
(WebKit::RemoteRealtimeVideoSource::createRemoteMediaSource):
(WebKit::RemoteRealtimeVideoSource::~RemoteRealtimeVideoSource):
(WebKit::RemoteRealtimeVideoSource::setShouldApplyRotation):
(WebKit::RemoteRealtimeVideoSource::hasEnded):
(WebKit::RemoteRealtimeVideoSource::generatePresets):
(WebKit::RemoteRealtimeVideoSource::setFrameRateWithPreset):
(WebKit::RemoteRealtimeVideoSource::gpuProcessConnectionDidClose):
(WebKit::RemoteRealtimeVideoSource::whenReady): Deleted.
(WebKit::RemoteRealtimeVideoSource::didFail): Deleted.
(WebKit::RemoteRealtimeVideoSource::setAsReady): Deleted.
(WebKit::RemoteRealtimeVideoSource::connection): Deleted.
(WebKit::RemoteRealtimeVideoSource::startProducingData): Deleted.
(WebKit::RemoteRealtimeVideoSource::stopProducingData): Deleted.

  • WebProcess/cocoa/RemoteRealtimeVideoSource.h:

(WebKit::RemoteRealtimeVideoSource::identifier const): Deleted.

9:07 AM Changeset in webkit [272854] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[WPE][GTK] BubblewrapLauncher should create flatpak-info keyfile only once
https://bugs.webkit.org/show_bug.cgi?id=221224

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-15
Reviewed by Adrian Perez de Castro.

BubblewrapLauncher should create its flatpak-info keyfile only once, because its contents
will never change. Makes more sense to cache this tiny string in memory than to recompute it
every time a subprocess is launched.

When working on this, I noticed a quirk in the documentation of g_key_file_to_data: although
the function has a GError parameter, it is legacy and the function is actually guaranteed to
succeed. So icky though it seems, I've removed the error checking for that, as recommended
by its documentation.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::createFlatpakInfo):

9:01 AM Changeset in webkit [272853] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[iOS] Cleanup exit/enterFullScreenHandler and how the global states are set.
https://bugs.webkit.org/show_bug.cgi?id=221886

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-02-15
Reviewed by Darin Adler.

There is no change in behavior with this commit.

  • platform/ios/VideoFullscreenInterfaceAVKit.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(VideoFullscreenInterfaceAVKit::doEnterFullscreen):
(VideoFullscreenInterfaceAVKit::doExitFullscreen):
(VideoFullscreenInterfaceAVKit::exitFullscreenHandler):
(VideoFullscreenInterfaceAVKit::enterFullscreenHandler):
Pass new nextActions OptionSet to define the behaviour of the handler; either call doEnterFullScreen or doExitFullScreen, rather than set member booleans that could be incorrectly used by other methods.

8:58 AM Changeset in webkit [272852] by youenn@apple.com
  • 4 edits
    3 adds in trunk

Use page setting to expose or not registerRTCRtpScriptTransformer in workers
https://bugs.webkit.org/show_bug.cgi?id=221892

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/wpt/webrtc/no-webrtc-transform.html

  • bindings/js/WebCoreBuiltinNames.h:
  • workers/DedicatedWorkerGlobalScope.idl:

LayoutTests:

  • http/wpt/webrtc/no-webrtc-transform-expected.txt: Added.
  • http/wpt/webrtc/no-webrtc-transform.html: Added.
  • http/wpt/webrtc/no-webrtc-transform.js: Added.
8:52 AM Changeset in webkit [272851] by commit-queue@webkit.org
  • 5 edits
    4 adds
    4 deletes in trunk/LayoutTests

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

Patch by Chris Gambrell <Chris Gambrell> on 2021-02-15
Reviewed by Jonathan Bedard.

  • http/tests/ssl/referer-301.html:
  • http/tests/ssl/referer-303.html:
  • http/tests/ssl/resources/ping-with-unsafe-redirect-frame.html:
  • http/tests/ssl/resources/redirect-ping-to-http.php: Removed.
  • http/tests/ssl/resources/redirect-ping-to-http.py: Added.
  • http/tests/ssl/resources/referer-301-redir.php: Removed.
  • http/tests/ssl/resources/referer-301-redir.py: Added.
  • http/tests/ssl/resources/referer-303-redir.php: Removed.
  • http/tests/ssl/resources/referer-303-redir.py: Added.
  • http/tests/ssl/verify-ssl-enabled.php: Removed.
  • http/tests/ssl/verify-ssl-enabled.py: Added.
  • platform/win/TestExpectations:
8:51 AM Changeset in webkit [272850] by msaboff@apple.com
  • 1 edit
    1 delete in trunk

Unreviewed cleanup after r272824.

  • Restored stepped on Tools/ChangeLog entries.
  • Eliminated unneeded empty directory.
4:56 AM Changeset in webkit [272849] by Chris Lord
  • 10 edits in trunk/Source/WebCore

CSSFontFace should not need its m_fontSelector data member
https://bugs.webkit.org/show_bug.cgi?id=208351

Reviewed by Myles C. Maxfield.

Remove the last use of m_fontSelector from CSSFontFace. Adding
CachedFontClient::fontRequested allows us to add the FontSelector as a
client while we have access to both the FontSelector and the CachedFont
in CSSFontFace::appendSources.

No new tests because there is no behavior change.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::appendSources):
(WebCore::CSSFontFace::create):
(WebCore::CSSFontFace::opportunisticallyStartFontDataURLLoading):
(WebCore::CSSFontFace::document):
(WebCore::CSSFontFace::pump):
(WebCore::CSSFontFace::font):

  • css/CSSFontFace.h:
  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::opportunisticallyStartFontDataURLLoading):
(WebCore::CSSFontFaceSource::load):

  • css/CSSFontFaceSource.h:
  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::opportunisticallyStartFontDataURLLoading):
(WebCore::CSSFontSelector::clearDocument):
(WebCore::CSSFontSelector::willBeginLoadingFontSoon):
(WebCore::CSSFontSelector::fontRequested):
(WebCore::CSSFontSelector::loadPendingFonts):

  • css/CSSFontSelector.h:
  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::requestLoad):

  • loader/cache/CachedFont.h:
  • loader/cache/CachedFontClient.h:

(WebCore::CachedFontClient::fontRequested):

3:39 AM Changeset in webkit [272848] by Lauro Moura
  • 2 edits in trunk/Source/WTF

REGRESSION(r272842) [GStreamer] Layout tests exiting early due to crashes after GPUProcess for media enabled by default for WTR
https://bugs.webkit.org/show_bug.cgi?id=221883

Reviewed by Philippe Normand.

  • Scripts/Preferences/WebPreferencesExperimental.yaml: Disable

UseGPUProcessForMediaEnabled when using GStreamer for now.

3:24 AM Changeset in webkit [272847] by Manuel Rego Casasnovas
  • 7 edits
    2 adds in trunk/LayoutTests

[selectors] Update WPT test suite
https://bugs.webkit.org/show_bug.cgi?id=221890

Reviewed by Carlos Alberto Lopez Perez.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/focus-visible-002-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-002.html:
  • web-platform-tests/css/selectors/focus-visible-006.html:
  • web-platform-tests/css/selectors/selectors-dir-selector-auto-direction-change-001-expected.xht: Added.
  • web-platform-tests/css/selectors/selectors-dir-selector-auto-direction-change-001.html: Added.
  • web-platform-tests/css/selectors/w3c-import.log:

LayoutTests:

3:05 AM Changeset in webkit [272846] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Improve readability in RenderFlexibleBox::childIntrinsicLogicalWidth
https://bugs.webkit.org/show_bug.cgi?id=221877

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-15
Reviewed by Sergio Villar Senin.

Improve readability in RenderFlexibleBox::childIntrinsicLogicalWidth by
using Optional instead of -1, which is a magic value that ends up not
being used.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::childIntrinsicLogicalWidth const):

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

Crash in RetainPtr<CGImage*>::RetainPtr via ImageBufferCGBackend::toCFData
https://bugs.webkit.org/show_bug.cgi?id=221376

Patch by Frederic Wang <fwang@igalia.com> on 2021-02-15
Reviewed by Said Abou-Hallawa.

Source/WebCore:

Call to copyNativeImage(CopyBackingStore) may return a null pointer if CGBitmapContextCreateImage
does. This patch fixes a crash due to null pointer dereference and adds a similar check for
copyNativeImage(DontCopyBackingStore).

Test: fast/canvas/resize-to-large-canvas-and-convert-to-blog.html

  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::ImageBufferCGBackend::toCFData const):

LayoutTests:

  • fast/canvas/resize-to-large-canvas-and-convert-to-blog-expected.txt: Added.
  • fast/canvas/resize-to-large-canvas-and-convert-to-blog-expected.txt: Added.
  • fast/canvas/resize-to-large-canvas-and-convert-to-blog.html: Added.
2:23 AM Changeset in webkit [272844] by Manuel Rego Casasnovas
  • 2 edits in trunk/Source/WebCore

[selectors] Update :focus-visible status in features.json
https://bugs.webkit.org/show_bug.cgi?id=221889

Reviewed by Sergio Villar Senin.

  • features.json:
1:04 AM Changeset in webkit [272843] by svillar@igalia.com
  • 4 edits in trunk/Source/WebCore

Don't update form control elements validity status if they are detached from the document.
https://bugs.webkit.org/show_bug.cgi?id=220390

Reviewed by Ryosuke Niwa.

When a radio button input element is removed from a form (either because it's moved or because the form
is deleted) then it's also removed from its current RadioButtonGroup. The latter removal might require the
update of the input validity status. In case of validity status changes, then we have to walk up
the ancestor chain in order to update the style for pseudo classes such as :valid :invalid. That node traversal
should not be done in case of being detached from the main document because our ancestors might have been
deleted before.

Apart from that we're replacing the HashSet of raw pointers to descendants in HTMLFieldSetElement by a WeakHashSet
which is safer.

  • html/HTMLFieldSetElement.cpp:

(WebCore::HTMLFieldSetElement::matchesValidPseudoClass const):
(WebCore::HTMLFieldSetElement::matchesInvalidPseudoClass const):
(WebCore::HTMLFieldSetElement::addInvalidDescendant):
(WebCore::HTMLFieldSetElement::removeInvalidDescendant):

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

(WebCore::HTMLFormControlElement::updateValidity(): Early return in case of isConnected().

Feb 14, 2021:

6:08 PM Changeset in webkit [272842] by Peng Liu
  • 46 edits in trunk

[GPUP] Move UseGPUProcessForMediaEnabled from WebPreferencesInternal to WebPreferencesExperimental
https://bugs.webkit.org/show_bug.cgi?id=221310

Reviewed by Eric Carlson.

Source/WTF:

Move UseGPUProcessForMediaEnabled from WebPreferencesInternal to WebPreferencesExperimental,
so that the WebKitTestRunner will turn it on by default.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):
Use WKPreferencesSetBoolValueForKeyForTesting() to set the preference for testing.
It works no matter the preference is internal or experimental.

LayoutTests:

Update expectations of the tests which are affected by the "Media In GPUProcess" feature
(WebKitTestRunner will enable the feature by default). Also set "UseGPUProcessForMediaEnabled=false"
for some webrtc tests.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html:
  • platform/wk2/TestExpectations:
  • webrtc/captureCanvas-webrtc-software-h264-baseline.html:
  • webrtc/captureCanvas-webrtc-software-h264-high.html:
  • webrtc/captureCanvas-webrtc.html:
  • webrtc/concurrentVideoPlayback2.html:
  • webrtc/direction-change.html:
  • webrtc/disable-encryption.html:
  • webrtc/h264-baseline.html:
  • webrtc/h264-high.html:
  • webrtc/multi-audio.html:
  • webrtc/multi-video.html:
  • webrtc/peer-connection-track-end.html:
  • webrtc/peerconnection-page-cache-long.html:
  • webrtc/peerconnection-page-cache.html:
  • webrtc/remove-track.html:
  • webrtc/utf8-sdp.html:
  • webrtc/video-addTrack.html:
  • webrtc/video-addTransceiver.html:
  • webrtc/video-autoplay.html:
  • webrtc/video-disabled-black.html:
  • webrtc/video-h264.html:
  • webrtc/video-interruption.html:
  • webrtc/video-mediastreamtrack-stats.html:
  • webrtc/video-mute.html:
  • webrtc/video-remote-mute.html:
  • webrtc/video-replace-muted-track.html:
  • webrtc/video-replace-track-to-null.html:
  • webrtc/video-replace-track.html:
  • webrtc/video-rotation-no-cvo.html:
  • webrtc/video-rotation.html:
  • webrtc/video-setDirection.html:
  • webrtc/video-sframe.html:
  • webrtc/video-stats.html:
  • webrtc/video-unmute.html:
  • webrtc/video-with-data-channel.html:
  • webrtc/video.html:
12:51 PM Changeset in webkit [272841] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[iOS] MobileSafari crashes at WebCore: WebCore::VideoFullscreenInterfaceAVKit::doEnterFullscreen
https://bugs.webkit.org/show_bug.cgi?id=221863
<rdar://73861140>

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-02-14
Reviewed by Darin Adler.

On iPad, it's possible for AVKit to fail due to racing requests to exit full screen and enter full screen. The enterFullscreenHandler would attempt to immediately re-enter full screen.
For now we bail-out early to avoid the crash. In a follow-up patch we will ensure that the condition to enter fullscreen while there's a pending operation to exit fullscreen can't occur.
No new tests, can't reproduce. Analysis has been entirely theoretical.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(VideoFullscreenInterfaceAVKit::enterFullscreenHandler):
Exit early if error returned.

11:06 AM Changeset in webkit [272840] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

JSC stress test stress/copy-data-properties-fast-path.js.default fails on s390x and ppc64le
https://bugs.webkit.org/show_bug.cgi?id=221557
<rdar://problem/74311603>

Unreviewed, unskip this test since it seems Yusuke has already fixed it.

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-14

  • stress/copy-data-properties-fast-path.js:
9:18 AM Changeset in webkit [272839] by Darin Adler
  • 3 edits
    2 adds in trunk

Crash calling replaceTrack on a sender that outlives its RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=221870

Reviewed by Youenn Fablet.

Source/WebCore:

Test: fast/mediastream/RTCRtpSender-outlives-RTCPeerConnection.html

  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::replaceTrack): Added a null check for m_connection.
It's already using WeakPtr, so null check is all we need.

LayoutTests:

  • fast/mediastream/RTCRtpSender-outlives-RTCPeerConnection-expected.txt: Added.
  • fast/mediastream/RTCRtpSender-outlives-RTCPeerConnection.html: Added.

Feb 13, 2021:

7:04 PM Changeset in webkit [272838] by Alexey Shvayka
  • 5 edits
    1 add in trunk

Proxy's GetOwnProperty? should complete trap result descriptor before validation
https://bugs.webkit.org/show_bug.cgi?id=221772

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/proxy-get-own-property.js:
  • stress/proxy-returning-incomplete-property-descriptor-error.js: Added.

Source/JavaScriptCore:

This patch implements CompletePropertyDescriptor abstract op and utilizes it in
Proxy's GetOwnProperty?, right before IsCompatiblePropertyDescriptor check
as per spec [1].

This change tightens trap result validation rules for properties that are
non-configurable on ProxyTarget?, aligning JSC with V8 and SpiderMonkey.

It's impossible to prefill trap result descriptor: toPropertyDescriptor() throws
on malformed descriptors, thus it expects the argument to be an empty descriptor
(added an assert).

Property descriptors returned to userland are unaffected as they were implicitly
completed when filling PropertySlot (see PropertyDescriptor::defaultAttributes).

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

  • runtime/ObjectConstructor.cpp:

(JSC::toPropertyDescriptor):

  • runtime/ProxyObject.cpp:

(JSC::completePropertyDescriptor):
(JSC::ProxyObject::performInternalMethodGetOwnProperty):

4:05 PM Changeset in webkit [272837] by weinig@apple.com
  • 5 edits in trunk/Source/WebCore

Reduce requirements for color types to only conversion to their reference color
https://bugs.webkit.org/show_bug.cgi?id=221868

Reviewed by Darin Adler.

We currently require every new color type to define a conversion to/from xyz and then perhaps
some more conversions to reference colors to avoid unnecessary trips through XYZ. For example,
if every conversion from HSL to sRGB went through XYZ it would be very silly and inefficient,
and the fact that we require the boiler plate for HSL -> XYZ, even though it's always going to
convert to SRGB first seems unfortunate. We can do better.

At first I thought we could model color conversion as DAG, with XYZ at the root, and each color
type declaring a "reference color" that would get them closer to XYZ. So, HSL would have a
"reference color" of sRGB, sRGB would have a "reference color" of linearSRGB, and linearSRGB
would have a "reference color" XYZ. Then, as long as there was a defined conversion to/from the
"reference color", we could do a least common ancestor graph search between the two color types
being converted between to find the optimal set of conversions needed.

That almost works, but the relationships between the four color types that make up each RGB type
(bounded-gamma-encoded, bounded-linear-encoded, extended-gamma-encoded, extended-linear-encoded)
make it not quite ideal, since a conversion from something like sRGB to ExtendedSRGB would wind
up going through XYZ (since the "reference color" for sRGB is LinearSRGB and the "reference color"
for ExtendedSRGB is LinearExtendedSRGB, and both either "reference colors" are XYZ).

Ultimately, the depth of the type graph is not all that large (though the ASCII art I made is
quite big, though I did remove A98RGB and Rec2020 as they are same as DisplayP3 here):

┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┼ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐

Matrix Conversions ┌───────────┐│┌───────────┐

│ │ XYZ (D50) │││ XYZ (D65) │ │

└─────▲─────┘│└─────▲─────┘

│ │ │ │ │

┌─────────────────────────┬───────────┘ │ └───────────┬───────────────────────────────┐
│ │ │ │ │ │ │
│ │ │ │ │
│ │ │ │ │ │ │
│ ProPhotoRGB───────────────────┐ │ SRGB──────────────────────────┐ DisplayP3─────────────────────┐
│ │ │┌────────┐ ┌────────────────┐│ │ │┌────────┐ ┌────────────────┐│ │┌────────┐ ┌────────────────┐│ │
│ ││ Linear │ │ LinearExtended ││ │ ││ Linear │ │ LinearExtended ││ ││ Linear │ │ LinearExtended ││
│ │ │└────────┘ └────────────────┘│ │ │└────────┘ └────────────────┘│ │└────────┘ └────────────────┘│ │
│ ─│─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│─ ─│─ ─│─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│─│─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│─

┌───────────┐ │┌────────┐ ┌────────────────┐│ │ │┌────────┐ ┌────────────────┐│ │┌────────┐ ┌────────────────┐│
│ Lab │ ││ Gamma │ │ GammaExtended ││ │ ││ Gamma │ │ GammaExtended ││ ││ Gamma │ │ GammaExtended ││
└─────▲─────┘ │└────────┘ └────────────────┘│ │ │└────▲───┘ └────────────────┘│ │└────────┘ └────────────────┘│

│ └─────────────────────────────┘ │ └─────┼───────────────────────┘ └─────────────────────────────┘
│ │ ┌──┴──────────┬─────────────┐
│ │ │ │ │

┌───────────┐ │┌───────────┐ ┌───────────┐┌─────────────┐
│ LCH │ ││ HSL │ │ HWB ││SRGB<uint8_t>│
└───────────┘ │└───────────┘ └───────────┘└─────────────┘

From this, it turns out you can handle all the cases in about 5 steps, with most peeling off a
conversion from the front or back or the path and using recursion to continue on. It ultimately
leaves a final step where only matrix conversions remain, which can potentially be further
optimized in another patch to concatenate the matrices at compile time.

  1. Handle the special case SRGBA<uint8_t> for Input and Output, and recursively call conversion.
  1. Handle all color types that are not IsRGBType<T> or IsXYZA<T> for Input and Output. For all these other color types, we can uncondtionally convert them to their "reference" color, as either they have already been handled by a ColorConversion specialization or this will get us closer to the final conversion, and recursively call conversion.
  1. Handle conversions within a RGBFamily (e.g. all have the same descriptor). This will conclude the conversion.
  1. Handle any gamma conversions for the Input and Output, recursively call conversion
  1. At this point, Input and Output are each either Linear-RGB types (of different familes) or XYZA and therefore all additional conversion can happen via matrix transformation. This will conclude the conversion.

With these steps, we group the color types into 3 distinct groups.

  1. RGB types.

These inherit from the RGBType struct and are defined in terms of their xyzToLinear / linearToXYZ
matrices, their transfer function, whether they are bounded or extended and their white point. New
RGB color types can be added without any new conversion code being required, as long as they specify
those properties.

  1. The XYZ type.

This is the root type, and only varies on its white point. If other white points beside D50 and D65
are ever needed, we will need to extend the ChromaticAdapation specializations to also have conversion
matrices between those.

  1. All other types.

All other types (e.g. Lab, LCHA, HSLA, HWBA (and SRGBA<uint8_t>, kind of, it's a special flower) are
the set currently) have their conversions defined in terms of single reference color and require
explicit specialization of the ColorConversion struct to work.

  • platform/graphics/ColorConversion.cpp:

(WebCore::Lab<float>>::convert):
(WebCore::WhitePoint::D50>>::convert):
(): Deleted.
(WebCore::WhitePoint::D65>>::convert): Deleted.
(WebCore::toLinear): Deleted.
(WebCore::toGammaEncoded): Deleted.
(WebCore::A98RGB<float>>::convert): Deleted.
(WebCore::LinearA98RGB<float>>::convert): Deleted.
(WebCore::DisplayP3<float>>::convert): Deleted.
(WebCore::LinearDisplayP3<float>>::convert): Deleted.
(WebCore::ExtendedSRGBA<float>>::convert): Deleted.
(WebCore::LinearExtendedSRGBA<float>>::convert): Deleted.
(WebCore::ProPhotoRGB<float>>::convert): Deleted.
(WebCore::LinearProPhotoRGB<float>>::convert): Deleted.
(WebCore::Rec2020<float>>::convert): Deleted.
(WebCore::LinearRec2020<float>>::convert): Deleted.
(WebCore::LinearSRGBA<float>>::convert): Deleted.
(WebCore::xyzToLinear): Deleted.
(WebCore::linearToXYZ): Deleted.
(WebCore::XYZFor<LinearA98RGB<float>>>::convert): Deleted.
(WebCore::XYZFor<LinearDisplayP3<float>>>::convert): Deleted.
(WebCore::XYZFor<LinearExtendedSRGBA<float>>>::convert): Deleted.
(WebCore::XYZFor<LinearProPhotoRGB<float>>>::convert): Deleted.
(WebCore::XYZFor<LinearRec2020<float>>>::convert): Deleted.
(WebCore::XYZFor<LinearSRGBA<float>>>::convert): Deleted.
(WebCore::XYZFor<Lab<float>>>::convert): Deleted.
(WebCore::XYZFor<A98RGB<float>>>::convert): Deleted.
(WebCore::XYZFor<DisplayP3<float>>>::convert): Deleted.
(WebCore::XYZFor<ExtendedSRGBA<float>>>::convert): Deleted.
(WebCore::XYZFor<HSLA<float>>>::convert): Deleted.
(WebCore::XYZFor<HWBA<float>>>::convert): Deleted.
(WebCore::XYZFor<LCHA<float>>>::convert): Deleted.
(WebCore::XYZFor<ProPhotoRGB<float>>>::convert): Deleted.
(WebCore::XYZFor<Rec2020<float>>>::convert): Deleted.
(WebCore::XYZFor<SRGBA<float>>>::convert): Deleted.

  • platform/graphics/ColorConversion.h:

(WebCore::ColorConversion::convert):
(WebCore::ColorConversion::toLinearEncoded):
(WebCore::ColorConversion::toGammaEncoded):
(WebCore::ColorConversion::toExtended):
(WebCore::ColorConversion::toBounded):
(WebCore::ColorConversion::handleRGBFamilyConversion):
(WebCore::ColorConversion::handleMatrixConversion):

  • platform/graphics/ColorMatrix.h:

(WebCore::operator==):
(WebCore::operator!=):
(WebCore::applyMatricesToColorComponents):

  • platform/graphics/ColorTypes.h:
12:35 PM Changeset in webkit [272836] by ap@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView pointerInteraction:styleForRegion:]):

11:13 AM Changeset in webkit [272835] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Improve computed style handling in degenerate grid cases, sizes and lengths of zero
https://bugs.webkit.org/show_bug.cgi?id=221856

Reviewed by Anders Carlsson.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForImageSliceSide): Handle "auto", which can come up with sizes of zero.
(WebCore::valueForNinePieceImage): Simplify by not putting Ref<> results into RefPtr<> locals.
(WebCore::valueForGridTrackList): Clamp insertion point to the actual size of the tracks,
since it can be set to an arbitrary larger value.

11:07 AM Changeset in webkit [272834] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][Integration] Not every inline box contributes to line overflow
https://bugs.webkit.org/show_bug.cgi?id=221867

Reviewed by Antti Koivisto.

Consider the follow content:
<div style="font-size: 20px;">content<span style="font-size: 200px;"><img></span></div>

In quirks mode, the inline box (<span>) does not stretch the line box vertically. What it means in practice is
that the inline box's descent is ignored. While the inline box has a relatively large descent and
in theory it overflows the line (since it is larger than the root inline box's descent)
it should not be taken into account when computing the scrollable overflow.
However adding "padding: 1px" to the <span> will make the inline box stretch the line and now this "1px padding" will
contribute to the scrollable overflow.

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::build const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayNonRootInlineBoxes const):

  • layout/integration/LayoutIntegrationInlineContentBuilder.h:
  • layout/integration/LayoutIntegrationLine.h:

(WebCore::LayoutIntegration::NonRootInlineBox::NonRootInlineBox):
(WebCore::LayoutIntegration::NonRootInlineBox::canContributeToLineOverflow const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::constructContent):

10:18 AM Changeset in webkit [272833] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

JSC stress test stress/copy-data-properties-fast-path.js.default fails on s390x and ppc64le
https://bugs.webkit.org/show_bug.cgi?id=221557

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-13
Reviewed by Saam Barati.

Skip the test on these architectures. I don't know what else to do with it.

  • stress/copy-data-properties-fast-path.js:
2:59 AM Changeset in webkit [272832] by ysuzuki@apple.com
  • 2 edits in trunk/JSTests

Unreviewed, fix stress/copy-data-properties-fast-path.js occasional failure

Wrap it with try-catch since stack-overflow RangeError in JS can happen.

  • stress/copy-data-properties-fast-path.js:
2:12 AM Changeset in webkit [272831] by ysuzuki@apple.com
  • 9 edits
    1 copy
    1 add
    2 deletes in trunk/Source

[JSC] Enable JITCage on macOS
https://bugs.webkit.org/show_bug.cgi?id=221805
<rdar://problem/74153806>

Reviewed by Mark Lam.

Source/JavaScriptCore:

We enable JITCage too on macOS if it is ARM64E.
We need to add this entitlement only when building it on macOS 120000 or higher version.
Otherwise, we cannot launch the process. This means that we need to dynamically generate entitlements file
because we must not attach this entitlement when building JSC for non 120000 macOS.

This patch follows r248164's way: we must not use CODE_SIGN_ENTITLEMENTS because XCode inserts implicit code-signing
and it breaks our pipeline. We need to disable this XCode's implicit behavior by setting CODE_SIGN_INJECT_BASE_ENTITLEMENTS.

And we also create TestAPI.xcconfig to apply generated entitlements only to testapi and jsc shell.

  • Configurations/Base.xcconfig:
  • Configurations/JSC.xcconfig:
  • Configurations/TestAPI.xcconfig: Copied from Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig.
  • Configurations/ToolExecutable.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/process-entitlements.sh: Added.
  • allow-jit-macOS.entitlements: Removed.
  • testapi.entitlements: Removed.

Source/WebKit:

We need to add this entitlement only when building it on macOS 120000 or higher version.
Otherwise, we cannot launch the process. And we attach this entitlement only when building processes
with Apple Internal SDKs.

  • Scripts/process-entitlements.sh:

Source/WTF:

Enable JIT_CAGE when macOS is 120000 or higher with ARM64E.

  • wtf/PlatformEnable.h:

Feb 12, 2021:

9:30 PM Changeset in webkit [272830] by mark.lam@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

Rename slotVisitor variables to visitor.
https://bugs.webkit.org/show_bug.cgi?id=221866

Reviewed by Yusuke Suzuki.

In existing code, we sometimes name a SlotVisitor instance slotVisitor and
sometimes just visitor. This patch makes it so that we use visitor consistently
everywhere. This will also reduce the size of the GC verifier patch later.

Also fixed a few typos in comments.

This is a pure refactoring patch. There are no behavior changes.

  • API/JSMarkingConstraintPrivate.cpp:

(JSContextGroupAddMarkingConstraint):

  • bytecode/RecordedStatuses.cpp:

(JSC::RecordedStatuses::visitAggregate):
(JSC::RecordedStatuses::markIfCheap):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::blocksInPostOrder):

  • heap/Heap.cpp:

(JSC::Heap::runBeginPhase):
(JSC::Heap::runFixpointPhase):
(JSC::Heap::runConcurrentPhase):
(JSC::Heap::stopThePeriphery):
(JSC::Heap::resumeThePeriphery):
(JSC::Heap::addCoreConstraints):
(JSC::Heap::performIncrement):

  • heap/HeapInlines.h:

(JSC::Heap::forEachSlotVisitor):

  • runtime/JSSegmentedVariableObject.cpp:

(JSC::JSSegmentedVariableObject::visitChildren):

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::visit):

8:36 PM Changeset in webkit [272829] by jer.noble@apple.com
  • 7 edits
    2 adds in trunk

[Mac] Sound does not play on YouTube after switching back to foreground
https://bugs.webkit.org/show_bug.cgi?id=221858
<rdar://70602677>

Reviewed by Eric Carlson.

Source/WebCore:

Test: platform/mac/media/unmute-after-loading.html

Remove a stray, unnecessary reset of a cached muted state which kept mute
state from being changed the first time after loading.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):

  • testing/Internals.cpp:

(WebCore::Internals::privatePlayerMuted):

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

(WebCore::Internals::privatePlayerMuted):

LayoutTests:

  • platform/mac/media/unmute-after-loading-expected.txt: Added.
  • platform/mac/media/unmute-after-loading.html: Added.
6:16 PM Changeset in webkit [272828] by Chris Dumez
  • 42 edits in trunk

Reduce explicit usage of [objC release] in WebKit
https://bugs.webkit.org/show_bug.cgi?id=221780
<rdar://problem/74282389>

Reviewed by Darin Adler.

Apply review feedback from Darin Adler and Sam Weinig after r272789.

Source/WebCore:

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(if):

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_addLinkForElement):
(HTMLConverter::_processElement):
(HTMLConverter::_addMarkersToList):

  • platform/ios/WebCoreMotionManager.mm:

(-[WebCoreMotionManager initializeOnMainThread]):

  • platform/network/ios/NetworkStateNotifierIOS.mm:

Source/WebKit:

  • UIProcess/Inspector/ios/WKInspectorHighlightView.h:
  • UIProcess/ios/WKScrollView.mm:
  • UIProcess/mac/WebColorPickerMac.mm:

(+[WKPopoverColorWell _colorPopoverCreateIfNecessary:]):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:

(-[WKAccessibilityWebPageObjectBase setRemoteParent:]):

Source/WebKitLegacy/ios:

  • WebView/WebPDFViewPlaceholder.mm:

(-[WebPDFViewPlaceholder _updateTitleForDocumentIfAvailable]):

Source/WebKitLegacy/mac:

  • DOM/DOMUIKitExtensions.mm:

(-[DOMNode absoluteQuads]):
(-[DOMHTMLAreaElement absoluteQuadsWithOwner:]):

  • DOM/ExceptionHandlers.mm:

(raiseDOMErrorException):

  • DefaultDelegates/WebDefaultUIDelegate.mm:

(-[WebDefaultUIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:]):

  • History/WebHistory.mm:

(-[WebHistoryPrivate visitedURL:withTitle:]):
(-[WebHistory _visitedURL:withTitle:method:wasFailure:]):

  • History/WebHistoryItem.mm:

(-[WebHistoryItem initFromDictionaryRepresentation:]):

  • Misc/WebNSDataExtras.mm:

(-[NSData _webkit_parseRFC822HeaderFields]):

  • Misc/WebNSPasteboardExtras.mm:

(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):

  • Plugins/Hosted/NetscapePluginHostManager.mm:

(WebKit::NetscapePluginHostManager::spawnPluginHost):

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::NetscapePluginInstanceProxy::performRequest):

  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::createWindow):
(WebChromeClient::addMessageToConsole):

  • WebCoreSupport/WebEditorClient.mm:

(attributesForAttributedStringConversion):

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::actionDictionary const):
(WebFrameLoaderClient::createFrame):

  • WebCoreSupport/WebInspectorClient.mm:

(-[WebInspectorWindowController initWithInspectedWebView:isUnderTest:]):
(-[WebInspectorWindowController window]):

  • WebView/WebDataSource.mm:

(-[WebDataSource _documentFragmentWithArchive:]):
(-[WebDataSource _makeRepresentation]):

  • WebView/WebFrame.mm:
  • WebView/WebFrameView.mm:
  • WebView/WebHTMLView.mm:

(-[WebHTMLView _updateMouseoverWithEvent:]):

  • WebView/WebNavigationData.mm:
  • WebView/WebPDFRepresentation.mm:

(-[WebPDFRepresentation finishedLoadingWithDataSource:]):

  • WebView/WebPDFView.mm:

(-[WebPDFView _menuItemsFromPDFKitForEvent:]):

  • WebView/WebPolicyDelegate.mm:
  • WebView/WebScriptDebugger.mm:

(WebScriptDebugger::sourceParsed):

  • WebView/WebView.mm:

(-[WebView _openNewWindowWithRequest:]):

  • WebView/WebWindowAnimation.h:
  • WebView/WebWindowAnimation.mm:

(-[WebWindowScaleAnimation setSubAnimation:]):

Tools:

  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::addChromeInputField):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::addChromeInputField):

5:48 PM Changeset in webkit [272827] by commit-queue@webkit.org
  • 10 edits
    5 adds
    5 deletes in trunk/LayoutTests

[LayoutTests] Convert http/tests/mime convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=221737

<rdar://problem/74219024>

Patch by Chris Gambrell <Chris Gambrell> on 2021-02-12
Reviewed by Jonathan Bedard.

  • http/tests/mime/quoted-charset.php: Removed.
  • http/tests/mime/quoted-charset.py: Added.
  • http/tests/mime/resources/style-with-charset.php: Removed.
  • http/tests/mime/resources/style-with-charset.py: Added.
  • http/tests/mime/resources/style-with-text-css-and-invalid-type.php: Removed.
  • http/tests/mime/resources/style-with-text-css-and-invalid-type.py: Added.
  • http/tests/mime/resources/style-with-text-plain.php: Removed.
  • http/tests/mime/resources/style-with-text-plain.py: Added.
  • http/tests/mime/resources/uppercase-mime-type.php: Removed.
  • http/tests/mime/resources/uppercase-mime-type.py: Added.
  • http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-and-css-extension-expected.txt:
  • http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-and-css-extension.html:
  • http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-expected.txt:
  • http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain.html:
  • http/tests/mime/standard-mode-loads-stylesheet-with-charset-and-css-extension.html:
  • http/tests/mime/standard-mode-loads-stylesheet-with-charset.html:
  • http/tests/mime/standard-mode-loads-stylesheet-with-text-css-and-invalid-type.html:
  • http/tests/mime/uppercase-mime-type-expected.txt:
  • http/tests/mime/uppercase-mime-type.html:
5:40 PM Changeset in webkit [272826] by jiewen_tan@apple.com
  • 6 edits in trunk

[WebAuthn] Provide SPI to query local credentials
https://bugs.webkit.org/show_bug.cgi?id=221743
<rdar://problem/65849832>

Reviewed by Brent Fulgham.

Source/WebKit:

Covered by API tests.

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

(getAllLocalAuthenticatorCredentialsImpl):
(+[_WKWebAuthenticationPanel getAllLocalAuthenticatorCredentials]):
(+[_WKWebAuthenticationPanel getAllLocalAuthenticatorCredentialsWithAccessGroup:]):
(+[_WKWebAuthenticationPanel deleteLocalAuthenticatorCredentialWithID:]):

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanelForTesting.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

5:27 PM Changeset in webkit [272825] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Remove some unused methods in MarkedBlock and PreciseAllocation.
https://bugs.webkit.org/show_bug.cgi?id=221864

Reviewed by Yusuke Suzuki.

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::Handle::visitWeakSet): Deleted.
(JSC::MarkedBlock::Handle::reapWeakSet): Deleted.

  • heap/PreciseAllocation.cpp:

(JSC::PreciseAllocation::shrink): Deleted.
(JSC::PreciseAllocation::visitWeakSet): Deleted.
(JSC::PreciseAllocation::reapWeakSet): Deleted.

  • heap/PreciseAllocation.h:
4:32 PM Changeset in webkit [272824] by achristensen@apple.com
  • 3 edits in trunk/LayoutTests

REGRESSION (r272784): [macOS Release] fast/animation/request-animation-frame-throttling-lowPowerMode.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=221843

Reviewed by Chris Dumez.

Something about r272784 subtly changed timing, which caused there to be a little bit of a lag in RAF throttling.
I could reproduce it making the way this test measures frame rate go up to 35, but not 36.
This test is still good, though, because if you remove setLowPowerModeEnabled it spikes up to 60 or 61 frames per second.

  • fast/animation/request-animation-frame-throttling-lowPowerMode-expected.txt:
  • fast/animation/request-animation-frame-throttling-lowPowerMode.html:
4:32 PM Changeset in webkit [272823] by msaboff@apple.com
  • 10 edits
    1 add in trunk

[ARM64e] Harden Mach exception handling
https://bugs.webkit.org/show_bug.cgi?id=221841

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Split wasm_throw_from_fault_handler_trampoline into two trampolines to eliminate the
need to pass a register argument to signify if we are using FastTLS. With this change
we don't need to modify registers besides the PC when handling exceptions.
Added sanity checks to make sure handlers are being called for the exceptions they
were registered for.

  • bytecode/BytecodeList.rb:
  • llint/WebAssembly.asm:
  • runtime/VMTraps.cpp:
  • signal: Added.
  • tools/SigillCrashAnalyzer.cpp:

(JSC::installCrashHandler):

  • wasm/WasmFaultSignalHandler.cpp:

(JSC::Wasm::trapHandler):

Source/WTF:

For Darwin ARM64e platforms, we check to make sure that all thread state besides the PC hasn't
been modified by an exception handler.

  • wtf/threads/Signals.cpp:

(WTF::hashThreadState):

Tools:

Updated test to check that the exception type matches the one we registered for.

  • TestWebKitAPI/Tests/WTF/Signals.cpp:

(TEST):

4:29 PM Changeset in webkit [272822] by jer.noble@apple.com
  • 8 edits
    3 adds in trunk

[Mac] Unable to play WebM/Opus generated from Chrome MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=221808

Reviewed by Eric Carlson.

Source/WebCore:

Test: platform/mac-bigsur/media/media-webm-no-duration.html

In the absense of an explicit decode timestamp, CoreMedia convention is to use
the presentation timestamp instead.

All fields in the CoreAudioOpusHeader must be byte-swapped.

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

(WebCore::MediaSampleAVFObjC::decodeTime const):

  • platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm:

(WebCore::cookieFromOpusCodecPrivate):

Source/WebKit:

In the absense of an explicit duration parsed from the InitializationSegment,
rely instead on the maximum presentation timestamp available in any MediaTrackReader
to generate an explicit duration.

  • Shared/mac/MediaFormatReader/MediaFormatReader.cpp:

(WebKit::MediaFormatReader::finishParsing):
(WebKit::MediaFormatReader::copyProperty):

  • Shared/mac/MediaFormatReader/MediaTrackReader.cpp:

(WebKit::MediaTrackReader::greatestPresentationTime const):

  • Shared/mac/MediaFormatReader/MediaTrackReader.h:

LayoutTests:

  • platform/mac-bigsur/media/media-webm-no-duration-expected.txt: Added.
  • platform/mac-bigsur/media/media-webm-no-duration.html: Added.
3:52 PM Changeset in webkit [272821] by don.olmstead@sony.com
  • 3 edits in trunk/Tools

[Python-3] Use pathlib to generate file:// urls
https://bugs.webkit.org/show_bug.cgi?id=221850

Reviewed by Jonathan Bedard.

Use pathlib which can generate file:// urls for *nix and Windows. The previous logic
only worked on *nix.

Add the pathlib backport for 2.7.

  • Scripts/webkitpy/init.py:
  • Scripts/webkitpy/common/checkout/scm/scm_unittest.py:

(SVNTestRepository.setup):
(SVNTestRepository._setup_mock_repo):

3:49 PM Changeset in webkit [272820] by don.olmstead@sony.com
  • 2 edits in trunk/Tools

[Python-3] base64.encodestring is deprecated
https://bugs.webkit.org/show_bug.cgi?id=221842

Reviewed by Jonathan Bedard.

In Python 3.9 base64.encodestring was completely removed. Replacing with base64.b64encode
which works in Python 2/3 and is used by the code being tested.

  • Scripts/webkitpy/w3c/wpt_github_unittest.py:

(WPTGitHubTest.test_auth_token):

3:46 PM Changeset in webkit [272819] by don.olmstead@sony.com
  • 2 edits in trunk/Tools

Run additional webkitpy tests on Windows by default
https://bugs.webkit.org/show_bug.cgi?id=221851

Reviewed by Jonathan Bedard.

The tests in WebKit/Scripts and webkitpy.common.config pass on Windows.

The WebKit/Scripts tests are not run when using Cygwin. Without any port option its
the only way to differentiate WinCairo, which doesn't use Cygwin, and AppleWin, which
does.

  • Scripts/webkitpy/test/main.py:
3:35 PM Changeset in webkit [272818] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[ Big Sur ] media/media-source/media-source-webm-init-inside-segment.html is failing
https://bugs.webkit.org/show_bug.cgi?id=220552

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations: Skip the test for WK1.
3:29 PM Changeset in webkit [272817] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

imported/w3c/web-platform-tests/html/dom/idlharness.worker.html is timing out on Catalina wk1 debug EWS
https://bugs.webkit.org/show_bug.cgi?id=206503

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations: Changed expectation from Mojave to Catalina to suppress failure.
3:06 PM Changeset in webkit [272816] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r272799.

Caused debug WK2 tests to exit early with an assertion failure

Reverted changeset:

"Unexpected ASSERT when touch events are dispatched on the
main thread"
https://bugs.webkit.org/show_bug.cgi?id=221832
https://commits.webkit.org/r272799

3:05 PM Changeset in webkit [272815] by Ryan Haddad
  • 2 edits in trunk/Tools

REGRESSION (r268421): TestWebKitAPI.WebKit.PreferenceChanges* tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=221848

Unreviewed test gardening.

TestWebKitAPI.WebKit.GlobalPreferenceChangesUsingDefaultsWrite is also flaky, so disable it for Big Sur.

  • TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm:
3:03 PM Changeset in webkit [272814] by Dewei Zhu
  • 2 edits in trunk/Websites/perf.webkit.org

'sync-commits.py' should be able to limit reporting scope to a specific branch on a Git repository.
https://bugs.webkit.org/show_bug.cgi?id=221799

Reviewed by Ryosuke Niwa.

Fetching git commits with 'git log --all ...' may end up fetching commits from branches created for
pull requests. Add 'branch' variable to allow us to limit to a certain branch.

  • tools/sync-commits.py: Added 'branch' variable to GitRepository so that we can fetch from a specific branch.

If branch is not specified, it will still use '--all' to list commits.
(load_repository):
(GitRepository.init):
(GitRepository._fetch_all_hashes):

2:29 PM Changeset in webkit [272813] by commit-queue@webkit.org
  • 3 edits in trunk/Websites/perf.webkit.org

perf.webkit.org/tools/js/analysis-results-notifier.js should allow sending of completion emails regardless of test name
https://bugs.webkit.org/show_bug.cgi?id=221712

Patch by Roy Reapor <rreapor@apple.com> on 2021-02-12
Reviewed by Dewei Zhu.

Rule platforms and tests can be undefined, an empty array, or an array of strings. Undefined will match everything.
Empty array will match nothing. Array of strings will match items in the array.

Rule will not match if either tests or platforms is an empty array.

  • tools/js/analysis-results-notifier.js:

(AnalysisResultsNotifier._validateRules.isUnderfinedOrEmptyArrayOrArrayOfStrings):

  • platforms and tests can now be undefined or an empty array officially

(AnalysisResultsNotifier._validateRules):

  • switched to assert.ok(). console.assert() no longer throws since node v10 (https://github.com/facebook/jest/issues/5634)
  • both rule platforms and tests must pass isUnderfinedOrEmptyArrayOrArrayOfStrings(). previously, rules like {tests: [1, 3], platforms: ['speedometer']} passes validation.

(AnalysisResultsNotifier._applyUpdate):

(AnalysisResultsNotifier._validateRules.isNonemptyArrayOfStrings): Deleted.

  • unit-tests/analysis-results-notifier-tests.js:
  • added a bunch of unittests
  • specify the exact regex match for assert.throws() and assert.doesNotThrow() argument.
2:13 PM Changeset in webkit [272812] by commit-queue@webkit.org
  • 25 edits
    3 adds
    3 deletes in trunk/LayoutTests

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

Patch by Chris Gambrell <Chris Gambrell> on 2021-02-12
Reviewed by Jonathan Bedard.

  • http/tests/storageAccess/aggregate-sorted-data-with-storage-access.html:
  • http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking-ephemeral.html:
  • http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking.html:
  • http/tests/storageAccess/deny-storage-access-under-opener-ephemeral.html:
  • http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral.html:
  • http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss.html:
  • http/tests/storageAccess/deny-storage-access-under-opener.html:
  • http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral.html:
  • http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html:
  • http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking.html:
  • http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-ephemeral.html:
  • http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies.html:
  • http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-ephemeral.html:
  • http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie.html:
  • http/tests/storageAccess/request-and-grant-access-cross-origin-non-sandboxed-iframe-ephemeral.html:
  • http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-and-access-from-right-frame.html:
  • http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-but-access-from-wrong-frame.html:
  • http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-nested-iframe.html:
  • http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html:
  • http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html:
  • http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access.html:
  • http/tests/storageAccess/request-and-grant-access-with-per-page-scope-access-from-another-frame.html:
  • http/tests/storageAccess/resources/echo-incoming-cookies-as-json.php: Removed.
  • http/tests/storageAccess/resources/echo-incoming-cookies-as-json.py: Added.
  • http/tests/storageAccess/resources/get-cookies.php: Removed.
  • http/tests/storageAccess/resources/get-cookies.py: Added.
  • http/tests/storageAccess/resources/has-storage-access-iframe.html:
  • http/tests/storageAccess/resources/request-storage-access-iframe.html:
  • http/tests/storageAccess/resources/set-cookie.php: Removed.
  • http/tests/storageAccess/resources/set-cookie.py: Added.
2:07 PM Changeset in webkit [272811] by stephan.szabo@sony.com
  • 2 edits in trunk/Source/WebCore

[PlayStation][Debug] Build fix after r272772
https://bugs.webkit.org/show_bug.cgi?id=221836

Unreviewed Build Fix

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
2:01 PM Changeset in webkit [272810] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Enable video capture in GPUProcess by default on MacOS
https://bugs.webkit.org/show_bug.cgi?id=221750

Reviewed by Eric Carlson.

Manually tested.

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultCaptureVideoInGPUProcessEnabled):

1:53 PM Changeset in webkit [272809] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Multiline inline boxes have incorrect content box height/width values
https://bugs.webkit.org/show_bug.cgi?id=221827

Reviewed by Antti Koivisto.

Exclude padding and borders when computing the content box size for a multiline inline box.
(This is similar to r272724 but with inline boxes spanning multiple lines.)

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

1:52 PM Changeset in webkit [272808] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

[Mac] Update Opus setting after a preference change.
https://bugs.webkit.org/show_bug.cgi?id=221807

Reviewed by Eric Carlson.

Make the opusDecoderEnabled() setting dynamic by applying changes
to that setting after a preference update.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

1:49 PM Changeset in webkit [272807] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Windows build again after r272772
https://bugs.webkit.org/show_bug.cgi?id=221765

Unreviewed.

No new tests because there is no behavior change.

  • platform/graphics/win/FontCGWin.cpp:

(WebCore::FontCascade::drawGlyphs):

1:35 PM Changeset in webkit [272806] by youenn@apple.com
  • 11 edits in trunk/Source/WebKit

Remote video capture samples should be processed in a background thread
https://bugs.webkit.org/show_bug.cgi?id=221201
<rdar://problem/73826816>

Reviewed by Eric Carlson.

Make RemoteRealtimeVideoSource register to RemoteCaptureSampleManager to get video samples from a background thread.
Make RemoteCaptureSampleManager able to handle incoming video samples in background thread like for audio.
Make UserMediaCaptureManagerProxy use RemoteCaptureSampleManager instead of UserMediaCaptureManager message.
Covered by existing tests.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::addSource):
(WebKit::RemoteCaptureSampleManager::removeSource):
(WebKit::RemoteCaptureSampleManager::audioStorageChanged):
(WebKit::RemoteCaptureSampleManager::audioSamplesAvailable):
(WebKit::RemoteCaptureSampleManager::videoSampleAvailable):
(WebKit::RemoteCaptureSampleManager::RemoteVideo::RemoteVideo):
(WebKit::RemoteCaptureSampleManager::RemoteVideo::videoSampleAvailable):

  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.messages.in:
  • WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:

(WebKit::RemoteRealtimeVideoSource::create):
(WebKit::RemoteRealtimeVideoSource::videoSampleAvailable):
(WebKit::RemoteRealtimeVideoSource::remoteVideoSampleAvailable): Deleted.

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

(WebKit::UserMediaCaptureManager::remoteVideoSampleAvailable): Deleted.

  • WebProcess/cocoa/UserMediaCaptureManager.h:
  • WebProcess/cocoa/UserMediaCaptureManager.messages.in:
1:31 PM Changeset in webkit [272805] by mmaxfield@apple.com
  • 75 edits in trunk/Source/WebCore

enum LengthType -> enum class LengthType
https://bugs.webkit.org/show_bug.cgi?id=221834

Reviewed by Sam Weinig and Simon Fraser.

iPhoneOS14.2.sdk/usr/include/MacTypes.h:193 has:

typedef SInt32 Fixed;

but we have:

enum LengthType {

... Fixed ...

}

This leads to: error: reference to 'Fixed' is ambiguous

Unfortunately, this error occurs in
/System/Library/Frameworks/CoreText.framework/Headers/SFNTLayoutTypes.h,
which means we can't modify the error site to qualify the name. Therefore,
the best solution is to turn enum LengthType into enum class LengthType.
This is in accordance with WebKit's style guide.

No new tests because there is no behavior change.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

  • css/BasicShapeFunctions.cpp:

(WebCore::convertToLengthSize):
(WebCore::convertToCenterCoordinate):

  • css/CSSBasicShapes.cpp:

(WebCore::buildSerializablePositionOffset):

  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcPrimitiveValueNode::createCalcExpression const):
(WebCore::createCSS):

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::init):
(WebCore::CSSPrimitiveValue::computeLength const):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::convertToLength const):

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapNinePieceImageSlice):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):

  • css/LengthFunctions.cpp:

(WebCore::valueForLength):
(WebCore::floatValueForLength):

  • css/LengthFunctions.h:

(WebCore::minimumValueForLength):

  • css/TransformFunctions.cpp:

(WebCore::convertToFloatLength):
(WebCore::transformsForValue):
(WebCore::translateForValue):

  • display/css/DisplayFillLayerImageGeometry.cpp:

(WebCore::Display::calculateImageIntrinsicDimensions):

  • dom/Document.cpp:

(WebCore::Document::updateLayoutIfDimensionsOutOfDate):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::createInnerTextStyle):

  • html/shadow/DateTimeNumericFieldElement.cpp:

(WebCore::DateTimeNumericFieldElement::adjustMinWidth const):

  • html/shadow/DateTimeSymbolicFieldElement.cpp:

(WebCore::DateTimeSymbolicFieldElement::adjustMinWidth const):

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerElement::resolveCustomStyle):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::buildLayoutTree):
(WebCore::Layout::TreeBuilder::createLayoutBox):

  • page/FrameView.cpp:

(WebCore::FrameView::performFixedWidthAutoSize):

  • page/IntersectionObserver.cpp:

(WebCore::parseRootMargin):
(WebCore::IntersectionObserver::rootMargin const):

  • platform/Length.cpp:

(WebCore::parseLength):
(WebCore::Length::Length):
(WebCore::convertTo100PercentMinusLength):
(WebCore::blend):
(WebCore::operator<<):

  • platform/Length.h:

(WebCore::Length::Length):
(WebCore::Length::operator=):
(WebCore::Length::setValue):
(WebCore::Length::isAuto const):
(WebCore::Length::isFixed const):
(WebCore::Length::isMaxContent const):
(WebCore::Length::isMinContent const):
(WebCore::Length::isPercent const):
(WebCore::Length::isRelative const):
(WebCore::Length::isUndefined const):
(WebCore::Length::isCalculated const):
(WebCore::Length::isLegacyIntrinsic const):
(WebCore::Length::isIntrinsic const):
(WebCore::Length::isFillAvailable const):
(WebCore::Length::isFitContent const):
(WebCore::Length::isMinIntrinsic const):

  • platform/LengthBox.h:

(WebCore::LengthBox::LengthBox):

  • platform/Theme.cpp:

(WebCore::Theme::minimumControlSize const):

  • platform/graphics/Image.cpp:

(WebCore::Image::computeIntrinsicDimensions):

  • platform/graphics/transforms/PerspectiveTransformOperation.cpp:

(WebCore::PerspectiveTransformOperation::blend):

  • platform/graphics/transforms/TranslateTransformOperation.cpp:

(WebCore::TranslateTransformOperation::blend):

  • platform/graphics/transforms/TranslateTransformOperation.h:
  • platform/mac/ThemeMac.mm:

(WebCore::sizeFromNSControlSize):
(WebCore::ThemeMac::minimumControlSize const):

  • rendering/AutoTableLayout.cpp:

(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
(WebCore::AutoTableLayout::layout):

  • rendering/FixedTableLayout.cpp:

(WebCore::FixedTableLayout::calcWidthArray):

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithm::calculateGridTrackSize const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::isNonBlocksOrNonFixedHeightListItems):
(WebCore::getBPMWidth):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::constrainLogicalWidthInFragmentByMinMax const):
(WebCore::RenderBox::constrainLogicalHeightByMinMax const):
(WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing const):
(WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing const):
(WebCore::RenderBox::computeLogicalWidthInFragment const):
(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing const):
(WebCore::RenderBox::sizesLogicalWidthToFitContent const):
(WebCore::RenderBox::computeInlineDirectionMargins const):
(WebCore::RenderBox::computeLogicalHeight const):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing const):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing const):
(WebCore::computeInlineStaticDistance):
(WebCore::RenderBox::computePositionedLogicalWidth const):
(WebCore::RenderBox::computePositionedLogicalWidthUsing const):
(WebCore::computeBlockStaticDistance):
(WebCore::RenderBox::computePositionedLogicalHeightUsing const):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced const):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced const):
(WebCore::RenderBox::percentageLogicalHeightIsResolvable const):

  • rendering/RenderButton.cpp:

(WebCore::RenderButton::updateAnonymousChildStyle const):

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):

  • rendering/RenderElement.cpp:

(WebCore::includeNonFixedHeight):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
(WebCore::RenderFlexibleBox::mainSizeForPercentageResolution):

  • rendering/RenderFullScreen.cpp:

(WebCore::createFullScreenStyle):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::layoutShadowContent):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::hasNonZeroTransformOrigin):

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::updateMargins):

  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::adjustInnerStyle):

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::logicalWidthFromColumns const):

  • rendering/RenderTableSection.cpp:

(WebCore::updateLogicalHeightForCell):

  • rendering/RenderTextControlMultiLine.cpp:

(WebCore::RenderTextControlMultiLine::layoutExcludedChildren):

  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::resetOverriddenHeight):
(WebCore::RenderTextControlSingleLine::layout):

  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::adjustApplePayButtonStyle const):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::setSizeFromFont const):
(WebCore::RenderThemeMac::adjustListButtonStyle const):
(WebCore::RenderThemeMac::adjustMenuListStyle const):
(WebCore::RenderThemeMac::adjustMenuListButtonStyle const):
(WebCore::RenderThemeMac::adjustSearchFieldStyle const):
(WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle const):
(WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle const):
(WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle const):
(WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle const):
(WebCore::RenderThemeMac::adjustSliderThumbSize const):

  • rendering/TextAutoSizing.cpp:

(WebCore::TextAutoSizingValue::adjustTextNodeSizes):

  • rendering/style/BasicShapes.cpp:

(WebCore::BasicShapeCenterCoordinate::updateComputedLength):

  • rendering/style/BasicShapes.h:

(WebCore::BasicShapeRadius::BasicShapeRadius):

  • rendering/style/BorderData.h:

(WebCore::BorderData::BorderData):

  • rendering/style/FillLayer.h:

(WebCore::FillLayer::initialFillXPosition):
(WebCore::FillLayer::initialFillYPosition):

  • rendering/style/GridTrackSize.h:

(WebCore::GridTrackSize::GridTrackSize):

  • rendering/style/NinePieceImage.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setPageScaleTransform):
(WebCore::RenderStyle::setWordSpacing):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::resetMargin):
(WebCore::RenderStyle::initialShapeMargin):
(WebCore::RenderStyle::initialBorderRadius):
(WebCore::RenderStyle::initialObjectPosition):
(WebCore::RenderStyle::initialWordSpacing):
(WebCore::RenderStyle::initialMaxSize):
(WebCore::RenderStyle::initialMargin):
(WebCore::RenderStyle::initialPadding):
(WebCore::RenderStyle::initialTextIndent):
(WebCore::RenderStyle::initialZeroLength):
(WebCore::RenderStyle::initialOneLength):
(WebCore::RenderStyle::initialLineHeight):
(WebCore::RenderStyle::initialFlexBasis):
(WebCore::RenderStyle::initialMarqueeIncrement):
(WebCore::RenderStyle::initialTransformOriginX):
(WebCore::RenderStyle::initialTransformOriginY):
(WebCore::RenderStyle::initialPerspectiveOriginX):
(WebCore::RenderStyle::initialPerspectiveOriginY):
(WebCore::RenderStyle::initialSpecifiedLineHeight):
(WebCore::RenderStyle::initialScrollMargin):
(WebCore::RenderStyle::initialScrollPadding):
(WebCore::RenderStyle::initialGridAutoColumns):
(WebCore::RenderStyle::initialGridAutoRows):
(WebCore::RenderStyle::setBorderRadius):

  • rendering/style/StyleGeneratedImage.cpp:

(WebCore::StyleGeneratedImage::computeIntrinsicDimensions):

  • rendering/style/StyleRareNonInheritedData.h:
  • rendering/style/StyleReflection.h:

(WebCore::StyleReflection::StyleReflection):

  • rendering/style/StyleSurroundData.cpp:

(WebCore::StyleSurroundData::StyleSurroundData):

  • rendering/updating/RenderTreeBuilderFullScreen.cpp:

(WebCore::RenderTreeBuilder::FullScreen::createPlaceholder):

  • style/StyleAdjuster.cpp:

(WebCore::Style::addIntrinsicMargins):
(WebCore::Style::Adjuster::adjust const):
(WebCore::Style::Adjuster::adjustForTextAutosizing):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertLength):
(WebCore::Style::BuilderConverter::convertLengthOrAuto):
(WebCore::Style::BuilderConverter::convertLengthSizing):
(WebCore::Style::BuilderConverter::convertLengthMaxSizing):
(WebCore::Style::BuilderConverter::convertToRadiusLength):
(WebCore::Style::BuilderConverter::convertRadius):
(WebCore::Style::BuilderConverter::convertTo100PercentMinusLength):
(WebCore::Style::BuilderConverter::convertPositionComponent):
(WebCore::Style::BuilderConverter::createGridTrackBreadth):
(WebCore::Style::BuilderConverter::convertWordSpacing):
(WebCore::Style::BuilderConverter::convertLineHeight):

  • style/StyleBuilderCustom.h:

(WebCore::Style::ApplyPropertyBorderImageModifier::applyInitialValue):

  • style/StyleBuilderState.cpp:

(WebCore::Style::BuilderState::createFilterOperations):

  • style/StyleResolveForDocument.cpp:

(WebCore::Style::resolveForDocument):

  • style/StyleResolveForFontRaw.cpp:

(WebCore::Style::resolveForFontRaw):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::intrinsicWidth const):
(WebCore::SVGSVGElement::intrinsicHeight const):

1:26 PM Changeset in webkit [272804] by Aditya Keerthi
  • 3 edits in trunk/Source/WebKit

[tvOS] Fix build failure in WKFormSelectPicker
https://bugs.webkit.org/show_bug.cgi?id=221839
<rdar://problem/74287348>

Reviewed by Wenson Hsieh.

UITableViewStyleInsetGrouped is not available on tvOS. Rather than
have two separate codepaths, we can just use UITableViewStyleGrouped
with sectionContentInsetFollowsLayoutMargins set to YES.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/forms/WKFormSelectPicker.mm:

(-[WKSelectPickerTableViewController initWithView:]):

1:22 PM Changeset in webkit [272803] by don.olmstead@sony.com
  • 2 edits in trunk/Tools

webkitpy.xcode only relevant for darwin platforms
https://bugs.webkit.org/show_bug.cgi?id=221837

Reviewed by Jonathan Bedard.

The tests in webkitpy.xcode are Darwin specific and should only run on that platform.

This issue was discovered when running the tests with Python 3 on Windows which failed
a number of tests in the suite. These tests may run successfully on *nix platforms but
aren't actually relevant.

  • Scripts/webkitpy/test/main.py:
1:10 PM Changeset in webkit [272802] by youenn@apple.com
  • 5 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.

Now that RemoteRealtimeVideoSource is a RealtimeVideoCaptureSource, we can register RemoteRealtimeVideoSource
to its factory so that it will be muted if another RemoteRealtimeVideoSource is created.
This is now possible as clones of the track will get the same underlying RemoteRealtimeVideoSource.
We can thus only recreate the active source when GPU process crashes.
Covered by test no longer flaky.

  • WebProcess/cocoa/RemoteRealtimeAudioSource.cpp:

(WebKit::RemoteRealtimeAudioSource::gpuProcessConnectionDidClose):

  • WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:

(WebKit::RemoteRealtimeVideoSource::gpuProcessConnectionDidClose):

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::VideoFactory::setActiveSource): Deleted.

  • WebProcess/cocoa/UserMediaCaptureManager.h:
1:01 PM Changeset in webkit [272801] by Antti Koivisto
  • 3 edits in trunk/LayoutTests

[LFC][Integration] Make accessibility/aria-modal-in-aria-hidden.html more robust
https://bugs.webkit.org/show_bug.cgi?id=221812

Reviewed by Zalan Bujtas.

It is very dependent on exact interactions between the internal testing API and the DOM.
It also seems to be partially testing a wrong thing (probably as workaround for above).

  • accessibility/aria-modal-in-aria-hidden-expected.txt:
  • accessibility/aria-modal-in-aria-hidden.html:

Do rendering update between every mutation and check, not just the last one.
Fix the middle test to use isIgnored too.
(isValid() is not even a function, it is a property, so this relied on getting null to pass)

12:38 PM Changeset in webkit [272800] by Jonathan Bedard
  • 5 edits in trunk/Tools

[webkit-patch] Post both revision and identifier to bugzilla
https://bugs.webkit.org/show_bug.cgi?id=221829
<rdar://problem/74282619>

Reviewed by Aakash Jain.

  • Scripts/webkitpy/tool/commands/download_unittest.py:
  • Scripts/webkitpy/tool/commands/upload_unittest.py:
  • Scripts/webkitpy/tool/comments.py:

(bug_comment_from_svn_revision): Include subversion revision.

  • Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py:

(CloseBugForLandDiffTest.test_empty_state):

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

Unexpected ASSERT when touch events are dispatched on the main thread
https://bugs.webkit.org/show_bug.cgi?id=221832
<rdar://problem/74283856>

Reviewed by Sam Weinig.

The change in r272558 causes an ASSERT when running on iOS debug
builds. The touch event CompletionHandlers are created on the EventDispatcher
thread, but serviced on the main thread. We now need to state that this
is ok as we create the CompletionHandler.

This is covered by tests, but the EWS bots don't run iOS tests in
debug mode, and the internal bots hadn't caught up yet!

  • Platform/IPC/HandleMessage.h:

(IPC::handleMessageAsync): Pass a CompletionHandlerCallThread into the constructor.

11:43 AM Changeset in webkit [272798] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION (r272241) [MacOS wk1] imported/w3c/web-platform-tests/css/css-flexbox/overflow-auto-006.html is flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=221347

Unreviewed test gardening.

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

  • platform/mac-wk1/TestExpectations:
11:25 AM Changeset in webkit [272797] by mark.lam@apple.com
  • 11 edits
    1 add in trunk/Source

Move RootMarkReason out of SlotVisitor.
https://bugs.webkit.org/show_bug.cgi?id=221831

Reviewed by Tadeu Zagallo.

Source/JavaScriptCore:

This will lessen the amount of diff needed for the GC verifier later.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/Heap.cpp:

(JSC::Heap::addCoreConstraints):

  • heap/HeapAnalyzer.h:
  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::analyzeEdge):
(JSC::rootTypeToString):

  • heap/HeapSnapshotBuilder.h:
  • heap/RootMarkReason.h: Added.
  • heap/SlotVisitor.h:

(JSC::SetRootMarkReasonScope::SetRootMarkReasonScope):

  • inspector/JSInjectedScriptHost.cpp:

Source/WebCore:

  • bindings/js/DOMGCOutputConstraint.cpp:

(WebCore::DOMGCOutputConstraint::executeImpl):

11:15 AM Changeset in webkit [272796] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[macOS] Limit mech-register to required services
https://bugs.webkit.org/show_bug.cgi?id=221768
<rdar://problem/70350150>

Reviewed by Per Arne Vollan.

Limit mach-register to the two cases identified by telemetry.

  • WebProcess/com.apple.WebProcess.sb.in:
11:10 AM Changeset in webkit [272795] by svillar@igalia.com
  • 8 edits
    7 adds
    2 deletes in trunk/LayoutTests

[css-flexbox] Another WPT test import
https://bugs.webkit.org/show_bug.cgi?id=221813

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-flexbox/flexbox-min-width-auto-005-expected.html: Added.
  • web-platform-tests/css/css-flexbox/flexbox-min-width-auto-005.html: Added.
  • web-platform-tests/css/css-flexbox/flexbox-min-width-auto-006-expected.html: Added.
  • web-platform-tests/css/css-flexbox/flexbox-min-width-auto-006.html: Added.
  • web-platform-tests/css/css-flexbox/percentage-descendant-of-anonymous-flex-item-expected.html: Added.
  • web-platform-tests/css/css-flexbox/percentage-descendant-of-anonymous-flex-item.html: Added.
  • web-platform-tests/css/css-flexbox/radiobutton-min-size-expected.txt: Updated expectations.
  • web-platform-tests/css/css-flexbox/radiobutton-min-size.html: Updated.
  • web-platform-tests/css/css-flexbox/support/40x20-green.png: Added.
  • web-platform-tests/css/css-flexbox/support/w3c-import.log:
  • web-platform-tests/css/css-flexbox/w3c-import.log:

LayoutTests:

Imported the most recent changes in flexbox WPT tests. This implies deleting a local test that
was upstreamed to WPT, so it does not make sense to have a duplicate.

  • TestExpectations: Removed a test that is currently passing. Adding a new expected failure.
  • css3/flexbox/percentage-descendants-of-skipped-flex-item-expected.html: Removed.
  • css3/flexbox/percentage-descendants-of-skipped-flex-item.html: Removed.
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/css-flexbox/radiobutton-min-size-expected.txt:

Updated expectations.

11:08 AM Changeset in webkit [272794] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Crash in WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart() from large scale
https://bugs.webkit.org/show_bug.cgi?id=221635

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-02-12
Reviewed by Darin Adler.

Source/WebCore:

Test: platform/mac/editing/style/large-scale-crash.html

paintSearchFieldResultsDecorationPart(), unlike other functions like
paintSearchField(), paintSearchFieldCancelButton(), etc. has been
calling [NSButton:drawWithFrame:inView] directly. When a very large
scale has been applied however, this can lead to an assertion below us.
First draw the cell to an ImageBuffer using
paintCellAndSetFocusedElementNeedsRepaintIfNecessary(), as other
functions are already doing (as of 213352).
Thanks to Aditya Keerthi for pointing out this difference
and help with the fix.

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):

LayoutTests:

Add a test with a very large value of scale that tests that
we do not trigger the assertion here.
Thanks to Ryosuke Niwa for help in cleaning up the test
and making it more reliable.

  • fast/rendering/searchfield-scale-crash-expected.txt: Added.
  • fast/rendering/searchfield-scale-crash.html: Added.
11:05 AM Changeset in webkit [272793] by Jonathan Bedard
  • 3 edits in trunk/Tools

[webkit-patch] Use identifiers when posting to bugzilla (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=221724
<rdar://problem/74209525>

Rubber-stamped by Aakash Jain.

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

(Svn): Keep track of the set of mock remotes.

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:

(Svn._cache_path): Change the cache path if we detect the current host is being mocked.

11:03 AM Changeset in webkit [272792] by aakash_jain@apple.com
  • 1 edit
    1 delete in trunk/Tools

Delete old build.webkit.org templates
https://bugs.webkit.org/show_bug.cgi?id=221692

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/templates: Removed.
10:59 AM Changeset in webkit [272791] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[build.webkit.org] Avoid hosting results on S3
https://bugs.webkit.org/show_bug.cgi?id=221822

Reviewed by Jonathan Bedard.

Reverts r271801, r272220 and r272399.

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

(ExtractTestResults.init):
(ExtractTestResults.resultDirectoryURL):

10:50 AM Changeset in webkit [272790] by stephan.szabo@sony.com
  • 3 edits in trunk/Source/WebCore

[WinCairo][Debug] Build fix after r272772
https://bugs.webkit.org/show_bug.cgi?id=221814

Unreviewed build fix.

  • platform/graphics/cairo/FontCairo.cpp:
  • platform/graphics/cairo/GraphicsContextImplCairo.cpp:
10:40 AM Changeset in webkit [272789] by Chris Dumez
  • 92 edits in trunk

Reduce explicit usage of [objC release] in WebKit
https://bugs.webkit.org/show_bug.cgi?id=221780

Reviewed by Alex Christensen.

Reduce explicit usage of [objC release] in WebKit by using smart pointers.

Source/WebCore:

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
(WebCore::postUserInfoForChanges):
(WebCore::AXObjectCache::postTextReplacementPlatformNotification):
(WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):

  • bridge/testbindings.mm:

(main):

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::HTMLConverter):
(HTMLConverter::computedAttributesForElement):
(HTMLConverter::_addMarkersToList):
(fileWrapperForURL):

  • history/mac/HistoryItemMac.mm:

(WebCore::HistoryItem::setViewState):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::exposedUnfilledArea const):

  • platform/ios/WebCoreMotionManager.h:
  • platform/ios/WebCoreMotionManager.mm:

(-[WebCoreMotionManager dealloc]):
(-[WebCoreMotionManager initializeOnMainThread]):
(-[WebCoreMotionManager checkClientStatus]):
(-[WebCoreMotionManager update]):

  • platform/ios/wak/WAKView.mm:

(-[WAKView dealloc]):
(-[WAKView _subviewReferences]):
(-[WAKView addSubview:]):
(-[WAKView removeFromSuperview]):

  • platform/ios/wak/WAKViewInternal.h:
  • platform/mac/PasteboardMac.mm:

(WebCore::writeFileWrapperAsRTFDAttachment):

  • platform/mac/PlatformSpeechSynthesizerMac.mm:

(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):

  • platform/network/ios/NetworkStateNotifierIOS.mm:

(-[WebNetworkStateObserver initWithBlock:]):
(-[WebNetworkStateObserver dealloc]):

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::makeDelegate):

  • platform/text/mac/TextBoundaries.mm:

(WebCore::findWordBoundary):
(WebCore::findNextWordFromIndex):

Source/WebKit:

  • Shared/Cocoa/WKObject.mm:

(-[WKObject dealloc]):
(initializeTargetIfNeeded):
(-[WKObject forwardingTargetForSelector:]):
(-[WKObject forwardInvocation:]):

  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:

(-[UIView _web_setSubviews:]):

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

  • UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm:

(-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
(-[WKCustomProtocolLoader dealloc]):
(WebKit::LegacyCustomProtocolManagerClient::startLoading):

  • UIProcess/Inspector/ios/WKInspectorHighlightView.h:
  • UIProcess/Inspector/ios/WKInspectorHighlightView.mm:

(-[WKInspectorHighlightView initWithFrame:]):
(-[WKInspectorHighlightView dealloc]):
(-[WKInspectorHighlightView _removeAllLayers]):
(-[WKInspectorHighlightView _createLayers:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _selectPositionAtPoint:stayingWithinFocusedElement:completionHandler:]):
(-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
(-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):

  • UIProcess/ios/WKScrollView.mm:

(-[WKScrollView _updateDelegate]):
(-[WKScrollView dealloc]):

  • UIProcess/ios/forms/WKFormSelectPopover.mm:

(-[WKSelectPopover initWithView:hasGroups:]):

  • UIProcess/mac/WKTextInputWindowController.mm:

(-[WKTextInputPanel dealloc]):
(-[WKTextInputPanel init]):

  • UIProcess/mac/WebColorPickerMac.mm:

(+[WKPopoverColorWell _colorPopoverCreateIfNecessary:]):

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

(-[WKAccessibilityWebPageObjectBase setRemoteParent:]):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:

(-[WKAccessibilityWebPageObject dealloc]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebChromeClientIOS.mm:

(WebChromeClientIOS::runOpenPanel):

  • WebView/WebPDFViewIOS.mm:

(-[WebPDFView dealloc]):
(-[WebPDFView setDataSource:]):
(-[WebPDFView _checkPDFTitle]):
(-[WebPDFView title]):

  • WebView/WebPDFViewPlaceholder.mm:

(-[WebPDFViewPlaceholder _updateTitleForDocumentIfAvailable]):

Source/WebKitLegacy/mac:

  • DOM/DOMUIKitExtensions.mm:

(-[DOMNode absoluteQuads]):
(-[DOMHTMLAreaElement absoluteQuadsWithOwner:]):

  • DOM/ExceptionHandlers.mm:

(raiseDOMErrorException):

  • DefaultDelegates/WebDefaultUIDelegate.mm:

(-[WebDefaultUIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:]):

  • History/WebHistory.mm:

(-[WebHistoryPrivate init]):
(-[WebHistoryPrivate dealloc]):
(-[WebHistoryPrivate removeItemFromDateCaches:]):
(-[WebHistoryPrivate addItemToDateCaches:]):
(-[WebHistoryPrivate visitedURL:withTitle:]):
(-[WebHistoryPrivate addItem:discardDuplicate:]):
(-[WebHistoryPrivate rebuildHistoryByDayIfNeeded:]):
(-[WebHistoryPrivate removeAllItems]):
(-[WebHistoryPrivate orderedLastVisitedDays]):
(-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
(-[WebHistoryPrivate addVisitedLinksToVisitedLinkStore:]):
(-[WebHistory loadFromURL:error:]):
(-[WebHistory _visitedURL:withTitle:method:wasFailure:]):

  • History/WebHistoryItem.mm:

(-[WebHistoryItem initFromDictionaryRepresentation:]):

  • Misc/WebDownload.mm:

(-[WebDownloadInternal dealloc]):
(-[WebDownloadInternal setRealDelegate:]):
(-[WebDownloadInternal downloadDidBegin:]):
(-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
(-[WebDownloadInternal download:didReceiveResponse:]):
(-[WebDownloadInternal download:didReceiveDataOfLength:]):
(-[WebDownloadInternal download:decideDestinationWithSuggestedFilename:]):
(-[WebDownloadInternal download:didCreateDestination:]):
(-[WebDownloadInternal downloadDidFinish:]):
(-[WebDownloadInternal download:didFailWithError:]):

  • Misc/WebNSDataExtras.mm:

(-[NSData _webkit_parseRFC822HeaderFields]):

  • Misc/WebNSPasteboardExtras.mm:

(-[NSPasteboard _web_writeFileWrapperAsRTFDAttachment:]):
(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):

  • Plugins/Hosted/NetscapePluginHostManager.mm:

(WebKit::NetscapePluginHostManager::spawnPluginHost):

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::NetscapePluginInstanceProxy::performRequest):

  • Plugins/WebNetscapePluginStream.mm:

(WebNetscapePluginStream::didReceiveData):

  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView pluginView:receivedData:]):
(-[WebNetscapePluginView loadPluginRequest:]):
(-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):

  • Plugins/WebPluginController.mm:

(-[WebPluginController pluginView:receivedResponse:]):

  • Plugins/WebPluginDatabase.mm:

(-[WebPluginDatabase refresh]):
(-[WebPluginDatabase _removePlugin:]):
(-[WebPluginDatabase _scanForNewPlugins]):

  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::createWindow):
(WebChromeClient::addMessageToConsole):
(WebChromeClient::mouseDidMoveOverElement):
(WebChromeClient::exceededDatabaseQuota):
(WebChromeClient::reachedApplicationCacheOriginQuota):
(WebChromeClient::runOpenPanel):
(WebChromeClient::exitFullScreenForElement):

  • WebCoreSupport/WebEditorClient.mm:

(attributesForAttributedStringConversion):

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::forceLayoutForNonHTML):
(WebFrameLoaderClient::dispatchCreatePage):
(WebFrameLoaderClient::committedLoad):
(WebFrameLoaderClient::prepareForDataSourceReplacement):
(WebFrameLoaderClient::createDocumentLoader):
(WebFrameLoaderClient::savePlatformDataToCachedFrame):
(WebFrameLoaderClient::transitionToCommittedForNewPage):
(WebFrameLoaderClient::actionDictionary const):
(WebFrameLoaderClient::createFrame):
(pluginView):
(WebFrameLoaderClient::createPlugin):

  • WebCoreSupport/WebGeolocationClient.mm:

(WebGeolocationClient::requestPermission):
(-[WebGeolocationProviderInitializationListener initializationAllowedWebView:]):

  • WebCoreSupport/WebInspectorClient.mm:

(-[WebInspectorWindowController init]):
(-[WebInspectorWindowController initWithInspectedWebView:isUnderTest:]):
(-[WebInspectorWindowController dealloc]):
(-[WebInspectorWindowController frontendWebView]):
(-[WebInspectorWindowController window]):
(-[WebInspectorWindowController showWindow:]):
(-[WebInspectorWindowController webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]):

  • WebCoreSupport/WebNotificationClient.mm:

(WebNotificationClient::requestPermission):
(WebNotificationClient::checkPermission):

  • WebView/WebArchive.mm:

(-[WebArchivePrivate dealloc]):
(-[WebArchive initWithMainResource:subresources:subframeArchives:]):
(-[WebArchive mainResource]):
(-[WebArchive subresources]):
(-[WebArchive subframeArchives]):

  • WebView/WebDataSource.mm:

(-[WebDataSource _documentFragmentWithArchive:]):
(-[WebDataSource _makeRepresentation]):

  • WebView/WebFrame.mm:

(-[WebFramePrivate dealloc]):
(-[WebFramePrivate setWebFrameView:]):
(+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
(+[WebFrame _createMainFrameWithPage:frameName:frameView:]):
(+[WebFrame _createMainFrameWithSimpleHTMLDocumentWithPage:frameView:style:]):
(-[WebFrame getDictationResultRanges:andMetadatas:]):
(-[WebFrame frameView]):

  • WebView/WebFrameInternal.h:
  • WebView/WebFrameView.mm:

(-[WebFrameViewPrivate dealloc]):
(-[WebFrameView _scrollView]):
(-[WebFrameView _install]):
(-[WebFrameView initWithFrame:]):
(-[WebFrameView _setCustomScrollViewClass:]):

  • WebView/WebFullScreenController.mm:

(-[WebFullScreenController init]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _updateMouseoverWithEvent:]):

  • WebView/WebNavigationData.mm:

(-[WebNavigationDataPrivate dealloc]):
(-[WebNavigationData initWithURLString:title:originalRequest:response:hasSubstituteData:clientRedirectSource:]):
(-[WebNavigationData url]):
(-[WebNavigationData title]):
(-[WebNavigationData originalRequest]):
(-[WebNavigationData response]):
(-[WebNavigationData clientRedirectSource]):

  • WebView/WebPDFDocumentExtras.mm:

(allScriptsInPDFDocument):

  • WebView/WebPDFRepresentation.mm:

(-[WebPDFRepresentation finishedLoadingWithDataSource:]):

  • WebView/WebPDFView.mm:

(-[WebPDFView menuForEvent:]):
(-[WebPDFView countMatchesForText:inDOMRange:options:limit:markMatches:]):
(-[WebPDFView attributedString]):
(-[WebPDFView selectionImageForcingBlackText:]):
(-[WebPDFView _menuItemsFromPDFKitForEvent:]):
(-[WebPDFView _nextMatchFor:direction:caseSensitive:wrap:fromSelection:startInSelection:]):

  • WebView/WebPolicyDelegate.mm:

(-[WebPolicyDecisionListenerPrivate initWithTarget:action:]):
(-[WebPolicyDecisionListenerPrivate dealloc]):
(-[WebPolicyDecisionListener _usePolicy:]):
(-[WebPolicyDecisionListener _invalidate]):

  • WebView/WebPreferences.mm:

(+[WebPreferences _setIBCreatorID:]):

  • WebView/WebScriptDebugger.mm:

(WebScriptDebugger::sourceParsed):

  • WebView/WebTextCompletionController.mm:

(-[WebTextCompletionController _buildUI]):

  • WebView/WebVideoFullscreenController.mm:

(-[WebVideoFullscreenController init]):

  • WebView/WebView.mm:

(-[WebView _registerDraggedTypes]):
(-[WebView _commonInitializationWithFrameName:groupName:]):
(+[WebView _supportedFileExtensions]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
(-[WebView _downloadURL:]):
(-[WebView _openNewWindowWithRequest:]):
(-[WebView _didStartProvisionalLoadForFrame:]):
(-[WebView caretChanged]):
(-[WebView setBackgroundColor:]):
(+[WebView setMIMETypesShownAsHTML:]):
(-[WebView setPreferences:]):
(-[WebView setPreferencesIdentifier:]):
(-[WebView setCurrentNodeHighlight:]):
(-[WebView stopLoadingAndClear]):
(-[WebView _openFrameInNewWindowFromMenu:]):
(-[WebView _searchWithGoogleFromMenu:]):

  • WebView/WebWindowAnimation.mm:

(-[WebWindowScaleAnimation setSubAnimation:]):

Tools:

  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::addNotificationListener):
(AccessibilityUIElement::removeNotificationListener):

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(AccessibilityUIElement::addNotificationListener):
(AccessibilityUIElement::removeNotificationListener):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(createWebViewAndOffscreenWindow):
(destroyWebViewAndOffscreenWindow):
(dumpFrameAsPDF):
(dumpBackForwardListForWebView):

  • DumpRenderTree/mac/DumpRenderTreePasteboard.mm:

(+[DumpRenderTreePasteboard _pasteboardWithName:]):

  • DumpRenderTree/mac/EventSendingController.mm:

(-[EventSendingController mouseDown:withModifiers:]):
(-[EventSendingController mouseUp:withModifiers:]):
(-[EventSendingController mouseMoveToX:Y:]):
(-[EventSendingController keyDown:withModifiers:withLocation:]):
(-[EventSendingController sentTouchEventOfType:]):
(-[EventSendingController touchEnd]):
(-[EventSendingController touchCancel]):

  • DumpRenderTree/mac/ResourceLoadDelegate.mm:

(-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):

  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::applicationCacheDiskUsageForOrigin):
(TestRunner::clearApplicationCacheForOrigin):
(TestRunner::clearBackForwardList):
(TestRunner::keepWebHistory):
(TestRunner::setDatabaseQuota):
(TestRunner::setMockDeviceOrientation):
(TestRunner::setMockGeolocationPosition):
(-[APITestDelegateIPhone initWithTestRunner:utf8Data:baseURL:]):
(-[APITestDelegateIPhone dealloc]):
(-[APITestDelegateIPhone run]):
(-[APITestDelegateIPhone _cleanUp]):
(TestRunner::apiTestNewWindowDataLoadBaseURL):
(-[SynchronousLoader dealloc]):
(-[SynchronousLoader connection:didReceiveAuthenticationChallenge:]):
(+[SynchronousLoader makeRequest:withUsername:password:]):
(TestRunner::addChromeInputField):

  • DumpRenderTree/mac/UIDelegate.h:
  • DumpRenderTree/mac/UIDelegate.mm:

(-[UIDelegate webView:decidePolicyForGeolocationRequestFromOrigin:frame:listener:]):
(-[UIDelegate timerFired]):
(-[UIDelegate dealloc]):

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::addNotificationListener):
(WTR::AccessibilityUIElement::removeNotificationListener):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::addNotificationListener):
(WTR::AccessibilityUIElement::removeNotificationListener):

  • WebKitTestRunner/ios/HIDEventGenerator.mm:

(-[HIDEventGenerator interpolatedEvents:]):

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::PlatformWebView):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::addChromeInputField):

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

(-[WebKitTestRunnerDraggingInfo dealloc]):
(-[WebKitTestRunnerDraggingInfo draggedImage]):
(-[WebKitTestRunnerDraggingInfo draggingPasteboard]):
(-[WebKitTestRunnerDraggingInfo draggingSource]):

  • WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:

(+[WebKitTestRunnerPasteboard _pasteboardWithName:]):
(-[LocalPasteboard _addTypesWithoutUpdatingChangeCount:owner:]):

10:37 AM Changeset in webkit [272788] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ] webgpu/whlsl/do-while-loop-break.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215606

Unreviewed test gardening.

Patch by Robert Jenner <Robert Jenner> on 2021-02-12

  • platform/mac-wk2/TestExpectations: Switch expectation from Failure to ImageOnlyFailure.
10:36 AM Changeset in webkit [272787] by aakash_jain@apple.com
  • 1 edit
    1 delete in trunk/Tools

[build.webkit.org] Delete unused Makefile
https://bugs.webkit.org/show_bug.cgi?id=221721

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/Makefile: Removed.
10:20 AM Changeset in webkit [272786] by commit-queue@webkit.org
  • 18 edits
    4 adds
    1 delete in trunk

GPU process WebGL context toDataURL does not work for non-premultiplied contexts
https://bugs.webkit.org/show_bug.cgi?id=221748

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-02-12
Reviewed by Myles C. Maxfield.

Source/WebKit:

Implement GraphicsContextGL::paintRenderingResultsToImageData(). This
is used for Image.toDataURL() call, and returns something for
WebGL canvases that have non-premultiplied alpha.

No new tests, tested by currently failing WebGL conformance and ad hoc tests like
premultiplyalpha-test.html.
This does not make any failing test pass, as the tests test also premultiplied
case, which needs other currently unimplemented code.

  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:

(paintRenderingResultsToImageData):
Generated GPU process side implementation.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::getImageData):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:

Change ImageDataReference to RefPtr<ImageData>.

  • Platform/IPC/ImageDataReference.h: Removed.

This implementation is redundant. The messages could accept just
RefPtr<WebCore::ImageData>, which is exactly "reference to
Image Data", i.e. ImageDataReference.

RefPtr<WebCore::ImageData> encoder and decoder already exist.

  • 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/TestWithImageData.messages.in: Added.
  • Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp: Added.

(WebKit::TestWithImageData::didReceiveMessage):
(WebKit::TestWithImageData::didReceiveSyncMessage):

  • Scripts/webkit/tests/TestWithImageDataMessages.h: Added.

(Messages::TestWithImageData::messageReceiverName):
(Messages::TestWithImageData::SendImageData::name):
(Messages::TestWithImageData::SendImageData::SendImageData):
(Messages::TestWithImageData::SendImageData::arguments const):
(Messages::TestWithImageData::ReceiveImageData::name):
(Messages::TestWithImageData::ReceiveImageData::arguments const):

  • Scripts/webkit/tests/TestWithImageDataMessagesReplies.h: Added.

Test using RefPtr<WebCore::ImageData> in messages.in.

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToImageData):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::getImageData):
Generated Web process side implementation.

Tools:

Add support for generating IPC implementation for functions with RefPtr<>.

  • Scripts/generate-gpup-webgl:
10:06 AM Changeset in webkit [272785] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[build.webkit.org] commit identifier should show main instead of trunk
https://bugs.webkit.org/show_bug.cgi?id=221798

Reviewed by Jonathan Bedard.

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

(ShowIdentifier.init): Increased timeout to 10 minutes (since first run might take a while).
(ShowIdentifier.evaluateCommand):

  • CISupport/build-webkit-org/steps_unittest.py: Updated unit-tests.
9:50 AM Changeset in webkit [272784] by achristensen@apple.com
  • 28 edits in trunk/Source/WebKit

Stop using GenericCallback from WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=221653

Reviewed by Chris Dumez.

There are still two uses in the DrawingAreaProxy implementations, but those are quite tangled and deserve their own patch.

  • UIProcess/API/APIAttachment.cpp:

(API::Attachment::updateAttributes):

  • UIProcess/API/APIAttachment.h:
  • UIProcess/API/C/WKPage.cpp:

(CompletionHandler<void):
(WKPageRenderTreeExternalRepresentation):
(WKPageGetSourceForFrame):
(WKPageGetContentsAsString):
(WKPageGetBytecodeProfile):
(WKPageGetSamplingProfilerOutput):
(WTF::Function<void): Deleted.

  • UIProcess/API/Cocoa/APIAttachmentCocoa.mm:

(API::Attachment::updateFromSerializedRepresentation):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _insertAttachmentWithFileWrapper:contentType:completion:]):
(-[WKWebView _getContentsAsStringWithCompletionHandler:]):
(-[WKWebView _getContentsOfAllFramesAsStringWithCompletionHandler:]):

  • UIProcess/API/Cocoa/_WKAttachment.mm:

(-[_WKAttachment setFileWrapper:contentType:completion:]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::startSpeaking):

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

(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
(WebKit::WebPageProxy::getSourceForFrame):
(WebKit::WebPageProxy::getContentsAsString):
(WebKit::WebPageProxy::getBytecodeProfile):
(WebKit::WebPageProxy::getSamplingProfilerOutput):
(WebKit::WebPageProxy::getSelectionOrContentsAsString):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::installActivityStateChangeCompletionHandler):
(WebKit::WebPageProxy::insertAttachment):
(WebKit::WebPageProxy::updateAttachmentAttributes):
(WebKit::WebPageProxy::didInsertAttachmentWithIdentifier):
(WebKit::WebPageProxy::clearLoadDependentCallbacks): Deleted.
(WebKit::WebPageProxy::voidCallback): Deleted.
(WebKit::WebPageProxy::stringCallback): Deleted.
(WebKit::WebPageProxy::invalidateStringCallback): Deleted.

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

(-[WKContentView _shareForWebView:]):
(-[WKContentView _defineForWebView:]):
(-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::applyAutocorrection):

  • UIProcess/mac/WKTextFinderClient.mm:

(-[WKTextFinderClient getSelectedText:]):

  • WebProcess/Notifications/NotificationPermissionRequestManager.h:
  • WebProcess/WebCoreSupport/WebNotificationClient.h:
  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::activityStateDidChange):

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

(WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setActivityState):
(WebKit::WebPage::getContentsAsString):
(WebKit::WebPage::getRenderTreeExternalRepresentation):
(WebKit::WebPage::getSelectionOrContentsAsString):
(WebKit::WebPage::getSourceForFrame):
(WebKit::WebPage::getBytecodeProfile):
(WebKit::WebPage::getSamplingProfilerOutput):
(WebKit::WebPage::insertAttachment):
(WebKit::WebPage::updateAttachmentAttributes):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::applyAutocorrection):

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

(WebKit::TiledCoreAnimationDrawingArea::handleActivityStateChangeCallbacks):
(WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):

9:32 AM Changeset in webkit [272783] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Windows build after r272772
https://bugs.webkit.org/show_bug.cgi?id=221765

Unreviewed.

No new tests because there is no behavior change.

  • platform/graphics/Font.cpp:
9:17 AM Changeset in webkit [272782] by Jonathan Bedard
  • 6 edits in trunk/Tools

[webkit-patch] Use identifiers when posting to bugzilla
https://bugs.webkit.org/show_bug.cgi?id=221724
<rdar://problem/74209525>

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/common/config/urls.py:

(view_identifier_url): Return commits.webkit.org identifier link.

  • Scripts/webkitpy/tool/commands/download_unittest.py:

(DownloadCommandsTest.mock_svn_remote): Return a mock context for a remote Svn instance.

  • Scripts/webkitpy/tool/commands/upload_unittest.py:
  • Scripts/webkitpy/tool/comments.py:

(bug_comment_from_svn_revision): Query remote Subversion server to construct identifier link.

  • Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py:

(CloseBugForLandDiffTest.test_empty_state): Mock context for a remote Svn instance.

  • Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py:
4:05 AM Changeset in webkit [272781] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Update the block box/container list
https://bugs.webkit.org/show_bug.cgi?id=221800
<rdar://problem/74178203>

Reviewed by Antti Koivisto.

Add DisplayType::FlowRoot to isBlockContainer/isBlockLevelBox and DisplayType::Grid to isBlockLevelBox.

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isBlockLevelBox const):
(WebCore::Layout::Box::isBlockContainer const):

3:51 AM Changeset in webkit [272780] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] LineLayout::enclosingBorderBoxRectFor reports content box size
https://bugs.webkit.org/show_bug.cgi?id=221778

Reviewed by Antti Koivisto.

Before 272724, inline boxes included their paddings and borders in the content box geometry.
Now we can just simply return the border box rect.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::enclosingBorderBoxRectFor const):

3:29 AM Changeset in webkit [272779] by svillar@igalia.com
  • 3 edits
    2 adds in trunk

Crash in InsertTextCommand::doApply
https://bugs.webkit.org/show_bug.cgi?id=213514

Reviewed by Ryosuke Niwa.

Source/WebCore:

The InsertTextCommand might delete the current selection before inserting the text. In that case and when
the selection was ending inside an empty row of a table the code was calling CompositeEditCommand::removeNode()
directly to delete the empty row. That method however does not properly update the m_endingPosition of
the CompositeEditCommand leaving the current selection in an inconsistent state. Replaced that call by
removeNodeUpdatingStates() which ends up calling removeNode() but only after updating the selection state.

Test: editing/deleting/insert-in-orphaned-selection-crash.html

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows): Replaced
CompositeEditCommand::removeNode() by removeNodeUpdatingStates().

LayoutTests:

  • editing/deleting/insert-in-orphaned-selection-crash-expected.txt: Added.
  • editing/deleting/insert-in-orphaned-selection-crash.html: Added.
2:54 AM Changeset in webkit [272778] by youenn@apple.com
  • 18 edits in trunk

Make RemoteRealtimeVideoSource a RealtimeVideoCaptureSource
https://bugs.webkit.org/show_bug.cgi?id=221747

Reviewed by Eric Carlson.

Source/WebCore:

Introduce isVideoSource to be able to get presets data from RealtimeVideoSource.
Expose presets in RealtimeVideoSource for GPUProcess to send it to WebProcess.
Remove no longer used m_defaultSize member.
Update RealtimeVideoSource to set some of its members when its capture source is ready,
including settings, size, frame rate and name.
Covered by existing tests.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeVideoCaptureSource.cpp:

(WebCore::RealtimeVideoCaptureSource::prepareToProduceData):
(WebCore::RealtimeVideoCaptureSource::presetsData):

  • platform/mediastream/RealtimeVideoCaptureSource.h:
  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::whenReady):

  • platform/mediastream/RealtimeVideoSource.h:

Source/WebKit:

All capture video sources are now deriving from RealtimeVideoCaptureSource.
This allows to expose a RealtimeVideoSource that can handle changes of resolution and frame rate in software as needed.
This also allows to better align audio and video sources on iOS: there will only be one running source at any given time.
Covered by existing tests.

  • Scripts/webkit/messages.py:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::capabilities):
(WebKit::UserMediaCaptureManagerProxy::generatePresets):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
  • WebProcess/cocoa/RemoteRealtimeAudioSource.cpp:

(WebKit::RemoteRealtimeAudioSource::createRemoteMediaSource):
(WebKit::RemoteRealtimeAudioSource::setAsReady):

  • WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:

(WebKit::RemoteRealtimeVideoSource::create):
(WebKit::RemoteRealtimeVideoSource::RemoteRealtimeVideoSource):
(WebKit::RemoteRealtimeVideoSource::createRemoteMediaSource):
(WebKit::RemoteRealtimeVideoSource::setAsReady):
(WebKit::RemoteRealtimeVideoSource::remoteVideoSampleAvailable):
(WebKit::RemoteRealtimeVideoSource::setFrameRateWithPreset):
(WebKit::RemoteRealtimeVideoSource::prefersPreset):
(WebKit::RemoteRealtimeVideoSource::gpuProcessConnectionDidClose):

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

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

LayoutTests:

  • fast/mediastream/resources/getDisplayMedia-utils.js:

(async waitForHeight):
(async waitForWidth):
Updated to fail instead of timing out.

  • fast/mediastream/resources/getUserMedia-helper.js:

Removing no longer needed code that made it impossible to run the tests in browser.

1:38 AM Changeset in webkit [272777] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Nullopt crash in DOMSelection::getRangeAt
https://bugs.webkit.org/show_bug.cgi?id=221786

Reviewed by Darin Adler.

No new tests since we don't have any way to reproduce this crash.

  • page/DOMSelection.cpp:

(WebCore::DOMSelection::getRangeAt): Added a nullopt check with an assertion.

1:10 AM Changeset in webkit [272776] by Said Abou-Hallawa
  • 26 edits in trunk

Source/WebCore:
Make Pattern hold a NativeImage instead of an Image
https://bugs.webkit.org/show_bug.cgi?id=221637

Reviewed by Simon Fraser.

This will make caching the Pattern data in the GPUP straightforward since
all we need is to cache the NativeImage and encode the pattern data.

  • html/canvas/CanvasPattern.cpp:

(WebCore::CanvasPattern::create):
(WebCore::CanvasPattern::CanvasPattern):

  • html/canvas/CanvasPattern.h:
  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::createPattern):

  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::buildArrayForCanvasPattern):
Extract a NativeImage of an Image. The platform Patterns deal with
NativeImages only.

  • platform/graphics/Image.h:

Remove ImageHandle.

  • platform/graphics/Pattern.cpp:

(WebCore::Pattern::create):
(WebCore::Pattern::Pattern):
(WebCore::Pattern::setPatternSpaceTransform):

  • platform/graphics/Pattern.h:

(WebCore::Pattern::Parameters::encode const):
(WebCore::Pattern::Parameters::decode):
(WebCore::Pattern::encode const): Deleted.
(WebCore::Pattern::decode): Deleted.
Make the new struct 'Parameters' holds all the members other than the
NativeImage. This struct + RenderingResourceIdentifer of the NativeImage
will be recorded for the strokePattern and the fillPattern.

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::FillSource::FillSource):

  • platform/graphics/cairo/PatternCairo.cpp:

(WebCore::Pattern::createPlatformPattern const):

  • platform/graphics/cg/PatternCG.cpp:

(WebCore::Pattern::createPlatformPattern const):
The platform Pattern deals only with NativeImages.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::shouldDumpForFlags):
SetState::state() is renamed to SetStateItem::stateChange() since it
returns GraphicsContextStateChange.

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemHandle::apply):
SetState::apply() has to be a special case.

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::SetState::SetState):
(WebCore::DisplayList::SetState::apply):
(WebCore::DisplayList::operator<<):
(WebCore::DisplayList::SetState::apply const): Deleted.
Add a new constructor for SetState to be used by the decoder. All the
members of GraphicsContextStateChange will be copied but strokePattern
and fillPattern will be created only when their NativeImages are resolved
in the SetState::apply().

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::SetState::stateChange const):
(WebCore::DisplayList::SetState::strokePatternParameters const):
(WebCore::DisplayList::SetState::fillPatternParameters const):
(WebCore::DisplayList::SetState::strokePatternImageIdentifier const):
(WebCore::DisplayList::SetState::fillPatternImageIdentifier const):
(WebCore::DisplayList::SetState::encode const):
(WebCore::DisplayList::SetState::decode):
(WebCore::DisplayList::SetState::state const): Deleted.
Specialize the encode and the decoding of strokePattern and fillPattern
by using the Pattern::Parameters and the RenderingResourceIdentifer of
the NativeImage.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::cacheNativeImage):
(WebCore::DisplayList::Recorder::appendStateChangeItem):
(WebCore::DisplayList::Recorder::drawNativeImage):
(WebCore::DisplayList::Recorder::drawPattern):

  • platform/graphics/displaylists/DisplayListRecorder.h:

Cache the NativeImages of strokePattern and fillPattern.

  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::applySetStateItem):
(WebCore::DisplayList::Replayer::applyItem):
Resolve the NativeImages of strokePattern and fillPattern from the cached
NativeImages.

  • platform/graphics/filters/FETile.cpp:

(WebCore::FETile::platformApplySoftware):

  • rendering/RenderLayerBacking.cpp:

(WebCore::patternForDescription):

  • rendering/svg/RenderSVGResourcePattern.cpp:

(WebCore::RenderSVGResourcePattern::buildPattern):
Patterns should be created with NativeImages.

Source/WebKit:
Make Pattern hold a NativeImage instead of an Image
https://bugs.webkit.org/show_bug.cgi?id=221637

Reviewed by Simon Fraser.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ImageHandle>::encode): Deleted.
(IPC::ArgumentCoder<ImageHandle>::decode): Deleted.

  • Shared/WebCoreArgumentCoders.h:

Delete the encoding and decoding of Image since it is not used anymore

LayoutTests:
[GPU Process] Implement SetState DisplayList item
https://bugs.webkit.org/show_bug.cgi?id=219468

Reviewed by Simon Fraser.

  • gpu-process/TestExpectations:

Unmark tests that are no longer crash.

12:42 AM Changeset in webkit [272775] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.30.5

WPE WebKit 2.30.5

12:42 AM Changeset in webkit [272774] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.30

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

.:

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

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.30.5.
12:32 AM Changeset in webkit [272773] by Antti Koivisto
  • 7 edits in trunk/Source/WebKit

Increase network layout resource load priority for prioritized loads
https://bugs.webkit.org/show_bug.cgi?id=221751

Reviewed by Geoffrey Garen.

Currently visibility based prioritization only affects resource load scheduler.
We should increase the priority passed to the network layer and so the server too.

  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTask::setPriority):

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::reprioritizeRequest):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkLoadScheduler.cpp:

(WebKit::NetworkLoadScheduler::HostContext::shouldDelayLowPriority const):
(WebKit::NetworkLoadScheduler::HostContext::schedule):
(WebKit::NetworkLoadScheduler::HostContext::unschedule):
(WebKit::NetworkLoadScheduler::HostContext::prioritize):

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

(WebKit::NetworkDataTaskCocoa::setPriority):

Note: See TracTimeline for information about the timeline view.